/* Case study pages: same tokens, type and components as the landing page */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.case-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 64px;
  padding-top: 48px;
  padding-bottom: 96px;
  align-items: start;
}
.case-rail {
  position: sticky;
  top: 104px;
  font-size: 0.9rem;
}
.case-rail-toggle {
  display: none;
}
.case-back {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 28px;
}
.case-back:hover {
  color: var(--ink);
}
.case-rail-label,
.case-eyebrow,
.case-facts dt,
.case-skim strong,
.case-doc-type {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 12px;
}
.case-section-link,
.case-switcher a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  min-height: 40px;
  box-sizing: border-box;
}
.case-switcher a {
  justify-content: space-between;
}
.case-section-link span {
  font-size: 0.75rem;
  color: #5c5f53;
}
.case-section-link:hover,
.case-switcher a:hover {
  color: var(--ink);
  background: var(--soft);
}
.case-section-link[aria-current],
.case-switcher a[aria-current] {
  background: var(--lilac);
  color: var(--ink);
}
.case-switcher {
  margin-top: 32px;
}
.case-body {
  min-width: 0;
}
.case-hero {
  padding-bottom: 16px;
}
.case-body h1 {
  font-family: Recoleta, Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.3rem, 4.4vw, 3.7rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
  max-width: 820px;
}
.case-deck {
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 660px;
  margin: 0 0 36px;
}
.case-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 40px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case-facts dd {
  margin: 0;
  font-size: 0.95rem;
}
.case-facts dt {
  margin-bottom: 6px;
}
.case-skim {
  background: var(--lilac);
  border-radius: 20px;
  padding: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 32px;
}
.case-skim h2 {
  grid-column: 1/-1;
  font-family: Gordita, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 12px;
}
.case-skim p {
  margin: 0;
  font-size: 0.95rem;
  color: #3d3f38;
}
.case-skim strong {
  display: block;
  margin-bottom: 8px;
}
.case-hero-actions {
  margin-top: 28px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.case-section {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: clamp(40px, 5vw, 72px);
  border-top: 1px solid var(--line);
}
.case-section h2 {
  font-family: Recoleta, Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.9rem, 3.2vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 760px;
  margin: 0 0 20px;
}
.case-section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
}
.case-section h3.font-recoleta {
  font-family: Recoleta, Georgia, serif;
  font-weight: 400;
  font-size: 1.6rem;
  margin: 48px 0 8px;
}
.case-body p,
.case-body li {
  max-width: 68ch;
  line-height: 1.65;
}
.case-lead,
.strategy-lead {
  font-size: 1.15rem;
  color: var(--muted);
}
.case-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 40px;
  margin: 32px 0;
}
.case-points > div > p {
  color: var(--muted);
  margin: 0;
}
.case-callout,
.strategy-tradeoff {
  background: var(--lilac);
  border-radius: 20px;
  padding: 28px 32px;
  margin: 28px 0;
}
.case-callout strong {
  display: block;
  margin-bottom: 6px;
}
.case-callout p {
  margin: 0;
}
.case-list,
.strategy-list {
  padding-left: 1.2em;
  margin: 16px 0;
}
.case-list li,
.strategy-list li {
  margin-bottom: 8px;
}
.case-note,
.strategy-status {
  font-size: 0.92rem;
  color: var(--muted);
}
.strategy-evolution {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.strategy-evolution > * {
  background: var(--soft);
  border-radius: 16px;
  padding: 24px;
}
.strategy-two-up.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin: 32px 0;
}
.col-md-6 {
  min-width: 0;
}
.case-disclosure {
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 16px;
}
.case-disclosure summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
/* mockups: tabs + dark frames */
.case-gallery {
  margin: 32px 0;
}
.case-gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.case-gallery-tabs button {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  cursor: pointer;
}
.case-gallery-tabs button:hover {
  background: var(--lilac);
}
.case-gallery-tabs button[aria-selected="true"] {
  background: var(--dark);
  color: #fff;
}
.case-screen {
  margin: 0;
}
.case-screen > a,
.case-journey > a,
.case-journey > img {
  display: block;
  position: relative;
  background: #363636;
  border-radius: 20px;
  padding: 32px;
  box-sizing: border-box;
  overflow: hidden;
  text-align: center;
}
.case-screen img,
.case-journey img {
  max-width: 100%;
  max-height: 680px;
  width: auto;
  height: auto;
  margin: 0 auto;
  display: inline-block;
  border-radius: 6px;
}
.strategy-enlarge,
.case-enlarge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
}
.case-screen figcaption,
.case-journey figcaption {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 12px;
  max-width: 68ch;
}
/* documents + next */
.case-documents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.case-document {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.case-document p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.case-document-action,
.strategy-text-link {
  font-weight: 600;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  min-height: 24px;
}
.theme-btn-two {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--dark);
  color: #fff;
  text-decoration: none;
}
.case-next {
  margin-top: clamp(56px, 7vw, 96px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
@media (max-width: 960px) {
  .case-shell {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-top: 24px;
  }
  .case-rail {
    position: static;
  }
  .case-rail-toggle {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    align-items: center;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    cursor: pointer;
  }
  .case-rail-content {
    display: none;
    padding-top: 16px;
  }
  .case-rail.is-open .case-rail-content {
    display: block;
  }
  .case-facts,
  .case-skim,
  .strategy-evolution,
  .strategy-two-up.row {
    grid-template-columns: 1fr;
  }
  .case-screen > a {
    padding: 16px;
  }
}
[hidden] {
  display: none !important;
}

/* product evolution cards */
ol.strategy-evolution {
  list-style: none;
  padding: 0;
}
.strategy-evolution li span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55584f;
  margin-bottom: 8px;
}
.strategy-evolution li strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.strategy-evolution li p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
/* next-case navigation */
.case-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.case-next a {
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
}
.case-next a span {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #55584f;
}
.case-next a strong {
  font-family: Recoleta, Georgia, serif;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}
.case-next a:hover strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* wide screens fill the frame width (tall screens crop; use Enlarge for the full image); phone and journey images stay contained */
.case-gallery:not(.case-gallery-phone) .case-screen > a {
  max-height: 640px;
  padding: 28px 28px 0;
}
.case-gallery:not(.case-gallery-phone) .case-screen img {
  width: 100%;
  max-height: none;
  display: block;
}
.case-gallery:not(.case-gallery-phone) .case-screen > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(54, 54, 54, 0), #363636);
  pointer-events: none;
}
.case-gallery .strategy-enlarge {
  z-index: 2;
}
.strategy-evolution + .case-points {
  margin-top: 40px;
}
/* phones: one column everywhere (placed last so it wins over the 2-column defaults) */
@media (max-width: 640px) {
  .case-body .case-points,
  .case-body .case-points:has(> :nth-child(3):last-child),
  .case-body .case-points:has(> :nth-child(6):last-child),
  .case-body .case-documents,
  .case-body .case-documents:has(> :nth-child(3):last-child),
  .case-body ol.case-journey,
  .case-body ol.case-journey:has(> :nth-child(5):last-child),
  .case-body ol.case-journey:has(> :nth-child(6):last-child),
  .case-body .strategy-two-up.row,
  .case-body .case-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .case-body .case-points > *,
  .case-body .case-documents > * {
    grid-column: auto !important;
  }
  .case-body h1 {
    font-size: clamp(1.9rem, 8.5vw, 2.4rem);
  }
  .case-screen > a,
  .case-gallery:not(.case-gallery-phone) .case-screen > a {
    padding: 14px 14px 0;
  }
}

/* A trailing lone item spans the row instead of sitting alone */
.case-points.is-odd-last > div:last-child {
  grid-column: 1 / -1;
}

/* Campaign health agent case (30 Oct 2026): stats, steps, timeline, table, image placeholders */
.case-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0 0;
}
.case-stats > div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.case-stats dt {
  font-family: Recoleta, Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.case-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.case-steps {
  list-style: none;
  padding: 0;
  margin: 28px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.case-steps li {
  background: var(--soft);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.92rem;
  display: flex;
  gap: 8px;
  align-items: center;
}
.case-steps li span {
  font-size: 0.75rem;
  color: #55584f;
}
.case-timeline {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
} /* 31 Oct 2026: 2 columns, was 4 */
.case-timeline li {
  background: var(--soft);
  border-radius: 16px;
  padding: 20px;
}
.case-timeline li span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #55584f;
  margin-bottom: 8px;
}
.case-timeline li strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 6px;
}
.case-timeline li p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.case-table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}
.case-table-wrap:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}
.case-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 640px;
}
.case-table th,
.case-table td {
  text-align: left;
  vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  line-height: 1.55;
}
.case-table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}
.case-table tbody th {
  font-weight: 600;
  width: 22%;
}
.case-table td:last-child {
  color: var(--muted);
}
.case-placeholders {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.case-placeholder {
  background: #e4e4de;
  border: 2px dashed #9a9b92;
  border-radius: 20px;
  min-height: 220px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  color: #3d3f38;
}
.case-placeholder.is-wide {
  grid-column: 1/-1;
  min-height: 300px;
}
.case-placeholder strong {
  font-size: 1rem;
}
.case-placeholder span {
  font-size: 0.88rem;
  line-height: 1.5;
}
@media (max-width: 960px) {
  .case-stats,
  .case-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  .case-body .case-stats,
  .case-body .case-timeline,
  .case-body .case-placeholders {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* Reporting: 4-step evolution and "what came next" link (30 Oct 2026) */
@media (min-width: 961px) {
  .strategy-evolution.is-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
} /* 31 Oct 2026: 2 columns, was 4 */
.strategy-evolution li strong a {
  color: inherit;
  text-underline-offset: 4px;
}
.case-next-step .strategy-text-link {
  display: inline-block;
  margin-top: 12px;
}

/* 31 Oct 2026 · health agent: tabbed screens of different sizes. Each one sits whole in the same frame, so the tabs do not jump. */
.case-gallery.case-gallery-fit .case-screen > a {
  height: clamp(300px, 50vw, 640px);
  max-height: none;
  padding: 24px 24px 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-gallery.case-gallery-fit .case-screen > a::after {
  content: none;
}
.case-gallery.case-gallery-fit .case-screen img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.case-gallery.case-single .case-screen > a {
  height: auto;
}
@media (max-width: 640px) {
  .case-gallery.case-gallery-fit .case-screen > a {
    padding: 14px 14px 56px;
  }
}

/* 2 Nov 2026 · health agent AI rules: the rule first, then its example in a light box */
.case-rules>div{display:flex;flex-direction:column}
.case-rules .case-rule-example{margin-top:12px;padding:12px 16px;background:var(--soft);border-radius:12px;font-size:.92rem;line-height:1.55}
.case-rules .case-rule-example strong{color:var(--ink);font-weight:600}
