/* Academy scope: retired surfaces stay inert while legacy handlers are retired safely. */
[data-retired] { display: none !important; }
html { scrollbar-gutter: stable; }
[data-view-panel="knowledge"] .knowledge-layout { grid-template-columns: minmax(0, 1fr); }
[data-view-panel="knowledge"] .source-column { width: 100%; min-width: 0; }
dialog { box-sizing: border-box; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; overflow: auto; overscroll-behavior: contain; }
dialog form, dialog fieldset, dialog .form-grid { min-width: 0; }
body:has(dialog[open]) { overflow: hidden; }
#app input[type="checkbox"] { appearance: none; display: inline-grid; place-content: center; width: 18px; height: 18px; min-width: 18px; padding: 0; margin: 3px 6px 3px 0; border: 1.5px solid #111827; border-radius: 3px; background: #fff; vertical-align: middle; cursor: pointer; }
#app input[type="checkbox"]:checked::after { content: ""; width: 8px; height: 4px; border: solid #111827; border-width: 0 0 2px 2px; transform: rotate(-45deg) translateY(-1px); }
#app input[type="checkbox"] { border-radius: 3px !important; }
input[type="checkbox"]:focus-visible { outline: 3px solid #00a5bd; outline-offset: 3px; }
input[type="checkbox"]:disabled { opacity: .55; cursor: not-allowed; }
[data-theme="dark"] dialog, [data-theme="dark"] .academy-editor { color: #e6edf5; background-color: #111c30; }
[data-theme="dark"] { color-scheme: dark; }
[data-theme="dark"] .academy-editor .academy-step-block { background: #151d26; border-color: #405166; color: #edf4fc; }
[data-theme="dark"] dialog :is(label, legend, h2, h3, h4, strong), [data-theme="dark"] .academy-editor :is(label, legend, h2, h3, h4, strong) { color: #edf4fc; }
[data-theme="dark"] dialog :is(p, small), [data-theme="dark"] .academy-editor :is(p, small) { color: #b9c8db; }
[data-theme="dark"] :is(input:not([type="checkbox"]), textarea, select) { color: #edf4fc; background-color: #17263b; border-color: #64748b; }
[data-theme="dark"] :is(input, textarea)::placeholder { color: #a8b8ca; opacity: 1; }
#passwordResetSearch { width: 100%; margin: 8px 0; }
@media (max-width: 640px) { dialog { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); } }
