.case-page {
  container-type: inline-size;
  max-width: 1440px;
  margin-inline: auto;
  background: #f5f2ec;
  color: #24231f;
  overflow: clip;
  font-weight: 400;
}
.case-page *, .case-page *::before, .case-page *::after { box-sizing: border-box; }
.case-page :is(h1, h2, h3, p, figure, figcaption) { margin: 0; font-weight: inherit; }
.case-page a { color: inherit; text-decoration: none; }
.case-page a:focus-visible { outline: 2px solid #5429ff; outline-offset: 5px; }
.case-page a:hover .case-related-title, .case-header-links:hover, .case-footer-description:hover { text-decoration: underline; text-underline-offset: .2em; }
.case-main { display: flex; flex-direction: column; }
.case-node {
  display: flex;
  flex-direction: column;
  flex: none;
  width: var(--w);
  height: var(--h);
  min-width: 0;
  padding: var(--pt) var(--pr) var(--pb) var(--pl);
  gap: var(--gap);
  justify-content: var(--justify);
  align-items: var(--align);
}
.case-row { flex-direction: row; }
.case-text {
  display: block;
  /* Measure tolerance (2px at 1440) for sub-pixel rounding vs Figma; the negative margin keeps every box where Figma puts it. */
  width: calc(var(--w) + 0.1389cqw);
  margin-right: -0.1389cqw;
  font-size: var(--font-size);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
}
.case-asset { display: block; position: relative; overflow: hidden; }
.case-asset > img { display: block; width: 100%; height: 100%; object-fit: var(--object-fit); }
.case-cropped-asset > img { position: absolute; }
.case-arrow { display: grid; place-items: center; }
.case-arrow > img { display: block; flex: none; width: 13px; height: 13px; }
.case-skip-link { position: fixed; top: -100px; left: 20px; padding: 12px 20px; z-index: 10; background: #24231f; color: white; }
.case-skip-link:focus { top: 16px; }
.case-mobile-only { display: none !important; }

@media (max-width: 767px) {
  .case-node { width: 100%; height: auto; padding: 0; gap: 0; align-items: stretch; }
  .case-row { flex-direction: column; }
  .case-text { margin-right: 0; font-size: var(--mobile-size); line-height: var(--mobile-line); letter-spacing: var(--mobile-letter); overflow-wrap: break-word; }
  .case-header { padding: 0 20px; }
  .case-header-row { flex-direction: row; min-height: 71px; align-items: center; justify-content: space-between; }
  .case-wordmark, .case-header-links, .case-footer-description { width: auto; }
  .case-header-links { min-height: 44px; justify-content: center; }
  .case-rule { min-height: 1px; height: 1px; }
  .case-mobile-only { display: flex !important; }
  .case-opening { padding: 48px 20px 40px; gap: 24px; }
  .case-introduction { padding: 28px 20px 40px; gap: 24px; }
  .case-asset { aspect-ratio: var(--image-ratio); }
  .case-top-media.case-inset-media { padding-inline: 20px; }
  .case-caption { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 16px; padding-top: 10px; padding-bottom: 16px; }
  .case-caption-inset { padding-inline: 20px; }
  .case-image-description { width: auto; flex: 1; }
  .case-sequence { width: auto; flex: none; }
  .case-caption .case-text { white-space: normal; }
  .case-sequence .case-text { white-space: nowrap; }
  .case-interlude { padding: var(--m-pt) 20px var(--m-pb); gap: var(--m-gap); }
  .case-gallery { padding: 20px; }
  .case-complete-gallery { padding: 0 20px; }
  .case-media-pair { gap: 40px; }
  .case-media-offset { gap: 32px; }
  .case-idea { padding: 48px 20px; gap: 24px; }
  .case-inset-note { padding: var(--m-pt) 0 var(--m-pb); gap: var(--m-gap); }
  .case-related { padding: 40px 20px 48px; gap: 32px; }
  .case-related-heading { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
  .case-related-heading > :first-child { width: auto; flex: 1; }
  .case-related-heading > :last-child { width: auto; }
  .case-related-heading > :last-child .case-text { white-space: nowrap; }
  .case-related-pair { gap: 40px; }
  .case-related-card { gap: 12px; }
  .case-related-title-row { flex-direction: row; align-items: center; gap: 12px; }
  .case-related-title { flex: 1; }
  .case-arrow { width: 24px; height: 24px; flex: none; }
  .case-footer { flex-direction: row; min-height: 120px; padding: 36px 20px; align-items: center; justify-content: space-between; gap: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .case-page { scroll-behavior: auto; }
}
