/*
 * Webal Blocks: the "Wide" page width of the Cassiopeia - Webal child theme and of any other child of Cassiopeia (task PW, widened in task P4;
 * design docs/specs/2026-10-30-page-width-child-theme-design.md).
 * Loaded as the Web Asset "wbl.page-width", and only by the site plugin (plg_system_wblsite), and only when the active template style is
 * cassiopeia_webal or a child of Cassiopeia, its Layout is Static (Fluid off) and its "Page width" is Wide. On every other page this file is not requested at all.
 *
 * Cassiopeia's static page is a grid: one flexible track on each side and four main tracks of 19.875rem with a 1em gap, which adds up to
 * 1,320px. Four tracks of 22.125rem with the same gap add up to 1,464px. The grid areas are NOT touched, so the sidebars, banner and
 * module positions keep the places Cassiopeia gives them; only the width of the four main tracks changes. The header, menu and footer
 * rows are not in that grid (each keeps its own .grid-child), so they get the same maximum width and their edges line up with the page.
 *
 * Each width is a MAXIMUM. Below it the page narrows exactly as Cassiopeia does (the tracks are minmax(0, ...)). No breakpoint is added.
 *
 * Two more rules keep the Webal parts on the same 1,464px column (they are the only places Webal Blocks assumes the stock 1,320px):
 *   - --wbl-fw-in is the hook base.css documents for "a theme whose column is different": the inset of a full width module that keeps its
 *     content inside the page column;
 *   - the Webal navbar prints its main row, and its top bar row when one is shown, in Bootstrap's .container-xxl (1,320px), so its brand,
 *     menu and top bar would sit 72px inside the column.
 */

body.wrapper-static .site-grid {
  grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(4, minmax(0, 22.125rem)) [main-end] minmax(0, 1fr) [full-end];
}

body.wrapper-static .grid-child {
  max-width: 1464px;
}

body.wrapper-static {
  --wbl-fw-in: max(1em, (100% - 1464px) / 2);
  /* Webal Layouts reads this when the Component's sidebar width is set (its twelve tracks then add up to this page width too). Harmless without it. */
  --wbll-track: 22.125rem;
}

body.wrapper-static .wbl-navbar__main.container-xxl,
body.wrapper-static .wbl-navbar__topbar.container-xxl {
  max-width: 1464px;
}
