/* Release and patch notes pages (issue #2703): web-base's notes layout
   (mg-notes-*, and its search layout on the index pages) in the theme's
   own colours and fonts. */

.notes-page,
.mg-notes-head,
.mg-notes-footer {
  --mg-notes-text: var(--pst-color-text-base);
  --mg-notes-muted: var(--pst-color-text-muted);
  --mg-notes-heading: var(--pst-color-heading);
  --mg-notes-accent: var(--pst-color-link);
  --mg-notes-font: var(--pst-font-family-base);
  --mg-notes-heading-font: var(--pst-font-family-heading);
  --mg-notes-mono: var(--pst-font-family-monospace);
}

/* The index pages have no sidebar, so, like search.html, they are centred
   at web-base's width. */
.notes-page { --mg-search-layout-max: 1120px; }

.notes-page .mg-search-layout {
  --mg-search-layout-pad: 1rem 0 2.5rem;
  --mg-search-layout-pad-narrow: 1rem 0 0;
}

/* web-static's hero padding takes in its page's own top padding, which the
   handbook's article already has. */
.notes-page .mg-notes-hero { padding: 1rem 0 1.5rem; }
.notes-page .mg-notes-hero h1 { margin: 0; }

/* Paging from the bottom pager scrolls back to the results head; clear the
   sticky site header, as on search.html. */
.notes-page .mg-search-results-head {
  scroll-margin-top: calc(var(--pst-header-height, 60px) + 33px + 1rem);
}

/* A release's own page has no sidebars, so it takes web-static's widths:
   the head across 1200px, the notes and the back link under them centred
   in 820px. */
.bd-article-container:has(.mg-notes-head) {
  max-width: 1200px;
  margin-inline: auto;
}
.bd-article:has(.mg-notes-head) > section > :not(.mg-notes-head),
.bd-article:has(.mg-notes-head) > .mg-notes-footer {
  max-width: 820px;
  margin-inline: auto;
}

/* The head sits at the top of the article, above the notes, which start
   with their first area. */
.mg-notes-head { padding-top: 0; }
.mg-notes-head h1 { margin: 0.25rem 0 0.6rem; }
/* The theme's paragraph rule would otherwise take the lead across the head. */
.mg-notes-head .mg-notes-lead { max-width: 600px; }
.mg-notes-head + * { margin-top: 2rem; }

/* The handbook's link colour on web-base's 10% tint of it is 4.45:1 on the
   page background, short of AA; a lighter tint clears it. */
.mg-notes-tag { background: color-mix(in srgb, var(--mg-notes-accent) 7%, transparent); }
