/* SISO Machine Shop: phone fit pass, 2026-11-24.
   Fit and framing only. No figures, prices, wording or data change here.
   Desktop rules below are width neutral: they only stop content from
   forcing the page wider than its frame. Every size change is scoped
   to the phone media query at the bottom, so desktop rendering is
   unchanged. */

/* phone-fit: box sizing and frame guard (all widths, visually neutral) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { max-width: 100%; }
img, svg, canvas, video { max-width: 100%; height: auto; }
table { max-width: 100%; }
pre { max-width: 100%; overflow-x: auto; }

/* phone-fit: phone layout */
@media (max-width: 700px) {
  html, body { overflow-x: hidden; }
  body {
    margin: 0.9rem;
    font-size: 16px;
    line-height: 1.45;
  }
  h1 { font-size: 1.25rem; overflow-wrap: break-word; }
  h2 { font-size: 1.05rem; overflow-wrap: break-word; }
  p, li, .note { max-width: 100%; overflow-wrap: break-word; }
  /* Each table becomes its own scrolling frame inside the page frame:
     it fits the phone where it can, and scrolls sideways on its own
     where its columns cannot compress without losing readability.
     The page itself never scrolls sideways. */
  table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  td, th {
    font-size: 0.92rem;
    padding: 0.35rem 0.45rem;
  }
  button {
    max-width: 100%;
    font-size: 1rem;
    padding: 0.55rem 0.9rem;
    margin-bottom: 0.4rem;
  }
  #out { min-width: 0; max-width: 100%; }
}
