/* Практическое задание в test.html (assets/test-task.js). Рабочая область как в прежней «Практике»:
   слева условие и схема, справа запрос и вывод (SQL) или мини-лист (Excel). */
body.task-active .container { max-width: 1240px; }
body.task-active #questionContainer .question { padding: 0; border: 0; background: none; box-shadow: none; }
.tt-workspace { display: grid; grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr); gap: 12px; align-items: stretch; margin-bottom: 16px; }
.tt-pane { background: #fff; border: 1px solid #dde2eb; border-radius: 14px; min-width: 0; }
.tt-left { display: flex; flex-direction: column; overflow: hidden; max-height: 74vh; }
.tt-task { flex: none; padding: 14px 18px; border-bottom: 1px solid #dde2eb; max-height: 45%; overflow: auto; }
.tt-task h2 { margin: 0 0 8px; font-size: 20px; }
.tt-eyebrow { margin: 0 0 4px; font-size: 13px; font-weight: 700; color: #6848d9; text-transform: uppercase; letter-spacing: .04em; }
.tt-prompt { white-space: pre-line; margin: 0; line-height: 1.5; }
.tt-schema { flex: 1; min-height: 0; overflow: auto; padding: 12px 18px 16px; }
.tt-schema h3 { margin: 0 0 6px; font-size: 16px; }
.tt-note { color: #5f6878; font-size: 14px; margin: 0 0 8px; }
.tt-tbl { border: 1px solid #dde2eb; border-radius: 12px; padding: 10px 12px; margin-top: 10px; }
.tt-tbl-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.tt-muted { color: #5f6878; font-size: 13px; flex: 1; }
.tt-link { appearance: none; border: 0; background: none; color: #315fd4; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; padding: 2px 4px; width: auto; margin: 0; }
.tt-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tt-chip { appearance: none; border: 1px solid #d6dcea; background: #f7f8fc; border-radius: 8px; padding: 3px 8px; font: 13px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace; cursor: pointer; color: #141722; width: auto; margin: 0; }
.tt-chip small { color: #5f6878; font-family: system-ui, sans-serif; }
.tt-chip:hover { border-color: #315fd4; }
.tt-col-notes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #5f6878; }
.tt-steps { margin: 4px 0 10px; padding-left: 20px; }
.tt-right { display: grid; grid-template-rows: minmax(220px, 42vh) minmax(200px, 32vh); gap: 12px; min-width: 0; }
.tt-editor-pane, .tt-out-pane { display: flex; flex-direction: column; overflow: hidden; }
.tt-pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #dde2eb; flex-wrap: wrap; }
.tt-pane-actions { display: flex; align-items: center; gap: 10px; }
.tt-button { appearance: none; border: 0; border-radius: 10px; background: #315fd4; color: #fff; font: inherit; font-size: 14px; font-weight: 700; padding: 6px 12px; min-height: 36px; cursor: pointer; width: auto; margin: 0; }
.tt-button.secondary { background: #fff; color: #141722; border: 1px solid #dde2eb; }
.tt-button:disabled { opacity: .55; cursor: not-allowed; }
.tt-editor { flex: 1; width: 100%; min-height: 0; resize: none; border: 0; border-radius: 0 0 14px 14px; background: #0f1422; color: #e8ecf8; padding: 14px; margin: 0; font: 15px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; tab-size: 2; }
.tt-out-tabs { display: flex; gap: 4px; padding: 6px 8px 0; border-bottom: 1px solid #dde2eb; }
.tt-out-tab { appearance: none; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 14px; font-weight: 600; color: #5f6878; padding: 6px 10px; cursor: pointer; width: auto; margin: 0; border-radius: 0; }
.tt-out-tab[aria-selected="true"] { color: #141722; border-bottom-color: #315fd4; }
.tt-out-body { flex: 1; min-height: 0; overflow: auto; padding: 10px 12px; }
.tt-out-meta { margin: 0 0 6px; font-size: 13px; color: #5f6878; }
.tt-table-wrap { overflow: auto; background: #fff; }
table.tt-data { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.tt-data th, table.tt-data td { padding: 6px 10px; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; }
table.tt-data th { position: sticky; top: 0; background: #f7f8fc; font-weight: 700; }
table.tt-data td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tt-data td.null { color: #9aa3b3; font-style: italic; }
.tt-run-error { border: 1px solid #f0c9cd; background: #fff6f7; color: #7a2330; border-radius: 12px; padding: 10px 12px; }
.tt-run-error code { display: block; margin-top: 4px; white-space: pre-wrap; }
.tt-sheet .tt-task { max-height: none; }
/* У мини-листа широкие столбцы подписей: таблице - две трети ширины. */
.tt-workspace.tt-sheet { grid-template-columns: minmax(260px, 1fr) minmax(0, 2fr); }
.tt-sheet-pane { overflow: auto; padding: 12px; max-height: 74vh; }
.tt-sheet-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.tt-sheet-toolbar label { font-weight: 700; }
.tt-sheet-toolbar input { flex: 1; min-width: 180px; margin: 0; padding: 8px 10px; border: 1px solid #dde2eb; border-radius: 8px; font: 15px/1.4 ui-monospace, Consolas, monospace; }
.tt-sheet-name { min-width: 38px; font-weight: 800; color: #6848d9; }
.tt-sheet-scroll { overflow: auto; border: 1px solid #dde2eb; border-radius: 10px; }
table.tt-grid { border-collapse: collapse; table-layout: fixed; min-width: max-content; font: 14px/1.3 ui-monospace, Consolas, monospace; }
table.tt-grid th { background: #f1f3f8; color: #5f6878; position: sticky; top: 0; z-index: 2; min-width: 104px; font-weight: 600; }
table.tt-grid th.corner, table.tt-grid th.row-head { min-width: 38px; width: 38px; left: 0; z-index: 3; }
table.tt-grid th.row-head { position: sticky; }
table.tt-grid th, table.tt-grid td { border: 1px solid #dce1eb; padding: 0; }
.tt-cell { appearance: none; border: 0; background: #fff; display: block; width: 104px; height: 34px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; padding: 5px 7px; margin: 0; font: inherit; color: #141722; cursor: pointer; border-radius: 0; }
.tt-cell.fixed { background: #f7f8fb; }
.tt-cell.wide { width: 190px; }
table.tt-grid th.wide { min-width: 190px; }
.tt-cell.target { background: #fff4d3; }
.tt-cell.target-empty:after { content: " ✎"; color: #956400; }
.tt-cell.selected { outline: 2px solid #315fd4; outline-offset: -2px; }
.tt-cell.formula { font-weight: 700; }
.task-device-note { border: 1px solid #fde68a; background: #fffbeb; color: #78350f; border-radius: 12px; padding: 10px 14px; margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
@media (max-width: 860px) {
  .tt-workspace { grid-template-columns: 1fr; }
  .tt-left, .tt-sheet-pane { max-height: none; overflow: visible; }
  .tt-task, .tt-schema { max-height: none; overflow: visible; }
  .tt-right { grid-template-rows: auto auto; }
  .tt-editor { min-height: 220px; }
  .tt-out-body { max-height: 55vh; }
  .tt-sheet-scroll { max-height: 55vh; }
}
