/*
 * Mobile layout QA: one border-box width governs both article shell and content.
 * This prevents a narrow shell from clipping an otherwise viewport-wide article grid.
 */
@media (max-width: 640px) {
  .badpd-archive-shell,
  .badpd-single-article {
    box-sizing: border-box !important;
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
    max-width: calc(100vw - 1.5rem) !important;
    overflow-x: clip !important;
    padding: 1rem 0.75rem !important;
    width: calc(100vw - 1.5rem) !important;
  }

  .badpd-single-article .badpd-single-layout,
  .badpd-single-article .badpd-single-content,
  .badpd-single-article .badpd-single-aside {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .badpd-single-article .badpd-single-content > * {
    box-sizing: border-box;
    max-width: 100%;
  }

  /* Keep consent controls available, but stop the panel from reading as a full-screen wall. */
  .cmplz-cookiebanner.cmplz-bottom-right {
    border-radius: 1rem !important;
    bottom: 0.75rem !important;
    box-sizing: border-box !important;
    gap: 0.5rem !important;
    left: 0.75rem !important;
    max-height: min(42svh, 22rem) !important;
    overflow-y: auto !important;
    padding: 0.85rem 1rem !important;
    right: 0.75rem !important;
    width: auto !important;
  }

  .cmplz-cookiebanner .cmplz-divider {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .cmplz-cookiebanner .cmplz-body {
    max-height: min(18svh, 9rem);
  }
}
