Scan chain design involves balancing chain length, minimizing physical routing distance between consecutively connected flip-flops, and respecting clock-domain and power-domain boundaries, all while meeting a target total test time and pattern count. A poorly balanced design — for instance, one chain far longer than the others — forces every chain to shift for as long as the slowest one, wasting test time on the shorter chains that finish early; poor physical ordering can also create excessive wire length and routing congestion in the scan-enable and scan-data nets, which can itself become a timing closure problem distinct from the functional logic the scan chain was inserted to test.