Claim: Any path from the root to a node crosses at most light edges. Proof: When you go down a light edge from to , you enter a subtree with size[u] <= size[v] / 2 because was not the heaviest child. Each light edge halves the subtree size.
Since subtree size starts at and ends at , you cross at most light edges. Each light edge moves you to a new chain. So you visit at most chains on any root-to-node path.
Space complexity is for the data structures used.