/* Law-firm pages intentionally use the full browser width. */
body.firm-page .page-shell {
  width: 100%;
  max-width: none;
  margin: 12px auto;
  padding: 0 18px 24px;
}
body.firm-page .card { width: 100%; }
body.firm-page table { min-width: 0; }
body.firm-page th,
body.firm-page td { overflow-wrap: anywhere; }
body.firm-page td:last-child { max-width: 520px; }
body.firm-page .grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

@media (min-width: 1100px) {
  body.firm-page { font-size: 14px; }
  body.firm-page th,
  body.firm-page td { padding: 8px 7px; }
}

@media (max-width: 900px) {
  body.firm-page .page-shell { padding: 0 8px 18px; }
  body.firm-page .card > div[style*="overflow-x:auto"] {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }
}
/* Mobile dashboard tables:
   preserve readable columns and allow intentional horizontal scrolling */
@media (max-width: 700px) {
  body.firm-page .card > div[style*="overflow-x:auto"] {
    overflow-x: auto !important;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  body.firm-page .card > div[style*="overflow-x:auto"] table {
    min-width: 980px;
    table-layout: auto;
  }

  body.firm-page .card > div[style*="overflow-x:auto"] th,
  body.firm-page .card > div[style*="overflow-x:auto"] td {
    white-space: normal;
    word-break: normal;
    overflow-wrap: normal;
    min-width: 82px;
  }

  body.firm-page .card > div[style*="overflow-x:auto"] th:first-child,
  body.firm-page .card > div[style*="overflow-x:auto"] td:first-child {
    min-width: 130px;
  }

  body.firm-page .card > div[style*="overflow-x:auto"] th:nth-child(2),
  body.firm-page .card > div[style*="overflow-x:auto"] td:nth-child(2) {
    min-width: 105px;
  }

  body.firm-page .card > div[style*="overflow-x:auto"] th:nth-child(3),
  body.firm-page .card > div[style*="overflow-x:auto"] td:nth-child(3) {
    min-width: 155px;
  }
}
