Click to add nodes. Click two nodes to add an edge. Run Kahn's algorithm step by step. Cycle detection highlights the invalid edge.