detective work
US /dɪˈtek.tɪv wɜːrk/
UK /dɪˈtek.tɪv wɜːrk/

1.
the work of a detective; investigation, especially to solve a crime or mystery
:
•
It took a lot of detective work to figure out who stole the cookies.
•
Her job involves a lot of detective work, piecing together clues from various sources.