/* Insights listing (/insights, body.page-insights) and case-study pages
   (/insights/<slug>, body.page-insights.page-case).
   Page-scoped additions only; everything else comes from styles.css. */

/* Listing: section head sits closer to the filter bar */
.page-insights .insights-head { margin-bottom: clamp(40px, 5vw, 56px); }
.page-insights .filter-empty a { color: var(--link-color); }

/* Case study body: each block starts with its own h2, so no extra top margin */
.page-case .article-layout__body .prose > h2:first-child,
.page-case .article-layout__body > section > h2:first-child { margin-top: 0; }
.page-case .article-layout__body > section > h2 { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); }
.page-case .article-layout__body .prose h3 { font-size: var(--fs-h4); margin-top: 1.5em; }
.page-case .article-layout__body .prose strong { color: var(--heading-color); font-weight: 600; }

/* "Technology in the work": shared .chip-row (styles.css section 28) */
.page-case .article-layout__body > .chip-row { margin-top: 40px; }

/* Metrics: rows of three keep a steady rhythm when a study has 4-6 results.
   They use the full body column (not the 70ch prose measure) and a slightly
   smaller figure, so values with units ("48 hours", "70-85%") stay on one line. */
.page-case .article-layout__body > .metrics,
.page-case .article-layout__body section > .metrics { max-width: none; }
.page-case .metrics { row-gap: 40px; }
/* Four results: 2 + 2 rather than 3 + 1. */
@media (min-width: 600px) { .page-case .metrics:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-case .metric__value { font-size: clamp(2rem, 1.6rem + 1.1vw, 2.625rem); }
/* Word values ("Zero", "Near real time") instead of figures: smaller so they
   fit a third of the measure without breaking mid-phrase. */
.page-case .metrics--words .metric__value {
  font-size: clamp(1.625rem, 1.4rem + 0.6vw, 2rem);
  line-height: 1.15;
}

/* "Where this work fits": links to the offering and capability-center pages */
.page-case .case-links {
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.page-case .article-layout__body > section.case-links > h2.case-links__title {
  font-size: var(--fs-h4);
}
.page-case .case-links__list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

/* Related case studies: heading row above the three cards */
.page-case .related-head { width: 100%; max-width: none; align-items: end; }
.page-case .related-head .section-head__aside { justify-items: end; }
@media (max-width: 899.98px) {
  .page-case .related-head .section-head__aside { justify-items: start; }
}

/* Keep metrics, links and the stack row on the same measure as the prose */
.page-case .article-layout__body > * { max-width: 70ch; }
.page-case .article-layout__body > section[aria-labelledby="results"] { max-width: none; }
.page-case .article-layout__body > section[aria-labelledby="results"] > .prose { max-width: 70ch; }

/* Phones: results two across, so a six-figure study stays a short scroll */
@media (max-width: 599.98px) {
  .page-case .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .page-case .metric__value { font-size: 1.875rem; }
  .page-case .metrics--words .metric__value { font-size: 1.5rem; }
  .page-case .metric__label { font-size: 0.9375rem; }
}
