/* Mobile directory containment, after the shared Studio theme. Desktop is unchanged. */
@media screen and (max-width: 820px) {
  :is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme).people-directory-page[data-studio-page] .wrap {
    box-sizing: border-box;
    width: calc(100% - 16px) !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 8px 0 16px !important;
  }
  .people-directory-page .wrap > *,
  .people-directory-page :is(.hero-copy,.header-brand,.header-actions,#authActions,.directory-overview,.table-wrap,.directory-toolbar,.search-box,.directory-search-control,.table-scroll,.tbl,.tbl tbody,.directory-employee-copy) {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100%;
  }
  :is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme).people-directory-page[data-studio-page] .directory-hero {
    grid-template-columns: minmax(0, 1fr) auto !important;
    padding: 12px !important;
    gap: 8px !important;
  }
  :is(body,#dashcontrol-studio-theme#dashcontrol-studio-theme).people-directory-page[data-studio-page] .directory-hero h1 {
    font-size: clamp(17px, 4.8vw, 22px) !important;
    overflow-wrap: anywhere;
  }
  .people-directory-page .directory-hero :is(.header-actions,#authActions) { margin: 0 !important; }
  .people-directory-page .people-tools-menu > summary { min-height: 44px; padding: 0 11px; }
  .people-directory-page .people-tools-panel { width: 220px; max-width: calc(100vw - 40px); box-sizing: border-box; }
  .people-directory-page .people-tools-panel > :is(button,a) { min-height: 44px; }
  .people-directory-page .people-local-nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    gap: 4px !important;
    scrollbar-width: thin;
  }
  .people-directory-page .people-local-nav > * { flex: 0 0 auto; min-height: 44px; box-sizing: border-box; }
  .people-directory-page .directory-overview #directoryStatsGrid {
    width: 100%;
    min-width: 0 !important;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
  }
  .people-directory-page .directory-overview #directoryStatsGrid .stat-card {
    flex: 0 0 auto;
    min-width: 110px !important;
    min-height: 44px !important;
    padding: 8px 12px !important;
  }
  .people-directory-page .directory-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    width: auto !important;
    margin: 0 8px 8px !important;
    padding: 8px !important;
  }
  .people-directory-page #searchInput { width: 100% !important; min-width: 0 !important; min-height: 44px !important; font-size: 16px !important; }
  .people-directory-page .directory-export-menu > summary { min-height: 44px; }
  .people-directory-page .table-head.directory-head { gap: 8px !important; padding: 10px 12px !important; }
  .people-directory-page .directory-head > div { min-width: 0; }
  .people-directory-page .directory-head h2 { font-size: 16px !important; }
  .people-directory-page .directory-result-block { flex: 0 1 45%; max-width: 45%; padding: 0 !important; }
  .people-directory-page #resultsMeta { white-space: normal !important; overflow-wrap: anywhere; font-size: 10px !important; }
  .people-directory-page .tbl { width: 100% !important; }
  .people-directory-page .tbl tbody tr { box-sizing: border-box; min-width: 0 !important; max-width: 100%; }
  .people-directory-page .directory-employee-identity { min-width: 0 !important; }
  .people-directory-page .emp-link { white-space: normal !important; overflow-wrap: anywhere; }
}
