:root{--syntax-keyword:#7337af;--syntax-function:#1457ad;--syntax-variable:#0b6e69;--syntax-type:#805b16;--syntax-string:#326b28;--syntax-number:#a03d3b;--syntax-comment:#5d6a7e;--syntax-selection:rgba(68,115,209,.23)}
:root[data-theme="dark"]{--syntax-keyword:#d4a5ff;--syntax-function:#8dc3ff;--syntax-variable:#74d9dc;--syntax-type:#ebd08c;--syntax-string:#a6d98b;--syntax-number:#ffb89e;--syntax-comment:#a3b2c7;--syntax-selection:rgba(141,195,255,.24)}
:is(.python-syntax,.python-color-key) .syntax-keyword{color:var(--syntax-keyword)}
:is(.python-syntax,.python-color-key) .syntax-function{color:var(--syntax-function)}
:is(.python-syntax,.python-color-key) .syntax-variable{color:var(--syntax-variable)}
:is(.python-syntax,.python-color-key) .syntax-type{color:var(--syntax-type)}
:is(.python-syntax,.python-color-key) .syntax-string{color:var(--syntax-string)}
:is(.python-syntax,.python-color-key) .syntax-number{color:var(--syntax-number)}
:is(.python-syntax,.python-color-key) .syntax-comment{color:var(--syntax-comment)}
.python-editor-frame{position:relative;min-width:0;background:var(--code-bg)}
.python-editor-frame .python-editor,.python-editor-backdrop{font:400 13px/1.75 var(--mono);font-variant-ligatures:none;letter-spacing:0;word-spacing:0;text-indent:0;text-align:left;direction:ltr;tab-size:4;white-space:pre;overflow-wrap:normal;word-break:normal;padding:16px}
.python-editor-backdrop{display:none;position:absolute;inset:1px;margin:0;border:0;border-radius:0;overflow:hidden;pointer-events:none;user-select:none;color:var(--code-text);background:transparent;box-sizing:border-box}
.python-editor-backdrop code,.python-editor-backdrop span{font:inherit}
.syntax-ready .python-editor-backdrop{display:block}
.syntax-ready .python-editor{position:relative;background:transparent;color:transparent;-webkit-text-fill-color:transparent;caret-color:var(--code-text);text-shadow:none}
.syntax-ready .python-editor::selection{background:var(--syntax-selection);color:transparent;-webkit-text-fill-color:transparent}
@media(max-width:700px){.python-editor-frame .python-editor,.python-editor-backdrop{font-size:12px;padding:12px}}
@media(forced-colors:active){.syntax-ready .python-editor-backdrop{display:none}.syntax-ready .python-editor{color:CanvasText;-webkit-text-fill-color:CanvasText;caret-color:CanvasText;background:Canvas}.syntax-ready .python-editor::selection{color:HighlightText;-webkit-text-fill-color:HighlightText;background:Highlight}}
@media print{.python-editor-frame{display:none}}
.code-editor-ready .python-editor,.code-editor-ready .python-editor-backdrop{display:none!important}
.code-editor-ready{border:1px solid var(--line)}
.code-editor-ready .cm-editor{height:360px;min-height:180px;max-height:720px;resize:vertical;overflow:hidden;background:var(--code-bg);color:var(--code-text);font:13px/1.75 var(--mono)}
.code-editor-ready .cm-editor.cm-focused{outline:2px solid var(--accent);outline-offset:2px}
.code-editor-ready .cm-scroller{font-family:var(--mono);overflow:auto;line-height:1.75}
.code-editor-ready .cm-content{padding:12px 0;caret-color:var(--code-text)}
.code-editor-ready .cm-line{padding:0 14px}
.code-editor-ready .cm-gutters{background:var(--code-bg);border-right:1px solid var(--line);color:var(--muted);font:inherit}
.code-editor-ready .cm-lineNumbers .cm-gutterElement{padding:0 10px 0 12px;min-width:35px}
.code-editor-ready .cm-activeLine,.code-editor-ready .cm-activeLineGutter{background:var(--hover)}
.code-editor-ready .cm-cursor{border-left-color:var(--code-text)}
.code-editor-ready .cm-selectionBackground,.code-editor-ready .cm-focused .cm-selectionBackground{background:var(--syntax-selection)}
.code-editor-ready .cm-matchingBracket{outline:1px solid var(--syntax-function);background:var(--syntax-selection);color:inherit}
.code-editor-ready .cm-nonmatchingBracket{outline:1px solid var(--red)}
.code-editor-ready .cm-python-error-line{background:var(--error-bg);box-shadow:inset 3px 0 var(--error-line)}
.code-editor-ready .cm-tooltip{border:1px solid var(--line);background:var(--panel);color:var(--text);box-shadow:0 6px 20px #0002;max-width:min(440px,90vw);font:12px/1.6 var(--mono)}
.code-editor-ready .cm-tooltip-autocomplete>ul>li{padding:5px 10px}
.code-editor-ready .cm-tooltip-autocomplete>ul>li[aria-selected]{background:var(--active);color:var(--text)}
.code-editor-ready .cm-completionDetail{color:var(--muted);font:10px var(--sans)}
.code-editor-ready .cm-completionInfo{padding:12px;font:12px/1.7 var(--sans);max-width:300px;overflow-wrap:anywhere}
.cm-content .syntax-keyword{color:var(--syntax-keyword)}.cm-content .syntax-function{color:var(--syntax-function)}.cm-content .syntax-variable{color:var(--syntax-variable)}.cm-content .syntax-type{color:var(--syntax-type)}.cm-content .syntax-string{color:var(--syntax-string)}.cm-content .syntax-number{color:var(--syntax-number)}.cm-content .syntax-comment{color:var(--syntax-comment)}
.python-error[hidden]{display:none}
.python-error{margin:12px 0 20px;padding:16px 18px;border:1px solid var(--error-line);border-left-width:3px;background:var(--error-bg);border-radius:4px;font-size:13px;overflow-wrap:anywhere}
.python-error h4{margin:0 0 8px;font-size:14px}.python-error p{margin:8px 0;line-height:1.7}.python-error-message{display:block;font:12px/1.8 var(--mono);white-space:pre-wrap;margin:10px 0;color:var(--text)}
.python-error .btn{margin:5px 0 10px}.python-error details{margin-top:8px;font-size:12px}.python-error summary{cursor:pointer;color:var(--muted)}.python-error pre{white-space:pre;overflow:auto;max-height:260px;background:var(--code-bg);color:var(--code-text);padding:14px;border:1px solid var(--line);font:12px/1.8 var(--mono);margin:10px 0 0}
@media(max-width:700px){.code-editor-ready .cm-editor{height:300px;font-size:12px}.code-editor-ready .cm-line{padding:0 10px}.python-error{padding:12px}}
@media(forced-colors:active){.code-editor-ready .cm-editor,.code-editor-ready .cm-gutters{color:CanvasText;background:Canvas}.code-editor-ready .cm-python-error-line{outline:2px solid Highlight}.cm-content [class*=syntax-]{color:CanvasText}}
