If WandaVision was a sci-fi sitcom and The Falcon and The Winter Soldier was a buddy action story, Loki is a hardboiled detective story.