/* Mobile landing interaction stability. The authenticated app uses its own
   mobile-input-zoom.css touch guard; this standalone public document did not.
   Allow ordinary vertical scrolling and intentional pinch-to-zoom, while
   preventing double-tap viewport zoom and sideways document drift. */
@media (hover: none) and (pointer: coarse) {
  html, body {
    touch-action: manipulation;
    overscroll-behavior-x: none;
    max-width: 100%;
    overflow-x: clip;
  }
  :is(a, button, summary, label, input, select, textarea,
      [role="button"], [role="tab"], [role="link"]) {
    touch-action: manipulation;
  }
}
/* No horizontal page scroll for phones. Cards that previously required
   swiping sideways now form a compact 2x2 group with complete labels.
   Real chart range selectors and product tab strips may still scroll within
   their own bounded containers; desktop and tablet layouts are unchanged. */
@media (max-width: 540px) {
  html, body {
    max-width: 100%;
    overflow-x: clip;
    overscroll-behavior-x: none;
  }
  #main {
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
  }
  #main .forward-thread.shell {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: min(calc(100% - 30px), 1280px) !important;
    max-width: 100% !important;
    overflow-x: clip !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    padding: 0 !important;
  }
  #main .forward-thread.shell > a {
    flex: initial !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 100px !important;
    scroll-snap-align: none !important;
    padding: 12px 13px !important;
    white-space: normal !important;
    overflow-wrap: break-word;
  }
  #main .forward-thread.shell > a :is(strong, span, small) {
    min-width: 0;
    max-width: 100%;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}
