﻿/* КуМир онлайн (Kumir.aspx) — окно среды в стиле КуМира 2.1. Интерфейс: js/kumir/kumir-ide.js.
   Шрифт PT Mono © ParaType, PT Free Font License 1.3 (fonts/PTMono/). */

@font-face { font-family: 'PT Mono K'; src: url('/fonts/PTMono/PTM55F.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'PT Mono K'; src: url('/fonts/PTMono/PTM75F.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }

.kum-page { max-width: 1600px; margin: 0 auto; padding: 6px 12px 30px; }
.kum-crumbs { font-size: 13px; color: #777; margin: 2px 0 4px; }
.kum-crumbs a { color: #0155cb; text-decoration: none; }
.kum-crumbs a:hover { text-decoration: underline; }
.kum-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 2px 0 8px; }
.kum-head-text { flex: 1 1 400px; min-width: 0; }
.kum-head h1 { font-size: 24px; margin: 0; font-weight: 700; line-height: 1.25; }
.kum-head .kum-sub { margin: 2px 0 0; color: #555; font-size: 14px; }
.kum-head-actions { display: flex; gap: 8px; align-items: center; }
.kum-hbtn { height: 34px; padding: 0 14px; border: 1px solid #c9d3e3; border-radius: 8px; background: #fff; font-size: 14px; cursor: pointer; white-space: nowrap; }
.kum-hbtn:hover { background: #f1f6ff; border-color: #9fb8e0; }
.kum-hmenu { position: relative; }
.kum-hmenu-pop { position: absolute; right: 0; top: 38px; z-index: 1000; width: 330px; max-height: 70vh; overflow-y: auto; background: #fff; border: 1px solid #c9d3e3; border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 6px 0; }
.kum-hmenu-group { font-size: 12px; font-weight: 700; color: #6a7891; text-transform: uppercase; letter-spacing: .03em; padding: 8px 14px 3px; }
.kum-hmenu-item { display: block; padding: 5px 14px; color: #1d2b44; text-decoration: none; font-size: 14px; }
.kum-hmenu-item:hover { background: #eef4ff; text-decoration: none; }
.kum-task { background: #fffbea; border: 1px solid #f0dc9a; border-radius: 8px; padding: 9px 14px; margin: 0 0 8px; font-size: 15px; line-height: 1.45; }
.kum-notice { background: #fff1f0; border: 1px solid #f3b4ae; border-radius: 8px; padding: 8px 14px; margin: 0 0 8px; font-size: 14px; }
.kum-unofficial-line { color: #888; font-size: 12px; margin: 6px 2px 0; }

/* ---------- реклама под окном (Kumir.aspx) ---------- */
.kum-withad { --kum-adh: 118px; }   /* баннер 90 + отступ 8 + 20: окно и баннер вместе помещаются в первый экран */
.kum-ad { display: flex; justify-content: center; align-items: center; min-height: 90px; margin: 8px 0 0; overflow: hidden; }
.kum-page:not(.kum-withad) .kum-ad { display: none; }
@media print { .kum-ad { display: none !important; } }

/* ---------- окно ---------- */
.kum-win {
  --kum-fs: 15px; --kum-lh: 19px;
  --kum-mono: 'PT Mono K', 'PT Mono', Consolas, 'Courier New', monospace;
  --kum-ui: 'Segoe UI', Tahoma, Arial, sans-serif;
  display: flex; flex-direction: column;
  height: calc(100vh - 150px - var(--kum-adh, 0px)); min-height: 540px;
  border: 1px solid #b9b9b9; background: #f0f0f0;
  font-family: var(--kum-ui); font-size: 13px; color: #000;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  position: relative; user-select: none;
}
.kum-win.kum-full { position: fixed; inset: 0; height: auto; z-index: 100000; border: 0; }
.kum-win button { font-family: var(--kum-ui); }

.kum-titlebar { display: flex; align-items: center; height: 30px; background: #fff; border-bottom: 1px solid #e3e3e3; padding: 0 0 0 8px; }
.kum-logo { width: 18px; height: 18px; border-radius: 3px; background: #2b3a8f; color: #ffd200; font: bold 13px/18px var(--kum-ui); text-align: center; margin-right: 8px; flex: 0 0 auto; }
.kum-wtitle { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; }
.kum-tbtn { width: 44px; height: 30px; border: 0; background: transparent; font-size: 15px; line-height: 30px; color: #333; cursor: pointer; }
.kum-tbtn:hover { background: #e5e5e5; }
.kum-tbtn-wide { width: auto; padding: 0 12px; font-size: 13px; color: #0155cb; }

/* меню */
.kum-menubar { display: flex; background: #fff; height: 22px; align-items: stretch; padding-left: 2px; position: relative; }
.kum-mtop { padding: 0 6px; line-height: 22px; cursor: default; white-space: nowrap; }
.kum-mtop:hover, .kum-mtop.open { background: #cce8ff; }
.kum-mtop.disabled { color: #999; }
.kum-mpop { position: absolute; top: 22px; min-width: 230px; background: #f9f9f9; border: 1px solid #a0a0a0; box-shadow: 2px 3px 6px rgba(0,0,0,.25); padding: 3px 0; z-index: 50; }
.kum-mi { display: flex; align-items: center; padding: 3px 24px 3px 28px; white-space: nowrap; cursor: default; position: relative; }
.kum-mi:hover:not(.disabled) { background: #cce8ff; }
.kum-mi.disabled { color: #a0a0a0; }
.kum-mi .kum-mk { margin-left: auto; padding-left: 28px; color: #444; }
.kum-mi.disabled .kum-mk { color: #b0b0b0; }
.kum-mi.checked::before { content: '✓'; position: absolute; left: 9px; }
.kum-msep { height: 1px; background: #d7d7d7; margin: 3px 4px 3px 26px; }
.kum-mhdr { padding: 5px 24px 2px 12px; font-size: 11px; font-weight: 700; color: #6a6a6a; text-transform: uppercase; letter-spacing: .03em; }
.kum-mpop { max-height: 70vh; overflow-y: auto; }

/* панель кнопок */
.kum-toolbar { display: flex; align-items: center; height: 24px; padding: 0 3px; background: #f0f0f0; border-bottom: 1px solid #dadada; gap: 1px; }
.kum-tb { width: 22px; height: 22px; border: 1px solid transparent; background: transparent; padding: 2px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; cursor: default; }
.kum-tb:hover:not(:disabled) { border-color: #9ec9ef; background: #e3f0fb; }
.kum-tb:disabled { opacity: .35; }
.kum-tb svg { width: 16px; height: 16px; display: block; }
.kum-tbsep { width: 1px; height: 16px; background: #c8c8c8; margin: 0 4px; }

/* ---------- основная часть ---------- */
.kum-body { flex: 1 1 auto; display: flex; min-height: 0; background: #f0f0f0; }
.kum-left { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 300px; }
.kum-right { flex: 0 0 auto; width: 34%; min-width: 220px; display: flex; flex-direction: column; padding: 2px 2px 2px 0; gap: 4px; }
.kum-right.kum-hidden, .kum-vsplit.kum-hidden { display: none; }
.kum-vsplit { flex: 0 0 6px; cursor: col-resize; }
.kum-hsplit { flex: 0 0 6px; cursor: row-resize; }

/* редактор + поля */
.kum-edbox { flex: 1 1 auto; display: flex; min-height: 80px; margin: 2px 0 0 2px; border: 1px solid #a0a0a0; background: #fff; position: relative; }
.kum-edbox.focused { border-color: #3992d4; }
.kum-edbox.has-errors { border-color: #3992d4; }
.kum-edwrap { flex: 1 1 auto; min-width: 0; position: relative; }
.kum-margin { flex: 0 0 auto; width: 190px; border-left: 2px solid #a0a0a0; position: relative; overflow: hidden; background: #fff; }
.kum-mgrip { position: absolute; left: 0; top: 0; bottom: 0; width: 5px; cursor: col-resize; z-index: 3; }
.kum-edbox.focused .kum-margin { border-left-color: #3992d4; }
.kum-edbox.has-errors .kum-margin { border-left-color: #e00000; }
.kum-margin-in { position: absolute; left: 0; right: 0; top: 0; cursor: default; }
.kum-mrow { position: absolute; left: 0; right: 0; padding-left: 5px; white-space: pre; overflow: hidden; font-family: var(--kum-mono); font-size: var(--kum-fs); line-height: var(--kum-lh); height: var(--kum-lh); color: #000; }
.kum-mrow.err { color: #e00000; }
.kum-mrow.cur { background: linear-gradient(#b8f5b8, #8fe88f 45%, #5cd65c); }
.kum-mrow.rterr { background: linear-gradient(#ffc8c8, #f08080); }

.kum-edwrap .CodeMirror { position: absolute; inset: 0; height: auto; font-family: var(--kum-mono); font-size: var(--kum-fs); line-height: var(--kum-lh); background: #fff; color: #000; }
.kum-edwrap .CodeMirror pre.CodeMirror-line { font-size: inherit; line-height: inherit; font-family: inherit; word-break: normal; }
.kum-edwrap .CodeMirror-gutters { background: #eaf1f7; border-right: 0; }
.kum-edwrap .CodeMirror-linenumber { color: #000; padding: 0 4px 0 2px; min-width: 22px; }
.kum-edwrap .CodeMirror-gutter-elt.kum-bp { color: #fff; }
.kum-edwrap .CodeMirror-linenumbers { cursor: pointer; }
.kum-edwrap .CodeMirror-cursor { border-left: 2px solid #000; }
.kum-edwrap .CodeMirror-selected { background: #c6defa; }
.kum-edwrap .CodeMirror-focused .CodeMirror-selected { background: #a8cdf5; }
.kum-edwrap .CodeMirror-matchingbracket { color: inherit !important; background: #dfe9b5; }
.kum-ro .CodeMirror-cursors { visibility: hidden !important; }

/* подсветка (цвета КуМира 2.1 по умолчанию; латинские буквы — курсив) */
.cm-s-kumir .cm-kw { color: #000; font-weight: 700; }
.cm-s-kumir .cm-type { color: #c05800; font-weight: 700; }
.cm-s-kumir .cm-num, .cm-s-kumir .cm-str, .cm-s-kumir .cm-bool { color: #0095ff; font-weight: 700; }
.cm-s-kumir .cm-alg { color: #0000c8; font-weight: 700; }
.cm-s-kumir .cm-mod { color: #00aa00; font-weight: 700; }
.cm-s-kumir .cm-doc { color: #a3acff; font-weight: 700; }
.cm-s-kumir .cm-comment { color: #888; font-weight: 700; font-style: italic; }
.cm-s-kumir .cm-lat { font-style: italic; }
.cm-s-kumir .kum-err { text-decoration: underline wavy #e00000; text-decoration-skip-ink: none; text-underline-offset: 3px; }
.cm-s-kumir .kum-rtbox { box-shadow: inset 0 1px #e00000, inset 0 -1px #e00000; }
.cm-s-kumir .kum-rtbox-s { box-shadow: inset 1px 0 #e00000, inset 0 1px #e00000, inset 0 -1px #e00000; }
.cm-s-kumir .kum-rtbox-e { box-shadow: inset -1px 0 #e00000, inset 0 1px #e00000, inset 0 -1px #e00000; }
.cm-s-kumir .kum-rtbox-s.kum-rtbox-e { box-shadow: inset 0 0 0 1px #e00000; }

/* отступы-точки: уровень = две позиции; точка внизу первой позиции */
.kum-edwrap pre.CodeMirror-line.kum-ind::before {
  content: ''; position: absolute; left: 4px; top: 0; bottom: 0; width: calc(var(--kum-n) * 2ch);
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(1ch - 4px), #000 calc(1ch - 4px), #000 calc(1ch - 1px), transparent calc(1ch - 1px), transparent 2ch);
  background-size: 100% 3px; background-repeat: no-repeat; background-position: 0 calc(100% - 4px);
  pointer-events: none;
}
/* строки выполнения */
.kum-edwrap .kum-curline { background: linear-gradient(#b8f5b8, #8fe88f 45%, #5cd65c); }
.kum-edwrap .kum-rterrline { background: linear-gradient(#ffc8c8, #f08080); }
.kum-edwrap .kum-bpline .CodeMirror-linenumber { background: #e00000; color: #fff; border-radius: 0 8px 8px 0; }

/* поиск */
.kum-find { position: absolute; top: 0; right: 0; z-index: 10; background: #f4f4f4; border: 1px solid #a0a0a0; border-top: 0; padding: 4px 6px; display: flex; gap: 4px; align-items: center; font-size: 12px; box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.kum-find input { width: 150px; font: 13px var(--kum-mono); padding: 1px 4px; border: 1px solid #a0a0a0; }
.kum-find button { font-size: 12px; padding: 0 6px; height: 22px; border: 1px solid #adadad; background: #e1e1e1; }
.kum-find .kum-find-msg { color: #a00; min-width: 70px; }

/* ввод-вывод */
.kum-io { flex: 0 0 auto; height: 26%; min-height: 50px; margin-left: 2px; border: 1px solid #a0a0a0; background: #fff; overflow: auto; position: relative; user-select: text; cursor: text; }
.kum-io.kum-hidden, .kum-hsplit.kum-hidden { display: none; }
.kum-io-in { padding: 3px 5px; font-family: var(--kum-mono); font-size: var(--kum-fs); line-height: var(--kum-lh); white-space: pre-wrap; word-break: break-all; color: #000; }
.kum-io .sys { color: #888; font-style: italic; }
.kum-io .err { color: #e00000; }
.kum-io .inp { color: #0000a0; }
.kum-io .inp-bad { color: #e00000; }
.kum-io input.kum-in { font: inherit; color: #0000a0; border: 0; outline: 0; padding: 0; margin: 0; background: #eef5ff; min-width: 3ch; width: 3ch; caret-color: #000; }
.kum-io input.kum-in.bad { color: #e00000; background: #fff0f0; }

/* пристыкованные окна */
.kum-dock { flex: 1 1 0; min-height: 60px; display: flex; flex-direction: column; background: #fff; border: 1px solid #c8c8c8; }
.kum-dock.kum-hidden { display: none; }
.kum-dtitle { height: 18px; line-height: 18px; background: #f0f0f0; border-bottom: 1px solid #ddd; font-size: 11px; font-weight: 700; text-align: center; position: relative; }
.kum-dtitle button { position: absolute; top: 0; width: 18px; height: 18px; border: 0; background: transparent; font-size: 11px; line-height: 18px; padding: 0; color: #333; cursor: pointer; }
.kum-dtitle button:hover { background: #ddd; }
.kum-dbody { flex: 1 1 auto; overflow: auto; user-select: text; }

/* исполнители */
.kum-dock-actor { flex: 1.35 1 0; }
.kum-actor-body { position: relative; overflow: auto; background: #289628; user-select: none; }
.kum-actor-body canvas { display: block; }
.kum-draw-body { overflow: hidden; background: #99ff99; cursor: grab; }
.kum-draw-body:active { cursor: grabbing; }
.kum-draw-nav { position: absolute; top: 4px; right: 4px; display: flex; gap: 2px; }
.kum-draw-nav button { width: 24px; height: 22px; border: 1px solid #7a9a7a; background: rgba(255,255,255,.85); font-size: 14px; line-height: 18px; padding: 0; cursor: pointer; }
.kum-draw-nav button:hover { background: #fff; }
.kum-draw-nav button.on { background: #ffe58a; border-color: #b08a00; }
.kum-draw-xy { position: absolute; left: 4px; bottom: 3px; font: 12px var(--kum-mono); color: #234; background: rgba(255,255,255,.6); padding: 0 4px; pointer-events: none; }
.kum-draw-xy:empty { display: none; }
.kum-redit { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 3px 6px; background: #e8efff; border-bottom: 1px solid #b8c8f0; font-size: 12px; }
.kum-redit[hidden] { display: none; }
.kum-redit button { min-width: 22px; height: 20px; border: 1px solid #9aaad0; background: #fff; font-size: 12px; padding: 0 4px; cursor: pointer; }
.kum-redit b { min-width: 22px; text-align: center; }
.kum-redit .kum-re-hint { color: #556; flex: 1 1 100%; font-size: 11px; line-height: 1.3; }
.kum-redit .kum-re-done { font-weight: 700; border-color: #2c5aa0; margin-left: auto; }
.kum-pult { width: 290px; }
.kum-pult-log { height: 132px; overflow-y: auto; border: 1px solid #b0b0b0; background: #fdfdf4; font: 13px var(--kum-mono); padding: 2px 4px; margin-bottom: 8px; }
.kum-pult-log div { display: flex; justify-content: space-between; border-bottom: 1px dotted #ddd; }
.kum-pult-log div.bad b { color: #e00000; }
.kum-pult-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.kum-pult-keys button { height: 40px; border: 1px solid #8a8a8a; border-radius: 4px; background: linear-gradient(#fafafa, #dedede); font-size: 13px; cursor: pointer; }
.kum-pult-keys button:active { background: #cfcfcf; }
.kum-pult-keys button.on { background: #ffe58a; border-color: #b08a00; }
.kum-pult-keys button[data-p=up], .kum-pult-keys button[data-p=down], .kum-pult-keys button[data-p=left], .kum-pult-keys button[data-p=right] { font-size: 20px; }
.kum-pult-note { font-size: 11px; color: #666; margin-top: 6px; }

/* справка */
.kum-help { padding: 8px 12px 16px; font-size: 13px; line-height: 1.45; }
.kum-help h3 { font-size: 14px; margin: 12px 0 4px; color: #1a3a7a; }
.kum-help h3:first-child { margin-top: 2px; }
.kum-help p { margin: 3px 0 6px; }
.kum-help code, .kum-help pre { font-family: var(--kum-mono); font-size: 13px; }
.kum-help code { background: #f1f4f8; border: 0; color: #000; padding: 0 3px; border-radius: 2px; white-space: nowrap; }
.kum-help pre { background: #f6f8fb; border: 1px solid #e1e6ee; padding: 4px 8px; margin: 4px 0 8px; white-space: pre; overflow-x: auto; word-break: normal; color: #000; border-radius: 0; line-height: 1.35; }
.kum-help pre b { font-weight: 700; }
.kum-help table { border-collapse: collapse; margin: 4px 0 8px; }
.kum-help td { padding: 1px 8px 1px 0; vertical-align: top; }
.kum-help td:first-child { white-space: nowrap; font-family: var(--kum-mono); }
.kum-help-nav { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border-bottom: 1px solid #e3e3e3; background: #fafafa; position: sticky; top: 0; }
.kum-help-nav a { font-size: 12px; color: #0645ad; cursor: pointer; text-decoration: none; padding: 1px 6px; border: 1px solid #d5dbe5; border-radius: 3px; background: #fff; }
.kum-help-nav a:hover { background: #eaf2ff; }

/* строка состояния */
.kum-status { flex: 0 0 auto; height: 24px; display: flex; align-items: center; gap: 0; background: #f0f0f0; border-top: 1px solid #dadada; font-size: 14px; white-space: nowrap; overflow: hidden; }
.kum-sbtns { display: flex; gap: 1px; padding: 0 6px 0 3px; }
.kum-sbtns .kum-tb { width: 18px; height: 18px; padding: 1px; }
.kum-sbtns .kum-tb svg { width: 13px; height: 13px; }
.kum-st-state { min-width: 120px; padding: 0 12px; }
.kum-st-info { min-width: 190px; padding: 0 12px; }
.kum-st-info.err { color: #e00000; }
.kum-st-msg { flex: 1 1 auto; padding: 0 12px; overflow: hidden; text-overflow: ellipsis; }
.kum-st-msg.err { color: #e00000; }
.kum-st-pos { padding: 0 12px; }
.kum-st-lang { padding: 0 10px 0 6px; color: #333; }

/* диалоги */
.kum-dlg-back { position: absolute; inset: 0; background: rgba(0,0,0,.08); z-index: 200; }
.kum-dlg { position: absolute; z-index: 201; background: #fff; border: 1px solid #8a8a8a; box-shadow: 0 6px 24px rgba(0,0,0,.3); min-width: 300px; max-width: 90%; display: flex; flex-direction: column; user-select: text; }
.kum-dlg-t { height: 28px; line-height: 28px; padding: 0 8px 0 10px; background: #fff; border-bottom: 1px solid #e3e3e3; display: flex; cursor: move; user-select: none; }
.kum-dlg-t span { flex: 1 1 auto; font-size: 13px; }
.kum-dlg-t button { border: 0; background: transparent; width: 30px; font-size: 14px; cursor: pointer; }
.kum-dlg-t button:hover { background: #e81123; color: #fff; }
.kum-dlg-b { padding: 10px 12px; overflow: auto; max-height: 60vh; font-size: 13px; }
.kum-dlg-f { padding: 8px 12px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #eee; background: #f7f7f7; }
.kum-dlg-f button { min-width: 80px; height: 26px; border: 1px solid #adadad; background: #e1e1e1; font-size: 13px; }
.kum-dlg-f button.def { border-color: #0078d7; }
.kum-dlg input[type=text] { width: 100%; font-size: 14px; padding: 3px 6px; border: 1px solid #a0a0a0; }
.kum-vars { border-collapse: collapse; font-size: 13px; width: 100%; }
.kum-vars th, .kum-vars td { border: 1px solid #d0d0d0; padding: 2px 8px; text-align: left; vertical-align: top; }
.kum-vars th { background: #f0f0f0; font-weight: 400; }
.kum-vars td.v { font-family: var(--kum-mono); white-space: pre-wrap; word-break: break-all; }
.kum-vars tr.alg td { background: #eaf1f7; font-weight: 700; }

/* поделиться */
.kum-share-row { display: flex; gap: 6px; align-items: flex-start; }
.kum-share-row input, .kum-share-row textarea { flex: 1 1 auto; font: 13px var(--kum-mono); padding: 4px 6px; border: 1px solid #a0a0a0; resize: none; }
.kum-share-row button { height: 28px; padding: 0 10px; border: 1px solid #adadad; background: #e1e1e1; font-size: 13px; white-space: nowrap; }
.kum-share-msg { color: #c00; margin: 6px 0 0; min-height: 1em; }

/* виджет для вставки (KumirEmbed.aspx) */
html.kum-embed-html, html.kum-embed-html body { margin: 0; height: 100%; overflow: hidden; background: #f0f0f0; }
.kum-embed-html #kumirApp { height: 100%; }
.kum-embed-html .kum-win { height: 100%; min-height: 0; border: 0; box-shadow: none; }

/* текст под окном */
.kum-about { max-width: 980px; margin: 22px auto 0; font-size: 15px; line-height: 1.55; color: #222; }
.kum-about h2 { font-size: 20px; margin: 22px 0 8px; }
.kum-about h3 { font-size: 16px; margin: 16px 0 6px; }
.kum-about code { font-family: 'PT Mono K', Consolas, monospace; background: #f3f5f8; padding: 0 3px; color: #1d2b44; border-radius: 3px; }
.kum-about .kum-lead { font-size: 16px; }
.kum-about pre.kum-ex-code { font: 15px/1.35 'PT Mono K', Consolas, monospace; background: #fbfcfe; border: 1px solid #dfe5ef; border-radius: 8px; padding: 10px 14px; overflow-x: auto; white-space: pre; word-break: normal; color: #000; }
.kum-about pre.kum-ex-code code { background: transparent; padding: 0; font: inherit; color: inherit; }
.kum-ex-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 24px; }
.kum-ex-group h3 { font-size: 15px; margin: 8px 0 4px; color: #2a3d63; }
.kum-ex-group ul { margin: 0; padding-left: 18px; }
.kum-ex-group li { margin: 2px 0; }
.kum-about details { border: 1px solid #e3e8f0; border-radius: 8px; padding: 8px 12px; margin: 6px 0; background: #fff; }
.kum-about summary { cursor: pointer; font-weight: 600; }
.kum-about .kum-ans { margin-top: 6px; color: #333; }
.kum-links { display: flex; flex-wrap: wrap; gap: 8px; }
.kum-links a { padding: 5px 12px; border: 1px solid #d5dde9; border-radius: 16px; text-decoration: none; color: #0155cb; font-size: 14px; background: #fff; }
.kum-links a:hover { background: #eef4ff; }
.kum-about .kum-note { color: #666; font-size: 13px; }
.kum-noscript { padding: 30px; text-align: center; font-size: 16px; }

/* ---------- окно задачи с автопроверкой (KumirTask.aspx, js/kumir/kumir-task-ui.js) ---------- */
html.kum-task-html, html.kum-task-html body { margin: 0; height: 100%; overflow: hidden; background: #f0f0f0; }
.kum-task-html #kumirApp { height: 100%; }
.kum-task-html .kum-win { height: 100%; min-height: 0; border: 0; box-shadow: none; }
.kum-task-html .kum-right { width: 38%; min-width: 280px; }
.kum-dock-task { flex: 1.25 1 0; }
.kum-task { padding: 8px 10px 12px; font-size: 13px; line-height: 1.45; }
.kt-title { font-size: 15px; font-weight: 700; margin: 0 0 4px; }
.kt-prompt { margin: 0 0 8px; overflow-wrap: anywhere; }
.kt-prompt p { margin: 0 0 6px; }
.kt-prompt img { max-width: 100%; height: auto; }
.kt-prompt pre, .kt-pre { background: #f6f8fb; border: 1px solid #e1e6ee; padding: 4px 8px; margin: 2px 0 6px; white-space: pre-wrap; word-break: break-word; font: 13px var(--kum-mono); max-height: 160px; overflow: auto; }
.kt-what { color: #555; margin: 0 0 8px; }
.kt-tests { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 6px; }
.kt-tab { border: 1px solid #b9c3d3; background: #fff; border-radius: 4px; padding: 2px 8px; font-size: 12px; cursor: pointer; }
.kt-tab.on { border-color: #2b3a8f; box-shadow: inset 0 0 0 1px #2b3a8f; background: #eef1fb; }
.kt-tab.ok { background: #e3f6e3; border-color: #5aa95a; }
.kt-tab.bad { background: #fde8e8; border-color: #d46a6a; }
.kt-tab.on.ok { box-shadow: inset 0 0 0 1px #3a8a3a; }
.kt-tab.on.bad { box-shadow: inset 0 0 0 1px #c03030; }
.kt-tab[disabled] { cursor: default; color: #777; }
.kt-tinfo { margin: 0 0 8px; padding: 6px 8px; border-left: 3px solid #c9d3e3; background: #fafbfd; }
.kt-tinfo .kt-tres { margin-top: 4px; font-weight: 600; }
.kt-tinfo .kt-tres.ok { color: #2a7a2a; }
.kt-tinfo .kt-tres.bad { color: #b02020; }
.kt-legend { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; background: rgba(147,112,219,0.42); outline: 1px dashed #fff; border: 1px solid #9370db; margin-right: 3px; }
.kt-result { margin: 0 0 8px; padding: 6px 8px; border-radius: 4px; }
.kt-result:empty { display: none; }
.kt-result.ok { background: #e3f6e3; color: #1f5f1f; }
.kt-result.part { background: #fff4d6; color: #6b4b00; }
.kt-result.bad { background: #fde8e8; color: #8a1f1f; }
.kt-result ul { margin: 4px 0 0; padding-left: 18px; }
.kt-result .kt-stale { display: block; margin-top: 4px; color: #6b4b00; font-weight: 600; }
.kt-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.kt-btn { height: 28px; padding: 0 12px; border: 1px solid #9aa7bd; border-radius: 4px; background: linear-gradient(#fff, #e9edf3); font-size: 13px; cursor: pointer; }
.kt-btn:disabled { opacity: .55; cursor: default; }
.kt-btn.go { background: linear-gradient(#3e64c8, #2b4aa0); border-color: #24418f; color: #fff; font-weight: 600; }
.kt-note { color: #666; font-size: 12px; margin: 0; }
.kt-author { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #b9c3d3; }
.kt-author h4 { margin: 0 0 6px; font-size: 13px; }
.kt-arow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.kt-arow input[type=text] { flex: 1 1 140px; min-width: 0; height: 24px; border: 1px solid #b9c3d3; border-radius: 3px; padding: 0 6px; font-size: 13px; }
.kt-arow textarea { width: 100%; min-height: 54px; border: 1px solid #b9c3d3; border-radius: 3px; font: 13px var(--kum-mono); padding: 3px 6px; }
.kt-arow label { white-space: nowrap; }
.kt-amsg { margin: 4px 0 0; font-size: 12px; }
.kt-amsg.err { color: #b02020; }
.kt-amsg.ok { color: #2a7a2a; }
.kt-broken { color: #b02020; font-weight: 600; }
.kum-tbtn.kt-close { width: auto; padding: 0 12px; font-size: 13px; }
