/* Действия принадлежат объекту или секции. Подробный контракт: docs/features/interface-actions.md. */
.object-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;width:100%;min-width:0}
.object-header>.titles{flex:1;min-width:0}.object-header h1{margin:0}.object-meta{font-size:13px;line-height:1.65;color:var(--text-2);margin-top:8px}
.object-actions{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:8px 12px;flex-shrink:0}
.object-actions>form{margin:0}.object-actions .btn{margin:0;white-space:normal}
.action-secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:38px;padding:8px 10px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--text-2);font:inherit;font-size:13px;font-weight:550;line-height:1.5;text-decoration:none;cursor:pointer}
.action-secondary:hover{color:var(--text);background:var(--surface);border-color:var(--line)}
body main.product-surface .action-icon{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;min-height:40px;padding:8px;border:1px solid var(--line);background:transparent;color:var(--text-2);flex:none}
body main.product-surface .action-icon:hover{color:var(--text);background:var(--surface)}
.action-menu{position:relative;display:inline-flex;align-items:center;flex:none}
.action-menu>.action-menu-panel{position:absolute;z-index:65;right:0;top:calc(100% + 8px);display:none;width:248px;max-width:calc(100vw - 40px);padding:6px;border:1px solid var(--line);border-radius:8px;background:var(--surface);box-shadow:0 12px 32px rgb(0 0 0 / .18)}
.action-menu[open]>.action-menu-panel{display:grid;gap:2px}
body main.product-surface .action-menu-panel :is(.btn,a:not(.btn)){display:flex;width:100%;height:auto;min-height:40px;margin:0;padding:9px 11px;border:0;border-radius:4px;background:transparent;color:var(--text);font-size:13px;font-weight:500;line-height:1.5;text-align:left;justify-content:flex-start;text-decoration:none;white-space:normal;box-shadow:none}
body main.product-surface .action-menu-panel :is(.btn,a):hover{background:var(--accent-soft)}
body main.product-surface .action-menu-panel .btn-danger{color:var(--err)}
.action-menu-panel form{margin:0;display:block}.action-menu-panel .check-row{font-size:12px;padding:8px;line-height:1.5}
body main.product-surface .page-head>.object-header{flex-basis:100%}
body main.product-surface .page-head>.actions .btn-ghost,body main.product-surface .object-actions>.btn-ghost{background:transparent;border-color:transparent;color:var(--text-2);box-shadow:none}
body main.product-surface .page-head>.actions .btn-ghost:hover,body main.product-surface .object-actions>.btn-ghost:hover{border-color:var(--line);background:var(--surface);color:var(--text)}
body main.product-surface :is(.section-label-row,.section-heading)>.actions{gap:8px 12px;align-items:center;flex-wrap:wrap}
body main.product-surface .section-label-row>.actions .btn-ghost{border-color:transparent;background:transparent;padding-inline:6px;font-size:12px}
body main.product-surface .section-label-row{flex-wrap:wrap}
/* Обзор урока: контекст и действие наверху, задачи и материалы — разные рабочие зоны. */
body main.product-surface.lesson-page .lh-hero{display:block;padding:4px 0 28px;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;margin:0;box-shadow:none}
body main.product-surface.lesson-page .lh-body.object-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px 32px;align-items:start}
body main.product-surface.lesson-page .lh-body>[data-view=lesson-read]{grid-column:1;min-width:0}
body main.product-surface.lesson-page .lh-topic{max-width:34ch;font-size:32px;font-weight:600;line-height:1.25;margin:0 0 12px}
.lesson-date{display:inline;font-size:14px;font-weight:500;color:var(--text)}
body main.product-surface.lesson-page .lh-time-note{display:inline;font-size:13px;margin:0 0 0 12px;white-space:normal}
body main.product-surface.lesson-page .lh-who{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 0;font-size:13px}
body main.product-surface.lesson-page .lh-actions.object-actions{grid-column:2;grid-row:1;max-width:380px;margin:0;align-self:start;gap:8px}
body main.product-surface.lesson-page .lt-title-form{grid-column:1/-1;grid-row:2;min-width:0}
body main.product-surface.lesson-page .lesson-room-offer{display:grid;justify-items:start;grid-column:1/-1;gap:8px;min-width:0}
body main.product-surface.lesson-page .lesson-room-offer .lt-note{margin:0}
body main.product-surface.lesson-page .lh-tabs{margin:0 0 28px;padding-top:10px}
.lesson-overview{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(260px,1fr);gap:36px;align-items:start}
.lesson-plan-panel,.lesson-notes-panel{min-width:0}
.lesson-plan-panel:not(:has(> *)),.lesson-notes-panel:not(:has(> *)){display:none}
.lesson-overview:has(>.lesson-plan-panel:not(:has(> *))),.lesson-overview:has(>.lesson-notes-panel:not(:has(> *))){grid-template-columns:1fr}
body main.product-surface.lesson-page .lesson-overview .section-label-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 18px}
body main.product-surface.lesson-page .lesson-overview .section-label{font-size:19px}
body main.product-surface.lesson-page .lesson-plan-panel .section-label-row{display:block}
body main.product-surface.lesson-page .lesson-plan-panel .section-label-row>.actions{display:flex;gap:4px 12px;margin-top:12px;padding:10px 0;border-block:1px solid var(--line)}
body main.product-surface.lesson-page .lesson-plan-panel .section-label-row .btn{font-size:12px;min-height:34px;padding:5px 0;border-color:transparent;background:none;color:var(--text-2)}
body main.product-surface.lesson-page .lesson-notes-panel{padding:22px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
body main.product-surface.lesson-page .lesson-notes-panel .section-label-row{display:block}
body main.product-surface.lesson-page .lesson-notes-panel .section-label-row .actions{margin-top:8px}
body main.product-surface.lesson-page .lesson-notes-panel .lh-materials{padding:0;border:0;background:none;box-shadow:none}
body main.product-surface.lesson-page .lesson-notes-panel .lh-notes-teaser{font-size:13px;line-height:1.7;margin-bottom:18px}
body main.product-surface.lesson-page .lesson-notes-panel .btn-primary{background:none;color:var(--text);border-color:var(--line);font-size:12px}
body main.product-surface.lesson-page .lh-empty{padding:24px 0;line-height:1.7}
/* Дз: сначала состав и прогресс, настройка — по требованию. */
body main.product-surface.homework-set-page .object-header{padding-bottom:24px;border-bottom:1px solid var(--line)}
body main.product-surface.homework-set-page .hw-recipient{margin:12px 0 0;font-size:13px;gap:10px;display:flex;flex-wrap:wrap}
body main.product-surface.homework-set-page .titles h1{max-width:34ch}
body main.product-surface.homework-set-page .hw-print-quiet{align-self:flex-start;white-space:nowrap;font-size:12px;min-height:36px;padding-inline:6px}
body main.product-surface.homework-set-page :is(#hw-settings,#hw-template){margin-top:32px;scroll-margin-top:100px}
body main.product-surface.homework-set-page .hw-manage{padding:20px 0;margin:0;border:0;background:none;box-shadow:none}
body main.product-surface.homework-set-page .hw-tpl-form{display:flex;gap:12px;flex-wrap:wrap;padding:16px 0;align-items:center}
body main.product-surface.homework-set-page .hw-tpl-form .input{flex:1;min-width:180px}
body main.product-surface.homework-set-page .hw-manage-footer{gap:20px;align-items:center}
/* Проверка: контекст читается под названием, навигация отделена от действий. */
body main.product-surface.review-workspace .object-header{padding-bottom:24px;border-bottom:1px solid var(--line)}
body main.product-surface.review-workspace .rv-title{font-size:30px;max-width:40ch;margin-bottom:12px}
body main.product-surface.review-workspace .rv-context-person{font-size:14px;color:var(--text)}
body main.product-surface.review-workspace [data-test=rv-assignment-context]{margin:14px 0 0;line-height:1.7;font-size:12px}
body main.product-surface.review-workspace .rv-queue-nav{padding:14px 0;margin-top:-10px;margin-bottom:24px;font-size:13px;gap:12px 20px}
body main.product-surface.review-workspace .review-finish-card{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0;margin-top:24px;border:0;border-top:1px solid var(--line);background:none;border-radius:0;box-shadow:none}
body main.product-surface.review-workspace .review-finish-card .score-hint{order:-1;max-width:56ch;margin:0;font-size:13px;line-height:1.6}
body main.product-surface.review-workspace .review-finish-card .btn{flex:none;max-width:250px}
body main.product-surface.review-workspace .review-comment-form{margin-bottom:0}
/* Ритм и точечные действия в списках и кабинетах. */
body main.product-surface .review-alert{margin-bottom:28px}
body main.product-surface .review-alert-row{gap:20px;align-items:center;flex-wrap:wrap}
body main.product-surface .ws-section-head{margin-bottom:18px}
body main.product-surface .ws-section-head h2{margin:0;line-height:1.4}
body main.product-surface .group-sec-head{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:20px 0;margin:0 0 14px}
body main.product-surface .group-sec-name{text-decoration:none;color:var(--text);font-size:18px;font-weight:600;line-height:1.5}
body main.product-surface .group-sec-name:hover{text-decoration:underline;text-underline-offset:4px}
body main.product-surface .group-sec-rule{display:none}
body main.product-surface .group-settings-btn{margin-left:auto;min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:6px;color:var(--text-2)}
body main.product-surface .group-settings-btn:hover{border-color:var(--line);background:var(--surface)}
body main.product-surface .own-add-menu{justify-content:flex-start;border:0;background:none;padding:0;box-shadow:none;margin:0}
body main.product-surface .own-add-item{padding:0;border:0!important;margin:0}
body main.product-surface .own-add{margin:24px 0 32px}
body main.product-surface .task-row-actions{align-items:center;justify-content:flex-end;border-top:1px solid var(--line);padding-top:12px;margin-top:20px;gap:8px}
body main.product-surface .task-row-actions .own-edit{margin:0}
body main.product-surface .task-row-actions>form .btn{border-color:transparent;background:none;font-size:12px}
body main.product-surface .task-row-actions>form .btn-danger{color:var(--text-2)}
body main.product-surface .task-row-actions>form .btn-danger:hover{color:var(--err)}
body main.product-surface .own-edit>button{margin:0}
body main.product-surface.tutor-home .hm-lesson-actions{gap:12px;align-items:center}
body main.product-surface.tutor-home .hm-lesson-actions .btn-ghost{border-color:transparent;background:none}
/* Предложение занятий: скрывается на неделю, доступно явное восстановление. */
.offer-dismiss{flex:none;display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:8px;border:0;border-radius:5px;background:transparent;color:var(--text-2);cursor:pointer;text-decoration:none}
.offer-dismiss:hover{color:var(--text);background:var(--surface)}
.offer-dismiss:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:760px){.sh-trial-offer{position:relative}.sh-trial-offer>.offer-dismiss{position:absolute;top:8px;right:8px}.sh-trial-offer>.sh-trial-copy{grid-column:2;grid-row:1;padding-right:28px}}
.offer-restore{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 0;color:var(--text-2);font-size:12px;grid-column:1/-1}
[data-dismissible-offer][hidden],[data-offer-restore][hidden],[data-offer-dismiss][hidden]{display:none!important}
@media(max-width:1100px){.object-header{flex-wrap:wrap;gap:18px}.object-header>.titles{flex-basis:100%}.object-header>.object-actions{justify-content:flex-start}.lesson-overview{grid-template-columns:minmax(0,1.5fr) minmax(230px,1fr);gap:24px}body main.product-surface.lesson-page .lh-body.object-header{grid-template-columns:1fr}body main.product-surface.lesson-page .lh-actions.object-actions{grid-column:1;grid-row:auto;justify-content:flex-start;max-width:none}body main.product-surface.lesson-page .lh-topic{font-size:29px}}
@media(max-width:760px){.lesson-overview{grid-template-columns:1fr;gap:28px}.object-actions{justify-content:flex-start}.object-header{gap:16px}body main.product-surface.lesson-page .lesson-notes-panel{padding:20px}body main.product-surface.lesson-page .lh-topic{font-size:26px}body main.product-surface .object-actions>.btn,body main.product-surface .object-actions>form>.btn{width:auto;flex:none}body main.product-surface .action-menu-panel .btn{width:100%}body main.product-surface.homework-set-page .hw-print-quiet{margin-top:-12px}body main.product-surface.review-workspace .review-finish-card{flex-direction:column;align-items:stretch;gap:16px}body main.product-surface.review-workspace .review-finish-card .btn{max-width:none}body main.product-surface.review-workspace .rv-title{font-size:25px}body main.product-surface .group-sec-name{font-size:16px;flex:1;min-width:140px}body main.product-surface .group-sec-count{font-size:11px}body main.product-surface .review-alert-row{gap:14px}body main.product-surface .page-head>.object-actions{margin-top:4px}.offer-dismiss{grid-column:1/-1}.offer-restore{align-items:flex-start;flex-wrap:wrap}}
[data-group-toggle][hidden]{display:none!important}
[data-group-toggle][aria-expanded=false] .ic{transform:rotate(-90deg)}
.group-block .pupil-grid[hidden]{display:none!important}
body main.product-surface .group-sec-head>[data-group-toggle]{width:30px;min-width:30px;height:36px;min-height:36px;padding:6px;border-color:transparent}
body main.product-surface .task-row-actions>.own-edit[open]{flex:0 1 auto;order:0;padding:0;border:0}
body main.product-surface.lesson-page .lesson-overview .lh-empty{padding:16px 0;margin-bottom:0}
body main.product-surface.tutor-home .hm-acts{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
body main.product-surface.tutor-home .hm-acts>.btn-ghost{border-color:transparent;background:none;color:var(--text-2);padding-inline:6px}
body main.product-surface [data-test=own-list]>.task-full.card--lvl{border-left:1px solid var(--line)}
@media(max-width:760px){body main.product-surface.review-workspace .review-finish-card .score-hint{flex:0 1 auto}}

/* Проверка: отдельная строка решения и действия рядом с ним. */
body main.review-queue .review-start-row{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:6px 0 28px;padding:16px 0;border-block:1px solid var(--line)}
.review-start-row>.btn{display:flex;align-items:center;gap:12px;min-height:42px}
body main.review-queue .rq-card{grid-template-columns:40px minmax(0,1fr);gap:16px;padding:20px 0;background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;cursor:default}
body main.review-queue .rq-main{min-width:0;gap:8px}
body main.review-queue .rq-who{font-size:16px;font-weight:650}
body main.review-queue .rq-meta{font-size:12px;line-height:1.6}
.rq-age{margin-left:auto;color:var(--text-2);font-size:12px;font-variant-numeric:tabular-nums}
body main.review-queue .rq-chips{display:flex;flex-direction:column;align-items:stretch;gap:0;margin-top:6px;width:100%}
body main.review-queue .rq-submission{display:flex;align-items:center;flex-wrap:nowrap;gap:16px;width:100%;padding:10px 0;min-height:66px;border-bottom:1px solid var(--line);cursor:pointer}
body main.review-queue .rq-submission:last-child{border-bottom:0}
body main.review-queue .rq-chip{display:flex;align-items:center;gap:12px;min-width:0;flex:1;padding:6px 0;background:none;border:0;border-radius:0;font-size:13px;text-decoration:none}
body main.review-queue .rq-chip>.ic{width:18px;height:18px;flex:none}
.rq-task-label{display:flex;flex-direction:column;gap:4px;min-width:0}
.rq-task-title{font-weight:550;color:var(--text);overflow-wrap:anywhere;line-height:1.55}
.rq-task-meta{font-size:11px;color:var(--text-2);line-height:1.5}
.rq-solution-actions{display:flex;align-items:center;gap:8px;flex:none}
body main.review-queue .rq-solution-actions .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:40px;margin:0;font-size:12px;padding:8px 11px;border:1px solid var(--line);border-radius:5px;background:none;color:var(--text)}
body main.review-queue .rq-solution-actions [data-test=review-viewed] .btn{color:var(--text-2);border-color:transparent}
body main.review-queue .rq-solution-actions .btn:hover,body main.review-queue .rq-solution-actions .btn:focus-visible{background:var(--accent-soft);border-color:var(--accent);color:var(--text)}
body main.review-queue .rq-solution-actions .btn:focus-visible{outline:2px solid var(--focus-ring,var(--accent));outline-offset:3px}
body main.review-queue .rq-submission:hover .rq-task-title{color:var(--text);text-decoration:underline;text-underline-offset:3px}
/* Дз: работа в центре страницы, редактирование — по явному вызову. */
.hw-review-summary{display:flex;align-items:center;gap:9px;padding:12px 0 18px;font-size:13px;color:var(--text-2)}
.hw-review-summary>.ic{flex:none;color:var(--accent)}
.hw-review-complete{color:var(--ok);font-size:13px;margin:16px 0}
.hw-attached{display:inline-flex;align-items:center;gap:6px;color:var(--accent);font-size:12px;font-weight:550;line-height:1.5;margin-top:8px}
.hw-attached>.ic{width:15px;height:15px;flex:none}
body main.homework-set-page--tutor .hwset-task-full{border:0;background:none;border-radius:0;padding-block:18px}
body main.homework-set-page--tutor .hw-task-line{border-bottom:1px solid var(--line);border-radius:0}
body main.homework-set-page--tutor .hw-task-line:hover{background:var(--accent-soft)}
body main.homework-set-page--tutor .hw-task-line .hwset-task-info{min-width:0}
.hw-modal-overlay .hw-dialog{width:560px;max-width:calc(100vw - 32px);max-height:calc(100dvh - 40px);overflow-y:auto;padding:24px}
.hw-dialog .modal-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:24px}
.hw-dialog .modal-head h2{font-size:22px;line-height:1.3;margin:0}
.hw-dialog .hw-manage{border:0;margin:0;padding:0;background:none;border-radius:0;box-shadow:none}
.hw-dialog .hw-manage-fields{display:grid;grid-template-columns:1fr 1.4fr;gap:16px}
.hw-dialog .field{min-width:0}
.hw-dialog .input{width:100%;min-width:0}
.hw-dialog .hw-manage-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;padding-top:20px;margin-top:20px;border-top:1px solid var(--line)}
.hw-dialog .hw-manage-footer .check-row{font-size:13px;line-height:1.6;flex:1}
.hw-dialog .hw-manage-footer>.btn{min-height:40px}
.hw-dialog .hw-tpl-form{display:flex;align-items:center;gap:12px;margin-top:8px}
.hw-dialog .hw-tpl-form .input{flex:1}
/* Код, фото и доска слева; комментарии и завершение — в одной боковой области. */
.review-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(300px,350px);gap:32px;align-items:start;margin-top:24px}
.review-document{min-width:0}
.review-feedback{position:sticky;top:88px;min-width:0;max-height:calc(100dvh - 112px);overflow-y:auto;overscroll-behavior:contain;border-left:1px solid var(--line);padding:0 0 4px 24px;scrollbar-gutter:stable}
.review-feedback>h2{font-size:20px;line-height:1.4;margin:0 0 20px}
.review-comment-title{font-size:14px;font-weight:600;line-height:1.5;margin:22px 0 8px}
body main.review-workspace .review-feedback .review-comment-form{padding:0;border:0;background:none;border-radius:0;box-shadow:none}
body main.review-workspace .review-feedback .review-finish-card{display:flex;flex-direction:column;align-items:stretch;gap:12px;margin-top:24px;padding:20px 0 0}
body main.review-workspace .review-feedback .review-finish-card .btn{max-width:none;width:100%;min-height:44px;white-space:normal}
body main.review-workspace .review-feedback .review-finish-card .score-hint{order:0;font-size:12px;line-height:1.65;max-width:none}
body main.review-workspace .review-feedback .review-action-note{font-size:12px;line-height:1.65;margin:0 0 14px;color:var(--text-2)}
.review-feedback .cc-hint{display:block;width:100%;font-size:11px;line-height:1.6}
.review-feedback .cc-target{flex-wrap:wrap;gap:8px}
.review-feedback .cc{padding:14px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:none;box-shadow:none}
.review-feedback textarea{min-height:130px;resize:vertical}
.review-condition{margin:0 0 24px;border-block:1px solid var(--line)}
.review-condition>.section-heading{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;cursor:pointer;font-size:13px;font-weight:550;color:var(--text-2)}
.review-condition>.section-heading::-webkit-details-marker{display:none}
.review-condition[open]>.section-heading .ic{transform:rotate(180deg)}
.review-condition .review-surface{margin:0 0 16px;padding:8px 0;border:0;background:none;max-height:480px;overflow-y:auto}
body main.review-workspace .review-document .review-solution{margin-bottom:24px}
body main.review-workspace .review-document .code{overflow-x:auto;max-width:100%;font-size:14px;line-height:1.8}
.review-condition>.section-heading:focus-visible{outline:2px solid var(--focus-ring,var(--accent));outline-offset:3px}
@media(max-width:1150px){.review-layout{grid-template-columns:1fr;gap:28px}.review-feedback{position:static;max-height:none;overflow:visible;border-left:0;border-top:1px solid var(--line);padding:24px 0 0;scrollbar-gutter:auto}}
@media(max-width:700px){body main.review-queue .rq-card{grid-template-columns:32px minmax(0,1fr);gap:10px}body main.review-queue .rq-submission{flex-wrap:wrap;gap:8px}body main.review-queue .rq-chip{flex-basis:100%}.rq-solution-actions{justify-content:flex-end;margin-left:auto;gap:6px}body main.review-queue .rq-solution-actions .btn{font-size:11px;min-height:40px;padding:8px 10px}.review-start-row{flex-wrap:wrap}.review-start-row>.btn{width:100%;justify-content:center}.hw-modal-overlay .hw-dialog{padding:20px}.hw-dialog .hw-manage-fields{grid-template-columns:1fr}.hw-dialog .hw-tpl-form{flex-wrap:wrap}.hw-dialog .hw-tpl-form .input{flex-basis:100%}.hw-dialog .hw-tpl-form>.btn{width:100%}.hw-dialog .hw-manage-footer>.btn{margin-left:auto}.hw-attached{font-size:11px}}
/* Компактная шапка оставляет решение и форму в первом экране. */
body main.review-workspace .page-head{margin-bottom:12px}
body main.product-surface.review-workspace .object-header{padding-bottom:16px}
body main.product-surface.review-workspace .rv-title{font-size:28px;margin-bottom:12px}
.rv-context-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;color:var(--text-2);font-size:12px;line-height:1.6}
body main.review-workspace .rv-context-meta .rv-context-person{font-size:13px;font-weight:550}
.review-status-meta{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
body main.review-workspace .review-status-meta .rv-score{padding:2px 6px;border:0;background:none;gap:4px}
body main.review-workspace .review-status-meta .rv-score b{font-size:17px}
body main.review-workspace .review-status-meta .rv-score i,body main.review-workspace .review-status-meta .rv-score em{font-size:11px}
body main.product-surface.review-workspace [data-test=rv-assignment-context]{margin-top:10px}
body main.product-surface.review-workspace .rv-queue-nav{margin:0 0 20px;padding:10px 0;min-height:44px}
.review-layout{margin-top:8px}
.review-feedback .review-comment-title{margin:14px 0 10px}
.review-feedback .review-comment-form .review-comment-title{margin-top:0}
.review-feedback .code-comment{background:none;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;padding:12px 0}
.review-feedback .code-comment .cc-head{flex-wrap:wrap;gap:8px}
.review-attach{margin-top:14px}
.review-attach>.section-heading{display:flex;align-items:center;gap:7px;min-height:34px;color:var(--text-2);font-size:12px;cursor:pointer;list-style:none}
.review-attach>.section-heading::-webkit-details-marker{display:none}
.review-attach[open]>.input{margin-top:8px;max-width:100%}
@media(max-width:700px){body main.product-surface.review-workspace .rv-title{font-size:24px}.rv-context-meta{gap:7px 12px}.review-status-meta{flex-basis:100%}}
.review-condition>.section-heading,.review-attach>.section-heading{margin:0;padding:0}
.review-condition .surface-fold-toggle{padding:12px 0;color:var(--text-2);font-size:13px}
.review-attach .surface-fold-toggle{padding:7px 0;color:var(--text-2);font-size:12px}
.review-attach .surface-fold-body{margin-top:8px}
/* Переходы по задачам дз сохраняются компактной полосой позиций. */
.review-position-label{margin:0 0 6px;font-size:11px;color:var(--text-2)}
body main.review-workspace .rv-hw-strip{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px;padding:0;border:0}
body main.review-workspace .rv-hw-cell{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-width:38px;min-height:34px;width:auto;padding:5px 10px;border-radius:4px;font-size:12px;line-height:1.5}
body main.review-workspace .rv-hw-cell small{display:none}
@media(max-width:700px){body main.review-workspace .rv-hw-cell{min-width:42px;min-height:40px}}

/* Рабочие инструменты: одно главное действие, остальные — компактно. */
.tool-control{display:inline-grid;place-items:center;flex:none;width:40px;height:40px;padding:9px;border:0;border-radius:5px;background:transparent;color:var(--text-2);cursor:pointer}
.tool-control .ic{width:20px;height:20px}
.tool-control:hover{background:var(--frame-bg);color:var(--text)}
.tool-control:focus-visible{outline:2px solid var(--text-2);outline-offset:2px}
.tool-control[hidden]{display:none}
body main:is(.product-surface,.lesson-room) .py-shell-head{gap:10px;padding:10px 14px;align-items:center}
body main:is(.product-surface,.lesson-room) .py-shell-filename{font-size:13px;color:var(--text-2);font-weight:500}
body main:is(.product-surface,.lesson-room) .py-shell-actions{display:flex;align-items:center;gap:6px;margin-left:auto;flex-wrap:nowrap;flex-basis:auto}
body main:is(.product-surface,.lesson-room) .py-shell-actions>[data-py-run]{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:7px 12px;font-size:13px}
.py-shell-more{position:relative;flex:none}
body .py-shell-more .work-menu-panel{left:auto;right:0;width:224px;max-width:calc(100vw - 32px);z-index:40}
body main.product-surface .py-secondary-actions .py-menu-action{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;height:auto;min-width:0;min-height:44px;padding:10px 12px;border:0;border-radius:4px;font:inherit;font-size:13px;background:transparent;color:var(--text);text-align:left;cursor:pointer}
body .py-secondary-actions .py-menu-action:hover{background:var(--frame-bg)}
.py-menu-label{position:static;width:auto;height:auto}
body main.product-surface .solution-fold{margin-top:24px;padding:0;border:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
.solution-fold>summary{display:flex;align-items:center;gap:9px;min-height:52px;list-style:none;cursor:pointer;font-size:14px;font-weight:550;color:var(--text)}
.solution-fold>summary::-webkit-details-marker{display:none}
.solution-fold>summary>.ic{width:18px;height:18px;color:var(--text-2)}
.solution-fold-chevron{margin-left:auto}
.solution-fold[open] .solution-fold-chevron{transform:rotate(180deg)}
.solution-fold>summary:focus-visible,.solution-extra>summary:focus-visible,.group-results-fold>summary:focus-visible{outline:2px solid var(--text-2);outline-offset:2px}
body main.product-surface .solution-fold .solution-form{max-width:680px;padding:4px 0 20px;margin:0;gap:18px}
.solution-fold .field{font-size:13px;font-weight:400}
.solution-fold .solution-hint{font-size:12px;line-height:1.6;margin:6px 0 0}
.solution-form .solution-methods {
  display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-self: start; align-self: start; width: fit-content; max-width: 100%;
  gap: 3px; padding: 3px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--frame-bg);
}
.solution-form .solution-methods > button {
  min-height: 40px; margin: 0; padding: 6px 14px; border: 1px solid transparent;
  border-radius: 5px; background: transparent; color: var(--text-2);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.solution-form .solution-methods > button:hover { color: var(--text); }
.solution-form .solution-methods > button[aria-pressed=true] {
  background: var(--accent-soft); border-color: var(--accent); color: var(--text); font-weight: 650;
}
.solution-form .solution-methods > button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.solution-extra>summary,.group-results-fold>summary{min-height:44px;display:list-item;cursor:pointer;color:var(--text-2);font-size:13px;line-height:1.6}
.solution-extra[open]>.field{margin-top:14px}
.group-results-fold{margin:14px 0}
@media(max-width:600px){body main:is(.product-surface,.lesson-room) .py-shell-head{padding:8px;gap:6px;flex-wrap:wrap}body main:is(.product-surface,.lesson-room) .py-shell-head>.py-files{order:3;flex-basis:100%}body main:is(.product-surface,.lesson-room) .py-shell-filename{font-size:12px}body main:is(.product-surface,.lesson-room) .py-shell-actions{gap:2px}body main:is(.product-surface,.lesson-room) .py-shell-actions>[data-py-run]{min-height:40px;padding:8px;font-size:12px}}

/* Переключатели рабочих поверхностей остаются на месте при раскрытии. */
body main.product-surface .draft-row{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);gap:12px;align-items:start}
body main.product-surface .draft-row>[data-py-editor],body main.product-surface .draft-row>[data-task-board]{display:contents}
.draft-row>[data-py-editor]>[data-py-open]{grid-column:1;grid-row:1}
.draft-row>[data-task-board]>[data-board-open]{grid-column:2;grid-row:1}
.draft-row>[data-py-editor]>[data-py-panel]{grid-column:1/-1;grid-row:2;min-width:0}
.draft-row [data-py-panel][hidden]{display:none}
body main.product-surface .task-tool-toggle.active{background:var(--accent-soft);border-color:var(--accent-mid);color:var(--text)}
body main:is(.product-surface,.lesson-room) .py-shell{border:1px solid var(--line);border-radius:5px;box-shadow:none;overflow:hidden}
body main:is(.product-surface,.lesson-room) .py-shell-head{padding:5px 10px;min-height:42px;gap:8px;border-bottom:1px solid var(--line);background:var(--frame-bg)}
body main:is(.product-surface,.lesson-room) .py-shell-filename{align-self:stretch;display:flex;align-items:center;border-bottom:2px solid var(--accent);padding:5px 8px;font:12px Onest,sans-serif;color:var(--text)}
body main:is(.product-surface,.lesson-room) .py-shell-actions{gap:2px;margin-left:auto}
body main:is(.product-surface,.lesson-room) .py-shell-actions .tool-control{width:30px;height:30px;padding:7px}
body main:is(.product-surface,.lesson-room) .py-shell-actions .tool-control .ic{width:16px;height:16px}
body main:is(.product-surface,.lesson-room) .py-run-button{color:var(--ok)}
.py-copy-slot{display:flex;align-items:center}
body main:is(.product-surface,.lesson-room) .py-shell-head .py-copy-slot .code-copy-button[data-copy-code]{width:28px;min-width:28px;height:28px;min-height:28px;border:0;padding:6px;border-radius:3px;background:transparent}
body main:is(.product-surface,.lesson-room) .py-shell .CodeMirror{font-size:14px;line-height:1.55;min-height:220px;background:var(--surface)}
body main:is(.product-surface,.lesson-room) .py-shell .CodeMirror-gutters{background:var(--surface);border-right:0}
body main:is(.product-surface,.lesson-room) .py-shell .CodeMirror-linenumber{color:var(--text-2);padding-right:10px}
body .py-shell-head>.py-shell-status{flex:1;min-width:0;min-height:0;max-width:40%;font-size:11px;line-height:1.5;padding:0;margin:0;border:0;background:transparent;color:var(--text-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.py-shell-status[hidden]{display:none}
body main:is(.product-surface,.lesson-room) .py-shell-output{padding:0;border-top:1px solid var(--line);background:var(--surface)}
body main:is(.product-surface,.lesson-room) .py-output-label{font:12px Onest,sans-serif;letter-spacing:0;padding:9px 12px;text-transform:none;border-bottom:1px solid var(--line)}
body main:is(.product-surface,.lesson-room) .py-shell .py-terminal{margin:0;border:0;border-radius:0;background:transparent;padding:12px;min-height:80px}
body main:is(.product-surface,.lesson-room) .py-shell .py-output{font-size:13px;line-height:1.55}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell{border-color:#3c3c3c;background:#1e1e1e;color:#d4d4d4}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell :is(.py-shell-head,.py-output-label){background:#252526;border-color:#3c3c3c;color:#bcbcbc}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell :is(.CodeMirror,.CodeMirror-gutters,.py-shell-output,.py-terminal,.py-output){background:#1e1e1e;color:#d4d4d4}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell .CodeMirror-linenumber{color:#858585}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell .cm-keyword{color:#c586c0}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell .cm-string{color:#ce9178}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell .cm-number{color:#b5cea8}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell .cm-comment{color:#6a9955}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell .CodeMirror-cursor{border-left-color:#d4d4d4}
html[data-theme=dark] main:is(.product-surface,.lesson-room) .py-shell-filename{color:#ddd}
.solution-destination{display:grid;gap:8px;padding:0;border:0;margin:0;min-width:0}
.solution-destination legend{padding:0;margin-bottom:8px;font-size:13px;font-weight:500}
.solution-destination>label{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:5px;cursor:pointer}
.solution-destination input{flex:none;margin:3px 0 0;accent-color:var(--accent)}
.solution-destination>label:has(input:checked){background:var(--accent-soft);border-color:var(--accent-mid)}
.solution-destination strong{font-size:13px;font-weight:550;display:block}
.solution-destination small{font-size:12px;line-height:1.5;color:var(--text-2);display:block;margin-top:3px}
.solution-quick-form>.solution-destination{flex:1 1 100%;width:100%;grid-column:1/-1}

/* Терминал: строка ввода продолжает вывод программы, без большой рамки формы. */
body .py-shell .py-output-label{display:flex;align-items:center;justify-content:space-between;min-height:34px;padding:0 10px;margin:0;font:12px Onest,sans-serif;letter-spacing:0;text-transform:none;border-bottom:1px solid var(--line)}
body .py-shell .py-output-label>span{align-self:stretch;display:flex;align-items:center;border-bottom:1px solid var(--text-2)}
body .py-shell .py-out-clear,body .py-shell .py-terminal-input .tool-control{display:inline-flex;align-items:center;justify-content:center;flex:none;width:28px;min-width:28px;height:28px;min-height:28px;padding:5px;border:0;border-radius:3px;background:transparent;color:var(--text-2);text-decoration:none;cursor:pointer}
body .py-shell .py-out-clear .ic,body .py-shell .py-terminal-input .ic{width:16px;height:16px}
body .py-shell .py-out-clear:hover,body .py-shell .py-terminal-input .tool-control:hover{background:var(--frame-bg);color:var(--text)}
body .py-shell .py-terminal-input{flex-wrap:nowrap;align-items:center;gap:6px;padding-top:3px;font:13px/1.55 "JetBrains Mono",monospace}
body .py-shell .py-terminal-input[hidden]{display:none}
body .py-shell .py-terminal-input input{flex:1 1 0;min-width:0;width:0;min-height:28px;padding:2px 0;border:0;border-bottom:1px solid transparent;border-radius:0;background:transparent;box-shadow:none;font:inherit;color:inherit}
body .py-shell .py-terminal-input input:focus,body .py-shell .py-terminal-input input:focus-visible{outline:none!important;box-shadow:none;border-bottom-color:var(--accent)}
body .py-shell .py-terminal-input [data-py-eof]{width:34px;font:11px "JetBrains Mono",monospace}
html[data-theme=dark] body .py-shell .py-terminal-input input:focus{border-bottom-color:#007fd4}
html[data-theme=dark] body .py-shell .py-terminal-input input::placeholder{color:#858585;opacity:1}
@media(max-width:600px){body .py-shell .py-terminal-input input{font-size:16px}}

/* Начальные подсказки и комментарии читаются спокойно, как обычный текст кода. */
html[data-theme] main:is(.product-surface,.lesson-room) .py-shell .cm-comment{color:var(--text-2);font-style:normal}

/* Одинаковые компактные инструменты и ответ в каталоге и тренировке. */
body main.product-surface.surface-practice:is(.task-page,.trainer-session) .condition.cw-canvas-host{padding:0}
body main.product-surface .workspace-tools.draft-row{display:grid;grid-template-columns:max-content max-content minmax(0,1fr);align-items:center;gap:10px 12px;margin:24px 0 18px;scroll-margin-top:90px}
body main.product-surface .workspace-tools-label{grid-column:1/-1;grid-row:1;margin:0;color:var(--text);font:600 15px/1.4 Onest,sans-serif;letter-spacing:-.015em}
.workspace-tools.draft-row>[data-py-editor]>[data-py-open]{grid-column:1;grid-row:2}
.workspace-tools.draft-row>[data-task-board]>[data-board-open]{grid-column:2;grid-row:2}
.workspace-tools.draft-row>[data-py-editor]>[data-py-panel]{grid-row:3}
.workspace-tools.draft-row>[data-py-editor]>:not([data-py-open]):not([data-py-panel]){grid-column:1/-1}
body main.product-surface .workspace-tools .task-tool-toggle{min-height:36px;height:36px;padding:6px 10px;border-radius:6px;font-size:13px;gap:6px;white-space:nowrap}
body main.product-surface .workspace-tools .task-tool-toggle .ic{width:16px;height:16px}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-label{font:600 15px/1.4 Onest,sans-serif;letter-spacing:-.015em;text-transform:none;margin:18px 0 8px;color:var(--text)}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form{display:flex;align-items:flex-start;flex-wrap:wrap;gap:8px 10px;margin:0}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form>.answer-cells--single{flex:0 1 160px;min-width:100px;max-width:calc(100% - 100px)}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .answer-cells input{height:34px;min-height:34px;padding:5px 10px;font-size:14px;line-height:1.4;font-weight:400;letter-spacing:normal;box-sizing:border-box;border-radius:6px}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .answer-cells--single input{width:100%;max-width:none;text-align:left}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form>.ans-actions{margin:0;flex:none}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .btn{min-height:34px;height:34px;padding:5px 10px;font-size:12px;font-weight:500;border-radius:6px;white-space:nowrap}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form:has(.answer-grid){align-items:flex-end}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .answer-grid{max-width:100%;overflow-x:auto}
body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .answer-grid input{width:7ch;min-width:4ch;padding-inline:6px}
body main.product-surface:is(.task-page,.trainer-session) .reveal-row{margin-top:12px}
body main.product-surface:is(.task-page,.trainer-session) .reveal-row .btn{min-height:36px;padding:5px 0;border:0;background:transparent;color:var(--accent);font-size:13px;text-decoration:underline;text-underline-offset:3px;border-radius:4px}
body main.product-surface:is(.task-page,.trainer-session) .cond-label{margin-bottom:10px}
body main.product-surface:is(.task-page,.trainer-session) .cond-label .marker-toggle{min-height:34px;padding:5px 10px;font-size:12px;gap:6px}
body main.product-surface.trainer-session .trainer-answer{margin:18px 0 0}
body main.product-surface.trainer-session .trainer-top-row .trainer-back{display:inline-flex;align-items:center;padding:0;color:var(--accent);background:transparent;border:0;font-size:13px;font-weight:500;text-decoration:none;white-space:nowrap}
body main.product-surface.trainer-session .trainer-top-row .trainer-back:hover{text-decoration:underline;text-underline-offset:3px}
body main.product-surface.task-page .task-heading-meta{gap:12px}
body main.product-surface.task-page .task-heading-meta>.task-src{margin:0;font-size:16px;line-height:1.45;font-weight:600;color:var(--text);overflow-wrap:anywhere}
@media(max-width:600px){
 body main.product-surface .workspace-tools.draft-row{gap:10px 8px}
 body main.product-surface .workspace-tools .task-tool-toggle{height:44px;min-height:44px;padding-inline:8px;font-size:12px}
 body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .answer-cells input,body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .btn{height:36px;min-height:36px}
 body main.product-surface:is(.task-page,.trainer-session) .task-answer-form .answer-cells input{font-size:16px}
}

.workspace-tools .calc-toggle{grid-column:3;grid-row:2;justify-self:start}

/* После ответа сначала идёт разбор, затем переход к следующей задаче и личная работа. */
.task-page .task-reference-answer { margin-block: 14px; }
.task-page .task-reference-answer p { margin-block: 4px; }
.task-page .task-related {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 20px;
  margin-block: 18px 10px;
}
.task-page .task-related-label { color: var(--text-2); font-size: 13px; }
.task-page .task-related-links { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 16px; }
.task-page .task-related-links a {
  display: inline-flex; align-items: center; gap: 5px; min-height: 36px;
  font-size: 14px; text-underline-offset: .2em;
}
.task-page .task-work-records { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 24px; }
.task-page .task-work-records > * { min-width: 0; max-width: 100%; }
.task-page .task-work-records > :is(:has([open]), [open], :has(.solution-panel,.attached-solutions,.solution-list), [data-test="submit-off"]) { flex-basis: 100%; }
body main.task-page .task-work-records .solution-fold { margin: 0; border: 0; }
body main.task-page .task-work-records :is(.solution-fold,.att-block,.prior-block) > summary {
  display: flex; align-items: center; gap: 7px; min-height: 42px; margin: 0;
  padding: 5px 0; color: var(--text-2); font: 500 14px/1.4 Onest, sans-serif;
  letter-spacing: normal; text-transform: none;
}
body main.task-page .task-work-records summary:hover { color: var(--text); }
body main.task-page .task-work-records .solution-fold-chevron { width: 13px; height: 13px; }
body main.task-page .task-work-records .solution-fold > summary > .ic:first-child { width: 15px; height: 15px; }
.task-page .task-related a:focus-visible, .task-page .task-work-records summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px;
}
@media (max-width:600px) {
  .task-page .task-related { display: block; }
  .task-page .task-related-links { gap: 0 14px; }
  .task-page .task-related-links a { min-height: 42px; }
}

.task-page .task-code-sample {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start;
  margin-block: 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--bg);
}
.task-page .solution-block .task-code-sample pre {
  min-width: 0; max-width: 100%; overflow: auto; margin: 0;
  padding: 12px; border: 0; background: transparent;
}
.task-page .task-code-sample .code-copy-tools { margin: 2px; }
body main.task-page .task-code-sample .code-copy-tools .code-copy-button[data-copy-code] {
  border: 0; background: transparent; color: var(--text-2);
}

/* Поля попытки остаются смонтированными при чтении разбора. */
.task-page .task-mode-picker {
  display: flex; gap: 20px; margin: 22px 0 16px; padding: 0; min-width: 0;
  border: 0; border-bottom: 1px solid var(--line); scroll-margin-top: 80px;
}
.task-mode-picker label { position: relative; cursor: pointer; }
.task-mode-picker input {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.task-mode-trigger { background: transparent; border: 0; font: inherit; cursor: pointer; }
.task-mode-picker label span, .task-mode-picker .task-mode-trigger {
  display: flex; align-items: center; min-height: 42px; padding-inline: 2px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 500;
}
.task-mode-picker input:checked + span { border-color: var(--accent); color: var(--text); }
.task-mode-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.task-page:has(.task-mode-picker input[value=review]:checked) .task-work-only,
.task-page:has(.task-mode-picker input[value=work]:checked) :is(.task-review-content, .reveal-row),
.task-page:not(:has(.task-mode-picker input[value=review]:checked)) .task-read-step { display: none; }
.task-page #task-mode { scroll-margin-top: 80px; }
.task-page .task-review-content { margin-block: 12px 24px; }
.task-page .task-review-content .task-reference-answer { color: var(--text-2); }
.task-page .task-review-content .task-reference-answer strong { color: var(--text); margin-inline-start: 6px; }
.task-review-text { min-width: 0; overflow-wrap: break-word; }
.task-review-text pre { overflow: auto; max-width: 100%; }
.task-review-text img { max-width: 100%; height: auto; }
.task-review-text > :first-child { margin-block-start: 0; }
.task-review-text > :last-child { margin-block-end: 0; }
.task-page .task-next-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; color: var(--accent); font-weight: 600; text-underline-offset: 3px; }
.task-page .task-next-link .ic { width: 16px; height: 16px; }
.task-page .task-review-content:empty { display: none; }
