/* ==========================================================================
 * responsive-guard.css — site-wide safety net so NO page can be pushed wider than the student's screen.
 * Loaded LAST on every page. It only ever removes ways to overflow; it never changes a layout that already fits.
 *
 * Why it exists: flex/grid children refuse to shrink below their content ("min-width:auto"). One long question,
 * title or unbroken string then widens the whole page; on tablets the page slid off to the left and hid the sidebar.
 * The site also builds lots of markup in JavaScript with inline styles ("style=\"flex:1\""), so the guard targets those too.
 * ========================================================================== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }          /* iOS landscape must not inflate fonts and widen rows */

/* the page frame can always shrink */
.vx-app, .vx-main, .vx-content { min-width: 0; }
.vx-content { max-width: 100%; }

/* flex children created with inline styles in JS: allow them to shrink instead of stretching the row */
[style*="flex:1"], [style*="flex: 1"], [style*="flex:1 "], [style*="flex-grow:1"], [style*="flex-grow: 1"] { min-width: 0; }

/* media and form controls never exceed their container */
img, video, canvas, iframe, embed, object, svg { max-width: 100%; }
input, select, textarea { max-width: 100%; }
table { max-width: 100%; }
pre { max-width: 100%; overflow-x: auto; }

/* long unbroken strings (emails, URLs, long names) wrap inside text areas instead of widening them */
.vx-content p, .vx-content li, .vx-content td, .vx-content h1, .vx-content h2, .vx-content h3, .vx-content h4 { overflow-wrap: break-word; }
