/* vxedge brand over mdBook: the site's tokens, type and top bar. Light by default, graphite (coal)
   on request or when the site's toggle says dark (see head.hbs). No gradients, shadows or animation. */
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("/fonts/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --mono-font: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --content-max-width: 88rem;
  --vx-bar: 56px;
  --vx-display: "Barlow Semi Condensed", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
}
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", sans-serif; scroll-padding-top: 7rem; }
body { font-size: 1.6rem; line-height: 1.65; }

/* ── colour tokens ─────────────────────────────────────────────────────── */
.light, .rust, .navy, .ayu {
  --bg: #FFFFFF; --fg: #1E2023; --sidebar-bg: #F5F5F3; --sidebar-fg: #5A5E66; --sidebar-non-existant: #8A8F97;
  --sidebar-active: #0E7C6B; --sidebar-spacer: #E3E3DF; --scrollbar: #C9C9C4;
  --icons: #5A5E66; --icons-hover: #1E2023; --links: #0E7C6B; --inline-code-color: #1E2023;
  --theme-popup-bg: #FFFFFF; --theme-popup-border: #E3E3DF; --theme-hover: #F5F5F3;
  --quote-bg: #F5F5F3; --quote-border: #E3E3DF; --warning-border: #8A5A08;
  --table-border-color: #E3E3DF; --table-header-bg: #F5F5F3; --table-alternate-bg: #FAFAF9;
  --searchbar-border-color: #C9C9C4; --searchbar-bg: #FFFFFF; --searchbar-fg: #1E2023;
  --searchresults-header-fg: #5A5E66; --searchresults-border-color: #E3E3DF; --searchresults-li-bg: #F5F5F3;
  --search-mark-bg: #F3E3C0;
  --vx-rule: #E3E3DF; --vx-ink-mid: #5A5E66; --vx-tint: #F5F5F3; --vx-code-bg: #F5F5F3;
}
.coal {
  --bg: #141517; --fg: #ECEEF0; --sidebar-bg: #18191C; --sidebar-fg: #A0A4AC; --sidebar-non-existant: #6E727A;
  --sidebar-active: #5FD3BC; --sidebar-spacer: #2E3137; --scrollbar: #42464E;
  --icons: #A0A4AC; --icons-hover: #ECEEF0; --links: #5FD3BC; --inline-code-color: #ECEEF0;
  --theme-popup-bg: #1B1C20; --theme-popup-border: #2E3137; --theme-hover: #222428;
  --quote-bg: #1B1C20; --quote-border: #2E3137; --warning-border: #DDA84A;
  --table-border-color: #2E3137; --table-header-bg: #1B1C20; --table-alternate-bg: #17181B;
  --searchbar-border-color: #42464E; --searchbar-bg: #1B1C20; --searchbar-fg: #ECEEF0;
  --searchresults-header-fg: #A0A4AC; --searchresults-border-color: #2E3137; --searchresults-li-bg: #1B1C20;
  --search-mark-bg: #4A3C1A;
  --vx-rule: #2E3137; --vx-ink-mid: #A0A4AC; --vx-tint: #18191C; --vx-code-bg: #1B1C20;
}
html, body { background: var(--bg); }

/* ── the site's top bar ────────────────────────────────────────────────── */
body { padding-top: var(--vx-bar); }
.vx-bar { position: fixed; top: 0; left: 0; right: 0; height: var(--vx-bar); z-index: 200; display: flex; align-items: center; gap: 1.4rem; padding: 0 1.6rem; background: var(--bg); border-bottom: 1px solid var(--vx-rule); font-size: 1.4rem; }
.vx-brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--fg); text-decoration: none; font: 700 2.2rem/1 var(--vx-display); letter-spacing: -.01em; }
.vx-brand:hover { color: var(--fg); text-decoration: none; }
.vx-sec { padding-left: 1.2rem; border-left: 1px solid var(--vx-rule); font: 1.1rem/1 var(--mono-font); letter-spacing: .1em; text-transform: uppercase; color: var(--vx-ink-mid); }
.vx-nav { display: flex; gap: .2rem; margin-left: auto; }
.vx-nav a, .vx-gh { color: var(--vx-ink-mid); text-decoration: none; padding: .7rem 1.1rem; border-radius: 4px; }
.vx-nav a:hover { color: var(--fg); background: var(--vx-tint); text-decoration: none; }
.vx-nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; text-decoration-color: var(--links); text-decoration-thickness: 2px; text-underline-offset: .6rem; }
.vx-gh { border: 1px solid var(--fg); color: var(--fg); font-weight: 600; padding: .6rem 1.2rem; }
.vx-gh:hover { background: var(--fg); color: var(--bg); text-decoration: none; }
.sidebar { top: var(--vx-bar); }
#menu-bar { top: var(--vx-bar); background: var(--bg); border-bottom-color: var(--vx-rule); }
#menu-bar-hover-placeholder { top: var(--vx-bar); }
.menu-title { font: 600 1.7rem/50px var(--vx-display); letter-spacing: 0; color: var(--vx-ink-mid); }
.nav-chapters { top: var(--vx-bar); }
@media (max-width: 62rem) { .vx-nav, .vx-sec { display: none; } .vx-gh { margin-left: auto; } }

/* ── sidebar ───────────────────────────────────────────────────────────── */
.sidebar { border-right: 1px solid var(--vx-rule); font-size: 1.45rem; }
.chapter li.chapter-item { line-height: 1.5; margin-top: .7rem; }
.chapter li a.active { font-weight: 600; }

/* ── content ───────────────────────────────────────────────────────────── */
.content main { padding-bottom: 4rem; }
h1, h2, h3 { font-family: var(--vx-display); font-weight: 700; letter-spacing: -.01em; line-height: 1.08; }
h1 { font-size: 4rem; margin: 1.2rem 0 1.4rem; }
h2 { font-size: 2.9rem; margin-top: 3.4rem; padding-bottom: .6rem; border-bottom: 1px solid var(--vx-rule); }
h3 { font-size: 2.2rem; margin-top: 2.6rem; font-weight: 600; }
h4 { font-size: 1.7rem; font-weight: 700; }
a { text-underline-offset: 3px; }
code { font-size: .88em; }
:not(pre) > code { background: var(--vx-code-bg); border: 1px solid var(--vx-rule); border-radius: 3px; padding: .1em .35em; }
h1 code, h2 code, h3 code, h4 code { font-size: .72em; vertical-align: .08em; }
.content main img { max-width: 100%; height: auto; }
pre { background: var(--vx-code-bg); border: 1px solid var(--vx-rule); border-radius: 6px; }
pre > .buttons { right: 1rem; }
pre code { font-size: 1.3rem; line-height: 1.6; }
table { width: 100%; font-size: 1.4rem; border-radius: 6px; }
table thead th { font: 1.15rem/1.2 var(--mono-font); letter-spacing: .06em; text-transform: uppercase; color: var(--vx-ink-mid); }
table td, table th { padding: .9rem 1.2rem; }
blockquote { border-inline-start: 3px solid var(--links); margin: 2rem 0; }
hr { border: 0; border-top: 1px solid var(--vx-rule); }
.nav-wide-wrapper .nav-chapters { color: var(--icons); }
:focus-visible { outline: 2px solid var(--links); outline-offset: 2px; }
/* traceability footer: which commit of vxedge/docs this page was built from */
.vx-trace { display: flex; flex-wrap: wrap; gap: .4rem 2rem; margin-top: 5rem; padding-top: 1.2rem; border-top: 1px solid var(--vx-rule); font: 1.15rem/1.5 var(--mono-font); color: var(--vx-ink-mid); }
.vx-trace a { color: var(--vx-ink-mid); }
.vx-trace code { background: none; border: 0; padding: 0; color: var(--fg); }
.vx-trace a { text-decoration: underline; }
/* accessibility helpers */
.vx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.vx-skip { position: absolute; left: -9999px; top: 0; z-index: 300; padding: .8rem 1.4rem; background: var(--fg); color: var(--bg); font-size: 1.4rem; }
.vx-skip:focus { left: 1rem; top: 1rem; }
.vx-scroll { overflow-x: auto; margin: 1.6rem 0; }
.vx-scroll table { margin: 0; width: 100%; max-width: none; }
.vx-scroll td { overflow-wrap: anywhere; }
.vx-scroll td:first-child { overflow-wrap: normal; }
/* per-page contents and citation */
.vx-toc { margin: 0 0 2.4rem; padding: 1.2rem 1.6rem; border: 1px solid var(--vx-rule); border-radius: 6px; background: var(--vx-code-bg); font-size: 1.4rem; }
.vx-toc strong { font: 1.15rem/1.2 var(--mono-font); letter-spacing: .06em; text-transform: uppercase; color: var(--vx-ink-mid); }
.vx-toc ol, .vx-toc ul { margin: .6rem 0 0; padding-left: 2rem; columns: 2 28rem; }
.vx-cite { margin-top: 3rem; padding: 1.2rem 1.6rem; border: 1px solid var(--vx-rule); border-radius: 6px; font-size: 1.3rem; }
.vx-cite summary { cursor: pointer; font-weight: 600; }
.vx-cite pre { overflow-x: auto; }
/* dark code contrast (>= 4.5:1 on the graphite ground) */
.coal .hljs-attr, .coal .hljs-attribute, .coal .hljs-variable, .coal .hljs-template-variable, .coal .hljs-name, .coal .hljs-tag, .coal .hljs-selector-tag { color: #8CC4FF; }
.coal .hljs-string, .coal .hljs-literal, .coal .hljs-number, .coal .hljs-built_in, .coal .hljs-type { color: #E8B26A; }
.coal .hljs-comment, .coal .hljs-quote, .coal .hljs-meta { color: #A0A4AC; }
.coal .hljs-keyword, .coal .hljs-title, .coal .hljs-section { color: #7FD6C4; }
/* print / PDF */
@media print {
  .vx-bar, #sidebar, #menu-bar, .nav-chapters, .nav-wide-wrapper, .vx-toc, .vx-skip, pre > .buttons { display: none !important; }
  body { padding-top: 0; background: #fff; color: #000; }
  .page-wrapper { margin: 0 !important; padding: 0 !important; left: 0 !important; }
  .content { max-width: none !important; }
  pre, pre code { white-space: pre-wrap; word-break: break-word; }
  table, figure, img, pre { break-inside: avoid; }
  .vx-scroll { overflow: visible; }
  h1, h2, h3 { break-after: avoid; }
  a[href^="http"]:not(.vx-trace a)::after { content: " (" attr(href) ")"; font-size: .8em; word-break: break-all; }
}
.content main p a, .content main li a, .content main td a { text-decoration: underline; }
