/* Keep preview controls readable when enlarged text reduces available space. */
@container case-preview-slider (max-width: 420px) {
  body[data-page-detail="case-study"] .project-preview-tab {
    flex: 1 1 auto;
    padding-inline: 4px;
  }

  body[data-page-detail="case-study"] .project-preview-tab-icon {
    display: none;
  }

  /* Intrinsic tab widths can change with text zoom without resizing the bar. */
  body[data-page-detail="case-study"] .project-preview-tabs::before {
    display: none;
  }

  body[data-page-detail="case-study"] .project-preview-tab[aria-selected="true"] {
    background: color-mix(in srgb, var(--case-accent) 56%, #102f3a);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
  }

  body[data-page-detail="case-study"] .project-preview-carousel-footer {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  body[data-page-detail="case-study"] .project-preview-footer-copy {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    padding: 8px 12px;
    border-radius: 18px;
  }

  body[data-page-detail="case-study"] .project-preview-arrow--previous {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  body[data-page-detail="case-study"] .project-preview-arrow--next {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
}
