/* Phone-only layout fixes for the original design (2026-11-16).
   Nothing here applies above 700px wide, so desktop is unchanged.
   Each rule stops something from pushing the page wider than the screen. */
@media (max-width: 700px) {
  html, body { overflow-x: clip; }

  /* inner pages: the nav has no menu button, so its links drop to a second row and wrap */
  .nav-inner:not(:has(.mobile-menu-btn)) { flex-wrap: wrap; height: auto !important; padding: 10px 0 !important; row-gap: 6px; }
  .nav-inner:not(:has(.mobile-menu-btn)) .nav-links { width: 100%; max-width: 100%; flex-wrap: wrap; gap: 6px 18px !important; }
  .nav-inner:not(:has(.mobile-menu-btn)) .nav-links a { white-space: nowrap; }

  /* footer links wrap onto more lines */
  .footer-links { flex-wrap: wrap !important; gap: 8px 18px !important; }

  /* wide tables scroll inside their own box */
  .ref-table-wrapper, .table-shell, .comp-table-wrap, .hl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.comp-table, table.dose-table, table.hl-table, table.schedule-table, .content-block > table, .section > table {
    display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  }

  .ref-table-wrapper { width: 100%; max-width: 100%; }
  .section:has(> .ref-table-wrapper) { min-width: 0; max-width: 100vw; }

  /* price board: one column */
  .board-grid, .market-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .board-main, .board-main > *, .market-copy { min-width: 0 !important; max-width: 100%; }
}
