/* The docs pages (scripts/docs-site/build.mjs), on the playground's paper and tokens in style.css:
   a nav beside the text on a desk, above it on a phone. Prose in the serif, code in the mono. */
.skip { position: absolute; left: 8px; top: -100px; z-index: 2; padding: 6px 10px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); }
.skip:focus { top: 8px; }
.slug a { color: inherit; }
/* WCAG 2.2 target size (2.5.8), as the playground's own links have it. */
.slug a { display: inline-block; min-height: 24px; line-height: 24px; }
.docs { flex: 1; display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 0 48px; padding-block: 18px 0; }
.docs nav ul { position: sticky; top: 18px; margin: 0; padding: 0; list-style: none; font: 13px/1.6 var(--mono); }
.docs nav a { display: block; min-height: 24px; padding: 3px 0 3px 10px; color: var(--faint); text-decoration: none; }
.docs nav a:hover { color: var(--ink); }
/* The page in view gets the selected stage's ink bar, on its left edge here. */
.docs nav [aria-current="page"], .docs nav .here { color: var(--ink); box-shadow: inset 2px 0 var(--ink); }

.prose { min-width: 0; line-height: 1.55; }
.prose > :not(.scroll, pre) { max-width: 68ch; }
.prose h1 { margin: 0 0 14px; font-size: 1.875rem; font-weight: 400; line-height: 1.25; }
.prose h2 { margin: 34px 0 10px; padding-top: 12px; border-top: 1px solid var(--rule); font-size: 1.375rem; font-weight: 600; line-height: 1.3; }
.prose h3 { margin: 26px 0 8px; font-size: 1.125rem; font-weight: 600; }
.prose h4 { margin: 20px 0 6px; font-size: 1rem; font-style: italic; font-weight: 400; }
.prose h1, .prose h2, .prose h3 { text-wrap: balance; }
.prose p, .prose li { text-wrap: pretty; }
.prose h2, .prose h3, .prose h4 { scroll-margin-top: 12px; }
.prose code { padding: 0 .2em; background: var(--tint); overflow-wrap: anywhere; }
.prose pre { width: fit-content; min-width: min(46rem, 100%); max-width: 100%; margin: 12px 0; padding: 10px 12px; overflow-x: auto; font-size: 13.5px; line-height: 1.55; background: var(--tint); scrollbar-color: var(--rule-strong) transparent; }
.prose pre code { padding: 0; background: none; font-size: inherit; overflow-wrap: normal; }
.prose blockquote { margin: 12px 0; padding-left: 14px; border-left: 2px solid var(--rule-strong); color: var(--faint); font-style: italic; }
.prose hr { border: 0; border-top: 1px dashed var(--rule-strong); }
/* File paths and rule ids in a table cell stay on one line, in the mono at the CLI-string size. */
.prose td > a:only-child, .prose td > code { font: 12.5px/1.6 var(--mono); }
.prose td > code { padding: 0; background: none; }
.prose li + li { margin-top: 2px; }
.prose details { margin: 12px 0; }
.prose summary { cursor: pointer; }
.contents li { margin-top: 8px; }

/* A wide table scrolls inside its box, so the page never does. */
.scroll { max-width: 100%; margin: 12px 0; overflow-x: auto; scrollbar-color: var(--rule-strong) transparent; }
.prose table { border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: 4px 12px 4px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.prose th { border-bottom-color: var(--rule-strong); font-weight: 600; white-space: nowrap; }
.prose td code, .prose th code { white-space: nowrap; overflow-wrap: normal; }
.prose th[align="center"], .prose td[align="center"] { text-align: center; }
.prose th[align="right"], .prose td[align="right"] { text-align: right; }

/* The page's own headings, nested under its nav item. */
.docs nav ul ul { position: static; margin: 0 0 6px; font-size: 12.5px; }
.docs nav ul ul a { padding-left: 22px; }

@media (min-width: 861px) {
  .prose td > a:only-child, .prose td > code { white-space: nowrap; }
}
@media (max-width: 860px) {
  .docs nav ul ul { display: none; }
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs nav { margin-bottom: 18px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
  .docs nav ul { position: static; display: flex; flex-wrap: wrap; gap: 0 18px; }
  .docs nav a { padding: 3px 0; }
  .docs nav [aria-current="page"], .docs nav .here { box-shadow: inset 0 -2px var(--ink); }
}
@media (forced-colors: active) {
  .prose pre { border: 1px solid CanvasText; }
  .docs nav [aria-current="page"], .docs nav .here { text-decoration: underline; }
}
