/* CodeMirror 6 styles - captured from the bundle, generated theme classes
   rewritten to the stable .cm-* names so this loads as a normal stylesheet
   under strict CSP (no runtime \3c style> injection, no nonce). */
.cm-editor.cm-focused {outline: 1px dotted #212121;}
.cm-editor {position: relative !important; box-sizing: border-box; display: flex !important; flex-direction: column;}
.cm-editor .cm-scroller {display: flex !important; align-items: flex-start !important; font-family: monospace; line-height: 1.4; height: 100%; overflow-x: auto; position: relative; z-index: 0; overflow-anchor: none;}
.cm-editor .cm-content[contenteditable="true"] {-webkit-user-modify: read-write-plaintext-only;}
.cm-editor .cm-content {margin: 0; flex-grow: 2; flex-shrink: 0; display: block; white-space: pre; overflow-wrap: normal; box-sizing: border-box; min-height: 100%; padding: 4px 0; outline: none;}
.cm-editor .cm-lineWrapping { white-space: break-spaces; word-break: break-word; overflow-wrap: anywhere; flex-shrink: 1;}
.cm-editor .cm-content {caret-color: black;}
.cm-editor .cm-content {caret-color: white;}
.cm-editor .cm-line {display: block; padding: 0 2px 0 6px;}
.cm-editor .cm-layer > * {position: absolute;}
.cm-editor .cm-layer {user-select: none; position: absolute; left: 0; top: 0; contain: size style;}
.cm-editor .cm-selectionBackground {background: #d9d9d9;}
.cm-editor .cm-selectionBackground {background: #222;}
.cm-editor.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground {background: #d7d4f0;}
.cm-editor.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground {background: #233;}
.cm-editor .cm-cursorLayer {pointer-events: none;}
.cm-editor.cm-focused > .cm-scroller > .cm-cursorLayer {animation: steps(1) cm-blink 1.2s infinite;}
@keyframes cm-blink {50% {opacity: 0;}}
@keyframes cm-blink2 {50% {opacity: 0;}}
.cm-editor .cm-cursor, .cm-editor .cm-dropCursor {border-left: 1.2px solid black; margin-left: -0.6px; pointer-events: none;}
.cm-editor .cm-cursor {display: none;}
.cm-editor .cm-cursor {border-left-color: #ddd;}
.cm-editor .cm-selectionHandle {background-color: currentColor; width: 1.5px;}
.cm-editor .cm-selectionHandle-start::before, .cm-editor .cm-selectionHandle-end::before {content: ""; background-color: inherit; border-radius: 50%; width: 8px; height: 8px; position: absolute; left: -3.25px;}
.cm-editor .cm-selectionHandle-start::before {top: -8px;}
.cm-editor .cm-selectionHandle-end::before {bottom: -8px;}
.cm-editor .cm-dropCursor {position: absolute;}
.cm-editor.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor {display: block;}
.cm-editor .cm-iso {unicode-bidi: isolate;}
.cm-editor .cm-announced {position: fixed; top: -10000px;}
@media print {.cm-editor .cm-announced {display: none;}}
.cm-editor .cm-activeLine {background-color: #cef4;}
.cm-editor .cm-activeLine {background-color: #9ef3;}
.cm-editor .cm-specialChar {color: red;}
.cm-editor .cm-specialChar {color: #f78;}
.cm-editor .cm-gutters {flex-shrink: 0; display: flex; height: 100%; box-sizing: border-box; z-index: 200;}
.cm-editor .cm-gutters-before {inset-inline-start: 0;}
.cm-editor .cm-gutters-after {inset-inline-end: 0;}
.cm-editor .cm-gutters.cm-gutters-before {border-right-width: 1px;}
.cm-editor .cm-gutters.cm-gutters-after {border-left-width: 1px;}
.cm-editor .cm-gutters {background-color: #f5f5f5; color: #6c6c6c; border: 0px solid #ddd;}
.cm-editor .cm-gutters {background-color: #333338; color: #ccc;}
.cm-editor .cm-gutter {display: flex !important; flex-direction: column; flex-shrink: 0; box-sizing: border-box; min-height: 100%; overflow: hidden;}
.cm-editor .cm-gutterElement {box-sizing: border-box;}
.cm-editor .cm-lineNumbers .cm-gutterElement {padding: 0 3px 0 5px; min-width: 20px; text-align: right; white-space: nowrap;}
.cm-editor .cm-activeLineGutter {background-color: #e2f2ff;}
.cm-editor .cm-activeLineGutter {background-color: #222227;}
.cm-editor .cm-panels {box-sizing: border-box; position: sticky; left: 0; right: 0; z-index: 300;}
.cm-editor .cm-panels {background-color: #f5f5f5; color: black;}
.cm-editor .cm-panels-top {border-bottom: 1px solid #ddd;}
.cm-editor .cm-panels-bottom {border-top: 1px solid #ddd;}
.cm-editor .cm-panels {background-color: #333338; color: white;}
.cm-editor .cm-dialog label {font-size: 80%;}
.cm-editor .cm-dialog {padding: 2px 19px 4px 6px; position: relative;}
.cm-editor .cm-dialog-close {position: absolute; top: 3px; right: 4px; background-color: inherit; border: none; font: inherit; font-size: 14px; padding: 0;}
.cm-editor .cm-tab {display: inline-block; overflow: hidden; vertical-align: bottom;}
.cm-editor .cm-widgetBuffer {vertical-align: text-top; height: 1em; width: 0; display: inline;}
.cm-editor .cm-placeholder {color: #888; display: inline-block; vertical-align: top; user-select: none;}
.cm-editor .cm-highlightSpace {background-image: radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%); background-position: center;}
.cm-editor .cm-highlightTab {background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>'); background-size: auto 100%; background-position: right 90%; background-repeat: no-repeat;}
.cm-editor .cm-trailingSpace {background-color: #f325;}
.cm-editor .cm-button {vertical-align: middle; color: inherit; font-size: 70%; padding: .2em 1em; border-radius: 1px;}
.cm-editor .cm-button:active {background-image: linear-gradient(#b4b4b4, #d0d3d6);}
.cm-editor .cm-button {background-image: linear-gradient(#eff1f5, #d9d9df); border: 1px solid #888;}
.cm-editor .cm-button:active {background-image: linear-gradient(#111, #333);}
.cm-editor .cm-button {background-image: linear-gradient(#393939, #111); border: 1px solid #888;}
.cm-editor .cm-textfield {vertical-align: middle; color: inherit; font-size: 70%; border: 1px solid silver; padding: .2em .5em;}
.cm-editor .cm-textfield {background-color: white;}
.cm-editor .cm-textfield {border: 1px solid #555; background-color: inherit;}
.cm-editor .cm-tooltip.cm-tooltip-autocomplete > ul > li, .cm-editor .cm-tooltip.cm-tooltip-autocomplete > ul > completion-section {padding: 1px 3px; line-height: 1.2;}
.cm-editor .cm-tooltip.cm-tooltip-autocomplete > ul > li {overflow-x: hidden; text-overflow: ellipsis; cursor: pointer;}
.cm-editor .cm-tooltip.cm-tooltip-autocomplete > ul > completion-section {display: list-item; border-bottom: 1px solid silver; padding-left: 0.5em; opacity: 0.7;}
.cm-editor .cm-tooltip.cm-tooltip-autocomplete > ul {font-family: monospace; white-space: nowrap; overflow: hidden auto; max-width: min(700px, 95vw); min-width: 250px; max-height: 10em; height: 100%; list-style: none; margin: 0; padding: 0;}
.cm-editor .cm-tooltip-autocomplete ul li[aria-selected] {background: #17c; color: white;}
.cm-editor .cm-tooltip-autocomplete-disabled ul li[aria-selected] {background: #777;}
.cm-editor .cm-tooltip-autocomplete ul li[aria-selected] {background: #347; color: white;}
.cm-editor .cm-tooltip-autocomplete-disabled ul li[aria-selected] {background: #444;}
.cm-editor .cm-completionListIncompleteTop::before, .cm-editor .cm-completionListIncompleteBottom::after {content: "···"; opacity: 0.5; display: block; text-align: center; cursor: pointer;}
.cm-editor .cm-tooltip.cm-completionInfo {position: absolute; padding: 3px 9px; width: max-content; max-width: 400px; box-sizing: border-box; white-space: pre-line;}
.cm-editor .cm-completionInfo.cm-completionInfo-left {right: 100%;}
.cm-editor .cm-completionInfo.cm-completionInfo-right {left: 100%;}
.cm-editor .cm-completionInfo.cm-completionInfo-left-narrow {right: 30px;}
.cm-editor .cm-completionInfo.cm-completionInfo-right-narrow {left: 30px;}
.cm-editor .cm-snippetField {background-color: #0002;}
.cm-editor .cm-snippetField {background-color: #fff2;}
.cm-editor .cm-snippetFieldPosition {vertical-align: text-top; width: 0; height: 1.15em; display: inline-block; margin: 0 -0.7px -.7em; border-left: 1.4px dotted #888;}
.cm-editor .cm-completionMatchedText {text-decoration: underline;}
.cm-editor .cm-completionDetail {margin-left: 0.5em; font-style: italic;}
.cm-editor .cm-completionIcon {font-size: 90%; width: .8em; display: inline-block; text-align: center; padding-right: .6em; opacity: 0.6; box-sizing: content-box;}
.cm-editor .cm-completionIcon-function::after, .cm-editor .cm-completionIcon-method::after {content: 'ƒ';}
.cm-editor .cm-completionIcon-class::after {content: '○';}
.cm-editor .cm-completionIcon-interface::after {content: '◌';}
.cm-editor .cm-completionIcon-variable::after {content: '𝑥';}
.cm-editor .cm-completionIcon-constant::after {content: '𝐶';}
.cm-editor .cm-completionIcon-type::after {content: '𝑡';}
.cm-editor .cm-completionIcon-enum::after {content: '∪';}
.cm-editor .cm-completionIcon-property::after {content: '□';}
.cm-editor .cm-completionIcon-keyword::after {content: '🔑︎';}
.cm-editor .cm-completionIcon-namespace::after {content: '▢';}
.cm-editor .cm-completionIcon-text::after {content: 'abc'; font-size: 50%; vertical-align: middle;}
.cm-editor .cm-tooltip {z-index: 500; box-sizing: border-box;}
.cm-editor .cm-tooltip {border: 1px solid #bbb; background-color: #f5f5f5;}
.cm-editor .cm-tooltip-section:not(:first-child) {border-top: 1px solid #bbb;}
.cm-editor .cm-tooltip {background-color: #333338; color: white;}
.cm-editor .cm-tooltip-arrow::before, .cm-editor .cm-tooltip-arrow::after {content: ''; position: absolute; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent;}
.cm-editor .cm-tooltip-above .cm-tooltip-arrow::before {border-top: 7px solid #bbb;}
.cm-editor .cm-tooltip-above .cm-tooltip-arrow::after {border-top: 7px solid #f5f5f5; bottom: 1px;}
.cm-editor .cm-tooltip-above .cm-tooltip-arrow {bottom: -7px;}
.cm-editor .cm-tooltip-below .cm-tooltip-arrow::before {border-bottom: 7px solid #bbb;}
.cm-editor .cm-tooltip-below .cm-tooltip-arrow::after {border-bottom: 7px solid #f5f5f5; top: 1px;}
.cm-editor .cm-tooltip-below .cm-tooltip-arrow {top: -7px;}
.cm-editor .cm-tooltip-arrow {height: 7px; width: 14px; position: absolute; z-index: -1; overflow: hidden;}
.cm-editor .cm-tooltip .cm-tooltip-arrow::before {border-top-color: #333338; border-bottom-color: #333338;}
.cm-editor .cm-tooltip .cm-tooltip-arrow::after {border-top-color: transparent; border-bottom-color: transparent;}
.cm-editor.cm-focused .cm-matchingBracket {background-color: #328c8252;}
.cm-editor.cm-focused .cm-nonmatchingBracket {background-color: #b554;}
.cm-editor .cm-line ::selection, .cm-editor .cm-line::selection {background-color: transparent !important;}
.cm-editor .cm-line {caret-color: transparent !important;}
.cm-editor .cm-content :focus::selection, .cm-editor .cm-content :focus ::selection {background-color: Highlight !important;}
.cm-editor .cm-content :focus {caret-color: initial !important;}
.cm-editor .cm-content {caret-color: transparent !important;}


/* --- colo dark editor chrome --- */
.cm-editor { color: #e6e6e6; background: transparent; }
.cm-editor .cm-content { caret-color: #e6e6e6; }
.cm-editor .cm-gutters { background: rgba(255,255,255,0.03); color: #6b7280; border: none; }
.cm-editor .cm-activeLineGutter { background: rgba(255,255,255,0.06); color: #cbd5e1; }
.cm-editor .cm-activeLine { background: rgba(255,255,255,0.04); }
.cm-editor .cm-cursor, .cm-editor .cm-dropCursor { border-left-color: #e6e6e6; }
.cm-editor .cm-selectionBackground,
.cm-editor.cm-focused .cm-selectionBackground { background: rgba(99,102,241,0.35); }
.cm-editor .cm-matchingBracket { background: rgba(99,102,241,0.25); outline: 1px solid rgba(99,102,241,0.6); }

/* Completion / hover popups: high z-index + dark surface. Rendered position:fixed
   (escape the editor's overflow-hidden wrapper); style globally since fixed
   tooltips may not sit under .cm-editor. */
.cm-editor .cm-tooltip, .cm-tooltip { z-index: 9999 !important; background: #1f2430; color: #e6e6e6; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; }
.cm-tooltip.cm-tooltip-autocomplete > ul { font-family: inherit; max-height: 16em; }
.cm-tooltip.cm-tooltip-autocomplete > ul > li { padding: 2px 8px; }
.cm-tooltip.cm-tooltip-autocomplete > ul > li[aria-selected] { background: rgba(99,102,241,0.45); color: #fff; }
.cm-completionLabel { color: #e6e6e6; }
.cm-completionDetail { color: #9aa4b2; font-style: italic; }

/* --- syntax colours (stable classHighlighter tok-* classes) --- */
.tok-keyword { color: #c792ea; }
.tok-controlKeyword, .tok-moduleKeyword { color: #c792ea; }
.tok-operator { color: #89ddff; }
.tok-string, .tok-string2, .tok-special { color: #c3e88d; }
.tok-number, .tok-bool, .tok-atom { color: #f78c6c; }
.tok-comment, .tok-lineComment, .tok-blockComment { color: #7d8799; font-style: italic; }
.tok-function, .tok-definition.tok-variableName { color: #82aaff; }
.tok-variableName { color: #e6e6e6; }
.tok-typeName, .tok-className, .tok-namespace { color: #ffcb6b; }
.tok-propertyName { color: #82aaff; }
.tok-punctuation, .tok-bracket, .tok-paren, .tok-brace { color: #abb2bf; }
.tok-meta { color: #7d8799; }
.tok-invalid { color: #ff5370; }
