If $\tan(x_1) \cdots\tan(x_n)=1$ for acute $x_i$, then does it follow that $\cos(x_1)+\cdots+\cos(x_n) \leq n\sqrt{2}/2$?

For three variables we ca use C-S:

Let $\tan{x}=\sqrt{\frac{b}{a}},$ $\tan{y}=\sqrt{\frac{c}{b}},$ where $a$, $b$ and $c$ are positives.

Thus, $\tan{z}=\sqrt{\frac{a}{c}}$ and by C-S we obtain: $$\sum_{cyc}\cos{x}=\sum_{cyc}\frac{1}{\sqrt{1+\tan^2x}}=\sum_{cyc}\sqrt{\frac{a}{a+b}}\leq$$ $$\leq\sqrt{\sum_{cyc}\frac{a}{(a+b)(a+c)}\sum_{cyc}(a+c)}\leq\frac{3}{\sqrt2},$$ where the last inequality it's just $$\sum_{cyc}c(a-b)^2\geq0.$$

The generalization is wrong for all $n\geq4$.

Try $x_1=x_2=...=x_{n-1}\rightarrow0^+$ and $x_n\rightarrow\frac{\pi}{2}^-$