/* Стиль «Шампань и сусальное золото»: фон цвета шампанского, матовое золото, тёмный «эспрессо»-текст.
   Шрифты лежат на самом сайте (static/school/fonts, лицензия OFL) — без внешних CDN, данные не уходят за рубеж.
   Золото — на рамках, кнопках, прогрессе; текст и ссылки — тёмные (золотой текст на светлом плохо читается). */
@font-face { font-family: "Golos Text"; src: url("fonts/GolosText-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Golos Text"; src: url("fonts/GolosText-Bold.ttf") format("truetype"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/CormorantGaramond.ttf") format("truetype"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/CormorantGaramond-Italic.ttf") format("truetype"); font-weight: 300 700; font-style: italic; font-display: swap; }
:root {
  --paper: #efe4d2; --sheet: #fbf6ec; --ink: #352b22; --muted: #7d7064; --line: #e3cfa6; --line-soft: #efe2c9;
  --accent: #7a5c25; --accent-soft: #f5e9d2; --gold: #b08a4a; --gold-light: #e2c68d; --on-gold: #2e2418;
  --gold-grad: linear-gradient(135deg, #e2c68d, #b08a4a);
  --ok: #3f7a3a; --ok-soft: #e6efd9; --warn: #9a5e10; --warn-soft: #f8e6c6;
  --bad: #a8321e; --bad-soft: #f7e0d8; --cell: #d2b98a; --shadow: 0 1px 2px rgba(90,60,20,.06), 0 4px 14px rgba(90,60,20,.06);
  --radius: 14px; --font: "Golos Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Cormorant Garamond", "PT Serif", Georgia, serif; --text-serif: "PT Serif", Georgia, "Times New Roman", serif; --mono: "PT Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #1b1714; --sheet: #25201b; --ink: #ede4d3; --muted: #a99d8d; --line: #4a3f31; --line-soft: #332c24;
    --accent: #dcc08a; --accent-soft: #3a3022; --gold: #c9a464; --gold-light: #e2c68d; --on-gold: #241b10;
    --ok: #8fc786; --ok-soft: #22301f; --warn: #e9b768; --warn-soft: #3a2c19;
    --bad: #f0907f; --bad-soft: #3d241e; --cell: #6b5a3e; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #1b1714; --sheet: #25201b; --ink: #ede4d3; --muted: #a99d8d; --line: #4a3f31; --line-soft: #332c24;
  --accent: #dcc08a; --accent-soft: #3a3022; --gold: #c9a464; --gold-light: #e2c68d; --on-gold: #241b10;
  --ok: #8fc786; --ok-soft: #22301f; --warn: #e9b768; --warn-soft: #3a2c19;
  --bad: #f0907f; --bad-soft: #3d241e; --cell: #6b5a3e; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.55 var(--font); }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.08rem; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); } .small { font-size: .88rem; } .nowrap { white-space: nowrap; }
.right { text-align: right; } .center { text-align: center; }
.hidden { display: none !important; }

/* Шапка */
.top { position: sticky; top: 0; z-index: 20; background: var(--sheet); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1680px; margin: 0 auto; display: flex; align-items: center; gap: 4px; padding: 0 16px; min-height: 56px; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; margin-right: 12px; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 8px 11px; border-radius: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: .96rem; }
.nav a:hover { background: var(--line-soft); }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: .75rem; line-height: 20px; text-align: center; margin-left: 3px; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { background: none; border: 1px solid transparent; border-radius: 8px; padding: 6px 9px; cursor: pointer; color: var(--ink); font: inherit; }
.icon-btn:hover { background: var(--line-soft); }

/* Мобильное меню снизу */
.tabbar { display: none; }
@media (max-width: 760px) {
  .nav { display: none; }
  .tabbar { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: var(--sheet); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; text-align: center; padding: 7px 2px 6px; color: var(--muted); text-decoration: none; font-size: .72rem; line-height: 1.2; }
  .tabbar a b { display: block; font-size: 1.15rem; font-weight: 400; }
  .tabbar a.on { color: var(--accent); font-weight: 600; }
  body { padding-bottom: 70px; }
}

main { max-width: 1180px; margin: 0 auto; padding: 22px 16px 48px; }
main.narrow { max-width: 760px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Листы и карточки */
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px; }
.sheet.tight { padding: 0; overflow: hidden; }
.sheet > h2:first-child, .sheet > h3:first-child { margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }  /* min(): на узком экране колонка не шире контейнера */
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi-box { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.kpi-box .v { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.kpi-box .l { color: var(--muted); font-size: .88rem; }
.kpi-box.warn .v { color: var(--warn); } .kpi-box.bad .v { color: var(--bad); } .kpi-box.ok .v { color: var(--ok); }

/* Списки строк */
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li, .row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
.rows > li:first-child { border-top: 0; }
.rows .grow, .row .grow { flex: 1; min-width: 0; }
.rows a.title { color: var(--ink); font-weight: 600; text-decoration: none; }
.rows a.title:hover { color: var(--accent); }
.empty { padding: 26px 16px; text-align: center; color: var(--muted); }

/* Таблицы */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.t th, table.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
table.t th { font-weight: 600; color: var(--muted); font-size: .85rem; background: var(--paper); position: sticky; top: 0; }
table.t tr:hover td { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }

/* Статусы */
.pill { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: .8rem; font-weight: 600; white-space: nowrap; background: var(--line-soft); color: var(--muted); }
.pill.new { background: var(--line-soft); color: var(--muted); }
.pill.draft { background: var(--accent-soft); color: var(--accent); }
.pill.submitted { background: var(--warn-soft); color: var(--warn); }
.pill.returned { background: var(--bad-soft); color: var(--bad); }
.pill.checked, .pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.due { font-size: .85rem; color: var(--muted); }
.due.soon { color: var(--warn); font-weight: 600; } .due.late { color: var(--bad); font-weight: 600; }

/* Кнопки и формы */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; text-decoration: none; line-height: 1.2; min-height: 40px; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
:root[data-theme="dark"] .btn.primary { color: #0f1a26; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0f1a26; } }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn.ghost { border-color: transparent; background: none; }
.btn.small { padding: 5px 10px; min-height: 32px; font-size: .86rem; }
.btn.vk { background: #0077ff; border-color: #0077ff; color: #fff; font-weight: 600; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn.block { width: 100%; }
form.inline { display: inline; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .help { font-size: .82rem; color: var(--muted); margin-top: 3px; font-weight: 400; }
.field .err, .errorlist { color: var(--bad); font-size: .86rem; margin: 4px 0 0; padding: 0; list-style: none; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); color: var(--ink); font: inherit; font-size: 1rem;
}
input:focus, select:focus, textarea:focus, [contenteditable]:focus { outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-color: var(--accent); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; max-height: 240px; overflow: auto; padding: 8px; border: 1px solid var(--line-soft); border-radius: 8px; }
.checks label { font-weight: 400; display: flex; gap: 7px; align-items: center; margin: 0; }
.checks ul { display: contents; } .checks li { list-style: none; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.filters > * { flex: 1 1 150px; }
.filters .btn { flex: 0 0 auto; }

/* Сообщения */
.msgs { list-style: none; padding: 0; margin: 0 0 16px; }
.msgs li { padding: 11px 14px; border-radius: 8px; margin-bottom: 8px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.msgs li.success { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.msgs li.error { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.note-box { padding: 12px 14px; border-radius: 8px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); margin-bottom: 14px; }

/* Кодификатор */
.section-block { margin-bottom: 18px; }
.section-head { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; }
.section-head::-webkit-details-marker { display: none; }
.section-head .num { font-weight: 700; color: var(--accent); font-size: 1.15rem; }
.section-head h2 { margin: 0; font-size: 1.1rem; flex: 1; }
.topic-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); }
.topic-row:hover { background: var(--accent-soft); }
.topic-row .code { font-family: var(--mono); color: var(--muted); font-size: .9rem; }
.topic-row .meta { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.count { font-size: .8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 1px 8px; white-space: nowrap; }
.count.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.dot-read { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }

/* Вкладки */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; }
.tabs a.on { color: var(--accent); border-color: var(--accent); }
/* на телефоне вкладки переносятся, а не прячутся за край */
@media (max-width: 600px) { .tabs { flex-wrap: wrap; overflow: visible; gap: 0 2px; } .tabs a { padding: 8px 10px; font-size: .92rem; } }

/* Текст конспекта / задания */
.prose { font-family: var(--text-serif); font-size: 1.06rem; line-height: 1.65; overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3 { font-family: var(--font); margin-top: 1.3em; }
/* Таблицы (критерии, данные): настоящая таблица во всю ширину; слова в ячейках не рвутся посреди —
   иначе узкие столбцы («25.1», «Баллы») сжимаются до буквы. На телефоне широкая таблица прокручивается. */
.prose table { border-collapse: collapse; margin: 1em 0; width: 100%; display: table; table-layout: auto; font-family: var(--font); font-size: .95rem; line-height: 1.5; }
.prose td, .prose th { border: 1px solid var(--line); padding: 7px 10px; vertical-align: top; overflow-wrap: break-word; word-break: normal; }
.prose th { background: var(--paper); }
.prose td > p, .prose th > p { margin: 0; }
.prose td > p + p, .prose th > p + p { margin-top: .45em; }
.prose td.c, .prose th.c { width: 1%; white-space: nowrap; text-align: center; }
.prose tr.head > td, .prose tr.crit > td, .prose tr.max > td { font-weight: 600; }
.prose tr.head > td, .prose tr.crit > td { background: var(--paper); }
@media (max-width: 600px) { .prose table { display: block; overflow-x: auto; } }
.prose blockquote { margin: 1em 0; padding: 8px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.prose .important, .prose mark { background: var(--warn-soft); color: inherit; padding: 0 3px; border-radius: 3px; }
.prose div.important { padding: 10px 14px; border-left: 4px solid var(--warn); border-radius: 0 8px 8px 0; margin: 1em 0; }
.prose details { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 1em 0; }
.prose summary { cursor: pointer; font-family: var(--font); font-weight: 600; }
.note-layout { display: grid; grid-template-columns: 1fr 240px; gap: 24px; align-items: start; }
.note-side { position: sticky; top: 76px; }
.note-side .toc a { display: block; padding: 3px 0; font-size: .9rem; color: var(--muted); text-decoration: none; }
.note-side .toc a:hover { color: var(--accent); }
@media (max-width: 900px) { .note-layout { grid-template-columns: 1fr; } .note-side { position: static; } }
/* конспект-PDF: страницы картинками, по ширине колонки */
.note-pages { min-width: 0; }
.note-page { margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.note-page img { display: block; width: 100%; height: auto; aspect-ratio: auto 595 / 842; }
.note-page figcaption { font-size: .75rem; color: var(--muted); text-align: right; padding: 4px 10px; border-top: 1px solid var(--line); background: var(--sheet); }
.note-layout.pdf { grid-template-columns: minmax(0, 820px) 240px; }
@media (max-width: 900px) { .note-layout.pdf { grid-template-columns: 1fr; } .note-page { margin: 0 -4px 12px; border-radius: 4px; } }

/* Задание */
.task { border-top: 1px dashed var(--line); padding: 20px 0; }
.task:first-of-type { border-top: 0; padding-top: 4px; }
.task-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.task-num { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 6px; border: 2px solid var(--ink); border-radius: 6px; font-weight: 700; font-family: var(--mono); }
.task-src { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; max-height: 420px; overflow: auto; }
.answer-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.answer-line .lbl { font-weight: 600; font-size: .92rem; }

/* Клеточки бланка ответов № 1 */
input.cells {
  --c: 34px; font-family: var(--mono); font-size: 22px; letter-spacing: calc(var(--c) - 1ch); text-transform: uppercase;
  width: calc(var(--c) * 12 + 2px); max-width: 100%; height: 44px; padding: 0 0 0 calc((var(--c) - 1ch) / 2);
  border: 1px solid var(--cell); border-radius: 4px; color: var(--ink);
  background-color: var(--sheet);
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(var(--c) - 1px), var(--cell) calc(var(--c) - 1px), var(--cell) var(--c));
}
input.cells:disabled { opacity: 1; -webkit-text-fill-color: var(--ink); background-color: var(--paper); }
.result { margin-top: 12px; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--line); }
.result.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.result.part { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.result.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.result .score { font-weight: 700; }
.reveal { margin-top: 10px; }
.reveal summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.save-state { font-size: .82rem; color: var(--muted); }
.progress { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.sticky-submit { position: sticky; bottom: 0; background: var(--sheet); border-top: 1px solid var(--line); padding: 12px 16px; margin: 0 -20px -20px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 760px) { .sticky-submit { bottom: 62px; padding: 8px 12px; } .sticky-submit .small { display: none; } .sticky-submit .btn { width: 100%; } }

/* Проверка */
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .review-grid { grid-template-columns: 1fr; } }
.student-answer { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; padding: 12px 14px; font-family: var(--text-serif); min-height: 60px; }
.crit-inputs { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.crit-inputs .field { margin: 0; width: 82px; }
.crit-inputs input { text-align: center; font-weight: 700; }

/* Статистика */
.bars { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 4px; align-items: end; height: 160px; padding-top: 10px; }
.bars .b { position: relative; background: var(--line-soft); border-radius: 4px 4px 0 0; height: 100%; display: flex; align-items: flex-end; }
.bars .b > span { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--accent); }
.bars .b.low > span { background: var(--bad); } .bars .b.mid > span { background: var(--warn); } .bars .b.hi > span { background: var(--ok); }
.bars-labels { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 4px; font-size: .72rem; color: var(--muted); text-align: center; font-family: var(--mono); }
.bars.weeks, .bars-labels.weeks { grid-template-columns: repeat(8, minmax(0, 1fr)); }
/* на телефоне 25 столбцов узкие: двузначные номера не должны расталкивать страницу вширь */
@media (max-width: 600px) {
  .bars, .bars-labels { gap: 2px; }
  .bars-labels:not(.weeks) { font-size: .56rem; letter-spacing: -.06em; }
  .bars-labels span { overflow: hidden; white-space: nowrap; }
  .bars-labels.weeks { font-size: .62rem; }
}
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) 140px 44px; gap: 10px; align-items: center; padding: 6px 0; font-size: .92rem; }
.hbar .progress { height: 10px; }
.pct-low { color: var(--bad); font-weight: 700; } .pct-mid { color: var(--warn); font-weight: 700; } .pct-hi { color: var(--ok); font-weight: 700; }

/* Редактор */
.editor { border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); position: sticky; top: 56px; background: var(--sheet); z-index: 5; border-radius: 10px 10px 0 0; }
.editor-bar button { border: 1px solid transparent; background: none; color: var(--ink); border-radius: 6px; padding: 5px 9px; cursor: pointer; font: inherit; font-size: .9rem; min-width: 34px; }
.editor-bar button:hover { background: var(--line-soft); border-color: var(--line); }
.editor-bar .sep { width: 1px; background: var(--line); margin: 3px 4px; }
.editor-area { min-height: 320px; padding: 16px 20px; outline: none; }
.editor-area:empty::before { content: attr(data-placeholder); color: var(--muted); }
.editor.small .editor-area { min-height: 110px; }

/* Загрузка файлов */
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 34px 20px; text-align: center; background: var(--sheet); cursor: pointer; transition: .15s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { display: none; }
.drop .big { font-size: 1.1rem; font-weight: 600; }
.file-list { list-style: none; padding: 0; margin: 12px 0 0; text-align: left; font-size: .92rem; }

/* Логин */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; }
.auth-card .brand { display: block; text-align: center; font-size: 1.3rem; margin: 0 0 18px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

footer.foot { max-width: 1180px; margin: 0 auto; padding: 18px 16px 30px; font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; }
footer.foot a { color: var(--muted); }
.copy-field { display: flex; gap: 6px; }
.copy-field input { font-family: var(--mono); font-size: .85rem; }

@media print {
  .top, .tabbar, .foot, .actions, .editor-bar, .note-side, .btn, .sticky-submit, .timer, .video-box, .lc-form, .slides, .crumbs { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; } .sheet { border: 0; box-shadow: none; padding: 0; }
}

/* Пробник: вариант слева, бланк ответов справа (на телефоне — выезжает снизу) */
.mock-bar { position: sticky; top: 56px; z-index: 15; display: flex; align-items: center; gap: 12px; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; margin-bottom: 14px; }
.mock-bar .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer { font-family: var(--mono); font-size: 1.25rem; font-weight: 700; padding: 2px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); }
.timer.warn { background: var(--warn-soft); color: var(--warn); }
.timer.bad { background: var(--bad-soft); color: var(--bad); animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: .55; } }
.mock-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.kim img { display: block; width: 100%; max-width: 820px; margin: 0 auto 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
:root[data-theme="dark"] .kim img { filter: brightness(.88); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .kim img { filter: brightness(.88); } }
.blank { position: sticky; top: 124px; max-height: calc(100vh - 140px); overflow: auto; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 0 16px 16px; }
.blank-head { position: sticky; top: 0; background: var(--sheet); display: flex; justify-content: space-between; align-items: center; padding: 12px 0 8px; border-bottom: 1px solid var(--line-soft); z-index: 1; }
.blank-head .btn, .blank-toggle { display: none; }
.blank h3 { margin: 14px 0 8px; }
.blank-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.blank-row .task-num { min-width: 32px; height: 32px; font-size: .9rem; }
.blank-row input.cells { --c: 26px; font-size: 17px; height: 34px; width: calc(var(--c) * 10 + 2px); }
.blank textarea { min-height: 90px; }
@media (max-width: 900px) {
  .mock-layout { grid-template-columns: 1fr; }
  .blank-toggle, .blank-head .btn { display: inline-flex; }
  .blank { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 52vh; z-index: 40; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 30px rgba(0,0,0,.18); transform: translateY(105%); transition: transform .2s; }
  .blank.open { transform: none; }
  .mock-bar { top: 56px; }
}
.review-crit img { width: 100%; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 10px; background: #fff; }
.review-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.review-split > .review-crit { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
@media (max-width: 900px) { .review-split { grid-template-columns: 1fr; } .review-split > .review-crit { position: static; max-height: 60vh; } }

.kim img { cursor: zoom-in; }
@media (max-width: 900px) { .kim img { border-radius: 4px; margin-bottom: 10px; } main:has(.mock-layout) { padding-left: 8px; padding-right: 8px; } }
/* Просмотр страницы варианта крупно */
.zoom-view { position: fixed; inset: 0; z-index: 60; background: rgba(20, 20, 20, .92); overflow: auto; -webkit-overflow-scrolling: touch; }
.zoom-view img { display: block; width: 160%; max-width: none; margin: 0; background: #fff; cursor: zoom-out; }
@media (min-width: 901px) { .zoom-view img { width: min(1400px, 140%); margin: 0 auto; } }
.zoom-view.page img { width: 170%; }  /* страница конспекта A4: крупнее, но без лишней прокрутки */
@media (min-width: 901px) { .zoom-view.page img { width: min(1300px, 100%); } }
.note-page img { cursor: zoom-in; }
/* на сенсорных экранах подсказать, что картинку задания можно открыть крупно */
@media (hover: none) and (max-width: 900px) {
  .prose .figure::after { content: "нажмите, чтобы увеличить"; display: block; font-size: .72rem; color: var(--muted); text-align: center; margin-top: 2px; }
}
.zoom-close { position: fixed; top: 12px; right: 12px; z-index: 61; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #111; font-size: 1.3rem; box-shadow: 0 2px 10px rgba(0,0,0,.3); cursor: pointer; }
.zoom-hint { position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%); z-index: 61; background: rgba(255,255,255,.92); color: #111; padding: 6px 12px; border-radius: 20px; font-size: .85rem; white-space: nowrap; }

/* Задания пробника текстом */
.prose p.opt { margin: .35em 0 .35em 1.6em; text-indent: -1.6em; }
.prose table.match { display: table; width: 100%; table-layout: fixed; }
.prose table.match th { text-align: center; font-size: .85rem; letter-spacing: .02em; }
.prose table.match td p { margin: .25em 0 .5em 1.4em; text-indent: -1.4em; }
.prose table.abc { display: table; width: auto; margin: .6em 0; }
.prose table.abc th, .prose table.abc td { width: 38px; height: 34px; text-align: center; padding: 2px; }
.prose .figure { text-align: center; margin: 1em 0; }
.prose .figure img { background: #fff; border-radius: 6px; padding: 6px; max-width: min(100%, 560px); }
.prose .figure-right { float: right; width: 38%; max-width: 220px; margin: 0 0 10px 16px; }
.prose .crit-page img { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.task::after { content: ""; display: table; clear: both; }
.mock-text .task { padding: 22px 0; }
.mock-text .sticky-submit { bottom: 0; }
@media (max-width: 760px) { .prose table.match { font-size: .88rem; } .prose .figure-right { float: none; width: 70%; margin: 0 auto 10px; display: block; } .mock-text .sticky-submit { bottom: 62px; } }
:root[data-theme="dark"] .prose .figure img, :root[data-theme="dark"] .prose .crit-page img { filter: brightness(.9); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .prose .figure img, :root:not([data-theme="light"]) .prose .crit-page img { filter: brightness(.9); } }
.prose .crit-page img, .prose .figure img { cursor: zoom-in; }
.mock-text .task-src { max-height: none; }
textarea[data-grow] { min-height: 140px; overflow-y: hidden; }
.review-split textarea[data-grow], .sheet textarea[name="tutor_comment"] { min-height: 160px; }
/* Шаблоны комментариев */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font: inherit; font-size: .84rem; line-height: 1.3; text-align: left; padding: 5px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; max-width: 100%; text-decoration: none; }
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.chip-pos { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.chip-add, .chip-link { color: var(--accent); background: none; border-style: dashed; }
.chip.flash { background: var(--ok-soft); border-color: var(--ok); }
.template-row textarea { min-height: 60px; }
/* Поиск */
.top-search input { width: 190px; padding: 6px 10px; font-size: .9rem; border-radius: 18px; background: var(--paper); }
.top-search-btn { display: none; font-size: 1.15rem; }
@media (max-width: 1400px) { .top-search { display: none; } .top-search-btn { display: inline-block; } }
.search-big { display: flex; gap: 8px; margin-bottom: 14px; }
.search-big input { font-size: 1.1rem; padding: 11px 14px; }
.search-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.search-snip { color: var(--muted); margin-top: 3px; }
.search-snip mark, .search-snip mark { background: var(--warn-soft); color: var(--ink); padding: 0 2px; border-radius: 3px; }

/* Видеолекции */
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* Карточка ученика */
.card-head { align-items: center; }
.avatar { width: 54px; height: 54px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; flex: none; }
.card-head .grow { flex: 1; min-width: 200px; }
.dl { display: grid; grid-template-columns: 140px 1fr; gap: 8px 14px; margin: 0 0 12px; }
.dl dt { color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; }
@media (max-width: 600px) { .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 8px; } }
.insights { list-style: none; padding: 0; margin: 0 0 12px; }
.ins { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--line-soft); }
.ins:first-child { border-top: 0; }
.ins-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--accent); }
.ins.bad .ins-dot { background: var(--bad); } .ins.warn .ins-dot { background: var(--warn); } .ins.good .ins-dot { background: var(--ok); }
/* Расписание */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.day { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; min-height: 140px; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-head { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.day-add { margin-left: auto; text-decoration: none; color: var(--muted); padding: 0 4px; border-radius: 6px; }
.day-add:hover { background: var(--accent-soft); color: var(--accent); }
.day-empty { padding: 6px 2px; }
.lesson { display: block; padding: 6px 8px; border-radius: 8px; margin-bottom: 6px; text-decoration: none; color: var(--ink); font-size: .88rem; line-height: 1.3; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.lesson.s-held { border-color: var(--ok); background: var(--ok-soft); }
.lesson.s-cancelled { border-color: var(--line); background: var(--line-soft); color: var(--muted); text-decoration: line-through; }
.lesson.s-missed { border-color: var(--bad); background: var(--bad-soft); }
@media (max-width: 900px) { .week { grid-template-columns: 1fr; } .day { min-height: 0; } }
.next-lesson { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border-left: 4px solid var(--accent); }
.next-lesson .grow { flex: 1; }

/* Компактное меню на средних экранах: все пункты помещаются без прокрутки */
@media (max-width: 1400px) {
  .brand-long { display: none; }
  .brand { margin-right: 4px; }
  .nav a { padding: 8px 7px; font-size: .9rem; }
}
@media (max-width: 1000px) {
  .nav { gap: 0; }
  .nav a { padding: 8px 5px; font-size: .85rem; }
  .top-in { gap: 2px; padding: 0 10px; }
  .top-actions .user-name { display: none; }
  .top-actions .user-icon { display: inline; }
}
.user-icon { display: none; }

/* Онлайн и объявления */
.announce-bar { background: var(--warn-soft); border-bottom: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); padding: 9px 16px; text-align: center; font-size: .95rem; }
.announce { background: var(--warn-soft); border-radius: 8px; padding: 10px 14px; }
.online-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); flex: none; }
.update-verdict.ok { border-left: 4px solid var(--ok); }
.update-verdict.warn { border-left: 4px solid var(--warn); }

/* Меню «Ещё» на телефоне */
.tabbar .tab-more { flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: .72rem; line-height: 1.2; padding: 7px 2px 6px; cursor: pointer; }
.tabbar .tab-more b { display: block; font-size: 1.15rem; font-weight: 400; }
.more-menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--sheet); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.2); padding: 8px 16px calc(80px + env(safe-area-inset-bottom)); max-height: 80vh; overflow: auto; }
.more-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; }
.more-search { margin: 6px 0 10px; }
.more-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.more-links a { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); background: var(--paper); }
@media (min-width: 761px) { .more-menu { display: none !important; } }
.brand-dot { color: var(--accent); }
@media (max-width: 1400px) { .brand-dot { display: none; } }
.mark-btns { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.btn.armed { background: var(--warn); border-color: var(--warn); color: #fff; }

/* Пометка редактора: что исправлено относительно сборника (только для репетитора) */
.editor-note { border-left: 3px solid var(--warn); background: var(--warn-soft); padding: 8px 12px; margin: 8px 0; border-radius: 6px; }
.editor-note .prose p { margin: .3em 0; }

/* ловушка для ботов в форме регистрации — человеку не видна */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
/* поиск внутри раздела */
.section-search { display: flex; gap: 6px; margin: 0 0 12px; max-width: 560px; }
.section-search input[type=search] { flex: 1; min-width: 0; }
.section-search-info { margin: -4px 0 12px; }
/* тренажёр терминов */
.tt-prompt { font-size: 1.15rem; line-height: 1.5; margin: 0 0 14px; }
.tt-prompt.term { font-family: var(--font-head, inherit); font-size: 1.5rem; font-weight: 700; }
.tt-options { display: grid; gap: 8px; margin-bottom: 12px; }
.tt-options button { text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--sheet); color: var(--ink); font: inherit; cursor: pointer; line-height: 1.4; }
.tt-options button:hover:not(:disabled) { border-color: var(--accent); }
.tt-options button.ok { border-color: var(--ok); background: var(--ok-soft, rgba(46, 160, 67, .12)); }
.tt-options button.bad { border-color: var(--bad); background: var(--bad-soft, rgba(207, 34, 46, .1)); }
.tt-options button:disabled { cursor: default; }
.tt-summary li { margin-bottom: 8px; }
/* чат */
.chat { display: flex; flex-direction: column; height: calc(100vh - 210px); min-height: 360px; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.chat-title { margin-bottom: 10px; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.chat-empty { margin: auto; text-align: center; max-width: 360px; }
.msg { max-width: min(78%, 520px); align-self: flex-start; }
.msg.mine { align-self: flex-end; }
.msg-body { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 14px 14px 14px 4px; padding: 8px 12px; overflow-wrap: anywhere; }
.msg.mine .msg-body { background: var(--accent-soft, #e3ecfa); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.msg-text { white-space: normal; line-height: 1.45; }
.msg-img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; margin: 2px 0; }
.msg audio { display: block; width: min(280px, 100%); height: 40px; }
.msg-file { display: inline-flex; gap: 6px; align-items: baseline; text-decoration: none; font-weight: 600; }
.msg-file small { color: var(--muted); font-weight: 400; }
.msg-meta { font-size: .72rem; color: var(--muted); margin: 2px 6px 0; display: flex; gap: 6px; align-items: center; }
.msg.mine .msg-meta { justify-content: flex-end; }
.msg-del { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: .75rem; opacity: .5; }
.msg-del:hover { opacity: 1; color: var(--bad); }
.chat-form { border-top: 1px solid var(--line); padding: 8px; background: var(--sheet); }
.chat-form.sending { opacity: .6; pointer-events: none; }
.chat-row { display: flex; gap: 6px; align-items: flex-end; }
.chat-row textarea { flex: 1; min-width: 0; resize: none; max-height: 140px; min-height: 40px; }
.chat-clip, .chat-mic { cursor: pointer; font-size: 1.15rem; min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.chat-send { min-width: 44px; height: 40px; padding: 0 12px; }
.chat-attach-info { font-size: .85rem; margin: 0 4px 6px; }
.chat-rec { display: flex; gap: 8px; align-items: center; padding: 6px 4px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); animation: recblink 1s infinite; }
@keyframes recblink { 50% { opacity: .2; } }
.chat-preview { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
@media (max-width: 760px) { .chat { height: calc(100vh - 220px); height: calc(100dvh - 210px); border-radius: 10px; } .msg { max-width: 88%; } }
:root[data-theme="dark"] .msg.mine .msg-body { background: #24344d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.mine .msg-body { background: #24344d; } }

/* атрибут hidden сильнее любых display у кнопок и блоков */
[hidden] { display: none !important; }
/* расписание учебного плана */
.plan-weeks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.plan-weeks li { border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem; line-height: 1.45; }
/* тема как маршрут: лекция → конспект → термины → задание */
.path-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 4px 0 8px; position: sticky; top: 60px; z-index: 5; background: var(--paper); padding: 6px 0; }
.path-step { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 600; padding: 6px 2px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--sheet); text-align: center; }
.path-step .n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--line); font-size: .85rem; }
.path-step.started { color: var(--ink); border-color: var(--accent); }
.path-step.started .n { border-color: var(--accent); color: var(--accent); }
.path-step.done { color: var(--ok); }
.path-step.done .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.path-step.none { opacity: .45; }
.path-summary { margin: 0 0 12px; }
.path-block { background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; scroll-margin-top: 130px; }
.path-block > h2 { margin: 0 0 10px; font-size: 1.12rem; display: flex; align-items: center; gap: 10px; }
.path-block > h2 .n { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: .9rem; flex: 0 0 auto; }
.path-block.done > h2 .n { background: var(--ok); font-size: 0; }
.path-block.done > h2 .n::after { content: "✓"; font-size: .95rem; }
.path-block .rows { margin: 0; }
.path-extra { margin-top: 10px; }
.path-extra summary { cursor: pointer; font-weight: 600; font-size: .92rem; }
/* значки шагов в списке тем */
.step-dots { display: inline-flex; gap: 3px; }
.step-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-soft); border: 1px solid var(--line); font-style: normal; }
.step-dots i.started { background: var(--accent); border-color: var(--accent); opacity: .55; }
.step-dots i.done { background: var(--ok); border-color: var(--ok); }
.step-dots i.none { opacity: .25; border-style: dashed; background: none; }  /* шага нет в теме (например, лекции) */
.continue-card { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px solid var(--accent); }
.continue-card .grow { min-width: 200px; }
@media (max-width: 600px) { .path-steps { top: 52px; } .path-step { font-size: .72rem; } }
.step-next { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.topic-materials { margin: 0 0 12px; color: var(--muted); }
.path-block .rows li { flex-wrap: wrap; padding-left: 0; padding-right: 0; }
.path-block .rows li .grow { min-width: min(220px, 100%); }
.path-block.none { background: transparent; border-style: dashed; }
.path-block.none > h2 { color: var(--muted); }
.path-block.none > h2 .n { background: var(--line); }
.section-head .share { font-size: .8rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
.consent-box { max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px 14px; background: var(--paper, transparent); margin: 10px 0; }
.consent-box h2 { font-size: 1rem; }
.pd-doc table.t td, .pd-doc table.t th { vertical-align: top; }
@media print { .crumbs { display: none !important; } .pd-doc { font-size: 11.5pt; } }
.lec-icon { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); font-size: .8rem; flex: none; }
.lecture-open { text-align: center; padding: 28px 16px; }
.btn.big { font-size: 1.1rem; padding: 12px 26px; }
/* Видеолекция: плеер, презентация, вопросы */
.video-box { background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 16px; border: 1px solid var(--line); }
.video-box video { display: block; width: 100%; max-height: 78vh; background: #000; aspect-ratio: auto 16 / 10; }
.video-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 12px; background: var(--sheet); border-top: 1px solid var(--line); }
.video-bar .speeds { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.video-bar .chip { padding: 3px 9px; }
.slides summary { cursor: pointer; }
.slides-frame iframe { display: block; width: 100%; height: min(78vh, 720px); border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; background: #fff; }
.lc-list { list-style: none; margin: 0; padding: 0; }
.lc { padding: 8px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-soft); margin: 0 0 8px; max-width: 760px; }
.lc-tutor { background: var(--accent-soft); border-color: transparent; margin-left: min(40px, 6%); }
.lc-new { box-shadow: inset 3px 0 0 var(--warn); }
.lc-head { display: flex; align-items: center; gap: 6px; }
.lc-head form { margin-left: auto; }
.lc-head .btn.ghost { padding: 0 6px; line-height: 1.2; min-height: 0; }
.lc-text { margin-top: 2px; overflow-wrap: anywhere; }
.lc-text a.tc { font-family: var(--mono); font-weight: 600; }
.lc-form textarea { width: 100%; resize: vertical; }
.lc-form .actions { margin-top: 6px; }
.upload-box .progress { margin-top: 10px; max-width: 520px; }
.glossary dl { margin: 0; }
.glossary dt { font-weight: 700; margin-top: 10px; }
.glossary dd { margin: 2px 0 0; }
@media print { .glossary { break-inside: auto; } .glossary dt { break-after: avoid; } .glossary h2 { break-after: avoid; } }
@media (max-width: 640px) { .video-box { border-radius: 0; margin-left: -16px; margin-right: -16px; border-left: 0; border-right: 0; } }
/* Оглавление заданий набора (ДЗ, пробник): сбоку на компьютере, свёрнутым списком сверху на телефоне */
.toc-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; }
.toc-layout > .toc-main:only-child { grid-column: 1 / -1; }
.toc-side { position: sticky; top: 66px; max-height: calc(100vh - 84px); overflow: auto; }
.toc { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.toc summary { cursor: pointer; font-weight: 700; font-size: .92rem; }
.toc-part { margin: 10px 0 4px; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.toc-row { display: flex; gap: 6px; align-items: flex-start; padding: 2px 0; }
.toc-pos { min-width: 40px; padding-top: 3px; font-weight: 700; font-size: .84rem; text-decoration: none; color: var(--ink); white-space: nowrap; }
.toc-chips { display: flex; flex-wrap: wrap; gap: 3px; }
.toc-chip { min-width: 25px; height: 25px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 6px; font-size: .78rem; text-decoration: none; color: var(--ink); background: var(--paper); }
.toc-chip:hover { border-color: var(--accent); }
.toc-chip.done { background: var(--accent-soft); border-color: var(--accent); }
.toc-chip.ok { background: var(--ok-soft); border-color: var(--ok); }
.toc-chip.part { background: var(--warn-soft); border-color: var(--warn); }
.toc-chip.bad { background: var(--bad-soft); border-color: var(--bad); }
.task { scroll-margin-top: 72px; }
.task:target { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 8px; }
.crit-hint { margin-top: 10px; }
@media (max-width: 1000px) { .toc-layout { grid-template-columns: minmax(0, 1fr); } .toc-side { position: static; max-height: none; } }
.add-bar { margin: -4px 0 16px; gap: 6px; align-items: center; }

/* ---- «Шампань»: золото на элементах управления, книжные заголовки ---- */
h1, h2, .brand, .auth-card .brand { font-family: var(--serif); font-weight: 700; letter-spacing: .005em; }
h1 { font-size: 2.15rem; line-height: 1.1; } h2 { font-size: 1.6rem; }
.brand { color: var(--gold); font-size: 1.55rem; }
.brand span, .brand-dot { color: var(--gold); }
.top { background: var(--sheet); border-bottom: 1px solid var(--line); }
.nav a.on, .chip.on { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; border-radius: 999px; }
.nav a { border-radius: 999px; }
.btn { border-radius: 999px; border-color: var(--line); }
.btn.primary, :root[data-theme="dark"] .btn.primary { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: var(--on-gold); } }
.btn.danger { border-radius: 999px; }
.progress > span { background: linear-gradient(90deg, var(--gold-light), var(--gold)); }
.tabs a.on { color: var(--ink); border-color: var(--gold); }
.task-num { border-color: var(--gold); color: var(--accent); border-radius: 10px; }
.path-step.started { border-color: var(--gold); }
.path-step.started .n { border-color: var(--gold); color: var(--accent); }
.path-step.done { color: var(--accent); }
.path-step.done .n { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); }
.toc-chip.done { background: var(--accent-soft); border-color: var(--gold); }
.badge { background: var(--gold); color: var(--on-gold); }
.kpi-box .v { font-family: var(--serif); font-size: 2.1rem; }
.sheet, .kpi-box { border-color: var(--line); }
.epigraph { margin: 4px 0 14px; padding-left: 14px; border-left: 3px solid var(--gold); }
.epigraph q { font-family: var(--serif); font-style: italic; font-size: 1.22rem; color: var(--accent); quotes: "«" "»"; }
.epigraph .who { font-size: .8rem; color: var(--muted); margin-top: 2px; }
