fn depth(doc: &Document, block: BlockId) -> usize
How many blocks a block sits inside. The fold refuses parent cycles (FoldError::BlockCycle), so walking up always reaches the root.
FoldError::BlockCycle