One stack, and nesting becomes possible
The previous lesson showed that a finite automaton fails whenever the input demands an unbounded count. The narrowest possible repair is to attach a stack: the machine may push a symbol, pop a symbol, or leave the stack alone on each move, and it may read only the top.
That is a pushdown automaton, and it is exactly enough for balanced brackets. Push on every opening bracket, pop on every closing one, accept if the stack is empty at the end. The depth is now held in the stack rather than in the state set, so nothing is capped in advance.
The languages recognised this way are the context-free languages, the same class the context-free grammars generate. The lesson Formal Grammars and the Chomsky Hierarchy approaches this ladder from the grammar side and asks where human language sits on it.

