/* Vibe Economics — тема сайта курсов. Тёмная сине-серая гамма и Open Sans — по образцу веб-панели хаба (тема ux-1,
   передал главный агент хаба, #hel.claude-mesh_main-2170). Цвет — только у акцента и статусов; отступы 4/8/12/16/24;
   цели нажатия от 44 px; 360 px без горизонтальной прокрутки. */
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/static/fonts/opensans-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 300 800; font-display: swap; src: url(/static/fonts/opensans-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #0e1621; --glow: radial-gradient(120% 80% at 50% 0%, #13202e 0%, #0e1621 60%) #0e1621;
  --panel: #17212b; --card: #182533; --hover: #202b36; --field: #242f3d; --sel: #2b5278; --edge: #0b121a; --line: #26323e;
  --text: #f5f5f5; --muted: #8796a8; --dim: #8190a2;   /* dim осветлён до 4,8:1 на карточке (аудит UX) */ --accent: #5288c1; --accent2: #6aa0d6;
  --ok: #4fae6f; --ok-soft: rgba(79, 174, 111, .14); --warn: #d9a441; --warn-soft: rgba(217, 164, 65, .14);
  --bad: #e5645a; --bad-soft: rgba(229, 100, 90, .14);
  --r: 15px; --r-s: 10px; color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--glow); background-attachment: fixed; color: var(--text);
  font: 15px/1.55 "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden], .hidden { display: none !important; }
a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; letter-spacing: -.2px; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 650; margin-top: 28px; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* шапка */
.top { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 1px solid var(--edge); }
.top-in { max-width: 820px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; font-size: 15.5px; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; flex: none; }
.brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .sp { flex: 1; }
.crumb { color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border-radius: 22px; border: 0; background: var(--field); color: var(--text); font-weight: 600; cursor: pointer;
  transition: background .18s, opacity .18s; text-decoration: none !important; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: #3f72aa; color: #fff; }          /* белый на нём 5,0:1 (было 3,7, аудит UX) */
.btn.primary:hover { background: #36679c; }
.btn.ghost { background: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { opacity: .45; cursor: default; }
input[type=text], input[type=search], input[inputmode], select, textarea { width: 100%; background: var(--field); border: 1px solid transparent;
  border-radius: 18px; padding: 11px 16px; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; border-radius: 14px; line-height: 1.5; }
label.f { display: block; color: var(--muted); font-size: 13.5px; margin: 12px 0 0; }
label.f > input, label.f > textarea, label.f > select { margin-top: 6px; color: var(--text); font-size: 15px; }

/* раскладка */
.wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 64px; }
.wrap.wide { max-width: 1200px; }
.hero { padding: 16px 0 8px; }
.hero .sub { color: var(--muted); }
.card { background: var(--card); border-radius: var(--r); padding: 18px 20px; margin: 12px 0; border: 1px solid var(--edge); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 13.5px; }

/* главная: выбор курса */
.courses { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.course-card { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r);
  padding: 20px; color: var(--text); transition: background .18s, transform .18s; min-height: 150px; }
.course-card:hover { background: var(--hover); text-decoration: none; }
.course-card b { font-size: 18px; }
.course-card .go { margin-top: auto; color: var(--accent2); font-weight: 600; font-size: 14px; }

/* курс: уроки */
.lesson { display: grid; grid-template-columns: 52px 1fr; gap: 0 14px; }
.lesson .num { width: 52px; height: 52px; border-radius: 14px; background: var(--sel); color: #dbe6f2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 700; font-size: 20px; line-height: 1; }
.lesson .num small { font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; opacity: .8; margin-top: 3px; }
.lesson .date { color: var(--muted); font-size: 13.5px; }
.lesson .acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.tasks { grid-column: 1 / -1; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.task-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 52px; border-radius: 12px; background: var(--panel);
  color: var(--text); transition: background .18s; }
.task-row:hover { background: var(--hover); text-decoration: none; }
.task-row .t { flex: 1; min-width: 0; }
.task-row .t b { display: block; font-weight: 600; }
.task-row .t span { color: var(--muted); font-size: 13px; }
.reports { grid-column: 1 / -1; margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }   /* доклады (t-1617) */
.rep-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 2px; }
.rep-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 52px; border-radius: 12px; background: var(--panel); }
.rep-adm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 3px 0; }
.rep-adm input.pts { width: 80px; padding: 6px 10px; }
.rep-adm input.pts.saved { border-color: var(--ok); }
select.rep-add { min-width: 180px; max-width: 240px; }
.rep-row.mine { box-shadow: inset 3px 0 0 var(--ok); }
.rep-row .t { flex: 1; min-width: 0; }
.rep-row .t b { display: block; font-weight: 600; }
.rep-ppl { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pill { font-size: 12.5px; font-weight: 600; border-radius: 12px; padding: 3px 10px; white-space: nowrap; background: var(--field); color: var(--muted); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.bad { background: var(--bad-soft); color: #f19a92; }
.pill.hw { background: var(--bad-soft); color: #f19a92; cursor: help; }   /* домашнее задание (#po-5064) */

/* студент в шапке */
.me { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px 0 4px; border-radius: 18px; background: var(--field);
  color: var(--text); cursor: pointer; border: 0; max-width: 230px; }
.chip:hover { background: var(--hover); }
.av { width: 28px; height: 28px; border-radius: 50%; background: var(--sel); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chip .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; font-weight: 600; }

/* окно входа */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 10, 16, .66); display: flex; align-items: flex-start; justify-content: center;
  padding: 10vh 16px 16px; overflow-y: auto; }
.dialog { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--edge); border-radius: 18px; padding: 22px; }
.dialog h2 { margin: 0 0 6px; font-size: 20px; }
.dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.dialog .err { color: var(--bad); font-size: 14px; min-height: 1.3em; margin-top: 8px; }
.people { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: transparent; border: 0;
  text-align: left; cursor: pointer; color: var(--text); min-height: 52px; transition: background .15s; }
.person:hover, .person.sel { background: var(--hover); }
.person .av { width: 36px; height: 36px; font-size: 13px; }
.person b { display: block; font-weight: 600; }
.person span { color: var(--muted); font-size: 13px; }
.code-in { font-size: 28px !important; letter-spacing: 12px; text-align: center; font-weight: 700; }
.code-big { font-size: 40px; font-weight: 800; letter-spacing: 10px; text-align: center; padding: 12px; margin: 12px 0; border-radius: 14px;
  background: var(--field); color: #fff; }

/* задание */
.progress { position: sticky; top: 56px; z-index: 5; background: var(--panel); border-bottom: 1px solid var(--edge); }
.progress-in { max-width: 820px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--field); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s; }
.save-state { font-size: 13px; color: var(--muted); white-space: nowrap; }
.save-state.err { color: var(--bad); }
.q { position: relative; }
.q h3 { display: flex; gap: 10px; align-items: baseline; padding-right: 96px; }
.q .n { color: var(--accent2); font-weight: 700; }
.q .kind { color: var(--dim); font-size: 13px; margin: -2px 0 8px; }
.q .text { white-space: pre-line; margin-bottom: 10px; }
.q .saved { position: absolute; top: 18px; right: 18px; font-size: 12.5px; color: var(--dim); }
.q .saved.ok { color: var(--ok); }
.q .saved.wait { color: var(--warn); }
.q .saved.err { color: var(--bad); }
.q.info { background: transparent; border-color: var(--line); }
.opt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 6px 0; border-radius: 12px; cursor: pointer;
  background: var(--panel); border: 1px solid transparent; transition: background .15s, border-color .15s; }
.opt:hover { background: var(--hover); }
.opt.on { border-color: var(--accent); background: rgba(82, 136, 193, .12); }
.opt input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.opt-body { display: flex; flex-direction: column; gap: 3px; }
.opt-desc { color: var(--muted); font-size: 14px; white-space: pre-line; }
.match-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; margin: 8px 0; }
.order { list-style: none; padding: 0; margin: 0; }
.order li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 6px 0; border-radius: 12px; background: var(--panel);
  cursor: grab; user-select: none; touch-action: none; }
.order li.drag { opacity: .5; }
.order li .pos { width: 26px; height: 26px; border-radius: 8px; background: var(--sel); color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.order li .lbl { flex: 1; }
.order li button { border: 0; background: var(--field); color: var(--text); border-radius: 10px; width: 40px; height: 40px; font-size: 16px; cursor: pointer; }
.order li button:disabled { opacity: .3; cursor: default; }
.scale { display: flex; flex-wrap: wrap; gap: 6px; }
.scale button { min-width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--panel); font-weight: 600; cursor: pointer; }
.scale button:hover { background: var(--hover); }
.scale button.on { background: #3f72aa; color: #fff; }
.scale-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; gap: 12px; }
.casebox { white-space: pre-line; background: var(--panel); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.finish { text-align: center; padding: 24px 0 8px; }
.notice { border-radius: 12px; padding: 12px 16px; margin: 12px 0; background: var(--field); }
.notice.ok { background: var(--ok-soft); color: #bfe6cb; }
.notice.warn { background: var(--warn-soft); color: #f1d9a6; }
.notice.bad { background: var(--bad-soft); color: #f5c3be; }
.notice.hw { background: var(--bad-soft); color: #f5c3be; border-left: 3px solid var(--bad); }
.summary { list-style: none; padding: 0; margin: 10px 0 0; }
.summary li { display: flex; gap: 10px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.summary li:first-child { border-top: 0; }
.summary .mk { width: 20px; flex: none; text-align: center; }

/* материал */
.material { font-size: 16px; line-height: 1.65; }
.material h2 { margin-top: 32px; }
.material ul, .material ol { padding-left: 22px; }
.material li { margin: 4px 0; }
.material blockquote { margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 12px 12px 0; }
.material table { border-collapse: collapse; width: 100%; font-size: 14.5px; margin: 12px 0; display: block; overflow-x: auto; }
.material th, .material td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.material th { color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; }

/* схемы в материалах (SVG, цвета из темы) */
.fig { margin: 20px 0 24px; padding: 16px; background: var(--card); border: 1px solid var(--edge); border-radius: var(--r); }
.fig { overflow-x: auto; }
.fig svg { display: block; width: 100%; min-width: 560px; height: auto; font-family: inherit; }   /* на телефоне схема листается внутри рамки, текст не мельчает */
.fig figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; text-align: center; }
.fig text { fill: var(--text); font-size: 15px; font-weight: 600; text-anchor: middle; }
.fig text.f-sub { fill: var(--muted); font-size: 12.5px; font-weight: 400; }
.fig .f-node rect, .fig .f-band rect { fill: var(--panel); stroke: var(--line); }
.fig .f-bank rect, .fig .f-now rect { fill: var(--sel); stroke: var(--accent); }
.fig .f-core { fill: rgba(82, 136, 193, .14); stroke: var(--accent); }
.fig text.f-core-t { fill: var(--accent2); font-size: 16px; }
.fig .f-line { fill: none; stroke: var(--accent); stroke-width: 2; }
.fig .f-acc { fill: var(--accent); }
.fig .f-axis { stroke: var(--line); stroke-width: 3; }
.fig .f-dot circle { fill: var(--panel); stroke: var(--accent); stroke-width: 3; }
.fig .f-now circle { fill: var(--accent); }

/* приём (преподаватель) */
.admin-list li { margin: 6px 0; }
.table-scroll { overflow-x: auto; }
table.answers { border-collapse: collapse; font-size: 13.5px; min-width: 100%; }
table.answers th, table.answers td { border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; text-align: left; white-space: pre-line; max-width: 360px; }
table.answers th { background: var(--panel); position: sticky; top: 0; }
table.answers td.ok { background: var(--ok-soft); }
table.answers td.part { background: var(--warn-soft); }
table.answers td.bad { background: var(--bad-soft); }
.legend { color: var(--muted); font-size: 13.5px; }

.foot { color: var(--dim); font-size: 13px; text-align: center; padding: 24px 16px 40px; }
.fade { animation: fade .22s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  h1 { font-size: 22px; }
  .card { padding: 16px; }
  .lesson { grid-template-columns: 44px 1fr; gap: 0 12px; }
  .lesson .num { width: 44px; height: 44px; font-size: 17px; }
  .match-row { grid-template-columns: 1fr; gap: 6px; }
  .chip .nm { max-width: 110px; }
  .q h3 { padding-right: 0; }
  .q .saved { position: static; display: block; margin: -4px 0 6px; }
}
/* подсказка групп при регистрации (#po-5058) */
.group-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.gchip { border: 0; background: var(--field); color: var(--text); border-radius: 14px; min-height: 32px; padding: 0 12px; font-size: 13.5px;
  font-weight: 600; cursor: pointer; transition: background .15s; }
.gchip:hover { background: var(--sel); }
/* шапка: крошки и автор (#po-5057) */
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); white-space: nowrap; }
.crumbs a:hover { color: var(--text); text-decoration: none; }
.crumbs .sep { color: var(--dim); }
.crumbs .cur { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.back-link { display: none; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.back-link:hover { color: var(--text); text-decoration: none; }
.author { position: relative; flex: none; }
.author-btn { border: 0; background: transparent; padding: 4px; border-radius: 50%; cursor: pointer; display: inline-flex; }
.author-btn .av { width: 32px; height: 32px; background: var(--field); color: var(--muted); font-size: 12px; transition: background .18s, color .18s; }
.author-btn:hover .av, .author.open .av { background: var(--sel); color: #fff; }
.author-card { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; white-space: nowrap; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .18s, transform .18s, visibility .18s;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.author:hover .author-card, .author.open .author-card, .author-btn:focus-visible + .author-card { opacity: 1; visibility: visible; transform: none; }
.author-card b { font-weight: 600; font-size: 14.5px; }
@media (max-width: 720px) {
  .crumbs { display: none; }
  .back-link { display: block; flex: 1 1 auto; }
  .back-link.hidden + .sp { display: block; }
  .back-link:not(.hidden) + .sp { display: none; }
  .brand { flex: none; }
  .brand span { display: none; }
  .me, .author { flex: none; }
  .chip { padding: 0 4px; }                     /* на телефоне у студента в шапке — только кружок с инициалами (аудит UX) */
  .chip .nm { display: none; }
  .author-card { position: fixed; left: 16px; right: 16px; top: 60px; white-space: normal; }   /* не уезжает за левый край экрана */
  .btn.small, .chip { min-height: 44px; }      /* цели нажатия на телефоне — от 44 px (аудит UX) */
  .author-btn { padding: 6px; }
  .back-link { padding: 12px 0; }
  .scale { display: grid; grid-template-columns: repeat(5, 1fr); }
  .scale button { min-width: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* страница преподавателя (#po-5060) */
.top-in.wide { max-width: 1200px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 14px; }
.tab { border: 0; background: var(--field); color: var(--muted); border-radius: 18px; min-height: 40px; padding: 0 16px; font-weight: 600; cursor: pointer; }
.tab.on { background: var(--sel); color: #fff; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.flt { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 13px; min-width: 150px; }
.flt.grow { flex: 1; min-width: 180px; }
.flt select, .flt input { padding: 8px 14px; color: var(--text); font-size: 14.5px; }
.kpis-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi-box { background: var(--card); border: 1px solid var(--edge); border-radius: 14px; padding: 12px 16px; display: flex; flex-direction: column; }
.kpi-box b { font-size: 26px; }
.kpi-box span { color: var(--muted); font-size: 13px; }
table.prog td.pc { text-align: center; white-space: nowrap; }
table.answers td.pc.ok { background: var(--ok-soft); color: #bfe6cb; }
table.answers td.pc.part { background: var(--warn-soft); color: #f1d9a6; }
table.answers th a { color: var(--text); }
.code-cell { font-size: 18px; font-weight: 800; letter-spacing: 3px; }
.code-wrap { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-wrap .code-cell { min-width: 64px; }
.stud-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: -4px 0 18px; }
.bad-t { color: #f19a92; }
.cell-link { color: inherit; display: block; }
.cell-link:hover { text-decoration: underline; }
table.answers.one td.n { color: var(--muted); width: 32px; }
table.answers.one td:nth-child(2) { width: 38%; }
table.answers.one td.when { width: 90px; white-space: nowrap; color: var(--muted); }
/* как набран развёрнутый ответ (#po-5074): печатал / вставил N% / вставил и правил N% */
table.answers.one td.when .typing { display: inline-block; margin-top: 4px; padding: 1px 7px; border-radius: 999px; font-size: 12px; cursor: help; }
table.answers.one td.when .typing.ok { background: var(--ok-soft); color: var(--ok); }
table.answers.one td.when .typing.warn { background: var(--warn-soft); color: var(--warn); }

/* ИИ-судья в админке (t-1465) */
.ai { margin-top: 8px; }
.ai summary { cursor: pointer; list-style: none; }
.ai summary::-webkit-details-marker { display: none; }
.ai-b { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(127,127,127,.15); }
.ai-b.ok { color: #2e9d5b; background: rgba(46,157,91,.12); }
.ai-b.warn { color: #c48a12; background: rgba(196,138,18,.14); }
.ai-b.bad { color: #d64545; background: rgba(214,69,69,.13); }
.ai .small { margin-top: 6px; line-height: 1.5; }
table.answers td.pc .ai-b { margin-top: 4px; }
/* ИИ-признаки у студента и попытки переответа (t-1467) */
ol.attempts { margin: 6px 0 0; padding-left: 18px; }
ol.attempts li { margin: 6px 0; }
ol.attempts .small { margin-top: 4px; white-space: pre-wrap; opacity: .85; }
.ai-fb { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(127,127,127,.25); }
.ai-fb.warn { border-color: rgba(196,138,18,.45); background: rgba(196,138,18,.08); }
.ai-fb.bad { border-color: rgba(214,69,69,.45); background: rgba(214,69,69,.08); }
.ai-fb p { margin: 6px 0 0; }
.ai-fb .btn { margin-top: 8px; }
.ai-fb.pending { color: var(--muted, #9aa4b2); font-size: 14px; }
.ai-prev { margin-top: 8px; }
.ai-prev .small { white-space: pre-wrap; margin-top: 6px; opacity: .8; }
.ai-fb.ok { border-color: rgba(46,157,91,.35); background: rgba(46,157,91,.06); }
/* телефон: с пилюлей ИИ трём пилюлям тесно — заголовок задания на всю ширину, пилюли строкой ниже (#po-5662) */
@media (max-width: 520px) { .task-row { flex-wrap: wrap; row-gap: 8px; } .task-row .t { flex-basis: 100%; } }

/* таблица в блоке info задания (скоринговая карта, данные кейса) */
table.qtable { border-collapse: collapse; width: 100%; font-size: 15px; margin: 4px 0 10px; }
table.qtable th, table.qtable td { border-bottom: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
table.qtable th { color: var(--muted); font-size: 13px; font-weight: 600; background: var(--panel); }
table.qtable.score td:last-child { font-weight: 600; white-space: nowrap; }

/* Админка, вкладка «Вопросы» (t-1652) */
table.qtab tr.qrow { cursor: pointer; }
table.qtab tr.qrow:hover td, table.qtab tr.qrow.open td { background: rgba(127,127,127,.08); }
table.qtab tr.qrow td:nth-child(2) { max-width: 520px; }
table.qtab tr.qdetail > td { padding: 8px 12px 16px 28px; background: rgba(127,127,127,.04); }
.qbar-box { display: inline-flex; align-items: center; gap: 8px; }
.qbar { display: inline-block; width: 110px; height: 8px; border-radius: 999px; background: rgba(127,127,127,.18); overflow: hidden; }
.qbar i { display: block; height: 100%; border-radius: 999px; background: #c48a12; }
.qbar.ok i { background: #2e9d5b; } .qbar.bad i { background: #d64545; }
td.qans { white-space: pre-wrap; max-width: 620px; }
td.nowrap { white-space: nowrap; }
