/*
 * CalcVex: small fixes shared by every page, for phones.
 * - Nothing may be wider than the screen (no sideways scrolling).
 * - Text boxes use at least 16px text on phones, so tapping them never zooms the page.
 * Pinch-zoom stays allowed (see the viewport tag in each page).
 * Loaded after assets/tailwind.css and each page's own styles. Desktop is not affected.
 */
@media (max-width: 767px) {
  /* Layout columns may shrink to the screen instead of growing past it */
  .grid > *, main, article, section { min-width: 0; }

  /* Long words, links, results and formulas wrap instead of pushing the page wider */
  p, li, dd, dt, h1, h2, h3, h4, label, a, td, th, figcaption, blockquote { overflow-wrap: break-word; }
  code, kbd, samp { white-space: normal !important; overflow-wrap: anywhere; }
  img, video, canvas, iframe { max-width: 100%; }

  /* Tables in the help text: tighter cells so they fit the screen */
  .prose-dark th, .prose-dark td { padding-left: .45rem; padding-right: .45rem; }
  .prose-dark th { letter-spacing: .06em; }
  .table-scroll { max-width: 100%; overflow-x: auto; }

  /* Text boxes: 16px or larger, so phones do not zoom in when you tap them */
  .field.text-sm, .field.text-xs, .field-sel, .unit-select, .lang-select, .fee-in, #toolSearch,
  input.text-sm, input.text-xs, select.text-sm, select.text-xs, textarea.text-sm, textarea.text-xs { font-size: 16px !important; }

  /* Last safety net: the page itself never scrolls sideways */
  html, body { overflow-x: clip; }
}
