/* The docs: a bar under the site's header (where you are, search), the
   contents on the left with an icon and a color for every part, the page in
   the middle, its sections on the right. Colors come from the site's palette
   (styles.css); the part tints are below. */

:root { --top-h: 65px; --bar-h: 52px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.docs svg, .docs-bar svg, .palette svg, .docs-hero svg, .docs-home svg { width: 1em; height: 1em; flex: none; }

/* ---- Part tints: one per part, set in data/docs-nav.yaml (color:). ---- */
.tint-orange { --tint: #df6417; } .tint-blue { --tint: #2f6fd6; } .tint-green { --tint: #2b9458; }
.tint-violet { --tint: #7a4ed6; } .tint-pink { --tint: #cf3b86; } .tint-teal { --tint: #11918a; }
.tint-sky { --tint: #1b8bc6; } .tint-amber { --tint: #bf830a; } .tint-indigo { --tint: #4b55c9; }
.tint-slate { --tint: #5b6a7f; } .tint-red { --tint: #d23d43; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tint-orange { --tint: #f5a25a; } :root:not([data-theme="light"]) .tint-blue { --tint: #7aaeff; }
  :root:not([data-theme="light"]) .tint-green { --tint: #62cf8e; } :root:not([data-theme="light"]) .tint-violet { --tint: #b597ff; }
  :root:not([data-theme="light"]) .tint-pink { --tint: #ff8cc3; } :root:not([data-theme="light"]) .tint-teal { --tint: #4fd2c2; }
  :root:not([data-theme="light"]) .tint-sky { --tint: #68c7f4; } :root:not([data-theme="light"]) .tint-amber { --tint: #f4c552; }
  :root:not([data-theme="light"]) .tint-indigo { --tint: #959dff; } :root:not([data-theme="light"]) .tint-slate { --tint: #a8b5c8; }
  :root:not([data-theme="light"]) .tint-red { --tint: #ff8b8f; }
}
:root[data-theme="dark"] .tint-orange { --tint: #f5a25a; } :root[data-theme="dark"] .tint-blue { --tint: #7aaeff; }
:root[data-theme="dark"] .tint-green { --tint: #62cf8e; } :root[data-theme="dark"] .tint-violet { --tint: #b597ff; }
:root[data-theme="dark"] .tint-pink { --tint: #ff8cc3; } :root[data-theme="dark"] .tint-teal { --tint: #4fd2c2; }
:root[data-theme="dark"] .tint-sky { --tint: #68c7f4; } :root[data-theme="dark"] .tint-amber { --tint: #f4c552; }
:root[data-theme="dark"] .tint-indigo { --tint: #959dff; } :root[data-theme="dark"] .tint-slate { --tint: #a8b5c8; }
:root[data-theme="dark"] .tint-red { --tint: #ff8b8f; }

.tile {
  --tint-x: var(--tint, var(--accent));
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 8px; font-size: 16px;
  color: var(--tint-x); background: color-mix(in srgb, var(--tint-x) 15%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint-x) 22%, transparent);
}
.tile.big { width: 56px; height: 56px; border-radius: 16px; font-size: 30px; }

/* ---- The docs bar ------------------------------------------------------ */
.docs-bar {
  position: sticky; top: var(--top-h); z-index: 4;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.docs-bar-in { width: min(1440px, 100% - 32px); margin-inline: auto; height: var(--bar-h); display: flex; align-items: center; gap: 12px; }
.db-menu { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 10px; width: 38px; height: 38px; place-items: center; font-size: 20px; cursor: pointer; }
.db-trail { min-width: 0; flex: 1; }
.db-trail ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; font-size: .9rem; white-space: nowrap; overflow: hidden; }
.db-trail li { display: flex; align-items: center; gap: 4px; min-width: 0; }
.db-trail li:last-child { overflow: hidden; }
.db-trail li:last-child span { overflow: hidden; text-overflow: ellipsis; }
.db-trail a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); text-decoration: none; padding: 4px 6px; border-radius: 7px; }
.db-trail a:hover { color: var(--text); background: var(--accent-soft); }
.db-trail [aria-current] { color: var(--text); font-weight: 600; padding: 4px 6px; }
.db-trail .sep { color: var(--line); font-size: 14px; }
.db-find {
  display: inline-flex; align-items: center; gap: 10px; flex: none;
  min-width: 260px; height: 38px; padding: 0 8px 0 12px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
  font: inherit; font-size: .92rem; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.db-find:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); box-shadow: 0 0 0 4px var(--accent-soft); }
.db-find span { flex: 1; text-align: left; }
.db-find kbd, .hero-find kbd, .palette kbd {
  font: 600 .74rem/1 var(--font-mono); padding: 4px 6px; border-radius: 6px;
  border: 1px solid var(--line); border-bottom-width: 2px; background: var(--bg); color: var(--muted);
}
.db-progress { height: 2px; background: transparent; }
.db-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #ff3d7f)); transition: width .1s linear; }

/* ---- The three columns -------------------------------------------------- */
.docs { width: min(1440px, 100% - 32px); margin-inline: auto; display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 48px; padding: 28px 0 72px; align-items: start; }
.docs.has-onpage { grid-template-columns: 272px minmax(0, 1fr) 220px; }
.doc { min-width: 0; max-width: 780px; width: 100%; justify-self: center; }

/* ---- The contents ------------------------------------------------------- */
.side {
  position: sticky; top: calc(var(--top-h) + var(--bar-h) + 20px);
  max-height: calc(100vh - var(--top-h) - var(--bar-h) - 40px); overflow: auto;
  overscroll-behavior: contain; padding: 2px 8px 12px 2px; font-size: .94rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.side-head { display: none; }
.parts, .parts ul { list-style: none; margin: 0; padding: 0; }
.part { margin: 1px 0; }
.part > details > summary, .parts details > summary { list-style: none; display: flex; align-items: center; cursor: pointer; border-radius: 10px; }
.parts summary::-webkit-details-marker { display: none; }
.part-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 5px 6px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.part-link .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.part > a.part-link:hover, .part summary:hover { background: color-mix(in srgb, var(--tint, var(--accent)) 9%, transparent); }
.part.open > details > summary .part-link, .part.open > .part-link { color: var(--tint, var(--accent)); }
.part-link[aria-current] { background: color-mix(in srgb, var(--tint, var(--accent)) 12%, transparent); }
.chev { display: grid; place-items: center; width: 26px; height: 26px; margin-right: 2px; color: var(--muted); border-radius: 7px; transition: transform .2s ease; }
.chev::before { content: ""; width: 7px; height: 7px; margin-left: -3px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); }
details[open] > summary > .chev { transform: rotate(90deg); }
.side-pages { position: relative; margin: 2px 0 10px 19px !important; padding-left: 14px !important; border-left: 2px solid color-mix(in srgb, var(--tint, var(--accent)) 20%, var(--line)); }
.side-pages a, .side-pages summary > a, .side-pages summary > span { display: block; padding: 5px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; line-height: 1.35; }
.side-pages a:hover { color: var(--text); background: color-mix(in srgb, var(--tint, var(--accent)) 8%, transparent); }
.side-pages a[aria-current="page"] { color: var(--text); font-weight: 600; background: color-mix(in srgb, var(--tint, var(--accent)) 13%, transparent); position: relative; }
.side-pages a[aria-current="page"]::before { content: ""; position: absolute; left: -17px; top: 6px; bottom: 6px; width: 2px; border-radius: 2px; background: var(--tint, var(--accent)); }
.side-pages ul { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); }
.side-pages summary > a, .side-pages summary > span { flex: 1; }
.side-pages a.out::after { content: " ↗"; }
.side-help { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line); color: var(--muted); text-decoration: none; font-size: .9rem; }
.side-help:hover { color: var(--text); border-color: var(--accent); }
.side-scrim { display: none; }

/* ---- The page ----------------------------------------------------------- */
.chip { display: inline-flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; border-radius: 999px; text-decoration: none; color: var(--tint, var(--accent)); font-weight: 650; font-size: .9rem; background: color-mix(in srgb, var(--tint, var(--accent)) 9%, transparent); }
.chip .tile { width: 26px; height: 26px; border-radius: 999px; font-size: 14px; box-shadow: none; }
.chip .count { color: var(--muted); font-weight: 500; padding-left: 9px; border-left: 1px solid color-mix(in srgb, var(--tint, var(--accent)) 30%, transparent); }
.chip:hover { background: color-mix(in srgb, var(--tint, var(--accent)) 15%, transparent); }
.doc h1 { margin: 14px 0 10px; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.12; letter-spacing: -.025em; }
.doc .lead { font-size: 1.15rem; color: var(--muted); margin: 0 0 14px; }
.doc .meta { display: flex; align-items: center; gap: 7px; margin: 0 0 30px; color: var(--muted); font-size: .88rem; }
.doc .prose h2 { margin-top: 2.2em; padding-top: .5em; border-top: 1px solid var(--line); }
.doc .prose h3 { margin-top: 1.8em; }
.doc .prose :is(h2, h3)[id] { scroll-margin-top: calc(var(--top-h) + var(--bar-h) + 20px); position: relative; }
.doc .prose .anchor { position: absolute; left: -1.1em; padding-right: .3em; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 500; transition: opacity .15s; }
.doc .prose :is(h2, h3):hover .anchor, .doc .prose .anchor:focus { opacity: 1; }
.doc .prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-radius: 12px; background: var(--accent-soft); border: 0; color: var(--text); }
.doc .prose blockquote p { margin: .3em 0; }
.doc .prose ol > li, .doc .prose ul > li { margin: .45em 0; }
.doc .prose table { display: block; overflow-x: auto; border-collapse: collapse; width: max-content; max-width: 100%; font-size: .95rem; }
.doc .prose th, .doc .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
.doc .prose th { background: var(--accent-soft); }
.doc .prose kbd { font-family: var(--font-mono); font-size: .85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; background: var(--surface); }
.doc .prose img { border-radius: 10px; }
.code-wrap { position: relative; }
.code-wrap pre { padding-right: 56px; }
.copy { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--band-text); cursor: pointer; opacity: .55; transition: opacity .15s; font-size: 15px; }
.code-wrap:hover .copy, .copy:focus-visible { opacity: 1; }
.copy.done { color: #5fd08a; opacity: 1; }
.onpage-fold { display: none; margin: 0 0 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.onpage-fold summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer; font-weight: 600; font-size: .95rem; }
.onpage-fold ul { list-style: none; margin: 0; padding: 0 14px 12px; font-size: .92rem; }
.onpage-fold li { margin: 4px 0; } .onpage-fold li.h3 { padding-left: 14px; }
.onpage-fold a { color: var(--muted); text-decoration: none; } .onpage-fold a:hover { color: var(--accent); }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pn { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.pn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 30px -20px rgba(0,0,0,.5); }
.pn .dir { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: .85rem; font-weight: 600; }
.pn strong { font-size: 1.08rem; }
.pn small { color: var(--muted); font-size: .85rem; }
.pn.next { text-align: right; align-items: flex-end; grid-column: 2; }

/* ---- On this page ------------------------------------------------------- */
.onpage { position: sticky; top: calc(var(--top-h) + var(--bar-h) + 20px); max-height: calc(100vh - var(--top-h) - var(--bar-h) - 40px); overflow: auto; font-size: .86rem; scrollbar-width: thin; }
.op-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.onpage ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.onpage li a { display: block; margin-left: -2px; padding: 4px 0 4px 14px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .15s, border-color .15s; }
.onpage li.h3 a { padding-left: 26px; font-size: .95em; }
.onpage li a:hover { color: var(--text); }
.onpage li a[aria-current="true"] { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.op-foot { display: grid; gap: 6px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.op-foot a { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); text-decoration: none; }
.op-foot a:hover { color: var(--accent); }

/* ---- A part's own page -------------------------------------------------- */
.part-head { display: flex; gap: 18px; align-items: center; margin: 6px 0 22px; }
.part-head h1 { margin: 0 0 4px; }
.part-head .lead { margin: 0; }
.pagecards { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 10px; }
.pagecards a { display: flex; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.pagecards a:hover { border-color: var(--tint, var(--accent)); transform: translateX(3px); }
.pagecards .num { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; font-weight: 700; color: var(--tint, var(--accent)); background: color-mix(in srgb, var(--tint, var(--accent)) 13%, transparent); }
.pagecards .body { flex: 1; min-width: 0; }
.pagecards strong { display: block; font-size: 1.05rem; }
.pagecards small { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.pagecards .go { color: var(--muted); font-size: 18px; }

/* ---- The docs' front page ---------------------------------------------- */
.docs-hero { position: relative; overflow: hidden; padding: 64px 0 56px; background: var(--band); color: var(--band-text); }
.docs-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 70%; height: 180%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 38%, transparent), transparent); opacity: .55; pointer-events: none; }
.docs-hero .wrap { position: relative; }
.docs-hero .eyebrow { margin: 0 0 8px; font: 700 .8rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.docs-hero h1 { margin: 0 0 10px; font-size: clamp(2.3rem, 5vw, 3.4rem); letter-spacing: -.03em; }
.docs-hero .lead { font-size: 1.2rem; max-width: 38em; margin: 0 0 26px; opacity: .85; }
.hero-find { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); height: 54px; padding: 0 12px 0 18px; border-radius: 14px; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.07); color: inherit; font: inherit; font-size: 1.02rem; cursor: pointer; transition: background .15s, border-color .15s; }
.hero-find:hover { background: rgba(255,255,255,.12); border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.hero-find span { flex: 1; text-align: left; opacity: .8; }
.hero-find svg { width: 20px; height: 20px; }
.hero-find kbd { background: rgba(0,0,0,.25); color: inherit; border-color: rgba(255,255,255,.2); }
.docs-home .home-intro { margin-top: 34px; max-width: 760px; }
.partgrid { list-style: none; padding: 0; margin: 30px 0 72px; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.partgrid > li { display: flex; flex-direction: column; padding: 18px 20px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.partgrid > li:hover { border-color: color-mix(in srgb, var(--tint, var(--accent)) 60%, var(--line)); box-shadow: 0 18px 36px -26px color-mix(in srgb, var(--tint, var(--accent)) 80%, #000); }
.pg-head { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.pg-head .tile { width: 40px; height: 40px; border-radius: 12px; font-size: 21px; }
.pg-head strong { flex: 1; font-size: 1.12rem; }
.pg-head .count { font-size: .78rem; color: var(--muted); padding: 3px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.pg-head:hover strong { color: var(--tint, var(--accent)); }
.partgrid p { margin: 10px 0 12px; color: var(--muted); font-size: .94rem; flex: 1; }
.partgrid ul { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); font-size: .92rem; }
.partgrid ul li { margin: 3px 0; }
.partgrid ul a { color: var(--text); text-decoration: none; }
.partgrid ul a:hover { color: var(--tint, var(--accent)); }
.partgrid .more a { display: inline-flex; align-items: center; gap: 6px; color: var(--tint, var(--accent)); font-weight: 600; }

/* ---- Search palette ----------------------------------------------------- */
.palette { width: min(680px, 100% - 24px); max-height: min(620px, 100vh - 80px); margin: 10vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0,0,0,.6); overflow: hidden; }
.palette[open] { display: flex; flex-direction: column; animation: pal-in .14s ease-out; }
.palette::backdrop { background: rgba(8,10,14,.45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } }
.pal-q { display: flex; align-items: center; gap: 12px; padding: 0 14px 0 18px; border-bottom: 1px solid var(--line); }
.pal-q > svg { width: 20px; height: 20px; color: var(--muted); }
.pal-q input { flex: 1; min-width: 0; height: 58px; border: 0; background: none; color: var(--text); font: inherit; font-size: 1.08rem; outline: none; }
.pal-q input::-webkit-search-cancel-button { display: none; }
.pal-esc { border: 0; background: none; padding: 0; cursor: pointer; }
.pal-results { overflow: auto; padding: 8px; flex: 1; scrollbar-width: thin; }
.pal-group { margin: 6px 0 2px; padding: 6px 10px 4px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.pal-group .tile { width: 20px; height: 20px; border-radius: 6px; font-size: 12px; box-shadow: none; }
.pal-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 11px; color: var(--text); text-decoration: none; }
.pal-item .ico { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.pal-item .ico:has(.tile) { border: 0; }
.pal-item .ico .tile { width: 30px; height: 30px; border-radius: 9px; }
.pal-item .txt { flex: 1; min-width: 0; }
.pal-item b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item small { display: block; color: var(--muted); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-item mark { background: none; color: var(--accent); font-weight: 700; }
.pal-item .go { opacity: 0; color: var(--accent); font-size: 16px; }
.pal-item[aria-selected="true"] { background: var(--accent-soft); }
.pal-item[aria-selected="true"] .go { opacity: 1; }
.pal-item[aria-selected="true"] .ico { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.pal-empty { margin: 26px 16px; text-align: center; color: var(--muted); }
.pal-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.pal-foot kbd { margin-right: 3px; }

/* ---- Narrower screens --------------------------------------------------- */
@media (max-width: 1240px) {
  .docs.has-onpage { grid-template-columns: 256px minmax(0, 1fr); }
  .onpage { display: none; }
  .onpage-fold { display: block; }
}
@media (max-width: 960px) {
  .docs, .docs.has-onpage { grid-template-columns: minmax(0, 1fr); padding-top: 18px; }
  .db-menu { display: grid; }
  .db-find { min-width: 0; width: 40px; padding: 0; justify-content: center; }
  .db-find span, .db-find kbd { display: none; }
  .side {
    position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: min(330px, 88vw);
    max-height: none; padding: 14px 14px 24px; background: var(--surface);
    border-right: 1px solid var(--line); box-shadow: 30px 0 60px -30px rgba(0,0,0,.5);
    transform: translateX(-105%); transition: transform .25s ease; visibility: hidden;
  }
  .side.is-open { transform: none; visibility: visible; }
  .side-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; padding: 0 2px 12px; border-bottom: 1px solid var(--line); }
  .side-head a { font-weight: 700; color: var(--text); text-decoration: none; }
  .side-close { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: none; color: var(--text); font-size: 18px; cursor: pointer; }
  .side-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(8,10,14,.45); }
  .prevnext { grid-template-columns: minmax(0, 1fr); }
  .pn.next { grid-column: auto; }
  .part-head { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .side, .chev, .pn, .pagecards a, .palette[open] { transition: none; animation: none; }
}

/* ---- Documentation syntax (admonitions, collapsible blocks, content tabs,
   keys, definition lists): the markup MkDocs writes, so a site moved from it
   keeps its pages as they are. Colors come from the theme's variables; each
   kind of admonition has its own, as in MkDocs Material. Only blocks in a
   page's text: a <details> in the page around it (a contents box, a menu)
   keeps its own look. ---- */
.admonition, :is(.prose details:not(.toc-box), details:is(.note, .abstract, .info, .tip, .success, .question, .warning, .failure, .danger, .bug, .example, .quote)) {
  margin: 1.4em 0; padding: 0 16px; border: 1px solid var(--line);
  border-left: 4px solid var(--adm); border-radius: 10px;
  background: color-mix(in srgb, var(--adm) 7%, var(--surface));
}
.admonition > :last-child, :is(.prose details:not(.toc-box), details:is(.note, .abstract, .info, .tip, .success, .question, .warning, .failure, .danger, .bug, .example, .quote)) > :last-child { margin-bottom: 14px; }
.admonition-title, :is(.prose details:not(.toc-box), details:is(.note, .abstract, .info, .tip, .success, .question, .warning, .failure, .danger, .bug, .example, .quote)) > summary {
  margin: 0 -16px; padding: 10px 16px; font-weight: 650; color: var(--text);
  background: color-mix(in srgb, var(--adm) 13%, var(--surface));
}
.admonition-title { margin-bottom: 10px; border-radius: 0 9px 0 0; }
.admonition > .admonition-title:first-child + * { margin-top: 0; }
:is(.prose details:not(.toc-box), details:is(.note, .abstract, .info, .tip, .success, .question, .warning, .failure, .danger, .bug, .example, .quote)) > summary { cursor: pointer; list-style-position: inside; border-radius: 0 9px 9px 0; }
:is(.prose details:not(.toc-box), details:is(.note, .abstract, .info, .tip, .success, .question, .warning, .failure, .danger, .bug, .example, .quote))[open] > summary { margin-bottom: 10px; border-radius: 0 9px 0 0; }
/* The accent unless the kind has a color of its own; :where() keeps this
   from outranking the kinds below. */
:where(.admonition, details) { --adm: var(--accent); }
:is(.admonition, details):is(.note, .abstract, .summary, .tldr, .info, .todo) { --adm: #2f7fd1; }
:is(.admonition, details):is(.tip, .hint, .important) { --adm: #0f9d8a; }
:is(.admonition, details):is(.success, .check, .done) { --adm: #2e9e48; }
:is(.admonition, details):is(.question, .help, .faq) { --adm: #7a9a12; }
:is(.admonition, details):is(.warning, .caution, .attention) { --adm: #e08a00; }
:is(.admonition, details):is(.failure, .fail, .missing, .danger, .error) { --adm: #d3324b; }
:is(.admonition, details):is(.bug) { --adm: #cf2f6f; }
:is(.admonition, details):is(.example) { --adm: #7a52d6; }
:is(.admonition, details):is(.quote, .cite) { --adm: #8a8f98; }

.tabbed-set { position: relative; display: flex; flex-direction: column; margin: 1.4em 0; border: 1px solid var(--line); border-radius: 10px; }
.tabbed-set > input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tabbed-labels { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tabbed-labels > label { padding: 10px 12px 8px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: .95em; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbed-labels > label:hover { color: var(--text); }
.tabbed-content { padding: 0 16px; }
.tabbed-block { display: none; }
.tabbed-set > input:nth-child(1):checked ~ .tabbed-content > .tabbed-block:nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-content > .tabbed-block:nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-content > .tabbed-block:nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-content > .tabbed-block:nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-content > .tabbed-block:nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-content > .tabbed-block:nth-child(6),
.tabbed-set > input:nth-child(7):checked ~ .tabbed-content > .tabbed-block:nth-child(7),
.tabbed-set > input:nth-child(8):checked ~ .tabbed-content > .tabbed-block:nth-child(8),
.tabbed-set > input:nth-child(9):checked ~ .tabbed-content > .tabbed-block:nth-child(9),
.tabbed-set > input:nth-child(10):checked ~ .tabbed-content > .tabbed-block:nth-child(10) { display: block; }
.tabbed-set > input:nth-child(1):checked ~ .tabbed-labels > label:nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > label:nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > label:nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-labels > label:nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-labels > label:nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-labels > label:nth-child(6),
.tabbed-set > input:nth-child(7):checked ~ .tabbed-labels > label:nth-child(7),
.tabbed-set > input:nth-child(8):checked ~ .tabbed-labels > label:nth-child(8),
.tabbed-set > input:nth-child(9):checked ~ .tabbed-labels > label:nth-child(9),
.tabbed-set > input:nth-child(10):checked ~ .tabbed-labels > label:nth-child(10) { color: var(--accent); border-bottom-color: var(--accent); }
.tabbed-set > input:nth-child(1):focus-visible ~ .tabbed-labels > label:nth-child(1),
.tabbed-set > input:nth-child(2):focus-visible ~ .tabbed-labels > label:nth-child(2),
.tabbed-set > input:nth-child(3):focus-visible ~ .tabbed-labels > label:nth-child(3),
.tabbed-set > input:nth-child(4):focus-visible ~ .tabbed-labels > label:nth-child(4),
.tabbed-set > input:nth-child(5):focus-visible ~ .tabbed-labels > label:nth-child(5),
.tabbed-set > input:nth-child(6):focus-visible ~ .tabbed-labels > label:nth-child(6),
.tabbed-set > input:nth-child(7):focus-visible ~ .tabbed-labels > label:nth-child(7),
.tabbed-set > input:nth-child(8):focus-visible ~ .tabbed-labels > label:nth-child(8),
.tabbed-set > input:nth-child(9):focus-visible ~ .tabbed-labels > label:nth-child(9),
.tabbed-set > input:nth-child(10):focus-visible ~ .tabbed-labels > label:nth-child(10) { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 6px 6px 0 0; }

.keys { white-space: nowrap; }
.keys > span { margin: 0 .15em; color: var(--muted); }
.keys kbd { font-family: var(--font-mono, monospace); font-size: .85em; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; background: var(--surface); color: var(--text); }

dl { margin: 1.2em 0; }
dt { font-weight: 650; margin-top: .8em; }
dd { margin: .2em 0 0 1.4em; color: var(--text); }

/* A code block's file name (```json title="servers.json"). */
.highlight > .filename { display: block; margin-top: 1.2em; padding: 6px 14px; font: 600 .85em var(--font-mono, monospace); color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0; }
.highlight > .filename + pre { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

/* A code block's file name sits on the block, in its colors. docs.js puts
   each <pre> in a .code-wrap for its copy button, so join across that too. */
.doc .highlight > .filename { margin-top: 1.4em; background: color-mix(in srgb, var(--band) 88%, var(--band-text)); color: color-mix(in srgb, var(--band-text) 75%, transparent); border: 0; border-radius: var(--radius) var(--radius) 0 0; padding: 8px 18px; }
.doc .highlight > .filename + pre, .doc .highlight > .filename + .code-wrap pre { margin-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
