/* D4rknotes: documentation layout inspired by opencode.ai/v2/docs. */
@font-face{font-family:"OpenTUI Mono";src:url(../fonts/opentui-mono-regular.woff2) format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"OpenTUI Mono";src:url(../fonts/opentui-mono-bold.woff2) format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"OpenTUI Mono";src:url(../fonts/opentui-mono-italic.woff2) format("woff2");font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:"OpenTUI Mono";src:url(../fonts/opentui-mono-bold-italic.woff2) format("woff2");font-weight:700;font-style:italic;font-display:swap}
:root{color-scheme:light;--background:#fff;--foreground:#1a1a1a;--muted:#6b6b6b;--border:#e2e2e2;--surface:#f6f6f6;--surface-hover:#ededed;--link:#1d63d8;--backdrop:#00000052;--header-height:3.875rem;--frame-width:96rem;--gutter:1.5rem}
:root[data-theme=dark]{color-scheme:dark;--background:#090909;--foreground:#efefef;--muted:#929292;--border:#303030;--surface:#101010;--surface-hover:#181818;--link:#4d8eff;--backdrop:#000000b8}
*{box-sizing:border-box;scrollbar-width:thin;scrollbar-color:var(--border) transparent}
html{background:var(--background);scrollbar-gutter:stable;scroll-behavior:smooth}
body{margin:0;background:var(--background);color:var(--foreground);font-family:"OpenTUI Mono",monospace;font-size:.875rem;line-height:1.8}
button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}a:hover{text-decoration:underline}button,a,input,summary{ -webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,input:focus-visible,summary:focus-visible{outline:2px solid var(--link);outline-offset:4px}img,video{max-width:100%;height:auto}svg{flex-shrink:0}button{border-radius:0}[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.skip-link{position:fixed;top:-5rem;left:1rem;z-index:100;padding:.5rem .75rem;background:var(--foreground);color:var(--background)}.skip-link:focus{top:1rem}
.site-header{height:var(--header-height);position:sticky;top:0;z-index:20;border-bottom:1px solid color-mix(in srgb,var(--border) 70%,transparent);background:color-mix(in srgb,var(--background) 92%,transparent);backdrop-filter:blur(16px)}
.header-inner{max-width:var(--frame-width);height:100%;padding-inline:var(--gutter);margin:auto;display:flex;align-items:center;gap:1.5rem}.brand{display:flex;align-items:center;flex-shrink:0;font-size:1.5rem;font-weight:700;letter-spacing:-1.5px;line-height:1}.brand:hover{text-decoration:none}.brand-light{font-weight:400}.brand-cursor{font-weight:700}.brand img{max-width:9rem;max-height:2rem;width:auto}.header-nav ul{display:flex;align-items:center;gap:1.25rem;list-style:none;margin:0;padding:0}.header-nav a{font-weight:700;color:var(--muted);white-space:nowrap}.header-nav a:hover,.header-nav .nav-current a{color:var(--foreground);text-decoration:none}.header-spacer{flex:1}.search-trigger{height:2.25rem;min-width:9.5rem;display:flex;justify-content:space-between;align-items:center;padding:0 .75rem;border:1px solid var(--border);color:var(--muted);background:transparent}.search-trigger kbd{font:inherit;font-size:.75rem}.search-icon{display:none}.theme-toggle{width:2.25rem;height:2.25rem;border:1px solid var(--border);background:transparent;color:var(--muted);display:grid;place-items:center;flex-shrink:0}.search-trigger:hover,.theme-toggle:hover{border-color:var(--muted);color:var(--foreground)}.sun-icon{display:none}[data-theme=dark] .sun-icon{display:block}[data-theme=dark] .moon-icon{display:none}.feed-link{color:var(--muted);font-weight:700;white-space:nowrap}
.docs-frame{max-width:var(--frame-width);min-height:calc(100vh - var(--header-height));margin:auto;display:grid;grid-template-columns:15rem minmax(0,1fr) 16rem}.sidebar-column{position:sticky;top:var(--header-height);height:calc(100vh - var(--header-height));padding:2.25rem 2rem 3rem var(--gutter);border-right:1px solid var(--border);overflow-y:auto}.docs-sidebar section+section{margin-top:2rem}.docs-sidebar h2,.docs-toc h2{margin:0 0 .625rem;font-size:.75rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase}.docs-sidebar ul,.docs-toc ul{list-style:none;margin:0;padding:0}.docs-sidebar li+li,.docs-toc li+li{margin-top:.375rem}.docs-sidebar a,.docs-toc a{display:block;padding-block:.125rem;color:var(--muted);overflow-wrap:anywhere}.docs-sidebar a:hover,.docs-sidebar a[aria-current=page],.docs-toc a:hover,.docs-toc a[aria-current=location]{color:var(--foreground)}.docs-sidebar a[aria-current=page]{font-weight:700}.sidebar-empty{color:var(--muted)}
main{min-width:0;padding:3rem clamp(2rem,4vw,4rem) 5rem;outline:none}#main-content{scroll-margin-top:calc(var(--header-height) + 1rem)}.toc-column{padding:3rem var(--gutter) 3rem 2rem}.docs-toc{position:sticky;top:calc(var(--header-height) + 2rem);max-height:calc(100vh - var(--header-height) - 4rem);overflow-y:auto}.docs-toc .nested{padding-left:1rem}.back-to-top{margin-top:1.5rem;font-size:.75rem}.mobile-navigation{display:none}
.prose{width:100%;max-width:60rem;overflow-wrap:break-word}.prose>:first-child{margin-top:0}.prose h1,.prose h2,.prose h3,.prose h4{font-weight:700;color:var(--foreground)}.prose h1{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:0 0 3rem;font-size:1.875rem;line-height:1.2}.prose h2{margin:3rem 0 .75rem;font-size:1.25rem;line-height:1.5}.prose h3{margin:2.25rem 0 .75rem;font-size:1.125rem;line-height:1.5}.prose h4{margin:2rem 0 .75rem;font-size:1rem}.prose :is(h2,h3,h4)[id]{scroll-margin-top:calc(var(--header-height) + 1rem)}.prose p,.prose ul,.prose ol{margin:0 0 1.5rem}.prose ul,.prose ol{padding-left:1.5rem}.prose li+li{margin-top:.5rem}.prose a{color:var(--link)}.prose hr{border:0;border-top:1px solid var(--border);margin:3rem 0}.prose hr+h2{margin-top:0}.prose code,.prose kbd{font:inherit}.prose :not(pre)>code,.prose kbd{padding:.0625rem .4ch;background:color-mix(in srgb,currentColor 8%,transparent)}.prose pre{max-width:100%;overflow-x:auto;border:1px solid var(--border);background:var(--background);padding:.875rem 1rem;margin:0 0 1.5rem;font:inherit;font-size:.8125rem;line-height:1.8;tab-size:4}.prose pre code{white-space:pre;overflow-wrap:normal}.code-block{position:relative}.code-block pre{padding-right:5rem}.copy-code{position:absolute;top:.5rem;right:.5rem;background:var(--surface);border:0;color:var(--muted);padding:.375rem .5rem;font-size:.75rem}.copy-code:hover{color:var(--foreground)}.copy-page{display:inline-flex;align-items:center;gap:.5rem;flex-shrink:0;padding:0;border:0;background:none;color:var(--muted)}.copy-page:hover{color:var(--foreground)}.heading-anchor{opacity:0;margin-left:.75ch;font-weight:400;color:var(--muted)!important}.prose :is(h2,h3):hover .heading-anchor,.heading-anchor:focus-visible{opacity:1}
.prose blockquote{border-left:2px solid var(--border);margin:1.5rem 0;padding:.25rem 0 .25rem 1.25rem;color:var(--muted)}.prose blockquote p:last-child{margin-bottom:0}.prose table{border-collapse:collapse;width:100%;margin:1.5rem 0}.table-scroll{overflow-x:auto}.prose th,.prose td{padding:.625rem .875rem;border-bottom:1px solid var(--border);text-align:left}.prose th{background:var(--surface)}.prose figure{margin:1.5rem 0}.prose figcaption{margin-top:.5rem;color:var(--muted);font-size:.75rem;text-align:center}.article-image img{display:block;width:100%}.article-meta{display:flex;gap:.625rem;flex-wrap:wrap;color:var(--muted);font-size:.75rem;margin:-1.5rem 0 2rem}.article-lead+.article-meta{margin-top:0}.article-meta a{color:inherit}.article-tags{border-top:1px solid var(--border);margin-top:3rem;padding-top:1rem}.article-pagination{display:flex;gap:1rem;justify-content:space-between;margin-top:3rem}.article-pagination a{flex:1;border:1px solid var(--border);padding:1rem;color:var(--foreground)}.article-pagination span{display:block;margin-bottom:.375rem;color:var(--muted);font-size:.75rem}.article-comments{margin-top:3rem}.note-row{padding:1rem 0;border-bottom:1px solid var(--border)}.note-row:first-child{border-top:1px solid var(--border)}.note-row-heading{display:flex;justify-content:space-between;gap:1rem;align-items:baseline}.note-row-heading a{font-weight:700}.note-row time{color:var(--muted);font-size:.75rem;white-space:nowrap}.note-row p{margin:.5rem 0 0;color:var(--muted)}.pagination{display:flex;justify-content:space-between;gap:1rem;margin-top:2rem;color:var(--muted)}
.search-dialog{width:min(42rem,calc(100% - 2rem));max-height:min(36rem,calc(100dvh - 4rem));margin:10vh auto auto;padding:0;border:1px solid var(--border);background:var(--background);color:var(--foreground)}.search-dialog::backdrop{background:var(--backdrop);backdrop-filter:blur(4px)}.search-bar{display:flex;gap:.75rem;align-items:center;padding:.75rem 1rem;border-bottom:1px solid var(--border)}.search-bar input{flex:1;min-width:0;padding:0;border:0;background:none;outline:none}.search-bar button{padding:0;border:0;background:none;color:var(--muted)}.search-results{max-height:28rem;overflow-y:auto;padding:.5rem}.search-results>p{margin:0;padding:.75rem;color:var(--muted)}.search-result{display:block;padding:.75rem}.search-result:hover,.search-result:focus{background:var(--surface-hover);text-decoration:none}.search-result strong,.search-result span{display:block}.search-result span{margin-top:.25rem;color:var(--muted);font-size:.8125rem}
/* Preserve Ghost editor cards inside the documentation column. */
.gh-content>*{max-width:100%}.kg-width-wide,.kg-width-full{width:100%;max-width:100%}.kg-image{display:block;margin:auto}.kg-gallery-container{display:flex;flex-direction:column;gap:.75rem}.kg-gallery-row{display:flex;gap:.75rem}.kg-gallery-image{flex:1}.kg-gallery-image img{width:100%;height:100%;object-fit:cover}.kg-bookmark-container{display:flex;border:1px solid var(--border);color:var(--foreground)!important;overflow:hidden}.kg-bookmark-content{flex:1;padding:1.25rem;min-width:0}.kg-bookmark-title{font-weight:700}.kg-bookmark-description{color:var(--muted);font-size:.8125rem;margin:.5rem 0}.kg-bookmark-metadata{display:flex;align-items:center;gap:.5rem;font-size:.75rem}.kg-bookmark-icon{width:1rem;height:1rem}.kg-bookmark-thumbnail{flex:0 0 30%}.kg-bookmark-thumbnail img{height:100%;width:100%;object-fit:cover}.kg-callout-card{border:1px solid var(--border);padding:1.25rem;margin:1.5rem 0}.kg-toggle-card{border:1px solid var(--border);padding:1rem;margin:1.5rem 0}.kg-toggle-card h4{margin:0}.kg-button-card a{display:inline-block;border:1px solid var(--border);padding:.625rem 1rem;background:var(--surface)}.kg-embed-card iframe{max-width:100%}.kg-video-card,.kg-audio-card,.kg-file-card,.kg-product-card{margin:1.5rem 0}.kg-signup-card,.kg-header-card{max-width:100%;overflow:hidden}.gh-post-upgrade-cta{padding:2rem;border:1px solid var(--border);text-align:center}.gh-post-upgrade-cta h2{margin-top:0}
@media(min-width:769px){.header-nav{max-width:40%;overflow-x:auto;scrollbar-width:none}}
@media(max-width:1024px){.docs-frame{grid-template-columns:14rem minmax(0,1fr)}.toc-column{display:none}.header-inner{gap:1rem}}
@media(max-width:768px){:root{--gutter:1rem}.header-nav,.feed-link,.search-trigger span,.search-trigger kbd{display:none}.search-trigger{min-width:2.25rem;width:2.25rem;padding:0;justify-content:center}.search-icon{display:block}.header-inner{gap:.75rem}.brand{font-size:1.375rem}.mobile-navigation{display:block;position:sticky;top:var(--header-height);z-index:10;border-bottom:1px solid var(--border);background:var(--background)}.mobile-navigation summary{display:flex;justify-content:space-between;padding:.75rem var(--gutter);cursor:pointer;font-weight:700;list-style:none}.mobile-navigation summary::-webkit-details-marker{display:none}.mobile-navigation[open] summary span{transform:rotate(180deg)}.mobile-navigation .docs-sidebar{max-height:calc(100dvh - 8rem);padding:.75rem var(--gutter) 1.5rem;overflow-y:auto}.docs-frame{display:block}.sidebar-column{display:none}main{padding:2rem var(--gutter) 4rem}.prose h1{margin-bottom:2rem}.prose :is(h2,h3,h4)[id]{scroll-margin-top:8rem}.note-row-heading{flex-wrap:wrap;gap:.25rem}.note-row-heading time{width:100%}.article-meta{margin-top:-.5rem}.article-pagination{flex-direction:column}.kg-bookmark-thumbnail{display:none}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.docs-topics{position:static;margin-top:2rem;max-height:none;overflow:visible}
.docs-toc-section>summary{display:flex;align-items:center;justify-content:space-between;gap:.5rem;cursor:pointer;list-style:none;user-select:none}
.docs-toc-section>summary::-webkit-details-marker{display:none}
.docs-toc-section>summary::marker{content:''}
.docs-toc-section>summary h2{margin:0}
.docs-toc-section>summary:hover h2,.docs-toc-section>summary:hover .toc-caret{color:var(--foreground)}
.docs-toc-section .toc-caret{color:var(--muted);font-size:.875rem;line-height:1;transition:transform .15s ease}
.docs-toc-section[open] .toc-caret{transform:rotate(180deg)}
.docs-toc-section:not([open]){padding-bottom:.125rem}
.docs-toc-section[open]>summary{margin-bottom:.625rem}
.mobile-navigation .docs-topics{margin-top:1.5rem}
.docs-topics a{display:inline}
.docs-topics li{display:flex;justify-content:space-between;gap:.75rem}
.docs-topics .topic-count{color:var(--muted);opacity:.5;font-size:.75rem;flex:none}
@media(min-width:1025px){html,body{height:100%}body{overflow:hidden}.docs-frame{height:calc(100vh - var(--header-height));min-height:0;overflow:hidden;align-items:stretch}.sidebar-column{position:static;height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain}main{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain}.toc-column{display:block;height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 var(--gutter) 3rem 2rem}.toc-column>.docs-toc{position:static;max-height:none;overflow:visible}.toc-column>.docs-toc-section:first-child{position:sticky;top:0;z-index:2;background:var(--background);padding:3rem 0 .875rem;margin:0 0 .5rem;border-bottom:1px solid var(--border)}.toc-column>.docs-toc-section:first-child::after{content:"";position:absolute;left:0;right:0;top:100%;height:1.25rem;pointer-events:none;background:linear-gradient(var(--background),transparent)}.toc-column>.docs-topics{margin-top:1.5rem}}
@media(min-width:1025px){.toc-column{scrollbar-width:none;-ms-overflow-style:none}.toc-column::-webkit-scrollbar{width:0;height:0;display:none}}
.docs-sidebar{min-height:100%;display:flex;flex-direction:column}.docs-sidebar-credit{margin-top:auto;padding-top:2rem;color:var(--muted);font-size:.6875rem}.docs-sidebar-credit a{display:inline;color:var(--foreground);text-decoration:none}.docs-sidebar-credit a:hover{color:var(--link);text-decoration:underline}
