  We consider minimizers of the one-phase Bernoulli free boundary problem in
domains with analytic fixed boundary. In any dimension $d$, we prove that the
branching set at the boundary has Hausdorff dimension at most $d-2$. As a
consequence, we also obtain an analogous estimate on the branching set for
solutions to the two-phase problem under an analytic separation condition.
Moreover, as a byproduct of our analysis we obtain strong boundary unique
continuation results for quasilinear operators and thin-obstacle variational
inequalities. The approach we use is based on the (almost-)monotonicity of a
boundary Almgren-type frequency function, obtained via regularity estimates and
a Calder\'on-Zygmund decomposition in the spirit of Almgren-De Lellis-Spadaro.
