/* The site's header bar and footer line, shared by the playground and the docs pages, which load
   this file and carry the markup of header.html and footer.html (a test compares them). The tokens
   (--ink, --faint, --rule-strong, --mono) come from the page's own stylesheet. */
.bar { display: flex; align-items: center; gap: 20px; height: 3.5rem; padding-inline: clamp(16px, 4vw, 48px); border-bottom: 1px dashed var(--rule-strong); font: 13px/1.6 var(--mono); color: var(--faint); }
.bar a { display: inline-flex; align-items: center; min-height: 44px; color: inherit; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.bar a:hover { color: var(--ink); text-decoration-color: currentColor; }
.bar .brand { color: var(--ink); font-weight: 700; }
.bar-end { display: flex; align-items: center; gap: 12px; margin-inline-start: auto; }
/* The theme toggle shows the theme in use: a sun on light paper, a moon on dark. */
.theme { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-inline-end: -12px; padding: 0; color: var(--faint); background: none; border: 0; cursor: pointer; }
.theme:hover { color: var(--ink); }
.theme svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.theme[data-theme="dark"] .i-sun, .theme:not([data-theme="dark"]) .i-moon { display: none; }

/* A line of parts set off by middle dots, in small mono. Every part gets a dot, and the list is
   shifted left by one dot and clipped there, so the dot before whichever part starts a wrapped
   line is hidden. */
.slug-part { display: flex; flex-wrap: wrap; margin: 0 0 0 -2.4ch; clip-path: inset(-8px -8px -8px calc(2.4ch - 4px)); font: 13px/1.6 var(--mono); color: var(--faint); }
.meta:has(> *) { margin-inline-start: -2.4ch; clip-path: inset(-8px -8px -8px calc(2.4ch - 4px)); }
.slug-part > :not([hidden])::before, .meta > *::before { content: "·"; content: "·" / ""; display: inline-block; width: 2.4ch; text-align: center; color: var(--dim); }
/* A part that wraps starts its next line at the left edge, not inside the clipped strip. */
.slug-part > * { padding-inline-start: 2.4ch; text-indent: -2.4ch; }
.slug-part > *::before, .slug-part > * > * { text-indent: 0; } /* inline-block links and buttons would inherit the hanging indent */

.colophon { margin-top: 28px; padding-block: 10px 20px; border-top: 1px solid var(--rule); }
/* WCAG 2.2 target size (2.5.8): the footer links are at least 24px high. */
.colophon a { display: inline-block; min-height: 24px; line-height: 24px; color: inherit; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: .22em; text-decoration-thickness: 1px; }
.colophon a:hover { color: var(--ink); text-decoration-color: currentColor; }
