/* ═══════════════════════════════════════════════════════════════
   LEARNIX — BASE FIXES
   Site-wide guards that prevent accidental horizontal scrolling.

   `overflow-x: clip` is preferred because, unlike `overflow-x: hidden`,
   it does NOT create a scroll container and therefore does not break
   `position: sticky` headers, sidebars, or tables of contents. The
   `hidden` declaration is a fallback for older browsers that don't yet
   understand `clip`. Loaded last so it wins the cascade.
   ═══════════════════════════════════════════════════════════════ */

html {
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}

/* Common culprits: media and wide blocks should never exceed the viewport.
   Code blocks and tables keep their own internal scroll (overflow-x: auto)
   so long lines scroll inside the box rather than pushing the page wide. */
img,
svg,
video,
canvas,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

pre,
table {
  max-width: 100%;
}
