Preparation of polyelectrolyte complexes. Stock solutions of the polyelectrolytes were prepared by dissolving each polyallylamine, PAH, and polyacrylic acid, PAA, in Milli-Q water at a final concentration of 0.2 to 2 g L -1 . PAA and PAH (2 g L -1 , 21 mM based on Mw of monomer units of both polymers) were dissolved separately in Milli-Q water consisting of 30 mM NaCl. HCl (10 mM) and KOH (10 mM) were prepared in Milli-Q water consisting of 30 mM NaCl and used to adjust pH in flow experiments. Sodium chloride (NaCl, 30 mM) was added to stabilize the complexes without which the output signal became more noisy (Supplementary Information, S4).