/* Atomster — responsive layer.
   Desktop (>820px) is left exactly as designed. Only the rules inside the
   media queries change anything, and box-sizing is scoped to mobile so the
   desktop layout stays pixel-identical. Inline styles are overridden with
   !important, targeting the exact inline-style substrings the pages use. */

/* Safe at every width: never allow a sideways scrollbar, keep media fluid.
   overflow-x: clip (not hidden) so it can't break the sticky header. */
html { overflow-x: clip; }
img, svg, video { max-width: 100%; }

@media (max-width: 820px) {
  *, *::before, *::after { box-sizing: border-box; }

  /* Every multi-column grid collapses to a single column */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }

  /* Tame oversized gaps once things are stacked */
  [style*="gap: 96px"] { gap: 32px !important; }
  [style*="gap: 64px"] { gap: 32px !important; }
  [style*="gap: 56px"] { gap: 28px !important; }
  [style*="gap: 32px"] { gap: 20px !important; }

  /* Shrink the big "… 48px" horizontal paddings to 24px on the sides */
  [style*="112px 48px"] { padding: 64px 24px !important; }
  [style*="104px 48px"] { padding: 56px 24px !important; }
  [style*="88px 48px"]  { padding: 48px 24px !important; }
  [style*="72px 48px"]  { padding: 44px 24px !important; }
  [style*="40px 48px"]  { padding: 28px 24px !important; }

  /* Headlines never overflow */
  h1 {
    font-size: 40px !important;
    letter-spacing: -0.5px !important;
    line-height: 1.1 !important;
    overflow-wrap: break-word;
  }

  /* Header: wrap tidily instead of overflowing off-screen */
  [style*="position: sticky"] {
    height: auto !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    row-gap: 10px !important;
    column-gap: 18px !important;
    padding: 12px 16px !important;
  }
  [style*="position: sticky"] a[href="/"] svg {
    width: 40px !important;
    height: 40px !important;
  }
}

@media (max-width: 520px) {
  h1 { font-size: 31px !important; }
}
