/* Shared code presentation: follow the explicit forum theme; print on white. */
:root {
 --code-bg:#ffffff; --code-fg:#24292f; --code-edge:#d0d7de;
 --code-muted:#57606a; --code-keyword:#a62635; --code-title:#6639ba;
 --code-number:#0550ae; --code-string:#0a4b78; --code-built:#953800;
 --code-name:#116329; --code-selection:#dbeafe;
}
html[data-theme="dark"] {
 --code-bg:#0d1117; --code-fg:#c9d1d9; --code-edge:#30363d;
 --code-muted:#8b949e; --code-keyword:#ff7b72; --code-title:#d2a8ff;
 --code-number:#79c0ff; --code-string:#a5d6ff; --code-built:#ffa657;
 --code-name:#7ee787; --code-selection:#344d68;
}
html:is([data-theme],:root) :is(.bcodebox,.codebox,.chat-file-preview pre:has(code.hljs),.ai-chat-document-content pre:has(code),.ai-chat-markdown-rendered pre,.ai-chat-plain-code,.simulations .CodeMirror) {background:var(--code-bg)!important;color:var(--code-fg)!important;border-color:var(--code-edge)!important;max-width:100%;box-sizing:border-box}
html:is([data-theme],:root) :is(.bcodebox pre code,.codebox code,pre code.hljs,code.hljs,.ai-chat-plain-code,.chat-file-preview code.hljs,.simulations .CodeMirror) {color:var(--code-fg)!important}
html:is([data-theme],:root) :is(pre code.hljs,.bcodebox pre code,.codebox code,.ai-chat-plain-code code,.chat-file-preview code.hljs) {background:transparent!important}
html:is([data-theme],:root) :is(.bcodebox-header,.simulations .CodeMirror-gutters) {background:var(--code-bg)!important;color:var(--code-muted)!important;border-color:var(--code-edge)!important}
html:is([data-theme],:root) :is(.bcodebox-lang,.bcodebox-btn,.simulations .CodeMirror-linenumber) {color:var(--code-muted)!important}
html:is([data-theme],:root) .bcodebox-btn {border-color:var(--code-edge)!important}
html:is([data-theme],:root) .bcodebox-btn:is(:hover,:focus-visible,.active) {color:var(--code-fg)!important;border-color:var(--code-fg)!important}
html:is([data-theme],:root) .simulations .CodeMirror-cursor {border-left-color:var(--code-fg)!important}
html:is([data-theme],:root) .simulations .CodeMirror-selected {background:var(--code-selection)!important}
html:is([data-theme],:root) :is(.hljs-doctag,.hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_,.CodeMirror .cm-keyword,.CodeMirror .cm-def) {color:var(--code-keyword)!important}
html:is([data-theme],:root) :is(.hljs-title,.CodeMirror .cm-variable-2) {color:var(--code-title)!important}
html:is([data-theme],:root) :is(.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable,.CodeMirror .cm-number,.CodeMirror .cm-atom,.CodeMirror .cm-property) {color:var(--code-number)!important}
html:is([data-theme],:root) :is(.hljs-meta .hljs-string,.hljs-regexp,.hljs-string,.CodeMirror .cm-string,.CodeMirror .cm-string-2) {color:var(--code-string)!important}
html:is([data-theme],:root) :is(.hljs-built_in,.hljs-symbol,.CodeMirror .cm-builtin) {color:var(--code-built)!important}
html:is([data-theme],:root) :is(.hljs-code,.hljs-comment,.hljs-formula,.CodeMirror .cm-comment) {color:var(--code-muted)!important}
html:is([data-theme],:root) :is(.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag,.hljs-section,.hljs-bullet) {color:var(--code-name)!important}
html:is([data-theme],:root) :is(.hljs-subst,.hljs-emphasis,.hljs-strong,.CodeMirror .cm-variable) {color:var(--code-fg)!important}
html:is([data-theme],:root) .hljs-addition {color:#116329!important;background:#dafbe1!important}
html:is([data-theme],:root) .hljs-deletion {color:#82071e!important;background:#ffebe9!important}
@media print {
 html,html[data-theme="dark"] {
  --code-bg:#ffffff;--code-fg:#24292f;--code-edge:#d0d7de;
  --code-muted:#57606a;--code-keyword:#a62635;--code-title:#6639ba;
  --code-number:#0550ae;--code-string:#0a4b78;--code-built:#953800;
  --code-name:#116329;--code-selection:#dbeafe;
 }
 html:is([data-theme],:root) :is(.bcodebox,.codebox,pre:has(code),.CodeMirror,.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-lines) {
  background:#fff!important;color:var(--code-fg)!important;max-height:none!important;height:auto!important;
  overflow:visible!important;break-inside:auto;box-shadow:none!important;
  print-color-adjust:exact;-webkit-print-color-adjust:exact;
 }
 html:is([data-theme],:root) :is(.bcodebox pre code,.codebox code,pre code.hljs) {
  min-width:0!important;max-width:100%!important;white-space:pre-wrap!important;
  overflow-wrap:anywhere!important;word-break:normal!important;
 }
 html:is([data-theme],:root) .bcodebox-actions {display:none!important}
 html:is([data-theme],:root) .bcodebox-header {position:static!important}
}
