/* The column of the work layout, beside c-sidebar: the main text (c-page__main) and, from --bp-toc up, "On this page" (c-toc) in
   a second column. Inside c-page__main every child is --measure wide and centred; c-markdown and c-plain-text set their own widths.
   <div class="c-page"><main class="c-page__main" id="main"><header class="c-page__header">c-breadcrumb, c-page__meta</header>
   …</main><aside class="c-toc" id="toc">…</aside></div> */

.c-page {
  display: grid;
  grid-template-columns: minmax(0, var(--measure-wide)) var(--toc-width);
  gap: var(--space-7);
  justify-content: center;
  margin-left: var(--sidebar-width);
  padding: var(--space-6) var(--space-6) 8rem;
}

.c-page__main { min-width: 0; font-size: var(--size-text); line-height: var(--leading); }
.c-page__main > * { max-width: var(--measure); margin-inline: auto; }
.c-page__main > :is(.c-markdown, .c-plain-text) { max-width: none; }

/* The header over the text: the path as an italic breadcrumb at the left, the modification date at the right, on a faint rule. */
.c-page__header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--space-5); margin-bottom: calc(var(--line) * 1.5); padding-bottom: var(--space-2); border-bottom: var(--stroke-hair) solid var(--color-rule-faint); color: var(--color-ink-muted); font-size: 0.72em; line-height: 1.4; }
.c-page__meta { font-style: italic; }

/* The title of a page that is not a markdown file (a listing, the search results, an error), and the italic line under it. */
.c-page__title { margin-bottom: var(--line); font-size: 1.7em; font-weight: 400; line-height: 1.2; text-align: center; text-wrap: balance; overflow-wrap: anywhere; }
.c-page__summary { margin-bottom: calc(var(--line) * 1.5); color: var(--color-ink-muted); font-style: italic; text-align: center; text-wrap: balance; }

@media (max-width: 88rem) {
  .c-page { grid-template-columns: minmax(0, var(--measure-wide)); }
}

@media (max-width: 56rem) {
  .c-page { margin-left: 0; padding: var(--space-5) var(--space-4) 5rem; }
}

@media print {
  .c-page { display: block; margin: 0; padding: 0; }
}
