/* The single source of truth for page width. Load after page-specific CSS.
   site-container: centered content inside a full-width background.
   site-section: a full-width background with bounded content.
   Content may be narrower. These are limits, never stretching requirements. */
:root {
  --site-max-width: 1280px;
  --site-gutter: 32px;
  --site-content-inset: max(var(--site-gutter), calc((100% - var(--site-max-width)) / 2));
}
@media (max-width: 1150px) { :root { --site-gutter: 24px; } }
@media (max-width: 600px) { :root { --site-gutter: 16px; } }

/* The repeated class intentionally wins over legacy layout declarations. */
html body .site-container.site-container {
  box-sizing: border-box;
  max-width: min(var(--site-max-width), var(--content-max-width, var(--site-max-width)), calc(100% - var(--site-gutter) - var(--site-gutter))) !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
  min-width: 0;
}
html body .site-section.site-section {
  box-sizing: border-box;
  width: 100% !important;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: var(--site-content-inset) !important;
  min-width: 0;
}

/* Only the shared navigation/footer occupy the standard full container.
   Existing page widths and narrower inner compositions remain intact. */
html body :is(.site-header-inner, .shared-site-footer > .site-container) {
  width: min(var(--site-max-width), calc(100% - var(--site-gutter) - var(--site-gutter))) !important;
}
/* The skills composition keeps its original compact width from
   skills-journey.css, centered within the shared outer container. */
