/* Shared phone-layout safety rules. Loaded after each page's inline <style>, so these win. */
@media (max-width: 760px) {
  /* one-column grids: let the text column shrink instead of stretching to its widest child */
  .layout > *, .article-layout > *, .page-layout > *, .content-grid > * { min-width: 0; }
  /* wide tables scroll inside themselves instead of pushing the page sideways */
  table:not(.table-wrap table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  img, video, iframe { max-width: 100%; height: auto; }
  .article a, .article-body a, .faq-a a { overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  nav .nav-back { display: none; }
  nav .nav-right { min-width: 0; }
  nav .nav-btn { white-space: normal; text-align: center; line-height: 1.15; max-width: 46vw; }
}
@media (max-width: 600px) {
  /* header template with .brand + .links: one swipeable row of links instead of a tall stack */
  nav > .links { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 1rem; width: 100%; scrollbar-width: none; }
  nav > .links::-webkit-scrollbar { display: none; }
  nav > .links a { white-space: nowrap; flex-shrink: 0; }
}
