:root{--page-margin:20.0mm}
@font-face{ font-family:'Inter'; font-weight:400; font-display:swap; src:url('fonts/inter-400.woff2') format('woff2'); }
@font-face{ font-family:'Inter'; font-weight:500; font-display:swap; src:url('fonts/inter-500.woff2') format('woff2'); }
@font-face{ font-family:'Inter'; font-weight:600; font-display:swap; src:url('fonts/inter-600.woff2') format('woff2'); }
@font-face{ font-family:'Inter'; font-weight:700; font-display:swap; src:url('fonts/inter-700.woff2') format('woff2'); }
@font-face{ font-family:'Inter'; font-weight:800; font-display:swap; src:url('fonts/inter-800.woff2') format('woff2'); }
@font-face{ font-family:'Source Serif 4'; font-weight:400; font-style:normal; font-display:swap; src:url('fonts/serif-400.woff2') format('woff2'); }
@font-face{ font-family:'Source Serif 4'; font-weight:400; font-style:italic; font-display:swap; src:url('fonts/serif-400i.woff2') format('woff2'); }
@font-face{ font-family:'Source Serif 4'; font-weight:600; font-style:normal; font-display:swap; src:url('fonts/serif-600.woff2') format('woff2'); }
@font-face{ font-family:'Source Serif 4'; font-weight:700; font-style:normal; font-display:swap; src:url('fonts/serif-700.woff2') format('woff2'); }
@font-face{ font-family:'JetBrains Mono'; font-weight:400; font-display:swap; src:url('fonts/jbmono-400.woff2') format('woff2'); }
@font-face{ font-family:'JetBrains Mono'; font-weight:500; font-display:swap; src:url('fonts/jbmono-500.woff2') format('woff2'); }
:root{
  --accent:#2563eb; --accent-dark:#1e40af; --error:#b42318;
  --ink:#1a1a1a; --muted:#6b7280; --rule:#e5e7eb;
  --body-font:'Inter'; --heading-font:'Inter'; --mono-font:'JetBrains Mono';
  
  --paper:#ffffff; --wash:#f6f7f9}
*{ box-sizing:border-box}
html, body{ margin:0; padding:0}
body{
  font-family:var(--body-font), system-ui, sans-serif;
  font-size:10.5pt; line-height:1.55; color:var(--ink);
  -webkit-print-color-adjust:exact; print-color-adjust:exact;
  hyphens:auto}
h1, h2, h3, h4, h5, h6{ font-family:var(--heading-font), system-ui, sans-serif;
  color:var(--ink); font-weight:700; line-height:1.15; margin:0 0 3mm 0}
h1{ font-size:24pt; letter-spacing:-0.02em}
h2{ font-size:16pt; margin-top:6mm; letter-spacing:-0.01em}
h3{ font-size:12.5pt; margin-top:4mm}
h4{ font-size:11pt; margin-top:3mm}
p{ margin:0 0 3mm 0}
ul, ol{ margin:0 0 3mm 0; padding-left:6mm}
li{ margin-bottom:1mm}
blockquote{ margin:0 0 3mm 0; padding:0 0 0 5mm; border-left:2px solid var(--rule); color:var(--muted)}
hr{ border:0; border-top:1px solid var(--rule); margin:5mm 0}
a{ color:var(--accent-dark); text-decoration:none}
strong{ font-weight:700}
em{ font-style:italic}
img{ max-width:100%; height:auto}
sup, sub{ line-height:0}
figure{ margin:4mm 0; break-inside:avoid}
figure img{ width:100%; height:auto; display:block}
figure svg{ display:block; margin:0 auto; max-width:100%; height:auto}
figcaption{ font-size:8.5pt; color:var(--muted); margin-top:2mm; font-style:italic}
html{ counter-reset: figure audio}
figure[id^="fig-"]{ counter-increment: figure}
figure[id^="fig-"] > figcaption::before{
  content: var(--figure-label) " " counter(figure) ". ";
  font-style:normal; font-weight:600}
figure.audio audio{ width:100%}
.audio-print{ display:none}
@media print{audio{ display:none}
figure.audio{ border:0.3mm solid var(--rule); border-radius:1.5mm; padding:2.5mm 3mm}
figure.audio .audio-print{ display:block; font-family:var(--mono-font), monospace;
                              font-size:8pt; margin:0}
.audio-print::before{ content:"\25B6\00A0"}
figure.audio .audio-print [data-file]::after,
  figure.audio .audio-print[data-file]::after{ content:attr(data-file)}
span.audio-print{ display:inline}
span.audio-print [data-file]::after,
  span.audio-print[data-file]::after{ content:" (" attr(data-file) ")"}}
figure[id^="aud-"]{ counter-increment: audio}
figure[id^="aud-"] > figcaption::before{
  content: var(--audio-label) " " counter(audio) ". ";
  font-style:normal; font-weight:600}
.unit{ display:flow-root; margin:0 0 3.5mm 0}
.unit > *:last-child{ margin-bottom:0}
.codeblock{ position:relative}
.code-file{ display:block; font-family:var(--mono-font), monospace; font-size:7pt;
  color:var(--muted); margin:0 0 1mm 1mm}
.hl, pre.output{ background:var(--wash); border:1px solid var(--rule); border-radius:4px;
  padding:3mm 4mm; font-family:var(--mono-font), monospace; font-size:8.5pt; line-height:1.5; overflow:hidden}
.hl pre{ margin:0; background:none; border:0; padding:0; white-space:pre-wrap; word-break:break-word}
pre.output{ white-space:pre-wrap; word-break:break-word; color:var(--muted); border-left:2px solid var(--accent)}
pre.output.error{ border-left-color:var(--error)}
pre.output.error .stderr{ color:var(--error)}
code{ font-family:var(--mono-font), monospace; font-size:0.9em}
table{ border-collapse:collapse; width:100%; font-size:9pt}
thead th{ text-align:left; font-size:7.5pt; letter-spacing:0.12em; text-transform:uppercase;
  font-weight:700; color:var(--muted); border-bottom:1.5px solid var(--ink); padding:2.5mm 3mm}
tbody td{ padding:2.5mm 3mm; border-bottom:1px solid var(--rule); vertical-align:top}
tbody tr{ break-inside:avoid}
tbody td strong{ color:var(--ink)}
.math-display{ text-align:center; margin:4mm 0}
.math-display svg{ max-width:100%}
.math-err{ color:#be123c; font-family:var(--mono-font), monospace}
.two-col{ columns:2; column-gap:8mm}
.two-col > *{ break-inside:avoid-column}
.three-col{ columns:3; column-gap:6mm}
.three-col > *{ break-inside:avoid-column}
.keep{ display:flow-root}
.stamp{ position:absolute; bottom:calc(var(--page-margin, 20mm) * 0.5);
  left:var(--page-margin, 20mm); right:var(--page-margin, 20mm); display:flex;
  justify-content:space-between; font-family:var(--heading-font), sans-serif;
  font-size:8pt; color:var(--muted)}
.runhead{ position:absolute; top:calc(var(--page-margin, 20mm) * 0.5);
  left:var(--page-margin, 20mm); right:var(--page-margin, 20mm);
  font-family:var(--heading-font), sans-serif; font-size:8pt; letter-spacing:0.08em; color:var(--muted)}
h1, h2, h3, h4, h5, h6{ hyphens: none}
thead th{ hyphens: none; overflow-wrap: break-word}
tbody td strong{ hyphens: none; overflow-wrap: break-word}
.no-hyphen{ hyphens: none; white-space: nowrap}
code{ hyphens: none; overflow-wrap: break-word}
.footnote-ref{ font-size: 0.72em; line-height: 0; vertical-align: super}
.footnote-ref a{ color: var(--accent-dark); text-decoration: none; border-bottom: none}
.footnote-ref a:hover{ text-decoration: underline}
.cite-ref{ white-space: nowrap}
.cite-ref a{ color: var(--accent-dark); text-decoration: none; border-bottom: none}
.gloss-ref{ color: var(--accent-dark); text-decoration: none;
             border-bottom: 0.4pt dotted currentColor}
.footnotes, .references, .glossary{
  margin-top: 6mm; padding-top: 3mm; border-top: 0.3mm solid var(--rule)}
.footnotes.labelled, .references.labelled, .glossary.labelled{
  border-top: none; padding-top: 0}
.apparatus-title{ font-size: 12pt; margin: 0 0 2.5mm 0}
.footnotes ol, .references ol, .glossary p{ font-size: 9pt; line-height: 1.45; margin: 0}
.footnotes ol, .references ol{ padding-left: 6mm}
.footnotes li, .references li, .glossary p{ margin: 0 0 1.5mm 0}
.footnotes a, .references a, .glossary a{ color: var(--accent-dark); border-bottom: none}
.cite-back::after, .gloss-back::after{
                    font-variant-numeric: tabular-nums}
.timeline{ margin-top: 6mm; padding-top: 3mm; border-top: 0.3mm solid var(--rule)}
.timeline.labelled{ border-top: none; padding-top: 0}
.tl-group{ font-size: 10pt; font-variant: small-caps; letter-spacing: 0.04em;
            color: var(--accent-dark); margin: 4mm 0 1.5mm 0; border-bottom: 0.2mm solid var(--rule)}
.timeline p{ font-size: 9pt; line-height: 1.45; margin: 0 0 1.5mm 0; text-indent: 0}
.timeline a{ color: var(--accent-dark); border-bottom: none}
.tl-back::after{
                  font-variant-numeric: tabular-nums}
.footnote-inline{ float: footnote; font-size: 9pt}
.admonition{ --adm:#2563eb; --adm-bg:#eff6ff; margin:3mm 0; padding:2mm 3.5mm; border-left:2.5pt solid var(--adm);
  background:var(--adm-bg); border-radius:2pt; break-inside:avoid}
.admonition.tip{ --adm:#059669; --adm-bg:#ecfdf5}
.admonition.info{ --adm:#0891b2; --adm-bg:#ecfeff}
.admonition.warning{ --adm:#d97706; --adm-bg:#fffbeb}
.admonition.danger{ --adm:#dc2626; --adm-bg:#fef2f2}
.admonition.example{ --adm:#7c3aed; --adm-bg:#f5f3ff}
.admonition-title{ margin:0 0 1mm; font-family:var(--heading-font), sans-serif; font-weight:700; font-size:0.9em; color:var(--adm)}
.admonition-body > :first-child{ margin-top:0}
.admonition-body > :last-child{ margin-bottom:0}
.admonition.note .admonition-title:empty::before{ content:"Note"}
.admonition.tip .admonition-title:empty::before{ content:"Tip"}
.admonition.info .admonition-title:empty::before{ content:"Info"}
.admonition.warning .admonition-title:empty::before{ content:"Warning"}
.admonition.danger .admonition-title:empty::before{ content:"Danger"}
.admonition.example .admonition-title:empty::before{ content:"Example"}
:lang(es) .admonition.note .admonition-title:empty::before{ content:"Nota"}
:lang(es) .admonition.tip .admonition-title:empty::before{ content:"Consejo"}
:lang(es) .admonition.info .admonition-title:empty::before{ content:"Información"}
:lang(es) .admonition.warning .admonition-title:empty::before{ content:"Advertencia"}
:lang(es) .admonition.danger .admonition-title:empty::before{ content:"Peligro"}
:lang(es) .admonition.example .admonition-title:empty::before{ content:"Ejemplo"}
.tabs{ margin:3mm 0}
.tab-title{ margin:2mm 0 1mm; font-family:var(--heading-font), sans-serif; font-weight:700; font-size:0.85em; color:var(--muted)}
.tab-body > :first-child{ margin-top:0}
:root{ --brand:var(--accent)}
body{
  font-family: var(--body-font), Georgia, "DejaVu Serif", serif;
  font-size:11pt; line-height:1.55; color:var(--ink);
  counter-reset: chapter part}
p{ margin:0 0 0 0; text-indent:5mm; text-align:justify; hyphens:auto}
p:first-of-type, h1 + p, h2 + p, h3 + p{ text-indent:0}
.lead, blockquote p{ text-indent:0}
h1, h2, h3, h4{ font-family: var(--heading-font), system-ui, sans-serif; color:var(--ink)}
h1{
  counter-increment: chapter; counter-reset: section;
  font-size:28pt; font-weight:800; line-height:1.05; letter-spacing:-0.02em; margin:0 0 10mm 0}
h1::before{
  content: counter(chapter);
  display:block; font-family:var(--body-font), serif; font-size:64pt; font-weight:300;
  line-height:1; color:var(--accent); margin-bottom:2mm}
h1.unnumbered{ counter-increment: none}
h1.unnumbered::before{ content: none}
h1.part{ counter-increment: part; break-before: column}
h1.part::before{
  content: "Part " counter(part, upper-roman);
  display:block; font-family:var(--heading-font), system-ui, sans-serif;
  font-size:14pt; font-weight:600; letter-spacing:0.12em; text-transform:uppercase;
  line-height:1; color:var(--accent); margin-bottom:4mm}
h2{ counter-increment: section; font-size:15pt; font-weight:700; margin:7mm 0 3mm 0}
h3{ font-size:12.5pt; font-weight:700; margin:5mm 0 2mm 0}
a{ color:var(--brand); text-decoration:none}
.page.titlepage{ display:flex; flex-direction:column; justify-content:center; align-items:center; text-align:center}
.tp-title{ font-family:system-ui,sans-serif; font-size:38pt; font-weight:800; color:var(--brand); line-height:1.1; hyphens:none}
.tp-sub{ font-size:14pt; color:var(--muted); margin-top:6mm; max-width:130mm; hyphens:none}
.tp-author{ margin-top:16mm; font-size:12pt; color:var(--ink); letter-spacing:0.04em}
.tp-institution{ margin-top:3mm; font-size:10pt; color:var(--muted)}
.page.coverpage{ padding:0; overflow:hidden}
.cover-img{ width:100%; height:100%; object-fit:cover; display:block}
.page.copyrightpage{ display:flex; flex-direction:column}
.cp-spacer{ flex:1 1 auto}
.cp-block{ font-family:system-ui,sans-serif; font-size:8.5pt; color:var(--muted); line-height:1.7}
.cp-line{ margin:0 0 1mm 0}
.cp-line strong{ color:var(--ink)}
.cp-muted{ margin-top:4mm}
.stamp{
  position:absolute; bottom:10mm; left:20mm; right:20mm;
  display:flex; justify-content:space-between;
  font-family:system-ui,sans-serif; font-size:8pt; color:var(--muted)}
.runhead{
  position:absolute; top:11mm; left:20mm; right:20mm;
  font-family:system-ui,sans-serif; font-size:8pt; letter-spacing:0.1em;
  text-transform:uppercase; color:var(--muted);
  border-bottom:1px solid var(--rule); padding-bottom:1.5mm}
.runhead-recto{ text-align:right}
.runhead-verso{ text-align:left}
.toc-h{ font-family:system-ui,sans-serif; font-size:24pt; font-weight:800; color:var(--brand); margin:0 0 9mm 0}
.unit:has(.toc-entry){ margin-bottom:0}
.toc-entry{ display:flex; align-items:baseline; gap:2mm; text-decoration:none; color:var(--ink); line-height:1.3; margin:1mm 0}
.toc-pg::after{ font-variant-numeric:tabular-nums; color:var(--muted)}
.toc-txt{ flex:0 0 auto}
.toc-lead{ flex:1 1 auto; border-bottom:1px dotted var(--rule); transform:translateY(-1mm)}
.toc-l1{ font-weight:700; margin-top:3.5mm}
.toc-l2{ margin-left:9mm; font-size:10pt; color:var(--muted)}
.glossary{ border-top:none; padding-top:0; margin-top:0}
.glossary p{ text-indent:0}
.timeline{ border-top: none; padding-top: 0; margin-top: 0}
.codeblock{ position:relative}
.code-file{ display:block; font-family:ui-monospace, monospace; font-size:7pt; color:var(--muted); margin:0 0 1mm 1mm}
.hl, pre.output{ background:#f6f7f9; border:1px solid var(--rule); border-radius:4px;
  padding:3mm 4mm; font-family:ui-monospace, monospace; font-size:8.5pt; line-height:1.5}
.hl pre{ margin:0; background:none; border:0; padding:0; white-space:pre-wrap; word-break:break-word}
pre.output{ white-space:pre-wrap; color:var(--muted); border-left:3px solid var(--brand)}
.math-display{ text-align:center; margin:4mm 0}
.math-display svg{ max-width:100%}
:root{--audio-label:"Audio";--mono-font:'JetBrains Mono';--rule:#e5e7eb;--figure-label:"Figure";--body-font:'Source Serif 4';--accent-dark:#7c2d12;--ink:#1a1a1a;--accent:#9a3412;--muted:#6b7280;--heading-font:Inter}
pre{ line-height: 125%}
td.linenos .normal{ color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px}
span.linenos{ color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px}
td.linenos .special{ color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px}
span.linenos.special{ color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px}
.hl .hll{ background-color: #ffffcc }
.hl{ background: #f8f8f8}
.hl .c{ color: #3D7B7B; font-style: italic }
.hl .err{ border: 1px solid #F00 }
.hl .k{ color: #008000; font-weight: bold }
.hl .o{ color: #666 }
.hl .ch{ color: #3D7B7B; font-style: italic }
.hl .cm{ color: #3D7B7B; font-style: italic }
.hl .cp{ color: #9C6500 }
.hl .cpf{ color: #3D7B7B; font-style: italic }
.hl .c1{ color: #3D7B7B; font-style: italic }
.hl .cs{ color: #3D7B7B; font-style: italic }
.hl .gd{ color: #A00000 }
.hl .ge{ font-style: italic }
.hl .ges{ font-weight: bold; font-style: italic }
.hl .gr{ color: #E40000 }
.hl .gh{ color: #000080; font-weight: bold }
.hl .gi{ color: #008400 }
.hl .go{ color: #717171 }
.hl .gp{ color: #000080; font-weight: bold }
.hl .gs{ font-weight: bold }
.hl .gu{ color: #800080; font-weight: bold }
.hl .gt{ color: #04D }
.hl .kc{ color: #008000; font-weight: bold }
.hl .kd{ color: #008000; font-weight: bold }
.hl .kn{ color: #008000; font-weight: bold }
.hl .kp{ color: #008000 }
.hl .kr{ color: #008000; font-weight: bold }
.hl .kt{ color: #B00040 }
.hl .m{ color: #666 }
.hl .s{ color: #BA2121 }
.hl .na{ color: #687822 }
.hl .nb{ color: #008000 }
.hl .nc{ color: #00F; font-weight: bold }
.hl .no{ color: #800 }
.hl .nd{ color: #A2F }
.hl .ni{ color: #717171; font-weight: bold }
.hl .ne{ color: #CB3F38; font-weight: bold }
.hl .nf{ color: #00F }
.hl .nl{ color: #767600 }
.hl .nn{ color: #00F; font-weight: bold }
.hl .nt{ color: #008000; font-weight: bold }
.hl .nv{ color: #19177C }
.hl .ow{ color: #A2F; font-weight: bold }
.hl .w{ color: #BBB }
.hl .mb{ color: #666 }
.hl .mf{ color: #666 }
.hl .mh{ color: #666 }
.hl .mi{ color: #666 }
.hl .mo{ color: #666 }
.hl .sa{ color: #BA2121 }
.hl .sb{ color: #BA2121 }
.hl .sc{ color: #BA2121 }
.hl .dl{ color: #BA2121 }
.hl .sd{ color: #BA2121; font-style: italic }
.hl .s2{ color: #BA2121 }
.hl .se{ color: #AA5D1F; font-weight: bold }
.hl .sh{ color: #BA2121 }
.hl .si{ color: #A45A77; font-weight: bold }
.hl .sx{ color: #008000 }
.hl .sr{ color: #A45A77 }
.hl .s1{ color: #BA2121 }
.hl .ss{ color: #19177C }
.hl .bp{ color: #008000 }
.hl .fm{ color: #00F }
.hl .vc{ color: #19177C }
.hl .vg{ color: #19177C }
.hl .vi{ color: #19177C }
.hl .vm{ color: #19177C }
.hl .il{ color: #666 }
html,body{margin:0;padding:0}
h1,h2,h3,h4,h5,h6{break-after:avoid}
.pagebreak{break-before:column;display:block;height:0;margin:0;padding:0}
.unit{display:flow-root}
.unit.break-before{break-before:column}
.unit.keep{break-inside:avoid}
figure{break-inside:avoid;margin:4mm 0}
figcaption{font-size:8.5pt;color:var(--muted);margin-top:2mm}
.unit img,figure img{width:100%;height:auto;display:block}
/* The docs layout: a top bar with search, a sidebar of parts and chapters,
   the page, and an outline of its sections. Colours come from the theme's
   vars, so the site looks like the project's PDF, and a project's palette
   overrides them. Three columns above 1100 px, two above 640 px, and below
   that one column with the sidebar in a drawer under the menu button.

   The scheme is <html data-scheme="light|dark">, set before the first paint
   by an inline script from the reader's choice, the project's, or the
   system's. */

:root {
  --docs-bg: #fff; --docs-panel: #f8f9fa; --docs-top: 3.25rem;
  --docs-ink: var(--ink, #1a1a1a); --docs-muted: var(--muted, #6b7280);
  --docs-rule: var(--rule, #e5e7eb); --docs-accent: var(--accent, #2563eb);
  --docs-primary: var(--docs-bg); --docs-on-primary: var(--docs-ink);
}
:root[data-scheme="dark"] {
  /* the theme colours its text through the same vars, so they turn too */
  --docs-bg: #16181d; --docs-panel: #1d2026; color-scheme: dark;
  --ink: #e6e6e6; --muted: #9aa3ae; --rule: #2e333b; --accent: #7aa7ff; --accent-dark: #9dbcff;
  --docs-accent: #7aa7ff;
}
[data-scheme="dark"] body.docs main pre, [data-scheme="dark"] body.docs main code { background: #22262d; color: inherit; }
/* a code block's frame takes the theme's --wash, which stays light; and Pygments'
   default colours are for paper. These follow its token classes by their first letter. */
[data-scheme="dark"] body.docs main :is(.hl, pre.output) { background: #22262d; border-color: var(--rule); }
[data-scheme="dark"] body.docs .hl :is([class^="k"], .ow) { color: #c792ea; font-weight: normal; }
[data-scheme="dark"] body.docs .hl [class^="s"] { color: #c3e88d; }
[data-scheme="dark"] body.docs .hl [class^="m"] { color: #f78c6c; }
[data-scheme="dark"] body.docs .hl [class^="c"] { color: #7f8796; }
[data-scheme="dark"] body.docs .hl :is(.nf, .nc, .fm) { color: #82aaff; }
[data-scheme="dark"] body.docs .hl :is(.nb, .bp) { color: #ffcb6b; }
[data-scheme="dark"] body.docs .hl .o { color: #89ddff; }
[data-scheme="dark"] body.docs .hl :is(.n, .nn, .p, .w, .nv, .vm, .na) { color: inherit; }
/* themes darken headings from their own scales, which vanish on dark */
[data-scheme="dark"] body.docs main :is(h1, h2, h3, h4, h5, h6, figcaption, th) { color: inherit; }

html { scroll-padding-top: calc(var(--docs-top) + 1rem); -webkit-text-size-adjust: 100%; }
body.docs { margin: 0; background: var(--docs-bg); color: var(--docs-ink);
            font-size: 16px; line-height: 1.6; }
body.docs a { color: var(--docs-accent); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 20; height: var(--docs-top); box-sizing: border-box;
          display: flex; align-items: center; gap: .75rem; padding: 0 1rem;
          background: var(--docs-bg); border-bottom: 1px solid var(--docs-rule); }
.topbar .menu { display: none; font: inherit; font-size: 1.25rem; background: none; border: 0;
                color: var(--docs-ink); cursor: pointer; padding: .25rem .5rem; }
.topbar .site-title { font-weight: 700; color: var(--docs-ink) !important; text-decoration: none;
                      white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.topbar .search { position: relative; margin-left: auto; flex: 0 1 18rem; min-width: 0; }
.topbar .search input { width: 100%; box-sizing: border-box; font: inherit; font-size: .9rem;
                        padding: .35rem .6rem; border: 1px solid var(--docs-rule); border-radius: 6px;
                        background: var(--docs-panel); color: var(--docs-ink); }
/* a palette's primary colours the bar; its text and controls turn white */
body.docs.has-primary .topbar { background: var(--docs-primary); border-bottom-color: transparent; --docs-on-primary: #fff; }
body.docs.has-primary .topbar :is(.site-title, .menu, .scheme, .repo, .version) { color: #fff !important; }
body.docs.has-primary .topbar .search input { background: rgba(255,255,255,.16); border-color: transparent; color: #fff; }
body.docs.has-primary .topbar .search input::placeholder { color: rgba(255,255,255,.75); }
.topbar .site-title { display: flex; align-items: center; gap: .5rem; }
.topbar .logo { height: 1.6rem; width: auto; flex: none; }
.topbar .version { font-size: .75rem; font-family: var(--mono-font, monospace), monospace; color: var(--docs-muted);
                   border: 1px solid currentColor; border-radius: 999px; padding: 0 .45rem; white-space: nowrap; opacity: .85; }
.topbar .scheme { flex: none; width: 2rem; height: 2rem; font: inherit; font-size: 1.05rem; line-height: 1;
                  background: none; border: 0; border-radius: 6px; color: var(--docs-ink); cursor: pointer; }
.topbar .scheme:hover { background: var(--docs-panel); }
body.docs.has-primary .topbar .scheme:hover { background: rgba(255,255,255,.14); }
.topbar .scheme::before { content: "◐"; }
[data-scheme-mode="light"] .topbar .scheme::before { content: "☀"; }
[data-scheme-mode="dark"] .topbar .scheme::before { content: "☾"; }
.topbar .repo { display: flex; align-items: center; gap: .5rem; font-size: .85rem; line-height: 1.2;
                white-space: nowrap; text-decoration: none; color: var(--docs-ink) !important; }
.topbar .repo svg { width: 1.35rem; height: 1.35rem; fill: currentColor; flex: none; }
.topbar .repo small { display: block; font-size: .72rem; opacity: .75; }
.search-results { position: absolute; right: 0; top: calc(100% + .35rem); width: min(26rem, calc(100vw - 2rem));
                  max-height: 70vh; overflow-y: auto; background: var(--docs-bg);
                  border: 1px solid var(--docs-rule); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.search-results a { display: block; padding: .5rem .75rem; text-decoration: none; border-bottom: 1px solid var(--docs-rule); }
.search-results a:hover, .search-results a:focus { background: var(--docs-panel); }
.search-results a small { display: block; color: var(--docs-muted); }
.search-results a strong { display: block; font-weight: 600; }
.search-results { hyphens: manual; -webkit-hyphens: manual; text-align: left; }
.search-results a .snippet { display: block; margin-top: .15rem; font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere;
                             color: var(--docs-muted); }
.search-results a.selected { background: var(--docs-panel); box-shadow: inset 3px 0 0 var(--docs-accent); }
.search-results mark, mark.search-hit { background: color-mix(in srgb, var(--docs-accent) 28%, transparent);
                                        color: inherit; border-radius: 2px; padding: 0 1px; }
.search-results p { margin: 0; padding: .5rem .75rem; color: var(--docs-muted); }

/* the three columns */
.layout { display: grid; grid-template-columns: 240px minmax(0, 72ch) 200px; gap: 2.5rem;
          justify-content: center; padding: 0 1.5rem; }
.sidebar, .outline { position: sticky; top: var(--docs-top); align-self: start;
                     max-height: calc(100vh - var(--docs-top)); overflow-y: auto; box-sizing: border-box;
                     padding: 1.5rem 0; font-size: .9rem; }
.sidebar ul, .outline ul { list-style: none; margin: 0; padding: 0; }
.sidebar ul ul { padding-left: .9rem; }
.sidebar a, .sidebar .part { display: block; padding: .2rem .5rem; border-radius: 4px; text-decoration: none; }
body.docs .sidebar a { color: var(--docs-ink); }
.sidebar .part { margin-top: 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
                 text-transform: uppercase; color: var(--docs-muted); }
body.docs .sidebar a[aria-current="page"] { background: var(--docs-panel); color: var(--docs-accent); font-weight: 600; }
body.docs .sidebar .sections a { color: var(--docs-muted); font-size: .85rem; }
.outline p { margin: 0 0 .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
             text-transform: uppercase; color: var(--docs-muted); }
body.docs .outline a { display: block; padding: .15rem 0 .15rem .75rem; border-left: 2px solid var(--docs-rule);
             color: var(--docs-muted); text-decoration: none; }
.outline .h3 a { padding-left: 1.5rem; }
body.docs .outline a.active { color: var(--docs-accent); border-left-color: var(--docs-accent); }

/* docs typography: the theme's colours, but screen text — left-aligned, not
   hyphenated, in the theme's heading face (a sans in every shipped theme) */
body.docs.typo-docs { font-family: var(--heading-font, 'Inter'), 'Inter', system-ui, sans-serif; }
body.docs.typo-docs main :is(p, li, dd, dt, blockquote, td, figcaption) {
  text-align: left; hyphens: manual; -webkit-hyphens: manual; font-family: inherit; }

/* the page */
body.docs main { min-width: 0; padding: 1.5rem 0 4rem; }
body.docs main img, body.docs main svg, body.docs main video { max-width: 100%; height: auto; }
body.docs main pre { overflow-x: auto; max-width: 100%; font-size: .85rem; line-height: 1.5; }
/* the themes wrap code for paper; on screen a long line scrolls instead */
body.docs main pre, body.docs main .hl pre { white-space: pre; word-break: normal; overflow-wrap: normal; }
body.docs main table { display: block; max-width: 100%; overflow-x: auto; }

/* code blocks: a title bar from export= or title=, a copy button, the output
   joined under its code with a label, and a scrollbar you can see */
body.docs .codeblock { position: relative; margin: 1rem 0; }
body.docs .codeblock .hl { margin: 0; }
body.docs .code-file { display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: .3rem .8rem;
                       font-size: .78rem; color: var(--docs-muted); background: var(--docs-panel);
                       border: 1px solid var(--docs-rule); border-bottom: 0; border-radius: 6px 6px 0 0; }
body.docs .code-file + .code-src .hl { border-top-left-radius: 0; border-top-right-radius: 0; }
body.docs .codeblock .copy { position: absolute; right: .5rem; top: .5rem; z-index: 1; font: inherit; font-size: .75rem;
                             padding: .1rem .5rem; border: 1px solid var(--docs-rule); border-radius: 4px; cursor: pointer;
                             background: var(--docs-bg); color: var(--docs-muted); opacity: 0; transition: opacity .15s; }
body.docs .code-file ~ .copy { top: 2.2rem; }
body.docs .codeblock:hover .copy, body.docs .codeblock .copy:focus { opacity: 1; }
/* every unit is wrapped in div.unit, so the join reaches across the wrappers */
body.docs .unit:has(> .codeblock):has(+ .unit > pre.output),
body.docs .unit:has(> .codeblock):has(+ .unit > pre.output) .codeblock { margin-bottom: 0; }
body.docs .unit:has(> .codeblock) + .unit > pre.output { margin-top: -1px; border-top: 1px dashed var(--docs-rule);
                                                        border-top-left-radius: 0; border-top-right-radius: 0; }
body.docs .unit:has(> .codeblock):has(+ .unit > pre.output) .hl { border-bottom-left-radius: 0;
                                                                  border-bottom-right-radius: 0; }
body.docs pre.output::before { content: var(--docs-output-label, "Output"); display: block; margin-bottom: .2rem;
                               font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
                               color: var(--docs-muted); }
body.docs main pre { scrollbar-width: thin; scrollbar-color: var(--docs-rule) transparent; }
body.docs main pre::-webkit-scrollbar { height: 8px; }
body.docs main pre::-webkit-scrollbar-thumb { background: var(--docs-rule); border-radius: 4px; }
body.docs main h1, body.docs main h2, body.docs main h3 { break-before: auto; }
.anchor { margin-left: .4em; text-decoration: none; color: var(--docs-muted) !important; opacity: 0; }
h2:hover > .anchor, h3:hover > .anchor, .anchor:focus { opacity: 1; }
figure.audio audio { width: 100%; max-width: 32rem; }
.audio-print { display: none; }
.contents ul { list-style: none; padding-left: 0; }
.contents ul ul { padding-left: 1.2rem; }
.contents .part { display: block; margin-top: 1rem; font-weight: 700; }
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem;
         padding-top: 1rem; border-top: 1px solid var(--docs-rule); }
.pager a { text-decoration: none; }
.pager a[rel="next"] { margin-left: auto; text-align: right; }

@media (max-width: 1100px) {
  .layout { grid-template-columns: 220px minmax(0, 1fr); gap: 2rem; }
  .outline { display: none; }
}
@media (max-width: 640px) {
  .topbar .menu { display: block; }
  .topbar .repo-name, .topbar .version { display: none; }
  .topbar .site-title span { display: none; }
  .topbar .site-title:not(:has(.logo)) span { display: inline; }
  .layout { display: block; padding: 0 1rem; }
  .topbar .search { flex-basis: 11rem; }
  /* focused, the box covers the bar and its results take the screen's width */
  .topbar .search.open { position: absolute; left: .5rem; right: .5rem; top: .5rem; margin: 0; z-index: 25; }
  body.docs.has-primary .topbar .search.open input { background: var(--docs-bg); color: var(--docs-ink); }
  body.docs.has-primary .topbar .search.open input::placeholder { color: var(--docs-muted); }
  .topbar .search.open .search-results { position: fixed; left: .5rem; right: .5rem; width: auto;
                                         top: calc(var(--docs-top) + .25rem);
                                         max-height: calc(100vh - var(--docs-top) - 1rem); }
  .sidebar { position: fixed; top: var(--docs-top); left: 0; z-index: 15; width: min(85vw, 300px);
             height: calc(100vh - var(--docs-top)); max-height: none; padding: 1rem; background: var(--docs-bg); border-right: 1px solid var(--docs-rule);
             transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
  body.drawer-open .sidebar { transform: none; visibility: visible; box-shadow: 0 0 32px rgba(0,0,0,.25); }
  body.drawer-open::after { content: ""; position: fixed; inset: var(--docs-top) 0 0 0; z-index: 14;
                            background: rgba(0,0,0,.35); }
}
@media (pointer: coarse) {
  body.docs .codeblock .copy { opacity: 1; min-height: 32px; }
  .topbar .scheme, .topbar .repo { min-width: 44px; min-height: 44px; justify-content: center; }
  .sidebar a, .outline a, .search-results a, .pager a, .topbar .menu { min-height: 44px; box-sizing: border-box;
                                                                       display: flex; flex-direction: column; justify-content: center; }
}

/* admonitions and tabs on the site: a collapsible note is a <details>, tabs
   switch, and on dark the tinted backgrounds come from each kind's colour */
body.docs .admonition { border-radius: 6px; padding: .6rem .9rem; margin: .25rem 0; }
body.docs details.admonition > summary { cursor: pointer; list-style-position: outside; margin-left: 1rem; }
body.docs details.admonition > summary.admonition-title { margin-bottom: 0; }
body.docs details.admonition[open] > summary.admonition-title { margin-bottom: .3rem; }
[data-scheme="dark"] body.docs .admonition { background: color-mix(in srgb, var(--adm) 14%, transparent); }
[data-scheme="dark"] body.docs .admonition-title { color: color-mix(in srgb, var(--adm) 55%, #fff); }
body.docs .tabs.ready .tab-title { display: none; }
body.docs .tabs.ready .tab:not(.on) { display: none; }
body.docs .tablist { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--docs-rule); margin-bottom: .6rem; }
body.docs .tablist button { font: inherit; font-size: .85rem; background: none; border: 0; border-bottom: 2px solid transparent;
                            padding: .35rem .7rem; margin-bottom: -1px; color: var(--docs-muted); cursor: pointer; }
body.docs .tablist button[aria-selected="true"] { color: var(--docs-accent); border-bottom-color: var(--docs-accent); font-weight: 600; }
@media (pointer: coarse) { body.docs .tablist button { min-height: 44px; } }

/* the page foot: last updated, edit this page, and the project's footer text */
.page-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 3rem;
             font-size: .82rem; color: var(--docs-muted); }
.page-foot + .pager { margin-top: 1rem; }

/* palette from the project */
:root, :root[data-scheme="dark"] { --docs-primary: #7c4a1e; --docs-accent: #0e7490; --accent: #0e7490; }
