/* Oatmeal public geometry. Operational shells keep their existing utilities. */
html.wired-tamaga-public .tamaga-container {
  box-sizing: border-box;
  width: 100%;
  max-width: 42rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

html.wired-tamaga-public .tamaga-gutters {
  padding-inline: 1.5rem;
}

@media (min-width: 48rem) {
  html.wired-tamaga-public .tamaga-container {
    max-width: 48rem;
  }
}

@media (min-width: 64rem) {
  html.wired-tamaga-public .tamaga-container {
    max-width: 80rem;
  }

  html.wired-tamaga-public .tamaga-container,
  html.wired-tamaga-public .tamaga-gutters {
    padding-inline: 2.5rem;
  }
}

/* Nested compositions use their parent's gutters rather than adding them twice. */
html.wired-tamaga-public .tamaga-container .tamaga-container {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
}

html.wired-tamaga-public .tamaga-container .tamaga-gutters {
  padding-inline: 0;
}

html.wired-tamaga-public .tamaga-page,
html.wired-tamaga-public .tamaga-document,
html.wired-tamaga-public .tamaga-section {
  padding-block: 4rem;
}

/* Composed pages delegate their rhythm to the rendered Paragraph sections. */
html.wired-tamaga-public .tamaga-page:has(> .node__sections section) {
  padding-block-start: 0;
}

html.wired-tamaga-public .tamaga-page:has(> .node__sections:last-child section),
html.wired-tamaga-public .tamaga-sectioned-page {
  padding-block-end: 0;
}

html.wired-tamaga-public .tamaga-sectioned-page {
  padding-block-start: 0;
}

/* A document owns its first 64px; its contained hero must not add another 64px. */
/* Explicit Oatmeal sections own their reference spacing instead. This affects
   only a deliberately selected new layout, never a retained legacy header. */
html.wired-tamaga-public .tamaga-document:has(> [data-oatmeal-hero]:first-child) {
  padding-block-start: 0;
}

html.wired-tamaga-public .tamaga-document > .paragraph--type--wp-header > .tamaga-hero {
  padding-block: 0;
}

/* A local nav separates a document's compact hero from its metadata. */
html.wired-tamaga-public .tamaga-document > .paragraph--type--wp-header:has(> .tamaga-hero) + nav[data-section-nav] {
  margin-block: 2.5rem;
}

html.wired-tamaga-public .tamaga-document > header > h1 {
  margin-block-start: 1.5rem;
}

html.wired-tamaga-public .tamaga-document-meta {
  margin-block-end: 2.5rem;
}

html.wired-tamaga-public .tamaga-document-sections {
  margin-block-start: 2.5rem;
}

html.wired-tamaga-public .tamaga-document-prose,
html.wired-tamaga-public .tamaga-page > .node__content.prose {
  max-width: 42rem;
}

html.wired-tamaga-public .tamaga-document-content {
  max-width: 64rem;
}

html.wired-tamaga-public .tamaga-document [data-tamaga-empty="true"] {
  display: none;
}

@media (min-width: 40rem) {
  html.wired-tamaga-public .tamaga-document > .paragraph--type--wp-header:has(> .tamaga-hero) + nav[data-section-nav] {
    margin-block: 4rem;
  }

  html.wired-tamaga-public .tamaga-document-meta {
    margin-block-end: 4rem;
  }

  html.wired-tamaga-public .tamaga-document-sections {
    margin-block-start: 4rem;
  }
}

html.wired-tamaga-public .tamaga-document:has(> .tamaga-document-sections:last-child > section:last-child) {
  padding-block-end: 0;
}

/* Feedback is compact chrome, with the same outer gutters as public content. */
html.wired-tamaga-public .tamaga-feedback {
  padding-block: 1rem;
}
