/* Формы, отчёты, графики, задания, редактор */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; }
.field label, .field .lbl { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea, .tool-row input, .num-ans input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--bg); outline: none; color: var(--fg);
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.field.inline select { width: auto; min-width: 180px; }
.field textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--red); }
.field input.bad { border-color: var(--warn); }
.hint { color: var(--muted); font-size: 12px; }
.multi { display: flex; flex-wrap: wrap; gap: 6px; }
.multi.col { flex-direction: column; }
.chk { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 13.5px; cursor: pointer; }
.chk:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.chk input { accent-color: var(--red); margin-top: 3px; }
.crit { font-style: normal; font-family: var(--font-mono); font-size: 10px; color: var(--warn); margin-left: 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.tool-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 14px; font-weight: 700; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 18px; border-radius: 12px; border: 0; background: var(--red); color: #fff; font-weight: 700; box-shadow: var(--glow); }
.btn span { display: grid; }
.btn:disabled { opacity: 0.4; box-shadow: none; cursor: default; }
.btn.sm, .ghost.sm { padding: 7px 11px; font-size: 12.5px; border-radius: 10px; }
.ghost span { display: grid; }
.ghost.on { color: var(--fg); border-color: var(--red); background: var(--red-soft); }
.formula { margin: 0; font-family: var(--font-mono); font-size: 13px; color: var(--fg); padding: 10px 12px; border-radius: 10px; background: #0b0a0e; border: 1px dashed var(--line-2); overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .split > .report { position: sticky; top: 12px; } }
.report { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-radius: var(--r); background: linear-gradient(120deg, #1b0a0f, var(--panel) 70%); border: 1px solid rgba(255, 43, 71, 0.35); }
.rep-head h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 17px; line-height: 1.25; }
.meter { flex: none; width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; align-content: center; border: 2px solid var(--line-2); text-align: center; }
.meter b { font-size: 22px; line-height: 1; }
.meter small { color: var(--muted); font-size: 10px; max-width: 64px; line-height: 1.15; }
.meter.ok { border-color: var(--ok); box-shadow: 0 0 16px -6px var(--ok); } .meter.warn { border-color: var(--warn); } .meter.bad { border-color: var(--red); box-shadow: var(--glow); }
.rep { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.rep h3 { margin: 0 0 8px; font-size: 12px; font-family: var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; }
.rep ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.rep.good h3 { color: var(--ok); } .rep.bad h3 { color: var(--red); } .rep.warn h3 { color: var(--warn); } .rep.info h3 { color: var(--info); }
.rep.good { border-left: 3px solid var(--ok); } .rep.bad { border-left: 3px solid var(--red); } .rep.warn { border-left: 3px solid var(--warn); } .rep.info { border-left: 3px solid var(--info); }
.lv { list-style: none; padding: 0 !important; }
.lv li { display: flex; gap: 8px; align-items: baseline; }
.lv-i { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; }
.lv-ok .lv-i { background: rgba(61, 220, 151, 0.15); color: var(--ok); } .lv-warn .lv-i { background: rgba(255, 181, 71, 0.15); color: var(--warn); } .lv-bad .lv-i { background: var(--red-soft); color: var(--red); } .lv-info .lv-i { background: rgba(111, 179, 255, 0.12); color: var(--info); }
.note-ok, .note-warn, .note-bad, .note-info { margin: 0; font-size: 13.5px; padding: 8px 10px; border-radius: 10px; }
.note-ok { color: var(--ok); background: rgba(61, 220, 151, 0.06); border: 1px solid rgba(61, 220, 151, 0.22); }
.note-warn { color: var(--warn); background: rgba(255, 181, 71, 0.07); border: 1px solid rgba(255, 181, 71, 0.25); }
.note-bad { color: #ff7186; background: var(--red-soft); border: 1px solid rgba(255, 43, 71, 0.35); }
.note-info { color: #b7d6ff; background: rgba(111, 179, 255, 0.06); border: 1px solid rgba(111, 179, 255, 0.22); }
.chart-box { width: 100%; min-width: 0; }
.chart-box[hidden] { display: none; }
.chart-canvas { display: block; width: 100%; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); touch-action: pan-y; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.lab-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.ind-facts { display: flex; flex-direction: column; gap: 12px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; }
.art-block.good h3 { color: var(--ok); } .art-block.weak h3 { color: var(--warn); }
.smc-sum { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.smc-sum b { color: var(--fg); font-weight: 600; }
.smc-sum .wide { flex-basis: 100%; }
.grid.tight { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid.tight .card-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.count { font-size: 11px; color: var(--muted); }
.go { color: var(--muted); display: grid; }
.lvl-chip { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 8px; white-space: nowrap; }
.chip.on { border-color: var(--red); background: var(--red-soft); }
.has-vis { color: var(--red); display: grid; }
.vis { display: flex; flex-direction: column; gap: 8px; }
.vis-chart { min-height: 10px; }
.vis-scheme { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.vis-svg { width: 100%; display: flex; justify-content: center; }
.vis-scheme figcaption { font-size: 12px; color: var(--muted); }
.scheme { width: 100%; max-width: 320px; max-height: 190px; height: auto; }
.vis-open { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255, 43, 71, 0.45); background: var(--red-soft); color: var(--fg); font-weight: 600; font-size: 13px; }
.vis-open span { display: grid; color: var(--red); }
.answers { display: flex; flex-direction: column; gap: 8px; }
.ans { text-align: left; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); font-size: 14px; font-weight: 600; transition: border-color 0.2s; }
.ans:hover:not(:disabled) { border-color: var(--red); }
.ans:disabled { cursor: default; opacity: 0.75; }
.ans.right { border-color: var(--ok); background: rgba(61, 220, 151, 0.08); opacity: 1; }
.ans.wrong { border-color: var(--red); background: var(--red-soft); opacity: 1; }
.ans.mid { border-color: var(--warn); background: rgba(255, 181, 71, 0.08); opacity: 1; }
.tr-result, .task-res { display: flex; flex-direction: column; gap: 8px; }
.tr-result p, .task-res p { margin: 0; }
.tasks { display: flex; flex-direction: column; gap: 12px; }
.task { padding: 14px 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.task h3 { margin: 0; font-size: 15px; line-height: 1.4; }
.task p { margin: 0; }
.task-meta { display: flex; gap: 10px; align-items: center; }
.num-ans { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.num-ans input { max-width: 180px; }
.score { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.score b { font-size: 20px; color: var(--fg); }
.q { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 6px; }
.q legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ex { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.ex p { margin: 0; color: var(--muted); font-size: 14px; }
.timer { font-size: 18px; color: var(--red); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.stat { padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; }
.stat b { font-size: 26px; color: var(--red); line-height: 1.1; }
.stat span { color: var(--muted); font-size: 12.5px; }
.kv-wrap { max-width: 420px; }
/* Редактор */
.ed-tools { display: flex; flex-direction: column; gap: 10px; }
.tool-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tool-row input { width: auto; flex: 1 1 140px; max-width: 220px; padding: 7px 10px; }
.tool-btn { padding: 7px 10px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); font-size: 12.5px; font-weight: 600; color: var(--fg); }
.tool-btn.on { border-color: var(--red); background: var(--red-soft); box-shadow: 0 0 10px -4px var(--red); }
.note-lbl { font-size: 12.5px; color: var(--muted); }
.ed-box { width: 100%; min-width: 0; }
.ed-canvas { display: block; width: 100%; border-radius: 12px; border: 1px solid var(--line-2); touch-action: none; cursor: crosshair; }
/* Чат: ответы */
.multi-ans { display: flex; flex-direction: column; gap: 14px; }
.part { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.part:first-child { border-top: 0; padding-top: 0; }
.part-q { margin: 0; font-weight: 700; color: var(--muted); font-size: 13px; }
.ans-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 2px; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.steps li::marker { color: var(--red); font-family: var(--font-mono); }
.link.inline { padding: 0; font-size: inherit; }
