/* Cortex phone layer. Loaded by every page (tools/inject-phone.mjs). Small, safe fixes for iPhone and Android;
   a page's own CSS wins on anything it sets itself. */
@media (max-width: 760px) {
  /* no sideways page scroll. clip, not hidden, so sticky headers keep working */
  html { overflow-x: clip; }
  body { -webkit-text-size-adjust: 100%; }
  /* wide tables and code scroll inside their box instead of being cut off at the screen edge */
  table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  pre { max-width: 100%; overflow-x: auto; }
  iframe { max-width: 100%; }
  /* iOS zooms the whole page into a field smaller than 16px; keep fields at 16px so the layout never jumps */
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { font-size: max(16px, 1em); }
}
@media (hover: none) {
  /* a comfortable thumb target on every button and chip without changing their design */
  button, .btn, .chip { min-height: 36px; }
  /* no stuck hover states after a tap */
  a, button { -webkit-tap-highlight-color: rgba(227, 181, 60, .18); }
}
