/*
 * Robuste central edge/layout contract.
 * Structural only: no content links, no page-specific colors injected.
 */
body.rr-design-system-page {
  overflow-x: clip;
}

body.rr-design-system-page .entry-content.is-layout-constrained > main {
  width: 100%;
  max-width: none !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* First and last top-level content sections are full viewport width. */
body.rr-design-system-page .entry-content.is-layout-constrained > main > section:first-of-type,
body.rr-design-system-page .entry-content.is-layout-constrained > main > section:last-of-type {
  position: relative;
  left: 50%;
  width: 100vw;
  max-width: none !important;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  box-sizing: border-box;
}

/* Shell spacing contract: edge blocks touch the shell; shell itself owns the thin separator. */
body.rr-design-system-page .entry-content.is-layout-constrained > main > section:first-of-type {
  margin-top: 0 !important;
}

body.rr-design-system-page .entry-content.is-layout-constrained > main > section:last-of-type {
  margin-bottom: 0 !important;
}

/* Central typography defaults; family CSS may override until migrated to tokens. */
body.rr-design-system-page .entry-content.is-layout-constrained > main {
  font-family: var(--rr-font-body);
  color: var(--rr-color-text);
  font-size: var(--rr-fs-body);
  line-height: var(--rr-line-body);
}

body.rr-design-system-page .entry-content.is-layout-constrained > main h1 {
  font-family: var(--rr-font-display);
  line-height: var(--rr-line-heading);
}

body.rr-design-system-page .entry-content.is-layout-constrained > main h2,
body.rr-design-system-page .entry-content.is-layout-constrained > main h3,
body.rr-design-system-page .entry-content.is-layout-constrained > main h4 {
  line-height: 1.2;
}

/* Keep public geometry clean; logged-in edit controls are not part of the content system. */
body.rr-design-system-page .entry-content.is-layout-constrained {
  margin-bottom: 0 !important;
}
