/* Академия · вид v3 (Алекс 24.10: макет academy-variants/p3 «Список-деталь как Linear», сводка из p1, «Сейчас» из p2).
   Вёрстка и размеры перенесены из макета: сайдбар 216, список 340, колонка EDEM 360, строки 30/26/46, радиусы
   окно 12 · карточка 10 · строка 8 · чип 7 · метка 5. Материал, линии зон и плотный центр рисует рама окна
   (window.css) по переменным --win-side-w / --win-panel-w; цвета - токены tokens.css и оттенки синего стекла
   макета ниже (--a-*). Цветных кантов по краю скруглённых карточек нет: угроза - заливкой, горящее - словом. */

.acad {
  --acad-side: 216px;
  --acad-panel: 360px;
  --acad-list: 340px;
  --c1: var(--acad-side);
  --c3: 0px;
  /* оттенки синего стекла из макета p3 поверх тонов рамы */
  --a-raise-1: rgba(214,228,250,.045);
  --a-raise-2: rgba(214,228,250,.075);
  --a-raise-3: rgba(214,228,250,.11);
  --a-hover: rgba(214,228,250,.05);
  --a-sel: rgba(207,224,255,.10);
  --a-line-soft: rgba(214,228,250,.055);
  --a-edge: rgba(214,228,250,.12);
  --a-tx-4: #606c80;
  --a-threat: rgba(150,38,50,.30);
  --a-threat-sel: rgba(150,38,50,.42);
  --a-threat-tx: #e3aab1;
  --a-fill: rgba(207,224,255,.6);
  --a-light: #e6eef9;
  --a-comp: rgba(38,51,75,.92);
  --a-scrim: rgba(4,6,10,.55);
  --a-sheet: rgb(16,25,39);   /* непрозрачный тон листа телефона (--pop-glass без прозрачности): под композером ничего не просвечивает */
  /* тона колонок (Алекс 24.10: «много списков, пусть немного различаются по цветам»): лёгкий синий поверх тонов рамы,
     список светлее детали, колонка EDEM синее сайдбара. Без линий и кромок: разница только заливкой. */
  --a-col-list: rgba(150,182,236,.04);
  --a-col-det: rgba(150,182,236,.012);
  --a-col-edem: rgba(128,166,236,.045);
  position: relative; display: grid; height: 100%; min-width: 0; min-height: 0;
  grid-template-columns: var(--c1) minmax(0, 1fr) var(--c3);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "side main panel";
  font: 400 13px/18px var(--font-ui);
}
:root[data-theme="light"] .acad {
  --a-raise-1: rgba(20,40,80,.035); --a-raise-2: rgba(20,40,80,.06); --a-raise-3: rgba(20,40,80,.10);
  --a-hover: rgba(20,40,80,.05); --a-sel: rgba(40,80,160,.10); --a-line-soft: rgba(20,40,80,.07); --a-edge: rgba(20,40,80,.14);
  --a-tx-4: #9aa3b2; --a-threat: rgba(201,58,69,.12); --a-threat-sel: rgba(201,58,69,.18); --a-threat-tx: #a33a44;
  --a-fill: rgba(40,80,160,.55); --a-light: #1d2633; --a-comp: rgba(255,255,255,.92); --a-scrim: rgba(20,24,32,.36); --a-sheet: rgb(252,252,253);
  --a-col-list: rgba(40,80,160,.025); --a-col-det: transparent; --a-col-edem: rgba(40,80,160,.03);
}
.acad [hidden] { display: none !important; }
:where(.acad) button { font: inherit; color: inherit; }   /* без веса: классы кнопок ниже перебивают */
/* Кнопки, у которых свой кегль, пишутся через «.acad »: общий сброс прототипа .dex-prototype button { font: inherit }
   весит (0,1,1) и иначе возвращал бы им 13 px. */
.acad[data-side="closed"], .acad[data-side="over"] { --c1: 0px; }
.acad[data-panel="open"] { --c3: var(--acad-panel); }
.acad[data-dragging] { user-select: none; cursor: col-resize; }

/* ── общие мелочи макета: «демо», код предмета, «?», клавиша ── */
.acad-demo { display: inline-flex; align-items: center; flex: none; height: 16px; padding: 0 5px; border-radius: 5px;
  background: var(--a-raise-2); color: var(--tx-3); font: 500 11px/1 var(--font-ui); white-space: nowrap; }
.acad-code { display: inline-grid; place-items: center; flex: none; width: 32px; height: 22px; border-radius: 7px;
  background: var(--a-raise-3); color: var(--tx-2); font: 600 10px/1 var(--font-code); letter-spacing: .04em; }
.acad-code--hot { background: var(--hot-wash); color: var(--hot); }
.acad-q { display: inline-grid; place-items: center; flex: none; width: 15px; height: 15px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--tx-3); color: var(--tx-2); font: 600 11px/1 var(--font-ui); }
.acad-kbd { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 5px; background: var(--a-raise-2); color: var(--tx-3); font: 500 11px/1 var(--font-ui); }

/* ── сайдбар (макет .side): прокрутка без полосы, подвал SmartLMS на месте ── */
.acad-side { grid-area: side; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; user-select: none; }
.acad[data-side="closed"] .acad-side { display: none; }
.acad[data-side="over"] .acad-side {
  grid-column: 1 / -1; position: absolute; top: 0; bottom: 0; left: 0; z-index: 6; width: var(--acad-side);
  background: var(--pop-glass); -webkit-backdrop-filter: var(--pop-blur); backdrop-filter: var(--pop-blur);
  box-shadow: var(--shadow-pop), inset -1px 0 0 var(--line);
}
.acad-side__in { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 8px 8px 0; overflow: hidden auto; scrollbar-width: none;
  /* мягкий срез над подвалом SmartLMS: строка под ним уходит в затухание 16 px, а не режется */
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); }
.acad-side__in::-webkit-scrollbar { display: none; }
.acad-side__in > * { flex: none; }
.acad-side__sp { flex: 1 1 0 !important; min-height: 8px; }

/* шапка: модуль и неделя, «шанс без долгов» крупной цифрой (макет .tb__mod, показатель из p2) */
.acad-head { display: flex; flex-direction: column; gap: 7px; margin: 0 0 8px; padding: 6px 8px 8px; border-bottom: 1px solid var(--a-line-soft); }
.acad-head__mod { display: flex; align-items: center; gap: 8px; color: var(--tx-3); font-size: 12px; line-height: 16px; white-space: nowrap; }
.acad-head__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acad-head__t b { color: var(--tx-2); font-weight: 500; }
.acad-head__segs { display: grid; grid-template-columns: repeat(var(--n, 8), minmax(0, 1fr)); gap: 3px; }
.acad-head__segs i { height: 4px; border-radius: 2px; background: var(--a-raise-3); }
.acad-head__segs i.on { background: rgba(207,224,255,.45); }
.acad-head__segs i.now { background: var(--cool); }
.acad .acad-head__chance { display: flex; flex-direction: column; align-items: flex-start; margin: 2px -6px 0; padding: 4px 6px 5px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tx-3); font-size: 12px; text-align: left; white-space: nowrap; cursor: pointer; }
.acad-head__chance:hover, .acad-head__chance[aria-current] { background: var(--a-hover); color: var(--tx-2); }
.acad-head__v { color: var(--tx-1); font: 600 22px/26px var(--font-ui); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.acad-head__v.is-hot { color: var(--hot); }
.acad-head__sub { display: flex; align-items: center; gap: 6px; max-width: 100%; height: 16px; font-size: 12px; line-height: 16px; }
.acad-head__k { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* поиск (макет .search, перенесён из строки заголовка в сайдбар: строку окна рисует рама) */
.acad-search { display: flex; align-items: center; gap: 8px; height: 28px; margin: 0 0 6px; padding: 0 5px 0 9px; border-radius: 8px;
  background: var(--a-raise-1); box-shadow: inset 0 0 0 1px var(--line); color: var(--tx-3); cursor: text; }
.acad-search:focus-within { box-shadow: inset 0 0 0 1px var(--line-focus); }
.acad-search > svg { width: 14px; height: 14px; flex: none; }
.acad-search__in { flex: 1; min-width: 0; height: 26px; margin: 0; padding: 0; border: 0; outline: none; background: transparent;
  font: inherit; color: var(--tx-1); }
.acad-search__in::placeholder { color: var(--tx-3); opacity: 1; }
.acad-search:focus-within .acad-kbd { display: none; }

/* строки фильтров (макет .nav) */
.acad-nav { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tx-2); white-space: nowrap; text-align: left; cursor: pointer; }
.acad-nav:hover { background: var(--a-hover); }
.acad-nav[aria-current] { background: var(--a-sel); color: var(--tx-1); }
.acad-nav > svg { width: 16px; height: 16px; flex: none; color: var(--tx-3); }
.acad-nav[aria-current] > svg { color: var(--tx-1); }
.acad-nav > .acad-q { width: 16px; height: 16px; margin: 0; }
.acad-nav__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acad-nav__n { color: var(--tx-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* заголовки групп (макет .grp) */
.acad .acad-grp { display: flex; align-items: center; gap: 6px; width: 100%; height: 28px; margin-top: 14px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tx-3); font-size: 12px; line-height: 16px; white-space: nowrap; text-align: left; }
.acad-grp__r { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.acad-grp__r.is-hot { color: var(--hot); }
.acad-grp--btn { cursor: pointer; }
.acad-grp--btn:hover { background: var(--a-hover); color: var(--tx-2); }
.acad-grp--btn[aria-current] { background: var(--a-sel); color: var(--tx-1); }
.acad-grp--btn > svg { width: 12px; height: 12px; flex: none; margin-right: -3px; }

/* предметы (макет .subj): код, название, прогноз, шанс, шкала 0-10 с засечкой порога */
.acad-subj { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; grid-template-rows: 17px 14px 10px; column-gap: 9px; align-items: center;
  width: 100%; padding: 7px 8px 6px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }
.acad-subj.is-gap { grid-template-rows: 17px 14px; }
.acad-subj:hover { background: var(--a-hover); }
.acad-subj[aria-current] { background: var(--a-sel); }
.acad-subj.is-threat { background: var(--a-threat); }
.acad-subj.is-threat[aria-current] { background: var(--a-threat-sel); }
.acad-subj > .acad-code { grid-row: 1 / 3; }
.acad-subj.is-threat > .acad-code { background: rgba(240,183,189,.16); color: #f0c4c9; }
.acad-subj__n { grid-column: 2 / 4; grid-row: 1; color: var(--tx-1); line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acad-subj__s { grid-column: 2; grid-row: 2; color: var(--tx-3); font-size: 11px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acad-subj.is-threat .acad-subj__s { color: var(--a-threat-tx); }
.acad-subj__p { grid-column: 3; grid-row: 2; color: var(--tx-2); font-size: 12px; font-weight: 600; line-height: 14px; font-variant-numeric: tabular-nums; }
.acad-subj__p.is-hot { color: var(--hot); }
/* нет формулы: «?» в кружке цветом --tx-3, как у «дата не проверена» */
.acad-subj > .acad-subj__p.acad-q { justify-self: end; width: 15px; height: 15px; color: var(--tx-3); font: 600 10px/1 var(--font-ui); }
.acad-subj > .acad-sc { grid-column: 2 / 4; grid-row: 3; align-self: end; }
.acad-sc { position: relative; display: grid; grid-template-columns: repeat(var(--n, 10), minmax(0, 1fr)); gap: 2px; }
.acad-sc > i { height: 4px; border-radius: 2px; background: var(--a-raise-3); }
.acad-sc > i.on { background: var(--a-fill); }
.acad-sc > i.need { background: transparent; box-shadow: inset 0 0 0 1px rgba(207,224,255,.4); }
.acad-sc > i.miss { background: transparent; box-shadow: inset 0 0 0 1px rgba(255,157,66,.6); }
.is-threat .acad-sc > i { background: rgba(255,220,224,.14); }
.is-threat .acad-sc > i.on { background: #f0b7bd; }
.acad-sc > b { position: absolute; top: -2px; left: var(--at, 40%); width: 1px; height: 8px; margin-left: -.5px; background: var(--cool); }

/* чаты-источники (макет .chat) */
.acad .acad-chat { display: flex; align-items: center; gap: 9px; width: 100%; height: 26px; padding: 0 8px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tx-2); font-size: 12px; white-space: nowrap; text-align: left; cursor: pointer; }
.acad-chat:hover { background: var(--a-hover); }
.acad-chat[aria-current] { background: var(--a-sel); color: var(--tx-1); }
.acad-chat__dot { width: 6px; height: 6px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px var(--tx-3); }
.acad-chat__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acad-chat__n { color: var(--tx-3); font-size: 11px; font-variant-numeric: tabular-nums; }
/* сколько учебных чатов читается всего (/status), если не все дали сроки: тихая строка, ведёт в Источники */
.acad .acad-read { display: flex; align-items: center; gap: 6px; width: 100%; height: 26px; padding: 0 8px 0 23px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tx-3); font-size: 12px; white-space: nowrap; text-align: left; cursor: pointer; }
.acad-read:hover { background: var(--a-hover); color: var(--tx-2); }
.acad-read__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acad-read > svg { width: 12px; height: 12px; flex: none; }

/* подвал: SmartLMS (макет .side__foot) */
.acad .acad-foot { display: flex; align-items: center; gap: 9px; flex: none; height: 40px; padding: 0 16px; border: 0; border-top: 1px solid var(--line);
  background: transparent; color: var(--tx-3); font-size: 12px; white-space: nowrap; text-align: left; cursor: pointer; }
.acad-foot:hover, .acad-foot[aria-current] { background: var(--a-hover); color: var(--tx-2); }
.acad-foot > svg { width: 14px; height: 14px; flex: none; }
.acad-foot__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.acad-foot__t b { color: var(--tx-2); font-weight: 500; }

/* Ручки ширины: зона захвата 6 px на линии, двойной клик возвращает исходную ширину. */
.acad-grip { position: absolute; top: 0; bottom: 0; z-index: 4; width: 6px; cursor: col-resize; touch-action: none; }
.acad-grip-side { right: -3px; }
.acad-grip-panel { left: -3px; }

/* ── содержимое: разделы сменяют друг друга на месте ── */
.acad-main { grid-area: main; position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.acad-sec { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.acad-sec > .ui-state { flex: 1; }

/* «Список + деталь» (макет .center): у списка и детали своя строка 40, деталь слева до 680 + поля 24. */
.acad-ld { position: relative; display: grid; flex: 1; min-height: 0; grid-template-columns: var(--acad-list) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.acad-ld-col { grid-column: 1; grid-row: 1; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line);
  background: var(--a-col-list); }
.acad-ld-tool { flex: none; height: 40px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--a-line-soft); overflow: hidden; white-space: nowrap; }
.acad-ld-band, .acad-ld-lead { flex: none; }
.acad-ld-lead:empty { display: none; }
.acad-ld-list { flex: 1; min-height: 0; overflow: hidden auto; }
.acad-ld-dcol { grid-column: 2; grid-row: 1; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; container: det / inline-size;
  background: var(--a-col-det); }
.acad-ld-dtool { flex: none; display: flex; align-items: center; gap: 2px; height: 40px; padding: 0 8px 0 24px; border-bottom: 1px solid var(--a-line-soft); white-space: nowrap; }
/* Тело детали прокручивается вместе с панелью действий: «Сдал / Обсудить» стоит сразу за содержимым (+20) и
   прилипает к низу колонки, только когда содержимое длиннее неё. Без срока (выбери срок, не найден) тело на всю высоту. */
.acad-ld-detail { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden auto; }
.acad-ld-inner { flex: none; max-width: 728px; padding: 18px 24px 0; }
.acad-ld-detail:has(> .acad-ld-act[hidden]) > .acad-ld-inner { flex: 1 0 auto; padding-bottom: 24px; }
.acad-ld-act { position: sticky; bottom: 0; z-index: 2; flex: none; display: flex; align-items: center; gap: 8px; height: 48px; margin-top: 20px; padding: 0 24px;
  border-top: 1px solid var(--a-line-soft); background: linear-gradient(var(--a-col-det), var(--a-col-det)), var(--win-content); }
.acad-grip-list { position: relative; grid-column: 1; grid-row: 1; justify-self: end; margin-right: -3px; }

/* Тост (§2.9): внизу по центру окна, 16 над краем, до 420. Текст - результат своего действия. */
.acad-toast {
  position: absolute; left: 50%; bottom: 16px; z-index: 8; transform: translateX(-50%);
  max-width: min(420px, calc(100% - 32px)); padding: 8px 14px; border-radius: var(--r-card);
  background: var(--pop-glass); -webkit-backdrop-filter: var(--pop-blur); backdrop-filter: var(--pop-blur);
  box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--a-edge); font: var(--type-ui); color: var(--tx-1);
}
.acad-ask { display: none; }

/* ── колонка EDEM (макет .edem): вкладки рисует рама; уже 1200 - поверх содержимого с тенью (§3.3) ── */
.acad-panel { grid-area: panel; position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--a-col-edem); }
.acad[data-panel="over"] .acad-panel {
  grid-column: 1 / -1; position: absolute; top: 0; bottom: 0; right: 0; z-index: 7; width: min(var(--acad-panel), 100%);
  background: var(--pop-glass); -webkit-backdrop-filter: var(--pop-blur); backdrop-filter: var(--pop-blur);
  box-shadow: var(--shadow-pop), inset 1px 0 0 var(--line);
}
.acad-pane { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.acad-pane[data-tab="context"] { overflow: auto; padding: var(--pad-panel); }
.acad-cards { display: flex; flex-direction: column; }

/* Сводка (макет p1 .pc «Сроки»): числа из /deadlines, не слова EDEM */
.acad-sum { flex: none; margin: 12px 12px 0; padding-bottom: 4px; border-radius: 10px; background: var(--a-raise-1); box-shadow: inset 0 0 0 1px var(--a-line-soft); }
.acad-sum__h { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; white-space: nowrap; }
.acad-sum__t { font-size: 12.5px; font-weight: 600; color: var(--tx-1); }
.acad-sum__r { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--tx-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.acad-sum__r b { color: var(--tx-1); font-weight: 500; }
.acad-sum__cap { padding: 2px 12px 2px; color: var(--tx-3); font: 500 9.5px/14px var(--font-code); letter-spacing: .1em; text-transform: uppercase; }
.acad-sum__cap > b { color: var(--hot); font-weight: 600; }
.acad-sum__none { margin: 0; padding: 0 12px 8px; color: var(--tx-2); font-size: 12.5px; line-height: 18px; }
.acad-sum__od { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; column-gap: 10px; width: calc(100% - 8px); height: 28px;
  margin: 0 4px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.acad-sum__od:hover { background: var(--a-hover); }
.acad-sum__od > .acad-code { height: 18px; width: 30px; font-size: 9px; border-radius: 6px; }
.acad-sum__odt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acad-sum__lag { color: var(--hot); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.acad-sum__near { display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); margin: 4px 12px 0; padding: 7px 0 8px; border: 0;
  background: transparent; box-shadow: inset 0 1px 0 var(--a-line-soft); text-align: left; cursor: pointer; }
.acad-sum__big { flex: none; color: var(--tx-1); font: 500 24px/28px var(--font-num); letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acad-sum__big small { margin: 0 3px 0 2px; color: var(--tx-2); font: 400 13px/1 var(--font-ui); }
.acad-sum__big.is-word { font: 600 15px/28px var(--font-ui); letter-spacing: 0; }
.acad-sum__w { min-width: 0; color: var(--tx-3); font-size: 12px; line-height: 16px; }
.acad-sum__w b { display: block; overflow: hidden; color: var(--tx-2); font-weight: 400; white-space: nowrap; text-overflow: ellipsis; }
/* «Сейчас» уже на экране: ближайший срок одной строкой 13 px, без второго крупного числа */
.acad .acad-sum__near.is-line { gap: 6px; height: 30px; padding: 0; font-size: 13px; line-height: 18px; white-space: nowrap; }
.acad-sum__nk { flex: none; color: var(--tx-3); }
.acad-sum__nt { flex: 0 1 auto; min-width: 0; overflow: hidden; color: var(--tx-1); text-overflow: ellipsis; }
.acad-sum__nd { flex: none; color: var(--tx-2); font-variant-numeric: tabular-nums; }
.acad-sum__nd.is-hot { color: var(--hot); }
.acad-sum__nt::before, .acad-sum__nd::before { content: "· "; color: var(--tx-3); }
.acad-sum__bks { margin-top: 4px; padding-top: 2px; box-shadow: inset 0 1px 0 var(--a-line-soft); }
.acad-sum__near + .acad-sum__bks { margin-top: 0; }
.acad .acad-sum__bk { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 12px; align-items: center; column-gap: 8px; width: calc(100% - 8px); height: 26px;
  margin: 0 4px; padding: 0 8px; border: 0; border-radius: 7px; background: transparent; font-size: 12.5px; white-space: nowrap; text-align: left; cursor: pointer; }
.acad-sum__bk:hover { background: var(--a-hover); }
.acad-sum__bkt { color: var(--tx-1); }
.acad-sum__bkm { min-width: 0; overflow: hidden; color: var(--tx-3); font-size: 12px; text-overflow: ellipsis; }
.acad-sum__bkv { color: var(--tx-1); font-variant-numeric: tabular-nums; }
.acad-sum__bk > svg { width: 12px; height: 12px; color: var(--tx-3); }
/* Группы в сводке - не второй список рядом со списком сроков, а одна строка чисел: число крупно, имя группы под ним.
   Даты групп уже стоят в шапках списка; «Просрочено, ещё N» над ней остаётся строкой. */
.acad .acad-sum__bks { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 2px; margin: 4px 4px 0; padding-top: 4px;
  box-shadow: none; background: linear-gradient(var(--a-line-soft), var(--a-line-soft)) 8px 0 / calc(100% - 16px) 1px no-repeat; }
.acad .acad-sum__bks > .acad-sum__bk { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: auto; height: auto; margin: 0; padding: 6px 8px 7px; }
.acad-sum__bks > .acad-sum__bk > .acad-sum__bkv { order: -1; font: 500 18px/22px var(--font-num); letter-spacing: -.01em; }
.acad-sum__bks > .acad-sum__bk > .acad-sum__bkt { color: var(--tx-3); font-size: 12px; line-height: 16px; }
.acad-sum__bks > .acad-sum__bk[data-bucket="hot"] > .acad-sum__bkv { color: var(--hot); }
.acad-sum__bks > .acad-sum__bk > :is(.acad-sum__bkm, svg) { display: none; }

/* Разговор (conversation.js) как у Claude: ход EDEM без пузыря с подписью, свой ход пузырём справа, дни разделителем.
   Лента идёт сверху сразу за Сводкой (+16), свободное место остаётся между последним ходом и композером. */
.acad-pane > .cv-feed { flex: 1; min-height: 0; padding: 16px 16px 12px; }
.acad:not([data-w="phone"]) .acad-pane > .cv-feed {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 16px), transparent); }
.cv-feed { display: flex; flex-direction: column; gap: 12px; overflow: auto; scrollbar-width: none; }
.cv-feed::-webkit-scrollbar { display: none; }
.cv-feed > .ui-state { flex: 1; }
/* подпись ленты одной строкой в стиле разделителя дня: «ОБЩИЙ РАЗГОВОР · ТОЛЬКО ЧТЕНИЕ» */
.cv-note { margin: 0; color: var(--tx-3); font: 500 9.5px/14px var(--font-code); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-day { display: flex; align-items: center; gap: 10px; color: var(--tx-3); font: 500 9.5px/14px var(--font-code); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.cv-day::before, .cv-day::after { content: ""; flex: 1; height: 1px; background: var(--a-line-soft, var(--line-soft)); }
.cv-meta { display: flex; align-items: center; gap: 6px; color: var(--tx-3); font-size: 12px; line-height: 16px; }
.cv-meta > b { color: var(--tx-2); font-weight: 600; letter-spacing: .02em; }
.cv-edem { color: var(--tx-1); font-size: 13.5px; line-height: 21px; }
.cv-edem > .cv-meta + .cv-p { margin-top: 4px; }
.cv-p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; text-wrap: pretty; }
.cv-p + .cv-p { margin-top: 8px; }
.cv-cut { margin: 6px 0 0; font: var(--type-meta); color: var(--tx-3); }
.cv-me { display: flex; justify-content: flex-end; }
.cv-bubble { max-width: 84%; padding: 8px 12px; border-radius: 18px 18px 6px 18px; background: rgba(207,224,255,.10); color: var(--tx-1); font-size: 13.5px; line-height: 20px; }
.cv-actrow { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.cv-act { cursor: default; width: 100%; }
.cv-act > span { flex: none; white-space: nowrap; }
.cv-act > .ui-act__obj { flex: 0 1 auto; min-width: 0; }
.cv-actrow > .cv-cut { margin: 0 0 0 20px; }
/* Композер до моста 3.6 (макет .comp, ряд 44): строка «Писать EDEM пока можно в Telegram» и справа «Telegram ↗»
   на месте круга отправки. Ни чипов с крестиком, ни мёртвого круга. Под ним строка 24 и 8 до низа окна. */
.acad-pane > .cv-composer { flex: none; padding: 0 16px 8px; }
.cv-composer { display: flex; flex-direction: column; gap: 4px; }
.acad .ui-composer.is-off { display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 7px 0 4px; border-radius: 18px;
  background: color-mix(in srgb, var(--a-comp) 70%, transparent); box-shadow: inset 0 0 0 1px var(--a-edge); }
.acad .ui-composer.is-off .ui-composer__input { flex: 1; min-width: 0; min-height: 0; padding: 0 10px; font-size: 13.5px; line-height: 20px; text-overflow: ellipsis; cursor: default; }
.acad .ui-composer__link { flex: none; gap: 5px; height: 30px; padding: 0 10px 0 11px; border-radius: 15px; background: var(--a-raise-2);
  box-shadow: inset 0 0 0 1px var(--a-edge); color: var(--tx-1); font-size: 12.5px; font-weight: 500; text-decoration: none; }
.acad .ui-composer__link:hover { background: var(--a-raise-3); }
/* строка под композером (макет .edem__f): одна строка 24, моно-капс 9.5 - слева «Только чтение», справа «● подключён» */
.cv-composer > .ui-composer-foot { height: 24px; padding: 0 6px; font: 500 9.5px/1 var(--font-code); letter-spacing: .1em; text-transform: uppercase; }
.cv-foot-left { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ── телефон (до 720, §8.1): стек сайдбар → список → деталь, колонка EDEM - нижний лист ── */
.acad-sheet-head, .acad-scrim { display: none; }
.acad[data-w="phone"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.acad[data-w="phone"] .acad-grip { display: none; }
.acad[data-w="phone"] .acad-side { display: none; }
.acad[data-w="phone"][data-level="sections"] .acad-side { display: flex; grid-area: main; }
.acad[data-w="phone"][data-level="sections"] .acad-side__in { padding: 8px 12px 0; }
.acad[data-w="phone"][data-level="sections"] .acad-main { display: none; }
.acad[data-w="phone"] :is(.acad-nav, .acad-subj, .acad-chat, .acad-grp--btn) { min-height: 40px; }
.acad[data-w="phone"] .acad-ld { grid-template-columns: minmax(0, 1fr); }
.acad[data-w="phone"] .acad-ld-col { border-right: 0; }
.acad[data-w="phone"] :is(.acad-ld-col, .acad-ld-dcol) { background: none; }
.acad[data-w="phone"] .acad-ld-act { background: var(--win-content); }
.acad[data-w="phone"] .acad-ld-dcol { grid-column: 1; }
.acad[data-w="phone"][data-level="section"] .acad-ld-dcol,
.acad[data-w="phone"][data-level="detail"] .acad-ld-col { display: none; }
.acad[data-w="phone"] .acad-ld-inner { padding: 16px; }
.acad[data-w="phone"] .acad-ld-dtool { padding: 0 4px 0 16px; }
.acad[data-w="phone"] .acad-ld-act { height: auto; padding: 10px 16px; }
/* строка к EDEM внизу списка (макет .m-comp): капсула 18, кнопка 36 */
.acad[data-w="phone"][data-level="section"][data-section="deadlines"] .acad-sec { bottom: 76px; }
.acad[data-w="phone"][data-level="section"][data-section="deadlines"] .acad-ask {
  position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 10px; height: 52px;
  padding: 0 8px 0 18px; border: 0; border-radius: 18px; background: var(--a-comp); box-shadow: 0 10px 28px rgba(0,0,0,.30), inset 0 0 0 1px var(--a-edge);
  color: var(--tx-3); font-size: 14px; text-align: left; cursor: pointer;
}
.acad-ask > svg { width: 18px; height: 18px; flex: none; }
.acad-ask__t { flex: 1; min-width: 0; overflow: hidden; color: var(--tx-2); white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
/* справа шеврон вверх «открыть лист»: не круг отправки - отправки из ОС нет */
.acad-ask__go { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--a-raise-2); color: var(--tx-2); }
.acad-ask__go > svg { width: 16px; height: 16px; transform: rotate(180deg); }
.acad[data-w="phone"] .acad-toast { bottom: 84px; }
.acad[data-w="phone"][data-panel="sheet"] .acad-scrim { display: block; grid-area: main; position: absolute; inset: 0; z-index: 8; background: var(--a-scrim); }
.acad[data-w="phone"] .acad-panel {
  grid-area: main; position: absolute; left: 0; right: 0; bottom: 0; z-index: 9; height: 66%;
  border-radius: 16px 16px 0 0; background: var(--pop-glass);
  -webkit-backdrop-filter: var(--pop-blur); backdrop-filter: var(--pop-blur); box-shadow: 0 -18px 40px rgba(0,0,0,.4), inset 0 1px 0 var(--a-edge);
  transition: height var(--dur-panel) var(--ease);
}
/* полный лист встаёт на 8 под строкой заголовка рамы: ничего из списка не режется пополам у верхнего края */
.acad[data-w="phone"][data-sheet="full"] .acad-panel { height: calc(100% - 8px); }
.acad[data-w="phone"] .acad-sheet-head { display: flex; flex-direction: column; align-items: stretch; flex: none; padding: 0 var(--pad-panel); }
/* в листе сводка и разговор прокручиваются вместе, композер стоит внизу */
.acad[data-w="phone"] .acad-pane[data-tab="edem"] { overflow: hidden auto; scrollbar-width: none; }
.acad[data-w="phone"] .acad-pane > .cv-feed { flex: none; min-height: auto; overflow: visible; }
/* композер прилипает к низу листа, лента уходит под него в затухание 16 px, а не обрывается */
.acad[data-w="phone"] .acad-pane > .cv-composer { position: sticky; bottom: 0; z-index: 2; margin-top: auto; padding: 16px 12px 8px;
  background: linear-gradient(180deg, transparent, var(--a-sheet) 16px); }
.acad[data-w="phone"] .ui-composer.is-off { height: 48px; }
.acad[data-w="phone"] .ui-composer.is-off .ui-composer__input { font-size: 14px; }
.acad[data-w="phone"] .ui-composer__link { height: 36px; padding: 0 12px; border-radius: 18px; font-size: 13px; }
.acad[data-w="phone"] .cv-edem, .acad[data-w="phone"] .cv-bubble { font-size: 14px; }
.acad-sheet-grip { position: relative; align-self: center; width: 44px; height: 22px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.acad-sheet-grip::before { content: ""; position: absolute; left: 4px; right: 4px; top: 9px; height: 4px; border-radius: 2px; background: rgba(214,228,250,.22); }
@media (prefers-reduced-motion: reduce) { .acad[data-w="phone"] .acad-panel { transition: none; } }
