{# Responsive field grid for one form section or notebook page.
Expects: cells, cols (section column count), mode. #}
{% set grid_cols = cols or 2 %}
{% set grid_cols_md = grid_cols if grid_cols < 2 else 2 %}
{% for cell in cells %}
{% set cell_span = cell.colspan or (grid_cols if cell.wide else 1) %}