/* The manual's look: Godot's docs' shape (Read the Docs' layout) in Games Communities' plum and lilac */
@font-face { font-family: Figtree; font-weight: 400; font-display: swap; src: url(fonts/figtree-400.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 600; font-display: swap; src: url(fonts/figtree-600.woff2) format("woff2"); }
@font-face { font-family: Figtree; font-weight: 700; font-display: swap; src: url(fonts/figtree-700.woff2) format("woff2"); }
@font-face { font-family: "Germania One"; font-display: swap; src: url(fonts/germania-one.woff2) format("woff2"); }
:root {
  --side: #2b1c31; --side-top: #4b2f53; --side-text: #d9cbe3; --side-dim: #9a86a8; --side-hover: #3a2742; --side-current: #f4effa;
  --bg: #fcfbfd; --text: #2c2533; --dim: #6b5f75; --line: #e4dcea; --link: #7a4fa3; --link-visit: #6a4590; --heading: #2a1d31;
  --code-bg: #f4f0f7; --code-line: #e2d8ea; --inline: #8a2d5a; --accent: #b98ad8;
  --note: #6d9de0; --note-bg: #e9f1fc; --tip: #4aa36a; --tip-bg: #e7f5ec; --warn: #e0943a; --warn-bg: #fdf1e2; --danger: #d65252; --danger-bg: #fbe6e6; --ai: #b98ad8; --ai-bg: #f3eafa;
}
html[data-theme="dark"] {
  --side: #1c1320; --side-top: #3c2544; --side-text: #cdbdd8; --side-dim: #8c789a; --side-hover: #2a1d31; --side-current: #2f2236;
  --bg: #241b29; --text: #ddd3e4; --dim: #a597b0; --line: #3b2f42; --link: #c9a2ea; --link-visit: #b48fd6; --heading: #f4effa;
  --code-bg: #1b141f; --code-line: #3b2f42; --inline: #f0a6c8;
  --note-bg: #22304a; --tip-bg: #1f3a29; --warn-bg: #43301b; --danger-bg: #452224; --ai-bg: #34233f;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 16px; }
body { margin: 0; background: var(--side); color: var(--text); font: 16px/1.6 Figtree, "Segoe UI", system-ui, sans-serif; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; z-index: 10; background: var(--bg); padding: 6px 10px; }
.wrap { display: flex; min-height: 100vh; }
.side { position: fixed; top: 0; bottom: 0; left: 0; width: 300px; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; z-index: 3; }
.side-top { background: var(--side-top); padding: 16px 16px 14px; text-align: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font: 26px/1.1 "Germania One", Figtree, serif; letter-spacing: .5px; }
.brand:hover { text-decoration: none; }
.version { color: #e2c3fb; font-size: 13px; margin: 6px 0 10px; opacity: .85; }
.search input { width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 50px; padding: 7px 14px; font: inherit; font-size: 14px; background: #fff; color: #2c2533; }
.search input:focus { outline: 2px solid var(--accent); }
.side-menu { overflow-y: auto; flex: 1; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: #4b3a55 transparent; }
.side-menu .caption { margin: 20px 0 4px; padding: 0 18px; color: var(--accent); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; }
.side-menu ul { list-style: none; margin: 0; padding: 0; }
.side-menu a { display: block; padding: 5px 18px 5px 22px; color: var(--side-text); font-size: 15px; line-height: 1.35; }
.side-menu a:hover { background: var(--side-hover); text-decoration: none; }
.side-menu .current > a { background: var(--side-current); color: var(--heading); font-weight: 600; border-right: 3px solid var(--accent); }
html:not([data-theme="dark"]) .side-menu .current > a { color: #2a1d31; }
.side-menu .current ul { background: var(--side-current); }
.side-menu .toctree-l2 a { padding-left: 36px; font-size: 14px; color: var(--dim); }
.side-menu .toctree-l2 a:hover { background: transparent; color: var(--link); }
.side-menu .search-hit a small { display: block; color: var(--side-dim); font-size: 12px; }
.side-foot { padding: 10px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; }
.side-foot a { color: var(--side-dim); }
.main { margin-left: 300px; flex: 1; min-width: 0; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 12px; max-width: 960px; padding: 18px 48px 0; font-size: 14px; color: var(--dim); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; }
.crumbs li + li::before { content: "»"; margin-right: 6px; color: var(--dim); }
.crumbs a:hover { text-decoration: none; }
.source { color: var(--dim); }
.theme, .menu-button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 2px 9px; font-size: 16px; cursor: pointer; }
.menu-button { display: none; }
.doc { max-width: 960px; padding: 8px 48px 24px; border-bottom: 1px solid var(--line); }
.doc h1, .doc h2, .doc h3, .doc h4 { color: var(--heading); font-weight: 700; line-height: 1.25; margin: 1.6em 0 .6em; }
.doc h1 { font: 40px/1.15 "Germania One", Figtree, serif; letter-spacing: .3px; margin-top: .6em; }
.doc h2 { font-size: 27px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc h3 { font-size: 21px; }
.doc h4 { font-size: 17px; }
.headerlink { visibility: hidden; margin-left: 8px; font-size: .75em; color: var(--dim); }
.doc :is(h1, h2, h3, h4):hover .headerlink { visibility: visible; }
.doc p, .doc ul, .doc ol { margin: 0 0 1.1em; }
.doc li { margin: .25em 0; }
.doc li > ul, .doc li > ol { margin: .25em 0; }
.doc img { max-width: 100%; border-radius: 6px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.doc code { font: 14px/1.5 "Cascadia Code", Consolas, "SFMono-Regular", monospace; }
.doc :not(pre) > code { background: var(--code-bg); border: 1px solid var(--code-line); color: var(--inline); padding: 1px 5px; border-radius: 4px; font-size: 87%; white-space: normal; }
.doc a code { color: var(--link); }
.highlight { margin: 0 0 1.2em; }
.highlight pre { margin: 0; padding: 12px 16px; overflow-x: auto; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: 6px; }
.doc blockquote { margin: 0 0 1.1em; padding: 2px 16px; border-left: 4px solid var(--line); color: var(--dim); }
.admonition { margin: 0 0 1.3em; padding: 10px 16px 2px; border-left: 4px solid var(--note); background: var(--note-bg); border-radius: 0 6px 6px 0; }
.admonition-title { font-weight: 700; margin: 0 0 4px !important; }
.admonition-title::before { content: "ℹ "; }
.admonition.tip { border-color: var(--tip); background: var(--tip-bg); }
.admonition.tip .admonition-title::before { content: "💡 "; }
.admonition.warning, .admonition.important { border-color: var(--warn); background: var(--warn-bg); }
.admonition.warning .admonition-title::before, .admonition.important .admonition-title::before { content: "⚠ "; }
.admonition.danger { border-color: var(--danger); background: var(--danger-bg); }
.admonition.danger .admonition-title::before { content: "⛔ "; }
.admonition.ai { border-color: var(--ai); background: var(--ai-bg); }
.admonition.ai .admonition-title::before { content: "🐾 "; }
.table-wrap { overflow-x: auto; margin: 0 0 1.3em; }
table.docutils { border-collapse: collapse; font-size: 15px; min-width: 50%; }
table.docutils th, table.docutils td { border: 1px solid var(--line); padding: 7px 12px; vertical-align: top; text-align: left; }
table.docutils th { background: var(--code-bg); font-weight: 700; }
table.docutils tbody tr:nth-child(odd) { background: color-mix(in srgb, var(--code-bg) 45%, transparent); }
footer { max-width: 960px; padding: 18px 48px 40px; font-size: 14px; color: var(--dim); }
.pager { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.btn { display: inline-flex; flex-direction: column; padding: 8px 16px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: var(--code-bg); max-width: 48%; }
.btn span { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: .5px; }
.btn.next { text-align: right; margin-left: auto; }
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn.prev span::before { content: "← "; }
.btn.next span::after { content: " →"; }
.search-results li { margin-bottom: 1em; }
.search-results p { margin: 2px 0 0; color: var(--dim); font-size: 14px; }
.search-results mark { background: color-mix(in srgb, var(--accent) 40%, transparent); color: inherit; border-radius: 2px; }
/* highlight.js in the kit's colours */
.hljs-comment, .hljs-quote { color: #8a7f94; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in { color: #a24fc9; }
.hljs-string, .hljs-attr, .hljs-template-tag, .hljs-addition { color: #3f8a45; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #c26a1d; }
.hljs-title, .hljs-section, .hljs-name, .hljs-selector-class, .hljs-selector-id { color: #2f6dbf; }
.hljs-variable, .hljs-params, .hljs-attribute, .hljs-property { color: #b03a6b; }
html[data-theme="dark"] .hljs-keyword, html[data-theme="dark"] .hljs-selector-tag, html[data-theme="dark"] .hljs-literal, html[data-theme="dark"] .hljs-built_in { color: #d39cf7; }
html[data-theme="dark"] .hljs-string, html[data-theme="dark"] .hljs-attr, html[data-theme="dark"] .hljs-template-tag { color: #9fdc5c; }
html[data-theme="dark"] .hljs-number, html[data-theme="dark"] .hljs-symbol { color: #ffcf6b; }
html[data-theme="dark"] .hljs-title, html[data-theme="dark"] .hljs-section, html[data-theme="dark"] .hljs-name, html[data-theme="dark"] .hljs-selector-class { color: #9fc8ff; }
html[data-theme="dark"] .hljs-variable, html[data-theme="dark"] .hljs-params, html[data-theme="dark"] .hljs-attribute, html[data-theme="dark"] .hljs-property { color: #ff9fc7; }
@media (max-width: 900px) {
  .side { transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.4); }
  body.menu-open .side { transform: none; }
  .main { margin-left: 0; }
  .menu-button { display: inline-block; }
  .topbar, .doc, footer { padding-left: 18px; padding-right: 18px; }
  .source { display: none; }
  .doc h1 { font-size: 32px; }
}
@media print { .side, .topbar, .pager { display: none; } .main { margin: 0; } }
