/* Стиль Юайти — в одном стиле с youit.school и брендбуком (22.10.2026, docs/СТИЛЬ-ЮАЙТИ.md). Логотип — как на сайте
   (static/logo.svg, знак с градиентами); заголовки — Nunito 800, текст — Nunito Sans, оба лежат у нас, без Google;
   кнопки — пилюли; радиусы по шкале сайта 4/8/16/24; текст — контраст не ниже 4,5:1. Цвета и размеры — только
   переменными из :root ниже: HEX в правилах не пишем. */
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:400 800;font-display:swap;src:url(/static/nunito-sans-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:400 800;font-display:swap;src:url(/static/nunito-sans-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Nunito Sans";font-style:normal;font-weight:400 800;font-display:swap;src:url(/static/nunito-sans-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* Nunito — заголовки, как на youit.school (переменный шрифт 200–1000, лицензия OFL) */
@font-face{font-family:"Nunito";font-style:normal;font-weight:200 1000;font-display:swap;src:url(/static/nunito-cyrillic.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Nunito";font-style:normal;font-weight:200 1000;font-display:swap;src:url(/static/nunito-latin-ext.woff2) format("woff2");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Nunito";font-style:normal;font-weight:200 1000;font-display:swap;src:url(/static/nunito-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  /* знак Юайти: три буквы — три градиента сверху вниз, как в брендбуке (с. 12) и в токенах сайта --yi-* */
  --brand-orange: #F15A31;  --brand-yellow: #FCAF17;     /* оранжевая буква */
  --brand-green: #00B259;   --brand-cyan: #39C2D7;       /* зелёная */
  --brand-purple: #BD5697;  --brand-magenta: #EE2E62;    /* сиреневая (на сайте #BD5697) */
  --brand-strip: linear-gradient(90deg, var(--brand-orange), var(--brand-yellow) 33.3%, var(--brand-green) 33.3%,
    var(--brand-cyan) 66.6%, var(--brand-purple) 66.6%, var(--brand-magenta));
  --brand-strip-v: linear-gradient(180deg, var(--brand-orange), var(--brand-yellow) 33.3%, var(--brand-green) 33.3%,
    var(--brand-cyan) 66.6%, var(--brand-purple) 66.6%, var(--brand-magenta));
  --brand-purple-text: #A0457F;    /* сиреневый текстом (ДЗ): 4,9:1 на своём фоне */
  --brand-purple-dark: #8F3D72;    /* сиреневая заливка при наведении */
  --brand-purple-soft: #F3E8F7;
  --brand-purple-line: #DCC3E8;
  --brand-orange-soft: #FEEBE5;
  /* математика — зелёная, как на сайте (страница «Курсы», заголовок «…и математики»): номера уроков, цветное слово */
  --math: var(--brand-green);
  --math-text: #008442;            /* зелёный текстом: 4,8:1 на белом, 4,3:1 на своём фоне (крупные цифры) */
  --math-soft: #E3F6EC;

  /* Цвет платформы — прежний голубой (Матвей по превью 22.10: «цвет оставляем голубым / синим как есть, не зелёный»):
     заливка кнопок, активный шаг, полоски, линия вкладки. Белый на нём — около 3:1, как было; текст ссылок — темнее, 6:1. */
  --accent: #4597F7;
  --accent-hover: #2878D6;         /* заливка при наведении */
  --accent-ink: #1A5FB4;           /* ссылки и текст на мягком фоне: 6,4:1 на белом, 5,8:1 на --accent-soft */
  --accent-soft: #EDF6FF;          /* мягкий фон: активный пункт меню, кнопки ввода в уроке */
  --accent-soft-2: #DCECFF;        /* мягкий фон при наведении, выделение текста */
  --accent-line: #B9D8FB;          /* светлая обводка: «это я», текущая тема карты */
  --accent-rgb: 69, 151, 247;      /* прозрачные полосы графиков: rgba(var(--accent-rgb), .1) */
  /* Страницы для родителей (запись /open, лендинг) — в стиле сайта по Фигме (UI-кит 517:1558): главная кнопка — жёлтая
     пилюля с чёрным текстом (11:1), выбранное — зелёным (блок .site-style ниже). Второстепенные кнопки везде — чёрная обводка. */
  --cta: #FCAF17;
  --cta-hover: #F29F05;
  --cta-ink: #1C1C1E;
  --ink: #1C1C1E;                  /* чёрный Фигмы: обводка второстепенных кнопок, фокус */

  --text: #404142;                 /* основной текст: 10:1 (пониженный контраст — правило шаблона уроков брендбука) */
  --text-2: #6B6E72;               /* второй текст: 5,1:1 на белом, 4,8:1 на фоне */
  --text-3: #A6AAAD;               /* только неактивное и декор (рамки, разделители), не для текста */
  --bg: #F7F7F7;
  --field: #F0F1F2;
  --line: #E8EBED;
  --line-2: #D2D7DB;
  --paper: #FFFFFF;                   /* белый лист: карточки, шапка, рисунок конструктора */
  --paper-tint: #FBFCFD;           /* строка при наведении, неактивная строка таблицы */
  /* состояния: текстом — тёмные (≥ 4,6:1 и на белом, и на своём светлом фоне); заливки и точки — светлые */
  --green: #327F32;
  --green-fill: #6AD46A;
  --green-fill-2: #8FD68F;
  --green-bg: #EEF9EE;
  --coral: #CF321C;
  --coral-fill: #E55541;
  --coral-bg: #FDF1EF;
  --orange: #B35421;
  --orange-fill: #F8C08A;
  --orange-bg: #FFF4EC;
  --lilac: #8A45B8;
  --lilac-bg: #F7EEFD;
  --lilac-tint: #FBF6FE;
  --gold-text: #8A5E00;
  --gold-ink: #6B4A00;
  --gold-bg: #FFF6DA;
  --amber-bg: #FFF6E5;  --amber-line: #F3D9A4;      /* педагог проходит урок как ученик */
  --mint-bg: #EAF8F0;   --mint-line: #A8DDBF;       /* разбор на уроке */

  /* шрифты и размеры: 6 ступеней вместо 22 (ревизия О11); мельче 13 px текста нет */
  --font-text: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: 'Nunito', 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 13px;                   /* мелкие пометки: время, «после ошибки — пауза» */
  --fs-sm: 14px;                   /* подписи, меню, таблицы */
  --fs-md: 16px;                   /* основной текст, кнопки */
  --fs-lg: 18px;                   /* h3, заголовки карточек */
  --fs-xl: 22px;                   /* h2 */
  --fs-2xl: 28px;                  /* h1, крупные цифры */
  --fs-display: 36px;              /* только заголовок гостевой страницы /open на ноутбуке */

  /* радиусы — шкала сайта */
  --r-xs: 4px;                     /* метки, клетки */
  --r-sm: 8px;                     /* поля, мелкие кнопки-инструменты, плашки */
  --r-md: 16px;                    /* карточки, всплывающие окна */
  --r-lg: 24px;                    /* крупные блоки: вход, анкета */
  --r-pill: 999px;                 /* кнопки, чипы, полоски прогресса */
  --radius: var(--r-md);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; accent-color: var(--accent); }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: var(--fs-md)/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft-2); }
input, textarea { caret-color: var(--accent); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); line-height: 1.2; margin: 0 0 4px; letter-spacing: -.01em; }
.wrap > h1, .wrap > .title-row h1 { padding-left: 16px; position: relative; }
.wrap > h1::before, .wrap > .title-row h1::before {
  content: ''; position: absolute; left: 0; top: 5px; bottom: 5px; width: 4px; border-radius: var(--r-pill);
  background: var(--brand-strip-v);
}
h2 { font-size: var(--fs-xl); line-height: 1.25; margin: 0 0 10px; }
h3 { font-size: var(--fs-lg); line-height: 1.3; margin: 0 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* шапка */
.top {
  background: var(--paper); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.top::before { content: ''; display: block; height: 3px; background: var(--brand-strip); }
.top-in {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; display: block; }
.brand b { display: block; font-weight: 800; font-size: var(--fs-lg); letter-spacing: .5px; line-height: 1; }
.brand small { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-top: 3px; line-height: 1; }
/* логотип сайта целиком (знак с градиентами + «ЮАЙТИ / онлайн-школа», static/logo.svg) — без перекраски и искажений;
   название курса — отдельной подписью за охранной зоной (не ближе одной «Ю», брендбук с. 5) */
.brand.brand-site { gap: 24px; }
.brand img.brand-logo { width: auto; height: 36px; flex: none; }
.brand .brand-course { display: block; margin: 0; max-width: 8.5em; white-space: normal; font-size: var(--fs-xs); line-height: 1.25;
  font-weight: 600; color: var(--text-2); }
.top-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.top-nav a {
  padding: 6px 12px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; white-space: nowrap;
}
.top-nav a.on { color: var(--accent-ink); background: var(--accent-soft); }
.top-nav a:hover { text-decoration: none; color: var(--accent-ink); }
/* overflow: hidden — в WebKit (Safari, любой браузер на iPhone) длинное название группы иначе вылезает из узкого выбора
   и растягивает страницу вбок (24.10.2026) */
.group-select { border: 0; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; border-radius: var(--r-pill);
  padding: 6px 10px; max-width: 240px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; }
.group-chip { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; border-radius: var(--r-pill); padding: 6px 10px;
  font-size: var(--fs-sm); white-space: nowrap; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.group-bar { border-top: 1px solid var(--line); background: var(--surface, var(--paper)); }
.group-bar-in { max-width: 1080px; margin: 0 auto; padding: 6px 20px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--fs-sm); }
.who { color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; display: flex; gap: 12px; align-items: center; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 20px 20px 80px; }
.crumbs { color: var(--text-2); font-size: var(--fs-sm); margin-bottom: 6px; }
.crumbs a { color: var(--text-2); }
.crumbs span { color: var(--text); }
.sub { color: var(--text-2); margin: 0 0 18px; }

.card { background: var(--paper); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; }

/* кнопки */
/* кнопки — пилюли (Фигма сайта): главная — голубая платформы, 44 px под палец, малая 36 px; второстепенная (.soft, .outline) —
   чёрная обводка; на страницах для родителей (.site-style) главная — жёлтая */
.btn {
  display: inline-block; border: 0; border-radius: var(--r-pill); padding: 10px 20px; font-weight: 700; cursor: pointer;
  font-size: var(--fs-md); line-height: 24px; text-align: center; vertical-align: middle;
  background: var(--accent); color: var(--paper); transition: background-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { background: var(--accent-hover); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.btn:disabled { background: var(--line-2); color: var(--text-2); cursor: default; }
.btn.soft { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.soft:hover { background: var(--field); }
.btn.ghost { background: transparent; color: var(--text-2); padding: 10px 14px; font-weight: 600; }
.btn.ghost:hover { color: var(--ink); background: var(--field); }
.btn.small { padding: 6px 14px; font-size: var(--fs-sm); }
.btn.ghost.small { padding: 6px 12px; }
.btn.outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn.outline:hover { background: var(--field); }
.lesson-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.lesson-head h1 { flex: 1 1 auto; min-width: 0; }
.lesson-head .head-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* поля */
.field {
  background: var(--field); border: 2px solid transparent; border-radius: var(--r-sm);
  padding: 8px 12px; width: 100%; outline: none; font-size: var(--fs-md); line-height: 24px;   /* 44 px, как кнопка */
}
.field::placeholder { color: var(--text-2); opacity: 1; }
.field:focus { border-color: var(--accent); background: var(--paper); }
label.lbl { display: block; font-weight: 600; margin: 12px 0 6px; }

/* табы */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin: 14px 0 18px; overflow-x: auto; }
.tabs a {
  padding: 8px 0 10px; color: var(--text-2); font-weight: 600; border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.tabs a.on { color: var(--accent-ink); border-bottom-color: var(--accent); font-weight: 700; }
.tabs a:hover { text-decoration: none; color: var(--accent-ink); }
.tabs .count { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; margin-left: 4px; }

/* чипы */
.chip { display: inline-block; font-size: var(--fs-xs); font-weight: 700; border-radius: var(--r-pill); padding: 2px 8px; vertical-align: 2px; }
.chip.extra { background: var(--lilac-bg); color: var(--lilac); }
.chip.ok { background: var(--green-bg); color: var(--green); }
.chip.off { background: var(--field); color: var(--text-2); }

.muted { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.empty { color: var(--text-2); text-align: center; padding: 40px 10px; }
.error-box { background: var(--coral-bg); color: var(--coral); border-radius: var(--r-sm); padding: 10px 12px; margin: 10px 0; }
.note-box { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-sm); padding: 10px 12px; margin: 10px 0; }

/* вход */
.login { max-width: 420px; margin: 8vh auto 0; padding: 0 16px; }
.login .card { padding: 34px 36px 30px; border-radius: var(--r-lg); box-shadow: 0 20px 60px rgba(0,0,0,.08); position: relative; overflow: hidden; }
.login .card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-strip); }
.login .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
/* вход — как был (Матвей по превью 22.10: «вход как сейчас нравится больше»): знак + «ЮАЙТИ», кнопка с прежними углами */
.login .logo img { width: 52px; height: 52px; }
.login .logo b { display: block; font-size: var(--fs-xl); font-weight: 800; letter-spacing: .6px; line-height: 1; }
.login .logo small { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; }
.login h1 { font-size: var(--fs-xl); }
.login .btn { width: 100%; margin-top: 18px; padding: 11px; border-radius: var(--r-sm); }

/* список уроков */
.lesson-card { display: flex; gap: 18px; align-items: center; color: var(--text); }
.lesson-card:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--accent-soft); }
/* ученик в двух группах (24.10.2026): заголовок раздела — название группы */
.lesson-group-head { font-size: var(--fs-lg); margin: 26px 0 10px; color: var(--text-2); }
.lesson-num {   /* номер урока — цветом математики (зелёный, как на youit.school) */
  width: 48px; height: 48px; border-radius: var(--r-md); background: var(--math-soft); color: var(--math-text);
  display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800;
  font-size: var(--fs-xl); flex: none;
}
.lesson-main { flex: 1; min-width: 0; }
.lesson-main h2 { margin: 0 0 6px; }
.bar { height: 8px; background: var(--field); border-radius: var(--r-pill); overflow: hidden; margin: 6px 0 4px; max-width: 420px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.progress-text { font-size: var(--fs-sm); color: var(--text-2); }

/* урок: теория */
.lesson-grid { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.toc { position: sticky; top: 74px; font-size: var(--fs-sm); }
.toc a { display: block; padding: 5px 10px; color: var(--text-2); border-radius: var(--r-sm); line-height: 1.35; }
.toc a:hover { background: var(--paper); color: var(--accent-ink); text-decoration: none; }
.theory section { scroll-margin-top: 80px; }
.theory p, .theory li { overflow-wrap: anywhere; }
.theory .card, .theory section, .card.theory { overflow-x: auto; }   /* длинная формула — прокрутка в карточке, не страницы (21.10) */
.theory p { margin: 0 0 10px; }
.theory ul, .theory ol { margin: 0 0 10px; padding-left: 24px; }
.theory li { margin-bottom: 4px; }
.theory .fig { margin: 4px 0 12px; text-align: center; }
.theory .fig img { max-width: min(100%, 560px); height: auto; }   /* рисунок урока (PNG 150 dpi); на телефоне — по ширине экрана */
.theory .katex-display, .theory .katex { font-size: 1.08em; }
table.memo { border-collapse: collapse; width: 100%; }
table.memo td { border: 1px solid var(--line-2); padding: 9px 12px; vertical-align: top; }
table.memo td:first-child { font-weight: 600; width: 42%; }
/* таблица в условии номера (цены магазинов — ЦПМ 5 класс, 25.10.2026): по ширине содержимого, мельче; если и так
   шире экрана телефона — листается внутри плашки, страница вбок не едет */
.task-note { overflow-x: auto; }
.task-note table.memo { width: auto; background: var(--paper); margin: 8px 0 4px; font-size: var(--fs-sm); }
.task-note table.memo td { padding: 6px 8px; }
.task-note table.memo td:first-child { width: auto; }
.task-note .fig { margin: 4px 0; }
.task-note .fig img { max-width: 100%; height: auto; }
@media (max-width: 560px) {
  .task-note table.memo { font-size: 13px; line-height: 1.3; }
  .task-note table.memo td { padding: 4px 5px; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: break-word; }
}
.pdf-link { display: inline-flex; gap: 8px; align-items: center; }

/* урок: задания */
.summary { display: flex; gap: 10px 22px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.summary .big { font-size: var(--fs-xl); font-weight: 700; }
.filters { display: inline-flex; background: var(--field); border-radius: var(--r-pill); padding: 3px; }
.filters a { padding: 5px 12px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.filters a.on { background: var(--paper); color: var(--text); }
.filters a:hover { text-decoration: none; }
.group-title { margin: 22px 0 10px; font-size: var(--fs-md); color: var(--text-2); font-weight: 700; text-transform: none; }
.task { scroll-margin-top: 80px; }
.task-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.task-head h3 { margin: 0; }
.task-meta { font-size: var(--fs-xs); color: var(--text-2); }
.task-note { background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-sm); padding: 8px 12px; margin: 10px 0 2px; font-size: var(--fs-md); }
/* пример под условием — длинная цепочка «=…=…» переносится по знакам, а не вылезает на телефоне */
.task-note .nowrap { white-space: normal; }
/* рисунок номера из модели фигуры (стереометрия): невидимые рёбра — пунктиром, подписи точек с индексами */
.task-figure { margin: 8px 0 4px; }
.task-figure svg { display: block; width: 100%; max-width: 340px; height: auto; }
.task-figure .edges line { stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; }
.task-figure .dots circle { fill: var(--text); }
.task-figure .dots text { font: 600 20px 'Nunito Sans', sans-serif; fill: var(--text); }
.item { border-top: 1px solid var(--line); padding: 12px 0 8px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 4px 6px; }
.task-head + .item { border-top: 0; margin-top: 6px; }
.letter { font-weight: 700; color: var(--text-2); padding-top: 1px; }
/* Длинная формула прокручивается вбок, но высокие дроби и показатели не обрезаются:
   запас сверху/снизу, вертикальной прокрутки нет (на Windows иначе появлялись стрелки). */
.prompt { margin: -6px 0 0; padding: 6px 2px 8px; overflow-x: auto; overflow-y: hidden; }
.answer-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.answer-row .field { flex: 1 1 180px; max-width: 360px; }
.answer-row .flabel { width: 100%; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); margin-top: 2px; }
/* «Да» с примером (НОД и НОК, № 14, 30.10): выбор, «Пример: [два числа]» и «Проверить» одной строкой */
.choice-pair { align-items: center; }
.choice-pair .when-field { display: flex; align-items: center; gap: 6px; flex: 1 1 240px; max-width: 340px; min-width: 0;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.choice-pair .when-field[hidden] { display: none; }
.choice-pair .when-field .field { flex: 1 1 auto; width: 0; min-width: 0; max-width: none; }
/* числа по окошкам и дробь «этажами»: числитель над знаменателем (30.10.2026, common.js numFieldHtml) */
.answer-row:has(.num-field) { align-items: center; }
.num-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 180px; max-width: 360px; min-width: 0; }
.num-field.num-many { max-width: 440px; }
.num-slot { display: flex; align-items: center; gap: 6px; flex: 1 1 120px; min-width: 0; }
.answer-row .num-slot .field { max-width: none; }
.answer-row .num-slot .num-whole { flex: 1 1 auto; width: 0; min-width: 48px; }
.num-slot.has-frac { flex: 0 1 auto; }                   /* дробь с целой — по размеру, остальное — второму окошку */
.answer-row .num-slot.has-frac .num-whole { flex: none; width: 84px; text-align: right; }
.num-slot .frac { display: flex; align-items: center; gap: 2px; flex: none; }
.num-slot .frac[hidden] { display: none; }
.num-slot .frac-col { display: flex; flex-direction: column; gap: 3px; width: 64px; }
.answer-row .num-slot .frac-col .field { flex: none; width: 100%; padding: 2px 4px; font-size: var(--fs-sm); line-height: 20px; text-align: center; }
.num-slot .frac-bar { height: 2px; background: var(--text); border-radius: 1px; }
.num-slot .frac-x { border: 0; background: none; color: var(--text-2); font-size: 20px; line-height: 1; padding: 4px 6px; cursor: pointer; }
.num-slot .frac-x:hover { color: var(--accent-ink); }
.keys { display: flex; gap: 4px; flex-wrap: wrap; margin: 5px 0 0; }
.keys:empty { display: none; }
.keys button {
  min-width: 36px; height: 30px; border: 0; border-radius: var(--r-pill); background: var(--accent-soft);
  color: var(--accent-ink); font-weight: 700; cursor: pointer; padding: 0 9px;
}
.keys button:hover { background: var(--accent-soft-2); }
.keys button.wide { font-weight: 600; font-size: var(--fs-sm); }
.preview { font-size: var(--fs-sm); color: var(--text-2); margin-top: 0; padding: 4px 2px 6px; overflow-x: auto; overflow-y: hidden; }
.preview:empty { display: none; }
.preview .err { color: var(--orange); font-size: var(--fs-sm); }
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices button[data-opt], .choices button[data-v] {
  min-width: 56px; height: 40px; border-radius: var(--r-pill); border: 1.5px solid var(--line-2); background: var(--paper);
  font-weight: 600; font-size: var(--fs-md); color: var(--text); cursor: pointer; padding: 0 16px;
}
.choices button[data-opt].sel, .choices button[data-v].sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.choices button[data-opt]:disabled { cursor: default; opacity: .6; }
.verdict { font-size: var(--fs-md); font-weight: 600; margin-top: 6px; }
.verdict.ok { color: var(--green); }
.verdict.bad { color: var(--coral); }
.verdict.form { color: var(--orange); }
.solved-answer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 30px; }
.solved-answer .verdict { margin-top: 0; }                 /* «Верно!» — на одной линии с «Решено» и ответом */
.solved-answer .muted, .solved-answer .verdict { font-size: var(--fs-md); line-height: 1.4; }
.item.solved .prompt { color: var(--text-2); }
/* ответ педагога на телефоне (24.10.2026): цепочка «=…=…» переносится по знакам, а что не переносится (одна длинная
   формула) — прокручивается внутри плашки; страница вбок не едет */
.teacher-answer { background: var(--green-bg); border-radius: var(--r-sm); padding: 6px 10px; margin-top: 4px;
  overflow-x: auto; overflow-y: hidden; }
.teacher-answer .nowrap { white-space: normal; }
.teacher-answer b { color: var(--green); font-size: var(--fs-xs); margin-right: 6px; }
.try { margin-top: 6px; }                                  /* педагог: «попробовать ответ как ученик» */
.try > summary { cursor: pointer; color: var(--accent-ink); font-size: var(--fs-sm); width: fit-content; }
.try-box { margin-top: 6px; }
.notes h2 { margin-top: 18px; }
.notes p { margin: 0 0 8px; }
.notes ul { padding-left: 22px; }

/* разбор урока преподавателем */
.review { box-shadow: 0 6px 18px rgba(0,0,0,.05); }
.review-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.review-sub { margin-top: 8px; font-size: var(--fs-sm); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.solvers { margin-top: 8px; font-size: var(--fs-sm); }
.solvers:empty { display: none; }
.who-line { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.who-count { font-weight: 700; margin-right: 2px; }
.solvers .chip { font-size: var(--fs-xs); padding: 3px 9px; font-weight: 600; }
.solvers a.chip:hover { text-decoration: none; filter: brightness(.96); }
.chip.bad { background: var(--coral-bg); color: var(--coral); }
.chip.warn { background: var(--orange-bg); color: var(--orange); }
.solvers .wrongs { margin-top: 5px; color: var(--coral); }
.history { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.history .att { background: var(--field); border-radius: var(--r-pill); padding: 3px 8px; }
.history .att b { color: var(--text-2); font-weight: 700; margin-right: 2px; }
.history .att.bad .mark { color: var(--coral); font-weight: 700; }
.history .att.ok { background: var(--green-bg); }
.history .att.ok .mark { color: var(--green); font-weight: 700; }
.history .att.form .mark { color: var(--orange); font-weight: 700; }
.history .t { color: var(--text-2); font-size: var(--fs-xs); }
.history .arrow { color: var(--text-3); }
.who-sub { margin-top: 5px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; color: var(--text-2); }
.chip.soft { background: var(--green-bg); color: var(--green); }
.chip.off { background: var(--field); color: var(--text-2); }
.solvers .wrongs .katex { color: var(--text); }

/* аналитика урока */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { background: var(--paper); border-radius: var(--radius); padding: 16px 18px; }
.tile-value { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; }
.tile-label { font-weight: 600; margin-top: 2px; }
.tile-how { font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.an-grid .card { margin: 0 0 14px; }
.an-sub { font-size: var(--fs-sm); margin: -4px 0 10px; }
svg.chart { width: 100%; height: auto; display: block; }
svg.chart .grid { stroke: var(--line); stroke-width: 1; }
svg.chart .axis { fill: var(--text-2); font-size: 11px; font-family: inherit; }
svg.chart .fill { fill: var(--accent); }
svg.chart .hit { fill: transparent; }
svg.chart .bar:hover .fill { fill: var(--accent-ink); }
svg.chart .bar:hover .hit { fill: rgba(var(--accent-rgb), .06); }
.hbars { display: flex; flex-direction: column; gap: 4px; max-height: 420px; overflow-y: auto; }
.hbar { display: grid; grid-template-columns: minmax(0, 1.4fr) 1fr 92px; gap: 10px; align-items: center; color: var(--text); font-size: var(--fs-xs); padding: 3px 4px; border-radius: var(--r-sm); }
.hbar:hover { background: var(--accent-soft); text-decoration: none; }
.hbar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 3px 0; }
.hbar-track { height: 10px; background: var(--field); border-radius: var(--r-pill); overflow: hidden; }
.hbar-track i { display: block; height: 100%; background: var(--accent); border-radius: 0 var(--r-pill) var(--r-pill) 0; }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.hbar-value small { color: var(--text-2); font-weight: 600; }
.analytics-table th a { color: var(--text-2); }
.analytics-table th a.on { color: var(--accent-ink); }
.analytics-table td.flags { white-space: normal; min-width: 220px; }
.analytics-table td, .analytics-table th { padding: 8px 8px; }
.analytics-table td.flags .chip { margin: 1px 0; }
.errors { display: flex; flex-direction: column; }
.err-row { display: grid; grid-template-columns: 58px minmax(120px, auto) 44px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.err-row:first-child { border-top: 0; }
.err-item { font-weight: 700; }
.err-count { color: var(--coral); font-weight: 700; }
.err-who { font-size: var(--fs-xs); }
.insight-body p { margin: 0 0 6px; }
.ins-code { font-family: inherit; background: var(--field); border-radius: var(--r-xs); padding: 0 5px; white-space: nowrap; }
.insight-body ul { margin: 0 0 6px; padding-left: 20px; }
.insight-foot { display: flex; gap: 10px; align-items: center; justify-content: flex-end; }
.insight-edit textarea { resize: vertical; font-size: var(--fs-md); }
.report-btn { border: 0; background: none; padding: 0; margin-top: 2px; font-size: var(--fs-xs); font-weight: 600; color: var(--text-2); cursor: pointer; }
.report-btn.has { color: var(--lilac); }
.report-btn:hover { color: var(--accent-ink); }
.report-row td { background: var(--lilac-bg); white-space: normal; padding: 12px 16px; }
tr.opened th, tr.opened td { background: var(--lilac-tint); }
.report-full { border-top: 1px solid var(--line); padding: 12px 0 4px; }
.report-full:first-of-type { border-top: 0; }
.insight-inline { margin-top: 10px; background: var(--lilac-bg); border-radius: var(--r-sm); padding: 10px 12px; }

/* опрос */
.survey-banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 2px solid var(--accent-soft); color: var(--text); }
.survey-banner:hover { text-decoration: none; border-color: var(--accent); }
.survey-banner span:not(.btn) { color: var(--text-2); flex: 1; }
.survey .q { margin-bottom: 18px; }
.survey .q-text { font-weight: 700; margin-bottom: 8px; }
.survey .choices button.wide-opt { font-size: var(--fs-md); font-weight: 600; }
.scale-labels { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-2); max-width: 330px; margin-top: 4px; }
.sv-bar { display: grid; grid-template-columns: minmax(120px, 200px) 1fr 40px; gap: 10px; align-items: center; font-size: var(--fs-sm); margin: 3px 0; }
.sv-bar .hbar-track { height: 10px; }
.sv-text { border-top: 1px solid var(--line); padding: 8px 0; }

.range-row { margin: 0 0 12px; }
.range-pick { flex-wrap: wrap; }
svg.chart .lesson-band { fill: rgba(var(--accent-rgb), .11); }
svg.chart .lesson-band.grace { fill: rgba(var(--accent-rgb), .05); }
svg.lanes .lane { stroke: var(--line); stroke-width: 2; }
svg.lanes .lane-name { font-size: 12px; fill: var(--text); }
svg.lanes .dot.ok { fill: var(--green-fill); }
svg.lanes .dot.bad { fill: var(--coral-fill); }
svg.lanes .dot.form { fill: var(--orange-fill); }
.dot-l { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.dot-l.ok { background: var(--green-fill); } .dot-l.bad { background: var(--coral-fill); } .dot-l.form { background: var(--orange-fill); }

/* подписи над клетками и предпросмотр условия */
.cells-head { align-items: flex-end; }
.cells-head .type-lbl { display: inline-block; text-align: center; font-size: var(--fs-xs); font-weight: 800; color: var(--text-2);
  background: var(--field); border-radius: var(--r-xs); line-height: 18px; cursor: help; flex: none; }
.cells-head .type-lbl.extra { color: var(--lilac); background: var(--lilac-bg); }
.cells-head .type-lbl:hover { background: var(--accent-soft); color: var(--accent-ink); }
.cells-head .type-lbl.hw, .legend .type-lbl.hw { background: var(--brand-purple); color: var(--paper); }   /* номер ДЗ группы; белый на нём 4,25:1, жирный */
.cells-head .type-lbl.hw:hover { background: var(--brand-purple-text); color: var(--paper); }
.type-lbl.hw .hw-ico { width: 11px; height: 11px; margin-right: 2px; vertical-align: -1px; stroke-width: 2.6; }
.legend .type-lbl.hw { display: inline-block; width: 26px; height: 18px; line-height: 18px; text-align: center;
  border-radius: var(--r-xs); margin-right: 4px; vertical-align: 1px; }
.legend .type-lbl.hw .hw-ico { margin: 0; vertical-align: -1px; }
.cells .cell, .cells .sep { flex: none; }
.hover-pop { position: fixed; z-index: 60; max-width: 440px; background: var(--paper); border-radius: var(--r-md); padding: 12px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.16); font-size: var(--fs-sm); pointer-events: none; }
.hover-pop .hp-item { margin-top: 8px; }
.hover-pop .hp-ans { color: var(--green); font-size: var(--fs-xs); margin-top: 2px; }
.hover-pop .hp-who { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* группы, педагоги, замечания */
.sched { display: grid; gap: 4px; }
.sched-row { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; min-height: 34px; }
.sched-row .day { min-width: 62px; }
.sched-row .sched-times { display: none; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
.sched-row.on .sched-times { display: flex; }
.sched-row.on .day { background: var(--accent-soft); color: var(--accent-ink); }
.sched .day { display: inline-flex; gap: 4px; align-items: center; background: var(--field); border-radius: var(--r-pill); padding: 5px 9px; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; }
.sched .field.time { width: auto; padding: 5px 8px; }
.group-card .gtitle { font-size: var(--fs-lg); font-weight: 700; max-width: 420px; }
.teachers { display: flex; gap: 6px 16px; flex-wrap: wrap; }
.remark { border-top: 1px solid var(--line); padding: 10px 0; }
.remark:first-of-type { border-top: 0; }
.remark.done { opacity: .6; }
.remark-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.remark-btn { border: 0; background: none; color: var(--text-2); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; padding: 2px 4px; }
.remark-btn:hover { color: var(--accent-ink); }
.remark-btn .n { background: var(--orange-bg); color: var(--orange); border-radius: var(--r-pill); padding: 0 5px; margin-left: 3px; }
.remark-box { background: var(--orange-bg); border-radius: var(--r-md); padding: 10px 12px; margin: 8px 0; font-size: var(--fs-sm); }
.remark-box textarea { margin: 6px 0; }
.remark-box .old { border-top: 1px solid rgba(0,0,0,.06); padding: 6px 0; }

/* карточка ученика */
.small-tiles { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 10px 0; }
.small-tiles .tile { background: var(--bg); padding: 10px 12px; }
.small-tiles .tile-value { font-size: var(--fs-xl); }
.small-tiles small { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.feed { max-height: 460px; overflow-y: auto; }
.feed-row { display: grid; grid-template-columns: 48px 70px 60px 1fr 24px; gap: 8px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.feed-row .t { color: var(--text-2); font-variant-numeric: tabular-nums; }
.feed-row .mark.ok { color: var(--green); font-weight: 700; }
.feed-row .mark.bad { color: var(--coral); font-weight: 700; }
.feed-row .mark.form { color: var(--orange); font-weight: 700; }

/* преподаватель */
.table-scroll { overflow: auto; max-height: 70vh; border-radius: var(--radius); background: var(--paper); }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--fs-sm); }
table.grid th, table.grid td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; background: var(--paper); }
table.grid thead th { position: sticky; top: 0; z-index: 2; color: var(--text-2); font-weight: 700; }
table.grid tbody th { position: sticky; left: 0; z-index: 1; font-weight: 600; }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
.cells { display: flex; gap: 2px; }
.cell {
  width: 18px; height: 18px; border-radius: var(--r-xs); background: var(--field); border: 0; padding: 0; cursor: pointer;
}
.cell.solved { background: var(--green-fill); }
.cell.credited { background: var(--green-fill-2); }
.cell.tried { background: var(--coral-fill); }
.cell.started { background: var(--orange-fill); }
.cell.home { background: var(--brand-purple); }   /* решено дома, вне занятий — фирменный сиреневый ДЗ (30.10, Матвей: «чуть светлее») */
.cell.extra { opacity: .75; }
.cells .sep { width: 6px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--text-2); margin: 6px 0 12px; align-items: center; }
.legend .cell { cursor: default; display: inline-block; vertical-align: -4px; margin-right: 4px; }
.switch { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: var(--fs-sm); color: var(--text-2); user-select: none; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }
.pop {
  position: fixed; z-index: 50; background: var(--paper); border-radius: var(--r-md); padding: 14px 16px; width: 300px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15); font-size: var(--fs-sm);
}
.secret { font-family: ui-monospace, Menlo, monospace; background: var(--field); padding: 10px 12px; border-radius: var(--r-sm); user-select: all; margin: 6px 0; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.inline-form > div { flex: 1 1 200px; }
.stamp { font-size: var(--fs-xs); color: var(--text-2); }

@media (max-width: 760px) {
  .an-grid { grid-template-columns: minmax(0, 1fr); }
  .hbar { grid-template-columns: minmax(0, 1fr) 70px; }
  .hbar-track { display: none; }
  .err-row { grid-template-columns: 40px auto 36px; }
  .err-who { grid-column: 1 / -1; }
  .top-in { padding: 8px 14px; gap: 6px 10px; flex-wrap: wrap; }
  .top-nav { order: 3; flex-basis: 100%; flex-wrap: wrap; overflow: visible; }
  .who { margin-left: auto; }
  .group-bar-in { padding: 6px 14px; }
  .brand small, .brand .brand-course { display: none; }
  .brand img.brand-logo { height: 32px; }
  .who .name { display: none; }
  .wrap { padding: 14px 14px 80px; }
  h1 { font-size: var(--fs-xl); }
  h2 { font-size: var(--fs-lg); }
  h3 { font-size: var(--fs-md); }
  .card { padding: 16px; border-radius: var(--r-md); }
  .lesson-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; display: none; }
  .answer-row .field { max-width: none; }
  .item { grid-template-columns: 24px minmax(0, 1fr); }
  table.memo td { padding: 7px 8px; }
  table.memo td:first-child { width: 38%; }
}

/* педагог проходит урок как ученик */
.student-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--amber-bg); border: 1px solid var(--amber-line); margin-bottom: 12px; }
.student-mode .sm-actions { display: flex; gap: 8px; margin-left: auto; }
/* разбор на уроке — зелёная плашка: этот экран видит класс */
.student-mode.review-mode { background: var(--mint-bg); border-color: var(--mint-line); }
.task-meta .remark-btn { margin-right: 10px; }

/* урок по шагам: кусок теории → задачи к нему, по одному шагу на экране */
.steps { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 6px; scrollbar-width: thin; }
.steps .step { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: var(--r-sm);
  background: var(--field); color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); max-width: 220px; }
.steps .step span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; }
.steps .step span .katex { font-size: 1em; }
.steps .step b { flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); font-size: var(--fs-xs); }
.steps .step.on { background: var(--accent); color: var(--paper); }
.steps .step.on b { color: var(--accent); }
.steps .step.done b { background: var(--green-bg); color: var(--green); }
.step-head { display: flex; justify-content: space-between; margin: 4px 0 10px; font-size: var(--fs-sm); }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 8px; flex-wrap: wrap; }
@media (min-width: 800px) { .steps { flex-wrap: wrap; overflow: visible; } }
/* Лента шагов урока — одна строка кружков-номеров (ревизия О9, 22.10.2026; static/lesson.js, класс steps-dots).
   Текущий шаг — заливкой, решённый — зелёным с галочкой, шаг с ДЗ — сиреневым значком, закрытый — пунктиром с замком.
   Название шага — в подсказке и заголовком шага, в ленте его нет. Не влезла (телефон, много шагов) — прокрутка вбок
   внутри ленты, у края, за которым есть ещё шаги, лента тает. /try со своей лентой (static/try.js) это не касается. */
@property --steps-fade-l { syntax: '<length>'; inherits: false; initial-value: 0px; }
@property --steps-fade-r { syntax: '<length>'; inherits: false; initial-value: 28px; }
.steps.steps-dots {
  flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; gap: 6px; margin: 0 -4px 2px; padding: 6px 28px 8px 4px;
  scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding-inline: 28px;
  --steps-fade-l: 0px; --steps-fade-r: 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--steps-fade-l), #000 calc(100% - var(--steps-fade-r)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--steps-fade-l), #000 calc(100% - var(--steps-fade-r)), transparent);
}
.steps.steps-dots::-webkit-scrollbar { display: none; }
@supports (animation-timeline: scroll()) {   /* тает только тот край, за которым ещё есть шаги */
  .steps.steps-dots { animation: steps-fade linear both; animation-timeline: scroll(self inline); }
  @keyframes steps-fade { 0% { --steps-fade-l: 0px; --steps-fade-r: 28px; } 8%, 92% { --steps-fade-l: 28px; --steps-fade-r: 28px; }
    100% { --steps-fade-l: 28px; --steps-fade-r: 0px; } }
}
.steps.steps-dots .step {
  position: relative; flex: none; justify-content: center; gap: 0; width: 36px; height: 36px; max-width: none; padding: 0;
  border-radius: 50%; background: var(--paper); color: var(--text-2); box-shadow: inset 0 0 0 1.5px var(--line-2);
  font-size: var(--fs-sm); transition: background-color .15s, color .15s, box-shadow .15s;
}
.steps.steps-dots .step b { width: auto; height: auto; background: none; font-size: var(--fs-sm); font-weight: 700;
  font-variant-numeric: tabular-nums; line-height: 1; }
.steps.steps-dots .step:not(.step-memo) > span {      /* название — для экранного диктора, глазу — подсказка и заголовок шага */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.steps.steps-dots a.step:hover { color: var(--accent-ink); box-shadow: inset 0 0 0 2px var(--accent); text-decoration: none; }
.steps.steps-dots .step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.steps.steps-dots .step.done { background: var(--green-bg); color: var(--green); box-shadow: inset 0 0 0 1.5px var(--green-fill); }
.steps.steps-dots .step.done b { background: none; color: inherit; }
.steps.steps-dots .step.done::before { content: ''; position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px;
  border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--bg); }
.steps.steps-dots .step.done::after { content: ''; position: absolute; right: 3px; bottom: 1.5px; width: 4px; height: 7px;
  border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.steps.steps-dots .step.on, .steps.steps-dots a.step.on:hover { background: var(--accent); color: var(--paper);
  box-shadow: 0 0 0 3px var(--accent-soft-2); }
.steps.steps-dots .step.on b { color: var(--paper); }
.steps.steps-dots .step.locked { opacity: 1; background: none; color: var(--text-3); box-shadow: none; border: 1.5px dashed var(--line-2); }
.steps.steps-dots .lock-ico { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.steps.steps-dots .step .step-hw { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; width: 16px; height: 16px;
  margin: 0; padding: 0; border-radius: 50%; background: var(--brand-purple-text); color: var(--paper); box-shadow: 0 0 0 2px var(--bg); }
.steps.steps-dots .step.on .step-hw { background: var(--brand-purple-text); }
.steps.steps-dots .step .step-hw .hw-ico { width: 10px; height: 10px; stroke-width: 2.6; }
.steps.steps-dots .step-memo { width: auto; padding: 0 14px; border-radius: var(--r-pill); font-weight: 600; }
.step-title { margin: 2px 0 12px; }
.answer-hint { margin: 2px 0 6px; }

/* активность учеников: бусы попыток и подсказка на точке */
svg.lanes .dot { stroke: var(--paper); stroke-width: 1.5; }
svg.lanes .hit { fill: transparent; cursor: pointer; }
svg.lanes .hit:hover { fill: rgba(64,65,66,.08); }
svg.lanes .try-link { stroke: rgba(62,158,62,.35); stroke-width: 6; stroke-linecap: round; }
svg.lanes .try-link.open { stroke: rgba(229,85,65,.30); }
svg.lanes .try-label { font-size: 10px; font-weight: 700; fill: var(--green); }
svg.lanes .try-label.open { fill: var(--coral); }
.lanes-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.lanes-head .legend { flex: 1; }
.legend .link-l { display: inline-block; width: 22px; height: 6px; border-radius: var(--r-pill); background: rgba(229,85,65,.30); margin-right: 6px; vertical-align: middle; }
.lanes-wrap { position: relative; }
.lane-tip { position: absolute; z-index: 5; max-width: 360px; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 8px 12px; font-size: var(--fs-xs); line-height: 1.45; pointer-events: none; }
.lane-tip .tip-head { display: flex; justify-content: space-between; gap: 12px; color: var(--text-2); }
.lane-tip .tip-head b { color: var(--text); }
.lane-tip .tip-item { margin: 3px 0; }
.lane-tip .v-c { color: var(--green); font-weight: 600; }
.lane-tip .v-w { color: var(--coral); font-weight: 600; }
.lane-tip .v-f { color: var(--orange); font-weight: 600; }
svg.lanes .axis-break { fill: var(--paper); }
svg.lanes .break-label { font-size: 10px; fill: var(--text-2); }
svg.lanes .seg-start { font-size: 10px; font-weight: 600; fill: var(--text-2); }
svg.lanes .path-toggle { cursor: pointer; }
svg.lanes .path-toggle:hover, svg.lanes .path-toggle.on { fill: var(--accent-ink); font-weight: 700; }
svg.lanes .path-row { stroke: var(--line); stroke-width: 1; }
svg.lanes .path-row.odd { stroke: var(--line); stroke-dasharray: 2 4; }
svg.lanes .path-line { fill: none; stroke: var(--text-3); stroke-width: 1.5; stroke-linejoin: round; }
.path-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin: 14px 0 4px; padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.path-head .muted { flex: 1; font-size: var(--fs-xs); }
svg.lanes .lane-count { font-size: 11px; font-weight: 700; }
svg.lanes .lane-count.ok { fill: var(--green); }
svg.lanes .lane-count.bad { fill: var(--coral); }
svg.lanes .lane-count.zero { fill: var(--text-2); }
svg.lanes:not(.path) { cursor: crosshair; }
svg.lanes .brush { fill: rgba(var(--accent-rgb), .18); stroke: var(--accent); stroke-width: 1; }
.zoom-chip { font-size: var(--fs-sm); background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-pill); padding: 6px 10px; }

/* экран одного ученика в аналитике урока */
.student-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.student-head h2 { margin: 0; }
.who-nav { display: flex; gap: 14px; font-size: var(--fs-sm); }
.item-map { display: flex; flex-direction: column; gap: 10px; }
.map-row { display: grid; grid-template-columns: 220px 1fr; gap: 12px; align-items: start; }
.map-title { font-size: var(--fs-xs); color: var(--text-2); padding-top: 6px; }
.map-cells { display: flex; flex-wrap: wrap; gap: 4px; }
.cell-i { width: 40px; height: 34px; border-radius: var(--r-xs); display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-decoration: none; font-size: var(--fs-xs); line-height: 1.1; border: 1.5px solid transparent; }
.cell-i span { color: inherit; opacity: .8; }
.cell-i b { font-size: var(--fs-xs); }
.cell-i.none { background: var(--field); color: var(--text-3); }
.cell-i.first { background: var(--green-fill); color: var(--text); }   /* белый на светло-зелёном был 1,9:1 */
.cell-i.later { background: var(--green-bg); color: var(--green); border-color: var(--green-fill); }
.cell-i.open { background: var(--coral); color: var(--paper); }
.cell-i.extra { border-style: dashed; border-color: var(--line-2); }
.cell-i.first.extra, .cell-i.open.extra { border-color: rgba(255,255,255,.7); }
.stuck-row { padding: 8px 0; border-top: 1px solid var(--line); }
.stuck-row:first-of-type { border-top: 0; }
.stuck-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.stuck-q { flex: 1; }
.stuck-tries { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.stuck-tries .try { font-size: var(--fs-sm); padding: 2px 8px; border-radius: var(--r-pill); background: var(--field); }
.stuck-tries .try.v-w { background: var(--coral-bg); color: var(--coral); }
.stuck-tries .try.v-c { background: var(--green-bg); color: var(--green); }
.stuck-tries .try.v-f { background: var(--orange-bg); color: var(--orange); }
@media (max-width: 700px) { .map-row { grid-template-columns: 1fr; } }
.tiles.tiles5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 900px) { .tiles.tiles5 { grid-template-columns: repeat(2, 1fr); } }
.cell-i { width: 46px; }
.cell-i span i { font-style: normal; }

/* домашнее задание */
.chip.hw { background: var(--brand-purple-soft); color: var(--brand-purple-text); }
.hw-switch { color: var(--brand-purple-text); font-weight: 600; }
.steps .step .step-hw { font-style: normal; font-size: var(--fs-xs); font-weight: 700; color: var(--brand-purple-text); background: var(--brand-purple-soft); border-radius: var(--r-xs); padding: 1px 4px; margin-left: -2px; }
.steps .step.on .step-hw { background: rgba(255,255,255,.85); }
.hw-card h2 { margin: 0 0 8px; font-size: var(--fs-lg); }
.hw-row { display: grid; grid-template-columns: 1fr auto 140px auto; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--text); }
.hw-row:first-of-type { border-top: 0; }
.bar.small { height: 6px; margin: 0; }
@media (max-width: 640px) { .hw-row { grid-template-columns: 1fr auto; } .hw-row .bar { display: none; } }
.cell-i.hw { box-shadow: 0 0 0 2px var(--brand-purple); }
.hw-stamp { color: var(--brand-purple-text); }
/* ДЗ — отдельная плашка с домиком, не галочка: не путать с «дополнительным» */
.hw-ico { width: 1.05em; height: 1.05em; vertical-align: -0.15em; margin-right: 4px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.task-tools { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hw-toggle { display: inline-flex; align-items: center; gap: 2px; padding: 4px 10px; border-radius: var(--r-pill); cursor: pointer; font-size: var(--fs-sm); font-weight: 600;
  border: 1.5px dashed var(--brand-purple); color: var(--brand-purple-text); background: var(--paper); user-select: none; }
.hw-toggle input { display: none; }
.hw-toggle.on { border-style: solid; background: var(--brand-purple-text); color: var(--paper); }
.hw-toggle:hover { background: var(--brand-purple-soft); }
.hw-toggle.on:hover { background: var(--brand-purple-dark); }
.chip.hw .hw-ico { margin-right: 3px; }
.steps .step .step-hw { display: inline-flex; padding: 1px 3px; }
.steps .step .step-hw .hw-ico { margin: 0; width: 14px; height: 14px; }
.hw-card h2 .hw-ico { color: var(--brand-purple); width: 22px; height: 22px; margin-right: 8px; }
/* вкладка «ДЗ» */
.hw-table th.hw-col { font-size: var(--fs-xs); text-align: center; min-width: 34px; padding: 6px 2px; }
.hw-table td { text-align: center; padding: 4px 2px; }
.hw-cell { display: inline-flex; width: 30px; height: 26px; align-items: center; justify-content: center; border-radius: var(--r-xs); text-decoration: none; font-weight: 700; font-size: var(--fs-xs); }
.hw-cell.none { background: var(--field); }
.hw-cell.class { background: var(--green-bg); color: var(--green); }
.hw-cell.home { background: var(--brand-purple-text); color: var(--paper); }
.hw-cell.open { background: var(--coral); color: var(--paper); }
.hw-foot th, .hw-foot td { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.ok-text { color: var(--green); }
.hw-table th.hw-col { min-width: 0; }
.hw-letters, .hw-group { display: inline-flex; gap: 3px; }
.hw-letters span { width: 22px; font-size: var(--fs-xs); font-weight: 400; color: var(--text-2); }
.hw-table .hw-cell { width: 22px; height: 24px; font-size: var(--fs-xs); border-radius: var(--r-xs); }
.hw-n { width: 22px; display: inline-block; }
.hw-table td { padding: 4px 6px; }
/* при прокрутке таблицы вбок «Ученик» и имена остаются слева, «Итог» — справа */
.hw-table thead th:first-child { left: 0; z-index: 3; }
.hw-table .hw-total { position: sticky; right: 0; z-index: 1; border-left: 1px solid var(--line); text-align: right; }
.hw-table thead th.hw-total { z-index: 3; }

/* кабинет родителя */
.p-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.p-grid > .card { margin-bottom: 0; }
.p-grid:empty { display: none; }
.p-date { font-weight: 700; }
.p-date::first-letter { text-transform: uppercase; }
.att-list { margin: 10px 0 6px; }
.att-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 9px 4px; border-top: 1px solid var(--line);
  color: var(--text); text-decoration: none; }
.att-row:first-child { border-top: 0; }
a.att-row:hover { background: var(--field); text-decoration: none; }
.att-date { width: 92px; color: var(--text-2); font-size: var(--fs-sm); }
.att-topic { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.att-marks { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.att-hw, .att-num { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; }
.att-hw.good { color: var(--green); }
.att-hw.bad { color: var(--coral); }
.p-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.p-stats span { background: var(--field); border-radius: var(--r-pill); padding: 4px 10px; font-size: var(--fs-sm); color: var(--text-2); }
.p-stats span b { color: var(--text); margin-right: 3px; }
.p-stats span.good { background: var(--green-bg); }
.p-stats span.good b { color: var(--green); }
.p-stats span.warn { background: var(--orange-bg); }
.p-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.p-ans { font-size: var(--fs-sm); margin-top: 2px; }
/* график ответов у родителя: на телефоне — своя прокрутка вбок, иначе точки и подписи не разглядеть */
@media (max-width: 700px) {
  .p-chart .lanes-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .p-chart .lanes-wrap svg.chart { min-width: 760px; }
  .p-chart .lanes-head { flex-direction: column; align-items: flex-start; }
}
.parents-cta { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.parents-table input.field { min-width: 220px; }
@media (max-width: 600px) {                    /* телефон: ученик, родители, поле и галочка — друг под другом */
  .parents-table thead { display: none; }
  .parents-table, .parents-table tbody, .parents-table tr, .parents-table th, .parents-table td { display: block; }
  .parents-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  table.grid.parents-table th, table.grid.parents-table td { border: 0; padding: 3px 0; position: static; white-space: normal; }
  .parents-table input.field { min-width: 0; width: 100%; }
  .parents-table .chip { white-space: normal; }
  .parents-scroll { max-height: none; overflow: visible; }
}
.bulk-go { margin: 12px 0 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.bulk-result .bulk-msg { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.btn.done { background: var(--green-bg); color: var(--green); }
.gender-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 4px 0 12px; }
.facts { margin: 6px 0 8px; padding-left: 20px; }
.facts li { margin-bottom: 4px; }
.p-cond { overflow-wrap: anywhere; }
.p-cond .chip { margin-left: 4px; }
.p-steps { margin: 0; padding-left: 22px; }
.p-steps li { margin-bottom: 4px; }

/* конструктор построений (поле construction, static/construction.js): рисунок во всю ширину пункта, инструменты,
   лупа под пальцем. Пункт — сетка «буква | текст»: рисунок — строкой под ней; на телефоне — от края до края пункта */
.constr-wide { grid-column: 2; min-width: 0; }
.constr-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.constr-tools .tool-group { display: flex; gap: 6px; }
.constr-tools .tool-group.actions { margin-left: auto; }
.constr-tools button {
  min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--paper);
  color: var(--text); font-weight: 600; font-size: var(--fs-md); cursor: pointer; touch-action: manipulation;
}
.constr-tools button:hover { border-color: var(--accent); }
.constr-tools button[data-tool].on { border-color: var(--accent); background: var(--accent); color: var(--paper); }
.constr-tools .actions button { border-color: transparent; background: var(--field); color: var(--text-2); }
.constr-tools .actions button:hover { color: var(--accent-ink); background: var(--accent-soft); }
.constr-ico { width: 1.1em; height: 1.1em; vertical-align: -0.2em; margin-right: 5px; fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* инструменты — значок слева от слова (решение 10 Матвея); линия значка — цвет текста, точки — заливка */
.constr-tools [data-tool] { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.constr-tools .tool-ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.constr-tools .tool-ico .f { fill: currentColor; stroke: none; }
.constr-tools button:disabled, .constr-tools .actions button:disabled { opacity: .45; cursor: default; color: var(--text-2); background: var(--field); }
.constr-hint { font-size: var(--fs-md); font-weight: 600; color: var(--accent-ink); min-height: 22px; margin: 2px 0 6px; }
.constr-root.busy .constr-hint { color: var(--text-2); }
.constr-svg {
  display: block; width: 100%; height: auto; max-width: calc(70vh * var(--ratio, 1)); margin: 0 auto; overflow: hidden;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  touch-action: manipulation; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.constr-svg.armed { touch-action: none; }           /* выбран инструмент: палец строит, а не листает страницу */
.constr-svg.armed.hot { cursor: pointer; }
.constr-root.busy .constr-svg { cursor: progress; }
.constr-viewing .constr-svg { max-width: min(460px, calc(70vh * var(--ratio, 1))); margin: 6px 0 0; }
/* сцена рисунка: правила — от .constr-scene, а не от svg: лупа показывает её копией через <use>, а копия живёт в
   своём теневом дереве — селектор с предком вне сцены там не срабатывает (точки чернели, прямые пропадали) */
.constr-scene line, .constr-scene circle, .constr-lens circle, .constr-lens path { vector-effect: non-scaling-stroke; }
.constr-scene .edge { stroke: var(--text); stroke-width: 2.4px; stroke-linecap: round; }
.constr-scene .edge.dash { stroke-dasharray: 7 6; }
.constr-scene .cline { stroke: var(--accent); stroke-width: 1.6px; }
.constr-scene .cside { stroke: var(--green); stroke-width: 4.5px; stroke-linecap: round; }
.constr-scene .cside.hidden { stroke-dasharray: 9 7; stroke-linecap: butt; }
.constr-scene .edge.sel, .constr-scene .cline.sel { stroke: var(--accent-ink); stroke-width: 3.5px; }
.constr-scene .pt { fill: var(--text); }
.constr-scene .pt.built { fill: var(--accent-ink); }
.constr-scene .pt.sel { fill: var(--accent-ink); }
.constr-scene .lbl { font-family: 'Nunito Sans', sans-serif; font-weight: 600; fill: var(--text);
  paint-order: stroke; stroke: var(--paper); stroke-width: .22em; stroke-linejoin: round; }   /* прямая через букву не прячет её */
.constr-scene .lbl.built { fill: var(--accent-ink); }
.constr-scene .lbl.par { font-style: italic; }                 /* параллельная «a» — строчная, как в шагах */
.constr-scene .halo-sel { fill: none; stroke: var(--accent-ink); stroke-width: 2.5px; }
.constr-scene .halo-sel-line { stroke: var(--accent); stroke-opacity: .35; stroke-width: 10px; stroke-linecap: round; }
.constr-scene .halo-target { fill: var(--accent); fill-opacity: .18; stroke: var(--accent); stroke-width: 1.5px; }
.constr-scene .halo-target-line { stroke: var(--accent); stroke-opacity: .28; stroke-width: 12px; stroke-linecap: round; }
.constr-scene .mark-miss { stroke: var(--coral); stroke-width: 3px; }
.constr-scene .mark-miss.dash { stroke-dasharray: 8 6; }
.constr-scene .mark-miss-pt { fill: none; stroke: var(--coral); stroke-width: 2.5px; }
.constr-scene .mark-pick { fill: var(--orange); fill-opacity: .18; stroke: var(--orange); stroke-width: 2.5px; }
.constr-scene .mark-pick-line { stroke: var(--orange); stroke-opacity: .45; stroke-width: 7px; }
.constr-lens .lens-bg { fill: var(--paper); }
.constr-lens .lens-ring { fill: none; stroke: var(--accent-ink); stroke-width: 2px; }
.constr-lens .lens-cross { stroke: var(--coral); stroke-width: 1.5px; }
.constr-answer { margin-top: 8px; font-size: var(--fs-md); }
.constr-answer b { font-size: var(--fs-lg); }
.constr-msg { font-size: var(--fs-md); margin-top: 6px; }
.constr-msg:empty { display: none; }
.constr-msg.done { color: var(--text-2); }
.constr-msg.note { color: var(--orange); font-weight: 600; }
.constr-msg.miss { color: var(--coral); font-weight: 600; }
.constr-msg .btn { margin-left: 6px; vertical-align: 1px; }
.constr-log { margin-top: 6px; font-size: var(--fs-sm); }
.constr-log > summary { cursor: pointer; color: var(--accent-ink); width: fit-content; }
.constr-steps { margin: 6px 0 0; padding-left: 26px; columns: 2 220px; column-gap: 28px; }
.constr-steps li { break-inside: avoid; }
.constr-steps li.later { color: var(--text-3); }
.constr-check { margin-top: 10px; }
.constr-sample { margin-top: 8px; }
.constr-sample > summary { cursor: pointer; color: var(--green); font-size: var(--fs-sm); font-weight: 600; width: fit-content; }
.constr-own { margin-top: 8px; font-size: var(--fs-sm); }
.constr-replay { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.constr-replay-head { font-size: var(--fs-sm); margin-bottom: 4px; }
.constr-events { list-style: none; margin: 0 0 8px; padding: 0; max-height: 210px; overflow-y: auto; }
.constr-events button {
  display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: var(--r-sm);
  cursor: pointer; font-size: var(--fs-sm); line-height: 1.4; color: var(--text);
}
.constr-events button:hover { background: var(--field); }
.constr-events button.on { background: var(--accent-soft); }
.constr-events button.miss b { color: var(--coral); }
.constr-events button.v-correct b { color: var(--green); }
.constr-events button.v-wrong b { color: var(--coral); }
.constr-events button.v-form b { color: var(--orange); }
.constr-events .t { color: var(--text-2); font-variant-numeric: tabular-nums; margin-right: 4px; }
.constr-event-text { margin: 4px 0; font-size: var(--fs-sm); }
.constr-slider { display: flex; align-items: center; gap: 12px; font-size: var(--fs-sm); max-width: 460px; }
.constr-slider input { flex: 1; min-height: 44px; accent-color: var(--accent); }
.constr-upto { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.constr-steptext { font-size: var(--fs-sm); color: var(--accent-ink); min-height: 21px; }
@media (max-width: 760px) {
  .constr-wide { grid-column: 1 / -1; }
}
@media (max-width: 640px) {   /* телефон: инструменты — в две колонки (три — третий на всю ширину), действия — ниже рядом */
  .constr-hint { font-size: var(--fs-sm); }   /* подсказка — в одну строку: перенос сдвигал рисунок под пальцем */
  .constr-tools .tool-group, .constr-tools .tool-group.actions { flex: 1 1 100%; margin-left: 0; }
  .constr-tools .tool-group:not(.actions) { display: grid; grid-template-columns: 1fr 1fr; }
  .constr-tools .tool-group:not(.actions) > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .constr-tools .tool-group button { flex: 1 1 0; padding: 0 4px; min-width: 0; font-size: var(--fs-sm); }
  .constr-tools .tool-group:not(.actions) button { padding: 0 6px; font-size: var(--fs-sm); gap: 6px; }
  .constr-tools .tool-ico { width: 18px; height: 18px; }
  .constr-viewing .constr-svg { max-width: calc(70vh * var(--ratio, 1)); margin: 6px auto 0; }
  .constr-steps { columns: 1; }
}
@media (max-width: 360px) {                    /* узкий телефон: «Пересечение» и «Параллельно» со значком — впритык */
  .constr-tools .tool-group:not(.actions) button { font-size: var(--fs-sm); }
}

/* Урок глазами ученика (педагогу): ученик группы, разбор, когда обновлено */
.pupil-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.pupil-pick { display: inline-flex; align-items: center; gap: 6px; }
/* «‹ ученик ›» — заметные кнопки под палец (40 px), как переключатель группы в шапке */
.pupil-pick .btn { width: 40px; height: 40px; padding: 0 0 3px; font-size: var(--fs-2xl); line-height: 1;
  background: var(--accent-soft); color: var(--accent-ink); }
.pupil-pick .btn:hover { background: var(--accent-soft-2); color: var(--accent-ink); }
.pupil-pick .btn:disabled { background: var(--field); color: var(--line-2); }
.pupil-pick select { height: 40px; max-width: 60vw; font: inherit; font-weight: 700; padding: 0 10px; border: 0;
  border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); cursor: pointer; }
.pupil-note { flex-basis: 100%; margin: 0; font-size: var(--fs-sm); }

/* журнал действий (волна 1) */
.grid.audit td { vertical-align: top; white-space: normal; }
.grid.audit .audit-when { white-space: nowrap; }
@media (max-width: 640px) {                    /* телефон: запись журнала — карточкой, без прокрутки вбок */
  .grid.audit thead { display: none; }
  .grid.audit, .grid.audit tbody, .grid.audit tr, .grid.audit td { display: block; width: auto; }
  .grid.audit tr { padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .grid.audit td { padding: 1px 0; border: 0; }
  .grid.audit td:nth-child(3) { font-weight: 700; }
}
/* шапка администратора — 7 разделов: на ноутбуке теснее, не влезло — вторая строка, а не скрытый за краем пункт */
@media (min-width: 761px) {
  .top-in { gap: 12px; }
  .top-nav { flex-wrap: wrap; row-gap: 4px; }
  .top-nav a { padding: 6px 10px; }
  .who .name { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
}
/* таймер и «Как шёл урок» (волна 1) */
.stage { position: relative; display: inline-flex; }
.btn.ghost.stage-btn { font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--field); color: var(--text); padding: 5px 10px; }
.btn.ghost.stage-btn:hover { background: var(--accent-soft); color: var(--accent-ink); }
.btn.ghost.stage-btn.over { color: var(--orange); background: var(--orange-bg); }
.stage-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; display: flex; flex-direction: column;
  min-width: 200px; padding: 6px; background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--r-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.stage-menu button { text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-sm); font: inherit;
  color: var(--text); cursor: pointer; white-space: nowrap; }
.stage-menu button:hover { background: var(--field); }
.stage-menu button.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.stage-menu button[data-stage="end"] { border-top: 1px solid var(--line); border-radius: 0 0 var(--r-sm) var(--r-sm); margin-top: 4px; }
.stage-total { padding: 4px 10px 6px; font-size: var(--fs-xs); color: var(--text-2); }
@media (max-width: 480px) { .stage-btn .st-plan { display: none; } }
.flow { overflow: hidden; }
.flow-grid { display: grid; gap: 6px; }
.flow-row, .flow-scale { display: grid; grid-template-columns: minmax(150px, 26%) minmax(0, 1fr) minmax(250px, 28%); gap: 10px; align-items: center; }
.flow-track { position: relative; height: 18px; background: var(--field); border-radius: var(--r-xs); }
.flow-scale .flow-track { background: none; height: 34px; }
.flow-scale i { position: absolute; bottom: 0; transform: translateX(-50%); font-style: normal; font-size: var(--fs-xs); color: var(--text-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.flow-mark { position: absolute; top: 0; transform: translateX(-50%); font-size: var(--fs-xs); font-weight: 600; color: var(--lilac); white-space: nowrap; }
.flow-track u { position: absolute; top: -3px; bottom: -3px; width: 0; border-left: 1px dashed var(--lilac); }
.flow-bar { position: absolute; top: 3px; bottom: 3px; background: var(--accent); border-radius: var(--r-xs); }
.flow-name { font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-num { font-size: var(--fs-xs); color: var(--text-2); }
.flow-legend { margin: -4px 0 10px; font-size: var(--fs-xs); color: var(--lilac); }
@media (max-width: 700px) {
  .flow-row, .flow-scale { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .flow-scale > span, .flow-mark { display: none; }          /* на узком экране подписи этапов налезают — они в строке «Этапы таймера» */
  .flow-row { margin-bottom: 8px; }
}
/* вопросы у пункта и «застряли» (волна 1) */
.question { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: var(--fs-sm); }
.q-btn { border: 1px dashed var(--line-2); background: none; color: var(--text-2); border-radius: var(--r-pill); padding: 3px 10px;
  font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.q-btn:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); }
.q-form { display: inline-flex; flex-wrap: wrap; gap: 6px; flex: 1 1 260px; }
.q-form .field, .q-write .field { flex: 1 1 200px; min-width: 0; padding: 6px 10px; font-size: var(--fs-sm); }
.q-reply { margin-top: 8px; padding: 8px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); font-size: var(--fs-sm); }
.questions { margin: 10px 0 12px; padding: 10px 12px; background: var(--orange-bg);
  border-radius: var(--r-md); }
.q-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px solid rgba(0, 0, 0, .06); }
.questions > b + .q-row { border-top: 0; }
.q-row > a { font-weight: 600; }
.q-text { flex-basis: 100%; }
.q-actions { display: inline-flex; gap: 6px; margin-left: auto; }
.q-write { display: flex; flex-basis: 100%; gap: 6px; }
.stuck { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.q-stamp { display: inline-block; margin-top: 4px; text-decoration: none; }
@media (max-width: 640px) { .q-actions { margin-left: 0; } }

/* цифры класса (волна 1) — строка под пунктом в режиме разбора; экран видит класс, имён нет */
.review-mode .sm-actions { flex-wrap: wrap; justify-content: flex-end; }
.btn.ghost.numbers-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-ink); }
.class-line { margin-top: 6px; font-size: var(--fs-md); color: var(--text-2); font-variant-numeric: tabular-nums; line-height: 1.5; }
.class-line:empty { display: none; }
.class-line b { color: var(--text); }
.class-line .cl-wrong { color: var(--coral); font-weight: 600; }
/* ДЗ в один клик, своё ДЗ, следующее занятие (волна 2) */
.chip.hw.personal { background: var(--brand-purple-text); color: var(--paper); }
.own-hw { margin: 8px 0 12px; padding: 8px 12px; border: 1px dashed var(--brand-purple-line); border-radius: var(--r-md); }
.own-hw summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.own-hw-note { margin: 6px 0; font-size: var(--fs-sm); }
.own-hw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.own-hw-n { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 5px 8px; border-radius: var(--r-pill);
  border: 1px dashed var(--brand-purple); color: var(--brand-purple-text); font-weight: 600; font-size: var(--fs-sm); cursor: pointer;
  font-variant-numeric: tabular-nums; }
.own-hw-n input { display: none; }
.own-hw-n.on { border-style: solid; background: var(--brand-purple-text); color: var(--paper); }
.own-hw-n.group { border-style: solid; border-color: var(--line-2); background: var(--field); color: var(--text-3); cursor: default; }
.hw-quick h3 { margin: 0 0 8px; }
.hw-quick-rules { display: flex; flex-wrap: wrap; gap: 8px; }
.hw-quick-rules .btn.on { outline: 2px solid var(--brand-purple); outline-offset: 1px; }
.hw-quick-pick { margin-top: 10px; }
.hw-quick-list { display: grid; gap: 4px; margin: 6px 0 10px; }
.hw-quick-n { display: flex; gap: 6px; align-items: baseline; font-size: var(--fs-sm); cursor: pointer; }
.hw-quick-n.done { color: var(--text-2); cursor: default; }
.hw-quick-go { display: flex; flex-wrap: wrap; gap: 8px; }
.next-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.next-when { font-size: var(--fs-lg); }
.next-hw { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; text-decoration: none; color: var(--text); }
/* подсказки на ошибку, качество задач (волна 2) */
.hint-line { margin-top: 6px; padding: 7px 11px; border-radius: var(--r-md); background: var(--lilac-bg); color: var(--text); font-size: var(--fs-sm); }
.hint-line b { color: var(--lilac); font-weight: 600; }
.wrong-ans { white-space: nowrap; }
.hint-add, .hint-chip { border: 1px dashed var(--line-2); background: none; color: var(--text-2); border-radius: var(--r-pill); padding: 1px 7px;
  font: inherit; font-size: var(--fs-xs); cursor: pointer; white-space: normal; text-align: left; }
.hint-add:hover { color: var(--lilac); border-color: var(--lilac); background: var(--lilac-bg); }
.hint-chip { border-style: solid; border-color: transparent; background: var(--lilac-bg); color: var(--lilac); }
.hint-form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 8px; padding: 8px 10px;
  border-radius: var(--r-md); background: var(--field); font-size: var(--fs-sm); }
.hint-form .field { flex: 1 1 240px; min-width: 0; padding: 6px 10px; font-size: var(--fs-sm); }
.hint-form .stamp { flex-basis: 100%; }
.hint-actions { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.hints-card { margin-top: 16px; }
.hint-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.hint-row:first-of-type { border-top: 0; }
.hint-item { font-weight: 700; min-width: 34px; }
.hint-row .hint-actions { margin-left: auto; }
.quality-list { margin: 4px 0 0; padding: 0 4px 0 0; list-style: none; max-height: 420px; overflow-y: auto; }   /* список целиком, длинный — со своей прокруткой */
.quality-list li { display: flex; flex-wrap: wrap; gap: 2px 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.quality-list li:first-child { border-top: 0; }
.quality-list .q-item { font-weight: 700; min-width: 40px; }
.quality-bar { position: relative; flex: 0 0 90px; height: 8px; margin-top: 7px; border-radius: var(--r-pill); background: var(--field); overflow: hidden; }
.quality-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--coral-fill); }
.quality-pick { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 14px; }
.quality-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
@media (max-width: 640px) { .hint-row .hint-actions { margin-left: 0; } .quality-grid { grid-template-columns: minmax(0, 1fr); } }
/* куратор, итоги, риск ухода (волна 2) */
.duty-chip { margin-left: 6px; vertical-align: middle; }
.report .report-line { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 12px; padding: 5px 0;
  border-top: 1px solid var(--line); }
.report .report-line:first-of-type { border-top: 0; }
.report .report-line .chip { margin: 1px 0; }
.report-link { display: inline-block; margin-top: 4px; }
.risk .risk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px solid var(--line); }
.risk .risk-row > a { font-weight: 600; min-width: 160px; }
.risk h3 + .an-sub + .risk-row, .risk h3 + .risk-row { border-top: 0; }
@media (max-width: 640px) {
  .report .report-line { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .risk .risk-row > a { min-width: 0; }
}
/* попробовать без входа (волна 4) */
.try-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 6px 0 18px; }
.card.try-lesson { display: flex; flex-direction: column; gap: 6px; margin: 0; color: var(--text); border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s; }
.card.try-lesson:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 8px 24px rgba(var(--accent-rgb), .12); }
.card.try-lesson b { font-size: var(--fs-lg); }
.try-go { margin-top: 8px; color: var(--accent-ink); font-weight: 700; }
.card.try-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--green-bg); }
.card.try-cta > div { display: flex; flex-direction: column; gap: 4px; flex: 1 1 280px; }
.card.try-cta.big { background: var(--green-bg); }
.steps .step.locked { opacity: .55; cursor: default; }
/* мои ошибки и итог блока (волна 3) */
.mk-entry { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; color: var(--text); text-decoration: none; }
.mk-entry .chip { margin-left: auto; }
.mk-link { font-size: var(--fs-sm); font-weight: 600; }
.mk-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; }
.mk-title .count { font-size: var(--fs-sm); font-weight: 700; color: var(--text-2); background: var(--field); border-radius: var(--r-pill); padding: 1px 9px; }
.mk-head { font-size: var(--fs-sm); color: var(--text-2); margin-bottom: 2px; }
.mk-item { border-top: 0; }
.mk-lesson .mk-item + .mk-item { border-top: 1px solid var(--line); }
.mk-wrong { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 0 8px; font-size: var(--fs-sm); }
.mk-wrong .att { background: var(--field); border-radius: var(--r-pill); padding: 2px 8px; }
.mk-wrong .att .mark { color: var(--coral); font-weight: 700; }
.mk-card.mk-done { opacity: .75; border: 1px solid var(--green-bg); }
.block-card .p-links { margin-bottom: 0; }
.block-page { max-width: 760px; }
.block-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 14px; }
.block-sheet { background: var(--paper); border-radius: var(--radius); padding: 22px 24px; }
.block-sheet h2 { font-size: var(--fs-lg); margin: 20px 0 8px; }
.block-brand { display: flex; align-items: center; gap: 24px; font-size: var(--fs-xs); color: var(--text-2); margin-bottom: 10px; }
.block-brand img { width: auto; height: 32px; flex: none; }   /* логотип сайта целиком, подпись — за охранной зоной */
.block-dates { display: grid; gap: 4px; }
.block-date { display: grid; grid-template-columns: minmax(110px, 26%) minmax(0, 1fr) auto; gap: 10px; padding: 6px 10px;
  border-radius: var(--r-sm); background: var(--field); font-size: var(--fs-md); }
.block-date.ok b { color: var(--green); }
.block-date.miss b { color: var(--coral); }
.block-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.block-nums div { background: var(--field); border-radius: var(--r-sm); padding: 10px 12px; }
.block-nums b { display: block; font-size: var(--fs-2xl); line-height: 1.1; }
.block-nums span { font-size: var(--fs-xs); color: var(--text-2); }
.block-hw { display: grid; grid-template-columns: minmax(0, 1fr) 30% auto; gap: 10px; align-items: center; margin: 4px 0; }
.block-foot { margin-top: 22px; font-size: var(--fs-xs); color: var(--text-2); }
@media (max-width: 640px) {
  .block-sheet { padding: 16px 14px; }
  .block-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .block-date { grid-template-columns: minmax(0, 1fr) auto; }
  .block-date span:nth-child(2) { grid-column: 1 / -1; grid-row: 2; color: var(--text-2); font-size: var(--fs-sm); }
  .block-hw { grid-template-columns: minmax(0, 1fr) auto; }
  .block-hw .bar { grid-column: 1 / -1; }
}
@media print {
  .no-print, .top { display: none !important; }
  body { background: var(--paper); }
  .block-page { max-width: none; padding: 0; }
  .block-sheet { padding: 0; }
  .block-date, .block-nums div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* значки и карта курса (волна 3) */
.badge-shelf .review-head h2 { margin: 0; }
.badge-count { font-size: var(--fs-sm); color: var(--text-2); font-variant-numeric: tabular-nums; }
.badge-note { margin: 4px 0 14px; font-size: var(--fs-sm); }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 18px 10px; }
.badge { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.badge .medal { display: block; margin-bottom: 4px; }
.medal .medal-arc { stroke: var(--accent); }   /* дуга прогресса значка — цветом действий (в badges.js атрибутом стоит старый голубой) */
.badge-title { font-size: var(--fs-sm); line-height: 1.25; color: var(--text); }
.badge-line { font-size: var(--fs-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.badge-line b { color: var(--text); }
.badge.got .badge-line { color: var(--text); }
.badge-goal { font-size: var(--fs-xs); line-height: 1.3; color: var(--text-2); max-width: 150px; }
.badge.locked .badge-title { color: var(--text-2); }
.badge-pips { display: flex; gap: 4px; margin: -2px 0 4px; }
.badge-pips i { width: 6px; height: 6px; border-radius: 50%; }
@media (max-width: 640px) {
  .badge-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 6px; }
  .badge .medal { width: 52px; height: 52px; }
  .badge-goal { font-size: var(--fs-xs); }
}
.badge-toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 12px;
  max-width: min(380px, calc(100vw - 32px)); padding: 12px 14px 12px 12px; background: var(--paper); border: 1px solid var(--line-2);
  border-radius: var(--r-md); box-shadow: 0 10px 30px rgba(40, 60, 80, .16); transition: opacity .25s, transform .25s; }
.badge-toast.out { opacity: 0; transform: translateY(8px); }
.toast-medals { display: flex; flex-shrink: 0; }
.toast-medals .medal + .medal { margin-left: -12px; }
.toast-text { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-sm); min-width: 0; }
.toast-text b { font-size: var(--fs-md); }
.toast-more { font-size: var(--fs-xs); margin-top: 2px; }
.toast-close { margin-left: auto; align-self: flex-start; border: 0; background: none; font-size: var(--fs-xl); line-height: 1; color: var(--text-2);
  cursor: pointer; padding: 2px 4px; }
.toast-close:hover { color: var(--text); }
@media (max-width: 640px) { .badge-toast { left: 16px; right: 16px; bottom: 16px; max-width: none; } }
@media (prefers-reduced-motion: no-preference) {
  .badge-toast .medal { animation: medal-in .5s cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes medal-in { from { transform: scale(.55) rotate(-12deg); opacity: 0; } to { transform: none; opacity: 1; } }
}

.map-sum { padding-bottom: 14px; }
.map-sum-line { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; font-size: var(--fs-md); }
.map-strip { display: flex; gap: 3px; margin: 12px 0 8px; }
.map-strip .seg { flex: 1; height: 10px; border-radius: var(--r-xs); }
.seg { display: inline-block; }
.seg.st-done { background: var(--green-fill); }
.seg.st-open { background: var(--accent); }
.seg.st-soon { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-line); }
.seg.st-plan { background: var(--field); }
.map-strip .seg.current { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--accent); }
.map-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--fs-xs); color: var(--text-2); }
.map-legend .seg { width: 14px; height: 8px; border-radius: var(--r-xs); margin-right: 6px; vertical-align: 1px; }
.map-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.map-mod h2 { font-size: var(--fs-lg); margin: 0 0 12px; }
.map-path { list-style: none; margin: 0; padding: 0; }
.map-topic { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.map-topic:last-child { padding-bottom: 0; }
.map-topic:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px;
  background: var(--line); border-radius: var(--r-pill); }
.map-topic.st-done:not(:last-child)::before { background: var(--green-fill); }
.map-topic.st-plan:not(:last-child)::before { background: repeating-linear-gradient(var(--line-2) 0 4px, transparent 4px 8px); }
.map-node { flex-shrink: 0; width: 36px; height: 36px; }
.map-ring .ring-track { stroke: var(--line); }
.st-plan .map-ring .ring-track { stroke: var(--line-2); stroke-dasharray: 3 3; }
.st-soon .map-ring .ring-track { stroke: var(--accent-line); stroke-dasharray: 4 3; }
.map-ring .ring-arc { stroke: var(--accent); }
.st-done .map-ring .ring-arc { stroke: var(--green-fill); }
.st-done .map-ring .ring-track { fill: var(--green-bg); }
.ring-num { font: 700 13px var(--font, inherit); fill: var(--text); font-family: inherit; }
.st-plan .ring-num { fill: var(--text-3); }
.map-body { min-width: 0; padding-top: 6px; }
.map-title { font-weight: 700; font-size: var(--fs-md); color: var(--text); }
a.map-title { color: var(--accent-ink); text-decoration: none; }
a.map-title:hover { text-decoration: underline; }
.st-plan .map-title { color: var(--text-2); font-weight: 600; }
.map-state { font-size: var(--fs-sm); color: var(--text-2); margin-top: 1px; }
.st-done .map-state { color: var(--green); }
.st-open .map-state { color: var(--text); }
.map-about { font-size: var(--fs-xs); line-height: 1.35; color: var(--text-2); margin-top: 2px; }
.map-topic.current .map-body { background: var(--accent-soft); border-radius: var(--r-sm); padding: 6px 10px; margin: -2px 0 0 -4px; }
.map-topic.current .map-ring .ring-track { stroke: var(--accent-line); }
.chip.map-now { background: var(--accent); color: var(--paper); font-size: var(--fs-xs); padding: 2px 8px; vertical-align: 2px; }
.map-other p { margin: 4px 0; }
@media (max-width: 900px) { .map-grid { grid-template-columns: minmax(0, 1fr); } }
/* запись на открытый урок, менеджер (волна 4) */
.open-pitch { color: var(--text); font-size: var(--fs-md); line-height: 1.5; margin: 8px 0 6px; }
.open-when { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-ink); font-size: var(--fs-md); }
.open-form select.field { appearance: auto; }
.open-youit { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.open-youit legend { width: 100%; margin-bottom: 4px; padding: 0; }
.open-youit label { display: inline-flex; gap: 6px; align-items: center; font-size: var(--fs-md); }
.open-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.open-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: var(--fs-sm); color: var(--text-2); line-height: 1.4; }
.open-consent input { margin-top: 3px; flex: none; }
.open-foot { font-size: var(--fs-sm); margin: 16px 0 0; }
.open-done h2 { margin: 4px 0 8px; color: var(--green); }
.open-account { margin-top: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--field); }
.open-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.open-actions .btn { width: auto; margin: 0; padding: 8px 14px; white-space: nowrap; text-decoration: none; }
@media (max-width: 480px) { .open-actions .btn { flex: 1 1 100%; text-align: center; } }
.open-creds { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: var(--fs-md); }
.open-creds span { color: var(--text-2); }
.open-creds b { font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.duty-chip.manager { background: var(--lilac-bg); color: var(--lilac); }
.signups-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.signup { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(170px, .8fr); gap: 6px 16px; padding: 12px 14px; }
.signup + .signup { border-top: 1px solid var(--line); }
.signup .su-who b { font-size: var(--fs-md); }
.signup .su-meta { font-size: var(--fs-xs); color: var(--text-2); }
.signup textarea.field { width: 100%; min-height: 38px; resize: vertical; font-size: var(--fs-sm); padding: 6px 10px; }
.signup select.field { width: 100%; padding: 6px 8px; }
.signup .saved { font-size: var(--fs-xs); color: var(--text-2); min-height: 16px; }
.signup.st-new { box-shadow: inset 4px 0 0 var(--orange); }
.signup.st-came { box-shadow: inset 4px 0 0 var(--green); }
.signup.st-declined { opacity: .7; }
@media (max-width: 760px) { .signup { grid-template-columns: minmax(0, 1fr); } }
.field.small-select { width: auto; min-width: 120px; padding: 5px 8px; font-size: var(--fs-sm); }
.open-kind { display: inline-flex; margin: 10px 0 2px; }
.open-lesson-card .field[type="datetime-local"] { max-width: 260px; }
.open-lesson-card .stamp { display: block; margin-top: 6px; }
.signups-filters { margin: 12px 0; flex-wrap: wrap; row-gap: 4px; }
/* самостоятельный режим: шаги по очереди (модуль 1) */
.btn.ghost.step-wait { cursor: default; white-space: normal; text-align: right; color: var(--text-2); background: var(--field); }
/* шапка: разделы и вкладки (21.10, вариант «А»): вкладки раздела второй строкой, справа — выбор группы */
.top-nav { flex-wrap: nowrap; }
.sub-bar { border-top: 1px solid var(--line); background: var(--paper); }
.sub-bar-in { max-width: 1080px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; min-height: 44px; }
.sub-tabs { display: flex; gap: 2px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.sub-tabs::-webkit-scrollbar { display: none; }
.sub-tabs a { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 11px 10px 10px; color: var(--text-2);
  font-weight: 600; font-size: var(--fs-sm); white-space: nowrap; transition: color .15s; }
.sub-tabs a:hover { color: var(--accent-ink); text-decoration: none; }
.sub-tabs a.on { color: var(--accent-ink); }
.sub-tabs a.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: var(--r-pill); background: var(--accent); }
.sub-tabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-sm); }
.tab-count { min-width: 18px; padding: 0 6px; border-radius: var(--r-pill); background: var(--coral); color: var(--paper); font-size: var(--fs-xs); font-weight: 700;
  line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.group-pick { display: flex; align-items: center; gap: 8px; margin-left: auto; font-size: var(--fs-sm); white-space: nowrap; }
@media (max-width: 760px) {
  .top-nav { flex-wrap: nowrap; justify-content: space-between; gap: 0; }
  .top-nav a { padding: 6px 9px; font-size: var(--fs-md); }
  .sub-bar-in { padding: 0 10px 0 14px; gap: 8px; min-height: 42px; }
  .sub-tabs { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .sub-tabs a { padding: 10px 8px 9px; }
  .sub-tabs a.on::after { left: 8px; right: 8px; }
  .group-pick .muted { display: none; }
  .group-pick .group-select, .group-pick .group-chip { max-width: 150px; }
}

/* настройки группы и «Все группы» (21.10) */
.settings { padding: 0; }
.set { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 8px 28px; padding: 20px 24px; border-top: 1px solid var(--line); }
.set:first-child { border-top: 0; }
.set[hidden] { display: none; }
.set-label b { display: block; font-size: var(--fs-md); }
.set-label span { display: block; margin-top: 4px; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-2); }
.set-body { min-width: 0; }
.set-body .gtitle { font-size: var(--fs-lg); font-weight: 700; max-width: 440px; }
.set-hint { display: block; margin: 8px 0 0; font-size: var(--fs-xs); line-height: 1.45; color: var(--text-2); }
.set-open { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.set-open .field { max-width: 260px; }
.set-line { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; padding-top: 2px; }
.save-state { font-weight: 600; color: var(--green); }
.save-state.bad { color: var(--coral); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: var(--r-lg); background: var(--field); }
.seg button { border: 0; background: none; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); padding: 7px 14px;
  border-radius: var(--r-pill); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--paper); color: var(--accent-ink); box-shadow: 0 1px 3px rgba(30, 50, 70, .14); }
.seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tchips { display: flex; flex-wrap: wrap; gap: 8px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 10px; border-radius: var(--r-pill); background: var(--field);
  color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; cursor: pointer; user-select: none; transition: background .15s, color .15s; }
.tchip input { position: absolute; opacity: 0; pointer-events: none; }
.tchip svg { opacity: 0; transition: opacity .15s; margin-left: -2px; }
.tchip:hover { color: var(--text); }
.tchip.on { background: var(--accent-soft); color: var(--accent-ink); }
.tchip.on svg { opacity: 1; }
.tchip small { font-size: var(--fs-xs); font-weight: 600; color: var(--lilac); }
.tchip:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.glist { background: var(--paper); border-radius: var(--radius); margin-bottom: 14px; }
.grow { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(0, 1.4fr) minmax(0, 1.3fr) auto auto; gap: 6px 18px; align-items: center;
  padding: 15px 20px; border-top: 1px solid var(--line); color: var(--text); }
.grow:first-child { border-top: 0; }
.grow:hover { text-decoration: none; background: var(--paper-tint); }
.grow:hover .grow-go { color: var(--accent-ink); }
.grow-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.grow-title b { font-size: var(--fs-md); }
.grow-when, .grow-who { font-size: var(--fs-sm); color: var(--text-2); }
.grow-n { font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.grow-go { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); white-space: nowrap; }
.warn-text { color: var(--orange); }
.gnew-row { display: flex; gap: 10px; flex-wrap: wrap; }
.gnew-row .field { flex: 1 1 260px; max-width: 420px; }
@media (max-width: 760px) {
  .set { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 10px; }
  .grow { grid-template-columns: minmax(0, 1fr) auto; padding: 14px 16px; }
  .grow-when, .grow-who { grid-column: 1 / -1; }
  .grow-go { display: none; }
  .seg { display: flex; } .seg button { flex: 1 1 auto; padding: 7px 10px; }
}
/* переключатели-«таблетки» не шире экрана: много групп на телефоне — переносятся (страница «Качество», 21.10) */
.filters { flex-wrap: wrap; max-width: 100%; }
/* расписание в настройках группы: неделя одной строкой, ниже — время отмеченных дней */
.settings .sched { display: flex; flex-wrap: wrap; gap: 6px; }
.settings .sched-row { display: contents; }
.settings .sched .day { order: 0; min-width: 0; padding: 7px 12px; }
.settings .sched .day input { position: absolute; opacity: 0; pointer-events: none; }
.settings .sched .day:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.settings .sched-row .sched-times { order: 1; flex-basis: 100%; }
.settings .sched-row.on .sched-times { display: flex; padding: 8px 0 0; }
.settings .sched-row.on .sched-times ~ .sched-times { padding-top: 0; }
.settings .t-day { display: inline-block; min-width: 26px; font-weight: 700; color: var(--text); }
.sched-times .t-day { display: none; }
.settings .sched-times .t-day { display: inline-block; }
/* «Темы» группы (21.10): таблица уроков группы; на телефоне — карточкой с подписями */
.topics-filter { margin: 0 0 12px; }
.grid.topics td { vertical-align: top; }
.grid.topics .topic-n { color: var(--text-2); font-variant-numeric: tabular-nums; width: 36px; }
.grid.topics .topic-title a:first-child { font-weight: 700; color: var(--text); }
.grid.topics .topic-title a:first-child:hover { color: var(--accent-ink); }
.grid.topics .report-link { display: block; margin-top: 3px; }
.grid.topics .topic-size { color: var(--text-2); font-size: var(--fs-sm); }
.grid.topics td { font-size: var(--fs-sm); }
.grid.topics .topic-title { min-width: 160px; font-size: var(--fs-md); }
.grid.topics th { white-space: normal; line-height: 1.25; vertical-align: bottom; }
.grid.topics td, .grid.topics th { padding-left: 9px; padding-right: 9px; }
.topic-pct { display: inline-flex; align-items: center; white-space: nowrap; }
.grid.topics .chip.warn { margin-top: 3px; }
.grid.topics tr.topic-off td { background: var(--paper-tint); }
.grid.topics tr.topic-off .topic-title a:first-child { color: var(--text-2); font-weight: 600; }
.topic-switch { white-space: nowrap; }
.topic-bar { display: inline-block; width: 48px; height: 6px; margin-right: 8px; vertical-align: middle; border-radius: var(--r-pill);
  background: var(--field); overflow: hidden; }
.topic-bar i { display: block; height: 100%; background: var(--green-fill); border-radius: var(--r-pill); }
@media (max-width: 760px) {
  .grid.topics thead { display: none; }
  .grid.topics, .grid.topics tbody, .grid.topics tr, .grid.topics td { display: block; width: auto; }
  .grid.topics tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .grid.topics td { padding: 3px 0; border: 0; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: baseline; min-width: 0; }
  .grid.topics td .tcell { min-width: 0; }
  .grid.topics tr.topic-off { background: var(--paper-tint); }
  .grid.topics tr.topic-off td { background: none; }
  .grid.topics td::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--text-2); }
  .grid.topics td.topic-n { display: none; }
  .grid.topics td.topic-title { display: block; padding-bottom: 6px; font-size: var(--fs-md); }
  .grid.topics td.topic-title::before { content: none; }
}
/* Ревизия 21.10 (Ч4, Ч5, Ч9). «Темы»: таблица целиком в ширину и без своей прокрутки по высоте — длинное название темы
   и подписи переносятся; номер урока по программе («8.1») — и в списке уроков; урок вне программы — пустая рамка. */
.table-scroll.topics-wrap { max-height: none; }
.grid.topics td { white-space: normal; }
.grid.topics .topic-title .tcell { max-width: 260px; }
.grid.topics .topic-n { white-space: nowrap; }
.grid.topics td.muted { white-space: nowrap; }
.lesson-num { font-variant-numeric: tabular-nums; }
.lesson-card .lesson-num.none { background: none; border: 2px dashed var(--line-2); }
/* ряд вкладок, который не влезает, — тень у края, за которым есть ещё вкладки; без JS: фон «local» едет с вкладками и
   закрывает тень, пока край ряда виден (вкладки урока — на фоне страницы, вкладки раздела — на белом) */
.tabs, .sub-tabs {
  background:
    linear-gradient(90deg, var(--tabs-bg) 40%, transparent) left / 28px 100% no-repeat local,
    linear-gradient(270deg, var(--tabs-bg) 40%, transparent) right / 28px 100% no-repeat local,
    radial-gradient(farthest-side at 0 50%, rgba(64, 65, 66, .22), transparent) left / 12px 100% no-repeat scroll,
    radial-gradient(farthest-side at 100% 50%, rgba(64, 65, 66, .22), transparent) right / 12px 100% no-repeat scroll;
}
.tabs { --tabs-bg: var(--bg); }
.sub-tabs { --tabs-bg: var(--paper); }
@media (max-width: 760px) {
  .sub-tabs { -webkit-mask-image: none; mask-image: none; }
}
/* карта курса: пройденная тема — с галочкой */
.map-check { vertical-align: -2px; margin-right: 4px; }

/* ---------------------------------------------------------------- урок педагога (ревизия 21.10): пять вкладок, одна кнопка,
   «Ответы группы» одной строкой у пункта, режим замечаний, PDF не вкладкой */
.quiet-btn { border: 0; background: none; color: var(--text-2); font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
  padding: 5px 8px; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.quiet-btn:hover { color: var(--accent-ink); background: var(--accent-soft); text-decoration: none; }
.quiet-btn:focus-visible, .more-btn:focus-visible, .fold-line:focus-visible, .pdf-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.quiet-btn[aria-pressed="true"] { color: var(--accent-ink); background: var(--accent-soft); }
.quiet-btn .n { background: var(--orange-bg); color: var(--orange); border-radius: var(--r-pill); padding: 0 5px; font-size: var(--fs-xs); }
.lesson-head .head-actions { align-items: center; }
.pdf-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--accent-ink);
  border: 1px solid var(--line-2); border-radius: var(--r-pill); padding: 4px 10px; background: var(--paper); white-space: nowrap; }
.pdf-link::before { content: ""; width: 10px; height: 13px; border: 1.5px solid currentColor; border-radius: 2px; flex: none;
  background: linear-gradient(currentColor, currentColor) 2px 4px / 5px 1.5px no-repeat, linear-gradient(currentColor, currentColor) 2px 7px / 5px 1.5px no-repeat; }
.pdf-link:hover { text-decoration: none; border-color: var(--accent); }
.pdf-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.steps .step-memo { padding: 7px 14px; color: var(--text-2); }
.ans-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 10px; }
.ans-pick { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); min-width: 0; max-width: 100%; }
.ans-pick select.field { width: auto; min-width: 0; max-width: min(420px, 100%); padding: 6px 10px; font-size: var(--fs-sm); }
.t-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 18px; align-items: start; min-width: 0; }
.t-item .solvers { margin-top: 0; }
.t-item .try { margin-top: 0; }
.t-item .try > summary { font-size: var(--fs-xs); }
@media (min-width: 760px) {
  .t-item { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .t-item .teacher-answer { margin-top: 0; }
  .t-item .try { padding-top: 3px; }
}
.try .task-meta { margin: 6px 0 4px; }
.more-btn { border: 0; background: none; color: var(--accent-ink); font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; padding: 2px 4px; border-radius: var(--r-pill); }
.more-btn:hover { background: var(--accent-soft); }
.who-more { margin-top: 2px; }
.fold-line { display: block; width: 100%; text-align: left; border: 0; border-radius: var(--r-sm); background: var(--green-bg); color: var(--green);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; padding: 7px 12px; margin-top: 8px; cursor: pointer; }
.fold-line:hover { filter: brightness(.97); }
.task.folded > :not(.task-head):not(.fold-line) { display: none; }
@media (max-width: 640px) {
  .lesson-head .head-actions { width: 100%; justify-content: flex-start; }
  .lesson-head .head-actions .btn { margin-left: auto; }
}
/* «Аналитика»: выбор занятия и ученика в одну строку, «Кто что решил» (бывшая «статистика урока»), ссылка на «Качество» */
.range-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.range-top .filters { flex-wrap: wrap; max-width: 100%; }
.matrix-card .legend { margin: 8px 0 10px; }
.matrix-card .table-scroll { margin: 0 -4px; }
.matrix th a { color: var(--text); font-weight: 600; }
.matrix th a:hover { color: var(--accent-ink); }
.matrix .cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.an-more { margin: 4px 2px 18px; font-size: var(--fs-sm); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.an-more a { font-weight: 600; }
.matrix th, .matrix td { padding-top: 5px; padding-bottom: 5px; }
@media (max-width: 640px) { .lesson-head .head-actions .btn { order: -1; margin-left: 0; } }
/* опрос 26.10: плашка «Не сейчас», строка внизу урока, подпись именем, картинка в конце, итоги у педагога */
.survey-banner { gap: 10px 12px; }
.survey-banner .sb-text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.survey-banner .sb-text span { flex: none; }
.survey-strip { max-width: 1080px; margin: -56px auto 32px; padding: 0 20px; display: flex; align-items: center; gap: 8px; }
.survey-strip a { flex: 1; min-width: 0; padding: 10px 14px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.survey-strip a:hover { text-decoration: none; background: var(--accent-soft-2); }
.survey-strip .btn { flex: none; }
.sv-sign { background: var(--field); border-radius: var(--r-md); padding: 12px 14px; margin: 4px 0 16px; }
.sv-sign label { display: flex; gap: 10px; align-items: center; font-weight: 700; cursor: pointer; }
.sv-sign input { width: 20px; height: 20px; accent-color: var(--accent-ink); flex: none; }
.sv-sign p { margin: 6px 0 0 30px; color: var(--text-2); font-size: var(--fs-sm); }
.sv-send { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.sv-teaser { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
.sv-pic-small { width: 64px; height: auto; flex: none; }
.sv-thanks { max-width: 520px; margin: 8px auto 0; text-align: center; background: var(--paper); border-radius: var(--radius); padding: 16px 16px 26px; }
.sv-thanks .sv-pic { width: 100%; max-width: 440px; height: auto; display: block; margin: 0 auto 6px; border-radius: var(--r-md); }
.sv-thanks h1 { margin-bottom: 4px; }
.sv-caption { font-size: var(--fs-lg); font-weight: 800; color: var(--text); margin: 0 0 8px; }
.sv-who { display: block; color: var(--text-2); font-size: var(--fs-xs); margin-top: 2px; }
.sv-pick { gap: 2px; }
.sv-pick button { border: 0; background: none; font: inherit; cursor: pointer; padding: 5px 12px; border-radius: var(--r-pill); color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); }
.sv-pick button.on { background: var(--paper); color: var(--text); }
.sv-list { margin: 4px 0 0; padding-left: 22px; color: var(--text); }
.sv-list li { margin: 3px 0; }
@media (max-width: 760px) {
  .survey-strip { margin: -64px auto 24px; padding: 0 12px; }
  .survey-strip a { padding: 9px 12px; }
}

/* ---- награды занятия и «Звезда урока» (значки 2.0, 22.10.2026; форк awards2) ---- */
.stars-line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 8px 0 4px; font-size: var(--fs-sm); }
.star-box { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.star-box .field.small { min-width: 0; width: 240px; max-width: 100%; padding: 4px 8px; font-size: var(--fs-sm); }
.star-box .verdict { flex-basis: 100%; }
.awards-card .award-list { display: grid; gap: 6px; }
.awards-card .award-row { display: grid; grid-template-columns: 52px minmax(0, max-content) 1fr; gap: 10px; align-items: baseline; }
.awards-card .award-row .t { color: var(--text-2); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .awards-card .award-row { grid-template-columns: 46px 1fr; }
  .awards-card .award-row .muted { grid-column: 2; }
  .star-box .field.small { width: 100%; }
}

/* Значки 2.0 — главная и сводка (22.10.2026, форк ach-home; docs/ЗНАЧКИ-2.md, 5а): ближайшие цели и уровень битами
   вместо полки значков, сводка после занятия вместо плашки, новые значки итога 4 занятий рисунками.
   Рисунки — static/badge-art.js, пиксели: размеры только целым масштабом клетки (48 / 72 px). */
.home-goals h2, .home-session h2 { font-size: var(--fs-lg); line-height: 1.3; margin: 0 0 6px; text-wrap: balance; }
.home-goal-list { list-style: none; margin: 0; padding: 0; }
.home-goal { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 6px 14px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line); }
.home-goal:first-child { border-top: 0; padding-top: 6px; }
.home-goal-art svg, .home-prize-art svg, .block-badge svg { display: block; }
.home-goal-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.home-goal-head { font-size: var(--fs-md); line-height: 1.3; }
.home-goal-detail { font-size: var(--fs-sm); line-height: 1.35; color: var(--text-2); }
.home-goal-meter { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.home-goal-bar { flex: 0 1 240px; height: 6px; border-radius: var(--r-pill); background: var(--field); overflow: hidden; }
.home-goal-bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); min-width: 4px; }
.home-goal-count { font-size: var(--fs-xs); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-goal-go, .home-goal-go:hover { white-space: nowrap; text-decoration: none; }
.home-level { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; padding-top: 12px;
  border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--text-2); }
.home-goals h2 + .home-level { border-top: 0; padding-top: 2px; }
.home-level-bits svg { display: block; }
.home-level-text b { color: var(--text); }
.home-level-link { margin-left: auto; font-weight: 600; }
.home-session { position: relative; overflow: hidden; padding-top: 24px; }
.home-session::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand-strip); }
.home-session h2 { font-size: var(--fs-lg); margin-bottom: 14px; }
.home-nb { white-space: nowrap; }
.home-prizes { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px 12px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.home-prize { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; }
.home-prize-art { height: 90px; margin-bottom: 6px; }   /* у награды под рамкой ленты (72×90): подписи — на одной линии */
.home-prize b { font-size: var(--fs-sm); line-height: 1.25; overflow-wrap: anywhere; }
.home-prize span:not(.home-prize-art) { font-size: var(--fs-xs); line-height: 1.3; color: var(--text-2); overflow-wrap: anywhere; }
.home-session-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.home-session-actions a { font-weight: 600; }
.home-goals a:focus-visible, .home-session a:focus-visible, .home-session button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .home-prize-art { animation: home-prize-in .7s cubic-bezier(.16, 1, .3, 1) both; }
  .home-prize:nth-child(2) .home-prize-art { animation-delay: .07s; }
  .home-prize:nth-child(3) .home-prize-art { animation-delay: .14s; }
  .home-prize:nth-child(n+4) .home-prize-art { animation-delay: .2s; }
}
@keyframes home-prize-in { from { opacity: .35; transform: translateY(6px) scale(.82); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) {
  .home-goal { grid-template-columns: 48px minmax(0, 1fr); }
  .home-goal-go { grid-column: 2; justify-self: start; }
  .home-level-link { margin-left: 0; flex-basis: 100%; }
  .home-session h2 { font-size: var(--fs-lg); }
}
.block-badges { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px 16px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.block-badge { display: flex; align-items: center; gap: 10px; min-width: 0; }
.block-badge > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.block-badge .muted { font-size: var(--fs-xs); }
@media print { .block-badge { break-inside: avoid; } }

/* Значки 2.0 — профиль и группа (22.10.2026, форк ach-profile): /profile, /profile/<ид>, /group, вкладка «Профиль»
   у родителя. Рисунки — badge-art.js, только целым масштабом клетки, поэтому размеры картинок здесь не трогаем. */
.who a.name { color: var(--text-2); font-weight: 600; border-radius: var(--r-pill); padding: 4px 8px; margin: -4px -2px; }
.who a.name:hover, .who a.name.on { color: var(--accent-ink); background: var(--accent-soft); text-decoration: none; }
.who a.name:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
@media (max-width: 760px) {
  .who a.name { display: inline-block; max-width: 128px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
}
@media (max-width: 420px) {   /* у родителя пять вкладок, у ученика четыре раздела: на телефоне — теснее, но в одну строку */
  .top-nav a, .top-nav-parent a { padding: 6px 5px; font-size: var(--fs-sm); }
}
@media (max-width: 340px) {   /* самый узкий телефон (320): полные слова, ещё теснее; меню не шире экрана */
  .top-nav { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav a, .top-nav-parent a { padding: 6px 3px; font-size: var(--fs-xs); letter-spacing: -.1px; }
}
.prof-sub { margin: 0 0 12px; font-size: var(--fs-sm); line-height: 1.45; }
.prof-empty-line { color: var(--text-2); margin: 4px 0; }
.prof-status { font-size: var(--fs-xs); font-weight: 600; color: var(--green); }
.prof-status.bad { color: var(--coral); }
.prof-head svg, .prof-show svg, .prof-grid svg, .prof-awards svg, .grp-grid svg, .grp-awards svg { display: block; }
/* шапка: аватар, имя, группа; справа — уровень битами */
.prof-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px 22px; align-items: center; padding: 22px 24px; }
.prof-ava svg { border-radius: var(--r-sm); }
.prof-name { font-size: var(--fs-2xl); line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.prof-embedded-title { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.prof-group { margin: 4px 0 0; color: var(--text-2); }
.prof-hidden-chip { margin-left: 4px; vertical-align: 1px; }
.prof-hidden-chip:hover { text-decoration: none; color: var(--accent-ink); }
.prof-level { width: 260px; }
.prof-level-n { font-size: var(--fs-md); font-weight: 700; color: var(--text-2); line-height: 1.1; }
.prof-level-n b { font-size: var(--fs-2xl); font-weight: 800; color: var(--text); margin-left: 4px; font-variant-numeric: tabular-nums; }
.prof-bits { width: 234px; margin: 8px 0 0; }
.prof-bits-labels { display: grid; grid-template-columns: repeat(10, 18px); column-gap: 6px; margin-top: 4px; font-size: var(--fs-xs); line-height: 1;
  color: var(--text-2); font-variant-numeric: tabular-nums; }
.prof-bits-labels span { justify-self: center; white-space: nowrap; }
.prof-bits-labels { padding-bottom: 15px; }   /* 13 px: «256 512 1024» в одну строку не влезают — подписи лесенкой */
.prof-bits-labels span:nth-child(even) { transform: translateY(15px); }
.prof-bits-labels span.on { color: var(--gold-text); font-weight: 700; }
.prof-level-next { margin: 8px 0 0; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.prof-level-note { margin: 2px 0 0; font-size: var(--fs-xs); line-height: 1.4; color: var(--text-2); }
.prof-head-hidden { grid-template-columns: auto minmax(0, 1fr); }
.prof-head-hidden .prof-ava svg { filter: grayscale(1); opacity: .45; }
.prof-teacher-note { margin: -4px 4px 14px; font-size: var(--fs-sm); }
.prof-error h1 { margin-bottom: 6px; }
/* витрина: три места */
.prof-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prof-slot { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 3px; min-width: 0; min-height: 168px;
  padding: 18px 10px 14px; border: 0; border-radius: var(--r-md); background: var(--bg); color: inherit; font: inherit; text-align: center; }
.prof-slot svg { margin-bottom: 8px; }
button.prof-slot { cursor: pointer; transition: background .15s; }
button.prof-slot:hover { background: var(--accent-soft); }
button.prof-slot:focus-visible, button.prof-cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prof-slot-title { font-size: var(--fs-md); line-height: 1.25; overflow-wrap: anywhere; }
.prof-slot-level { font-size: var(--fs-xs); color: var(--text-2); }
.prof-slot-remove { margin-top: 4px; font-size: var(--fs-xs); color: var(--text-2); }
button.prof-slot:hover .prof-slot-remove { color: var(--accent-ink); }
.prof-slot.empty { justify-content: center; background: none; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--text-2); font-weight: 600; }
.prof-slot.empty small { font-weight: 400; color: var(--text-2); font-size: var(--fs-xs); }
.prof-show-note { margin: 10px 0 0; font-size: var(--fs-xs); color: var(--text-2); }
/* коллекция: клетка — рисунок слева, подписи справа */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px 12px; }
.prof-cell { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; width: 100%; padding: 10px;
  border: 0; border-radius: var(--r-md); background: none; color: inherit; font: inherit; text-align: left; }
.prof-cell-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding-top: 4px; }
.prof-cell-title { font-size: var(--fs-md); line-height: 1.3; }
.prof-cell.locked .prof-cell-title { color: var(--text-2); }
.prof-cell-when { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.prof-cell-desc { font-size: var(--fs-xs); line-height: 1.35; color: var(--text-2); }
.prof-rare { margin-top: 4px; padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; color: var(--lilac); background: var(--lilac-bg); }
.prof-cell-next { margin-top: 3px; font-size: var(--fs-xs); color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.prof-meter { display: block; width: 100%; max-width: 160px; height: 4px; margin-top: 4px; border-radius: var(--r-pill); background: var(--field); overflow: hidden; }
.prof-meter i { display: block; height: 100%; background: var(--accent); }
button.prof-cell.pick { cursor: pointer; transition: background .15s; }
button.prof-cell.pick:hover { background: var(--bg); }
button.prof-cell.pick.on { background: var(--accent-soft); }
.prof-on-show { margin-top: 5px; padding: 1px 8px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px var(--accent-line); }
.prof-cell.pick.on .prof-on-show { color: var(--paper); background: var(--accent-ink); box-shadow: none; }
.prof-kind { margin: 18px 0 0; font-size: var(--fs-md); }
.prof-kind-about { margin: 0 0 4px; font-size: var(--fs-xs); color: var(--text-2); }
.prof-secrets { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px; }
.prof-secret { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--text-2); font-size: var(--fs-xs); }
.prof-secrets-note { flex: 1 1 200px; margin: 0; font-size: var(--fs-xs); color: var(--text-2); }
/* награды занятий лентой */
.prof-award-list, .prof-award-kinds { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px 16px; }
.prof-award-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.prof-award { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 8px 0; }
.prof-award-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; padding-top: 6px; }
.prof-award-text b { font-size: var(--fs-md); }
.prof-award-when { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.prof-award-about { font-size: var(--fs-xs); color: var(--text-2); }
.prof-award-note { margin-top: 5px; padding: 3px 10px; border-radius: var(--r-sm); font-size: var(--fs-sm); background: var(--gold-bg); color: var(--gold-ink); }
.prof-award-why { margin-top: 5px; font-size: var(--fs-xs); color: var(--lilac); }
.prof-award-kinds { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 6px; }
.prof-award-kinds li { display: flex; align-items: center; gap: 12px; font-size: var(--fs-sm); color: var(--text-2); }
.prof-award-kinds b { color: var(--text); }
/* полоска карты курса из медалей тем */
.prof-map { margin: 0 0 10px; }
.prof-map-line { margin: 0 0 6px; font-size: var(--fs-sm); }
.prof-map-line a { margin-left: 6px; font-weight: 600; white-space: nowrap; }
.prof-map-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; max-width: 640px; }
.prof-map-strip i, .prof-map-legend i { display: block; height: 12px; border-radius: var(--r-xs); background: var(--field); }
.prof-map-strip i.done, .prof-map-legend i.done { background: var(--green); }
.prof-map-strip i.started, .prof-map-legend i.started { background: var(--accent-line); }
.prof-map-strip i.open, .prof-map-legend i.open { background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.prof-map-strip i.closed, .prof-map-legend i.closed { background: var(--field); }
.prof-map-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; font-size: var(--fs-xs); color: var(--text-2); }
.prof-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.prof-map-legend i { width: 12px; height: 10px; }
/* кто видит профиль */
.prof-switch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.prof-switch { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.prof-switch input { -webkit-appearance: none; appearance: none; position: relative; flex: none; width: 44px; height: 26px; margin: 0;
  border-radius: var(--r-pill); background: var(--line-2); cursor: pointer; transition: background .15s; }
.prof-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--paper);
  box-shadow: 0 1px 3px rgba(18, 24, 38, .25); transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
.prof-switch input:checked { background: var(--accent-ink); }
.prof-switch input:checked::after { transform: translateX(18px); }
.prof-switch input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prof-switch input:disabled { opacity: .6; cursor: progress; }
.prof-privacy-now { margin: 12px 0 4px; }
.prof-privacy-more { margin: 0; font-size: var(--fs-sm); }
.prof-link-card p { margin: 0 0 4px; }
@media (max-width: 640px) {
  .prof-head { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
  .prof-name { font-size: var(--fs-xl); }
  .prof-level { grid-column: 1 / -1; width: auto; padding-top: 12px; border-top: 1px solid var(--line); }
  .prof-slots { gap: 8px; }
  .prof-slot { min-height: 132px; padding: 12px 4px 10px; }
  .prof-slot-title { font-size: var(--fs-sm); }
  .prof-slot-level, .prof-slot-remove { font-size: var(--fs-xs); }
  .prof-grid, .prof-award-list { grid-template-columns: minmax(0, 1fr); }
  .prof-cell { gap: 12px; padding: 8px 4px; }
  .prof-cell-text { padding-top: 0; }
  .prof-award { gap: 12px; padding: 6px 0; }
  .prof-award-text { padding-top: 0; }
}
/* «Моя группа»: карточки по алфавиту, внизу — награды последнего занятия */
.grp-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.grp-card { min-width: 0; border-radius: var(--radius); background: var(--paper); }
.grp-link { height: 100%; padding: 16px; border-radius: inherit; color: inherit; transition: box-shadow .15s; }
.grp-link:hover { text-decoration: none; box-shadow: 0 4px 16px rgba(18, 24, 38, .08); }
.grp-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.grp-card.me { box-shadow: inset 0 0 0 2px var(--accent-line); }
.grp-link { display: grid; grid-template-columns: 48px minmax(0, 1fr); grid-template-areas: 'ava who' 'bits bits' 'show show'; gap: 10px 12px;
  align-items: center; align-content: start; }
.grp-ava { grid-area: ava; } .grp-who { grid-area: who; } .grp-bits { grid-area: bits; } .grp-show { grid-area: show; }
.grp-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.grp-top svg, .grp-ava svg { flex: none; border-radius: var(--r-sm); }
.grp-who { display: flex; flex-direction: column; min-width: 0; }
.grp-name { font-size: var(--fs-md); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-me { margin-left: 4px; padding: 1px 7px; border-radius: var(--r-pill); font-size: var(--fs-xs); font-weight: 700; color: var(--accent-ink); background: var(--accent-soft); vertical-align: 1px; }
.grp-level { font-size: var(--fs-xs); color: var(--text-2); }
.grp-off { color: var(--orange); }
.grp-show { display: flex; align-items: center; gap: 8px; min-height: 48px; }
.grp-show-empty { font-size: var(--fs-xs); color: var(--text-2); }
.grp-hidden { padding: 16px; background: var(--field); }
.grp-hidden .grp-top svg { filter: grayscale(1); opacity: .45; }
.grp-hidden .grp-name { color: var(--text-2); }
.grp-lesson { font-size: var(--fs-xs); }
.grp-award-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.grp-award-list a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: var(--r-md); color: inherit; text-align: center; }
.grp-award-list a:hover { background: var(--bg); text-decoration: none; }
.grp-award-list svg { margin-bottom: 6px; }
.grp-award-list b { font-size: var(--fs-md); line-height: 1.25; }
.grp-award-list span { font-size: var(--fs-xs); color: var(--text-2); }
@media (max-width: 640px) {
  .grp-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .grp-link { grid-template-areas: 'ava who' 'ava bits' 'show show'; gap: 4px 12px; padding: 14px; }
  .grp-ava { align-self: start; }
  .grp-bits { align-self: start; }
  .grp-show { margin-top: 8px; }
  .grp-award-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
  .grp-award-list a { padding: 8px 2px; }
  .grp-award-list b { font-size: var(--fs-sm); }
  .grp-award-list span { font-size: var(--fs-xs); }
}

/* Значки 2.0 — «что это» под названием и карточка значка по нажатию (Матвей, 22.10: «понять, что это и как получать») */
button.prof-cell { cursor: pointer; transition: background .15s; }
button.prof-cell:hover { background: var(--bg); }
button.prof-cell.on { background: var(--accent-soft); }
.prof-cell.on .prof-on-show { color: var(--paper); background: var(--accent-ink); box-shadow: none; }
.prof-cell-short { font-size: var(--fs-xs); line-height: 1.3; color: var(--text); }
.prof-cell.locked .prof-cell-short { color: var(--text-2); }
button.prof-secret { border: 0; background: none; padding: 4px; border-radius: var(--r-sm); font: inherit; color: var(--text-2); cursor: pointer; }
button.prof-secret:hover { background: var(--bg); }
button.prof-secret:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.prof-sheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; }
.prof-sheet-wrap[hidden] { display: none; }
.prof-sheet-back { position: absolute; inset: 0; background: rgba(20, 24, 31, .45); }
.prof-sheet { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; margin: 0;
  padding: 22px 22px 18px; box-shadow: 0 18px 48px rgba(20, 24, 31, .28); }
.prof-sheet-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: var(--r-pill); background: none;
  font-size: var(--fs-2xl); line-height: 1; color: var(--text-2); cursor: pointer; }
.prof-sheet-x:hover { background: var(--bg); color: var(--text); }
.prof-sheet-x:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
.prof-sheet-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding-right: 32px; }
.prof-sheet-top h2 { margin: 0; font-size: var(--fs-xl); line-height: 1.2; }
.prof-sheet-short { margin: 2px 0 0; font-weight: 600; color: var(--text); }
.prof-sheet-status { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--text-2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prof-sheet-about { margin: 14px 0 0; line-height: 1.5; }
.prof-sheet h3 { margin: 16px 0 6px; font-size: var(--fs-md); }
.prof-sheet-how { margin: 0; line-height: 1.5; }
.prof-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.prof-step { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 6px 8px; border-radius: var(--r-sm); }
.prof-step > span { display: flex; flex-direction: column; gap: 2px; line-height: 1.35; font-size: var(--fs-sm); }
.prof-step small { font-size: var(--fs-xs); color: var(--text-2); font-variant-numeric: tabular-nums; }
.prof-step.got small { color: var(--green); font-weight: 600; }
.prof-step.now { background: var(--accent-soft); }
.prof-step.now small { color: var(--accent-ink); font-weight: 600; }
.prof-step.ahead { opacity: .72; }
.prof-sheet #prof-sheet-pick { margin-top: 16px; }
.prof-sheet-msg { margin: 6px 0 0; font-size: var(--fs-xs); color: var(--text-2); min-height: 1em; }
body.prof-sheet-open { overflow: hidden; }
@media (max-width: 640px) {                     /* телефон: карточка снизу во всю ширину */
  .prof-sheet-wrap { align-items: flex-end; padding: 0; }
  .prof-sheet { width: 100%; max-height: 88vh; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
  .prof-sheet-top { gap: 12px; }
  .prof-sheet-top h2 { font-size: var(--fs-xl); }
}

/* Ревизия: открытый урок и вход (22.10.2026, Д1–Д3). Страницы для родителей — ближе к youit.school: главная кнопка —
   пилюля под палец, крупный заголовок с цветным словом. Цвета только из :root. Сначала телефон, с 900 px — две колонки. */
.btn.cta {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px;
  border-radius: var(--r-pill); font-size: var(--fs-lg); font-weight: 700; text-align: center; text-decoration: none;
  background: var(--accent-ink);   /* тёмно-синий, как было: белый на нём 6,4:1 (голубой --accent даёт 3:1) */
}
.btn.cta:hover { background: var(--ink); }
.btn.cta:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
/* страницы для родителей — в стиле сайта по Фигме: зелёный вместо голубого, жёлтая главная кнопка (Матвей: «запись
   на открытый стала лучше», 22.10) */
.site-style { --accent: #00874A; --accent-hover: #00733F; --accent-ink: #00733F; --accent-soft: #E3F6EC; --accent-soft-2: #CFEFDD;
  --accent-line: #9FD9B9; --accent-rgb: 0, 135, 74; }
.site-style .btn.cta { background: var(--cta); color: var(--cta-ink); }
.site-style .btn.cta:hover { background: var(--cta-hover); }
.site-style .btn.cta:focus-visible { outline-color: var(--ink); }
.btn.cta:disabled { background: var(--line-2); }

/* второй текст на гостевых страницах темнее общего --text-2 (3,4:1): смесь двух переменных даёт около 6:1 */
.open-land, .login-more, .card.try-cta { --quiet: color-mix(in srgb, var(--text-2) 45%, var(--text)); }
.open-land .muted, .open-land .open-consent, .login-more p, .card.try-cta .muted { color: var(--text-2); color: var(--quiet); }

/* /open: кадр урока, цифры, программа, анкета */
.open-land { max-width: 1000px; margin: 0 auto; padding: 18px 16px 64px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.open-land h1 { font-size: var(--fs-2xl); line-height: 1.18; letter-spacing: -.01em; margin: 0 0 10px; text-wrap: balance; }
.open-accent { color: var(--math-text); }
.open-land .open-pitch { font-size: var(--fs-md); margin: 0 0 14px; max-width: 34em; }
.open-land .open-when { margin: 0; font-size: var(--fs-md); }
.open-jump { display: inline-block; margin-top: 4px; padding: 8px 0; font-weight: 700; }
.open-shot { margin: 0; }
.open-shot img {
  display: block; width: 100%; max-width: 440px; height: auto; border-radius: var(--r-md);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--text) 10%, transparent), 0 14px 32px color-mix(in srgb, var(--text) 14%, transparent);
}
.open-shot figcaption { margin-top: 12px; max-width: 440px; font-size: var(--fs-sm); line-height: 1.45; color: var(--quiet); }
.open-numbers { margin: 0 0 22px; font-size: var(--fs-lg); line-height: 1.45; }
.open-numbers b { font-weight: 800; font-variant-numeric: tabular-nums; }
.open-facts h2 { font-size: var(--fs-xl); margin: 0 0 6px; }
.open-lines { list-style: none; margin: 0; padding: 0; }
.open-lines li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.open-lines li:first-child { border-top: 0; }
.open-lines b { font-weight: 700; }
.open-lines .muted { flex: none; font-size: var(--fs-sm); }
.open-all { margin-top: 4px; }
.open-all summary { cursor: pointer; padding: 8px 0; font-weight: 700; color: var(--accent-ink); }
.open-all p { margin: 12px 0 4px; }
.open-all ol { margin: 0; padding-left: 30px; color: var(--text); }
.open-all li { padding: 1px 0; }
.card.open-form { margin: 0; padding: 22px 20px 20px; border-radius: var(--r-lg); scroll-margin-top: 76px; }
.open-form h2 { font-size: var(--fs-xl); margin: 0 0 2px; }
.open-form-sub { margin: 0 0 4px; font-size: var(--fs-md); color: var(--quiet); }
.open-form .btn.cta { width: 100%; margin-top: 18px; }
@media (min-width: 900px) {
  .open-land { grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "intro form" "shot form" "facts form";
    column-gap: 56px; row-gap: 26px; align-items: start; padding-top: 36px; }
  .open-intro { grid-area: intro; }
  .open-shot { grid-area: shot; }
  .open-facts { grid-area: facts; }
  .open-form { grid-area: form; }
  .open-land h1 { font-size: var(--fs-display); }
  .open-jump { display: none; }
}
@media (min-width: 900px) and (min-height: 780px) {   /* анкета целиком помещается по высоте — держим её на виду */
  .open-form { position: sticky; top: 76px; }
}

/* конец пробного урока: «Назад» и «Дальше» — ссылками, главная кнопка одна — «Записаться» */
.step-nav .step-link { padding: 10px 0; font-weight: 700; }
.step-nav .step-link.back { color: var(--text-2); font-weight: 600; }
.step-nav .step-link.next { margin-left: auto; text-align: right; }
@media (max-width: 480px) {
  .card.try-cta { padding: 18px 16px; }
  .card.try-cta .btn.cta { width: 100%; padding: 10px 14px; }
}

/* вход: куда идти тем, кто ещё не учится */
.login-more { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.login-more p { margin: 0 0 2px; font-size: var(--fs-sm); }
.login-more a { display: block; padding: 8px 0; font-weight: 700; }

/* Ревизия: ученик и родитель */
/* У6 (21.10): «Последнее занятие» у родителя — полоска ответов под фразой вместо графика педагога на главной */
.p-dots-box { min-height: 58px; margin: -4px 0 14px; }          /* место под полоску до прихода ответов — текст не прыгает */
.p-dots { position: relative; height: 24px; margin: 0 7px; }
.p-dots::before { content: ''; position: absolute; left: -7px; right: -7px; top: 50%; height: 2px; margin-top: -1px;
  background: var(--line); border-radius: var(--r-pill); }
.p-dots .p-dot { position: absolute; top: 50%; margin: -6px 0 0 -6px; }
.p-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--green-fill);
  box-shadow: 0 0 0 2px var(--paper); }
.p-dot.bad { background: var(--coral-fill); }
.p-dot.form { background: var(--orange); }
.p-dots-how { margin: 6px 0 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--text-2); }
.p-dot-key { white-space: nowrap; }
.p-dot-key .p-dot { width: 9px; height: 9px; margin-right: 4px; box-shadow: none; vertical-align: 0; }

/* Ревизия: педагог (22.10.2026, О5–О8, Д4). «Обзор» группы: 3 последние темы, строка «Сейчас»; карточка ученика: сводка,
   родители одной строкой, неначатые уроки одной строкой; «Родители» — единственное место, где их заводят.
   Цвета — только переменные :root (общая правка стиля их поменяет). */
.ov-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 12px; font-size: var(--fs-sm); }
.table-scroll.ov-wrap { max-height: none; }
.ov-table th, .ov-table td { vertical-align: top; }
.ov-table thead th { vertical-align: bottom; }
.ov-table th.ov-topic { white-space: normal; min-width: 190px; max-width: 280px; line-height: 1.3; }
.ov-table th.ov-topic > a { color: var(--text); font-weight: 700; }
.ov-table th.ov-topic > a:hover { color: var(--accent-ink); }
.ov-table th.ov-topic .stamp { font-weight: 400; margin-top: 2px; }
.ov-table .ov-cell { white-space: normal; font-variant-numeric: tabular-nums; }
.ov-table .ov-solved b { font-size: var(--fs-md); }
.ov-table .ov-more { display: block; }
.ov-table .ov-hw { display: table; margin-top: 4px; }
.now-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: -6px 0 14px; padding: 10px 14px 10px 16px;
  background: var(--paper); border-radius: var(--radius); }
.now-line.live { background: var(--green-bg); }
.now-dot { display: inline-block; width: 10px; height: 10px; margin-right: 8px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.now-line.live .now-dot { background: var(--green); box-shadow: 0 0 0 0 var(--green-fill); }
.now-text { flex: 1 1 320px; min-width: 0; line-height: 1.45; }
.now-sep { color: var(--text-3); }
.now-warn { color: var(--orange); font-weight: 700; white-space: nowrap; }
.now-bad { color: var(--coral); font-weight: 700; white-space: nowrap; }
.now-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.now-actions .btn.ghost { background: var(--field); color: var(--text); padding: 5px 10px; }
.now-actions .btn.ghost:hover { background: var(--accent-soft); color: var(--accent-ink); }
@media (prefers-reduced-motion: no-preference) {
  .now-line.live .now-dot { animation: now-pulse 2.4s cubic-bezier(.16, 1, .3, 1) infinite; }
  @keyframes now-pulse { 0% { box-shadow: 0 0 0 0 var(--green-fill); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
}
.card-sum { padding-top: 8px; padding-bottom: 8px; }
.card-sum dl { margin: 0; }
.sum-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sum-row:last-child { border-bottom: 0; }
.sum-row dt { color: var(--text-2); font-size: var(--fs-sm); font-weight: 600; padding-top: 1px; }
.sum-row dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: baseline; }
.sum-row .chip { vertical-align: baseline; }
.sum-hw { display: inline-flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-right: 10px; }
.sum-weak { margin: 0; padding-left: 20px; }
.sum-weak li { margin: 0 0 4px; }
.sum-weak li .muted { font-size: var(--fs-sm); }
.card-fold > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-right: 26px; position: relative; }
.card-fold > summary::-webkit-details-marker { display: none; }
.card-fold > summary::after { content: ''; position: absolute; right: 4px; top: .55em; width: 8px; height: 8px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3); transform: rotate(45deg); transition: transform .2s; }
.card-fold[open] > summary::after { transform: rotate(225deg); top: .8em; }
.card-fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: var(--r-xs); }
.card-fold[open] > summary { margin-bottom: 10px; }
.card-parents, .card-unstarted { padding-top: 14px; padding-bottom: 14px; }
.par-line { flex: 1 1 320px; min-width: 0; }
.par-label { font-weight: 700; margin-right: 4px; }
.par-add { font-size: var(--fs-sm); white-space: nowrap; }
.par-table { margin-bottom: 10px; }
.card-unstarted > summary > .muted { flex: 1 1 200px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: var(--fs-sm); }
.unstarted-row { padding: 10px 0 2px; border-top: 1px solid var(--line); }
.unstarted-row .own-hw { margin: 6px 0 8px; }
.parents-table tr.par-focus th, .parents-table tr.par-focus td { background: var(--accent-soft); }
.par-who { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin: 2px 10px 2px 0; }
.par-link h3 { margin-bottom: 10px; }
#link-msg .note-box, #link-msg .error-box { margin-top: 12px; }
/* лента попыток прокручивается внутри себя: скрытая MathML-копия формул KaTeX (position: absolute) без этого торчала
   ниже ленты и удлиняла страницу карточки на тысячи пикселей пустоты */
.feed { position: relative; }
@media (max-width: 760px) {                     /* телефон: «Обзор» без прокрутки вбок — темы списком, ученик — карточкой */
  .ov-table, .ov-table thead, .ov-table tbody, .ov-table tr, .ov-table th, .ov-table td { display: block; width: auto; }
  .ov-table thead th:first-child, .ov-table thead th:last-child { display: none; }
  table.grid.ov-table th, table.grid.ov-table td { position: static; white-space: normal; }
  table.grid.ov-table thead th.ov-topic { max-width: none; padding: 10px 14px; background: var(--bg); color: var(--text-2); }
  .ov-table tbody tr { padding: 10px 14px 8px; border-bottom: 1px solid var(--line); }
  table.grid.ov-table tbody th, table.grid.ov-table tbody td { border: 0; padding: 2px 0; }
  table.grid.ov-table tbody th { padding-bottom: 4px; font-size: var(--fs-md); }
  .ov-table td { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 0 10px; align-items: baseline; }
  .ov-table td::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ov-table td.ov-last { grid-template-columns: auto minmax(0, 1fr); }
  .ov-table .ov-vals { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
  .ov-table .ov-more { display: inline; }
  .ov-table .ov-hw { display: inline-block; margin-top: 0; }
  .sum-row { grid-template-columns: minmax(0, 1fr); }
  .now-actions { width: 100%; }
}

/* ===== Лендинг (22.10.2026) ===== */
/* Гость на «/» (docs/ЛЕНДИНГ.md): в стиле сайта (.site-style, как /open) — первый экран и цены тёмные, как шаблон курса
   в Фигме (1443:4786), главная кнопка жёлтая, секции на белом и сером по очереди. Сначала телефон 375, с 900 px — ноутбук,
   контейнер до 1080 px. Цвета — только переменные; приглушённое — смесью переменных (как --quiet у /open). */
[data-page="landing"] { accent-color: var(--accent); --fs-hero: 48px; --quiet: color-mix(in srgb, var(--text-2) 45%, var(--text));
  --on-dark: var(--paper); --on-dark-2: color-mix(in srgb, var(--paper) 80%, var(--ink));
  --dark-line: color-mix(in srgb, var(--paper) 18%, var(--ink)); --dark-soft: color-mix(in srgb, var(--paper) 10%, var(--ink)); }
.ld-in { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.ld-sec { padding: 40px 0 44px; background: var(--paper); scroll-margin-top: 64px; }
.ld-sec.ld-alt { background: var(--bg); }
.ld-sec h2, .ld-prices h2 { font-size: var(--fs-2xl); line-height: 1.2; margin: 0 0 8px; }
.ld-sub { margin: 0 0 20px; color: var(--quiet); max-width: 44em; }
.ld-sub.ld-big { font-size: var(--fs-lg); line-height: 1.45; color: var(--text); font-weight: 700; }

/* 2. первый экран */
.ld-hero { color: var(--on-dark); padding: 36px 0 40px;
  background: radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--brand-green) 30%, transparent), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, color-mix(in srgb, var(--brand-cyan) 16%, transparent), transparent 70%), var(--ink); }
.ld-hero h1 { font-size: var(--fs-display); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 14px; color: var(--on-dark); max-width: 14em; }
.ld-accent { color: var(--brand-green); }
.ld-lead { font-size: var(--fs-lg); line-height: 1.5; margin: 0 0 18px; max-width: 34em; color: var(--on-dark-2); }
.ld-facts { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ld-facts li { padding: 4px 12px; border-radius: var(--r-pill); background: var(--dark-soft); box-shadow: inset 0 0 0 1px var(--dark-line);
  font-size: var(--fs-sm); font-weight: 700; color: var(--on-dark); }
.ld-when { margin: 0 0 22px; font-weight: 700; color: var(--cta); }
.ld-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
.btn.ld-btn-light { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 24px;
  font-size: var(--fs-lg); background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 2px var(--on-dark); }
.btn.ld-btn-light:hover { background: var(--dark-soft); }
.ld-hero .btn:focus-visible, .ld-hero .btn.cta:focus-visible, .ld-prices .btn.cta:focus-visible { outline-color: var(--on-dark); }
.ld-hero-in { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; }
.ld-formulas { display: none; }               /* украшение первого экрана — только на ноутбуке */

/* 3. две задачи: на телефоне одна под другой, с 640 px — рядом */
.ld-tasks { display: grid; gap: 16px; align-items: start; max-width: 920px; }
.ld-tasks > .muted, .ld-tasks > .ld-task-from { grid-column: 1 / -1; margin: 0; }
.ld-task { margin: 0; padding: 20px; box-shadow: 0 0 0 1px var(--line); }
.ld-task-from { margin: 0 0 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--quiet); }
.ld-task h3 { font-size: var(--fs-lg); margin: 0; }
.ld-item { margin-top: 16px; }
.ld-item .prompt { font-size: var(--fs-xl); margin: 0 0 10px; padding: 0; }
.ld-item .answer-row .field { flex: 1 1 140px; max-width: 220px; }
.ld-item .answer-row.ld-solved { align-items: center; gap: 10px; min-height: 44px; }
.ld-solved .verdict { margin: 0; }
.ld-task-after { max-width: 920px; margin-top: 16px; }
.ld-task-after p { margin: 0 0 12px; }
.ld-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ld-more { font-weight: 700; padding: 10px 0; }

/* 4. зачем курс, 10. кому подойдёт */
.ld-cards { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.ld-card { margin: 0; padding: 20px; }
.ld-card h3 { margin: 0 0 8px; }
.ld-card p { margin: 0; }
.ld-card ul { margin: 0; padding: 0; list-style: none; }
.ld-card li { position: relative; padding: 0 0 6px 26px; }
.ld-yes h3 { color: var(--green); }
.ld-yes li::before { content: '✓'; position: absolute; left: 2px; top: 0; font-weight: 800; color: var(--green); }
.ld-no h3 { color: var(--orange); }
.ld-sec#fit { background: var(--paper); }
.ld-sec#fit .ld-card { background: var(--bg); }

/* 5. как идёт урок */
.ld-split { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); }
.ld-steps { list-style: none; counter-reset: ld-step; margin: 0 0 18px; padding: 0; }
.ld-steps li { counter-increment: ld-step; position: relative; padding: 0 0 18px 52px; min-height: 52px; }
.ld-steps li::before { content: counter(ld-step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  background: var(--math-soft); color: var(--math-text); font: 800 var(--fs-lg)/36px var(--font-head); text-align: center; }
.ld-steps li:not(:last-child)::after { content: ''; position: absolute; left: 17px; top: 42px; bottom: 4px; width: 2px;
  border-radius: var(--r-pill); background: var(--line); }
.ld-min { display: block; font-size: var(--fs-sm); font-weight: 700; color: var(--math-text); }
.ld-steps b { margin-right: 2px; }
.ld-notes { margin: 0; padding-left: 20px; }
.ld-notes li { margin: 0 0 6px; }
.ld-shot { margin: 0; }
.ld-shot img { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: var(--paper);
  box-shadow: 0 2px 4px color-mix(in srgb, var(--text) 8%, transparent), 0 14px 32px color-mix(in srgb, var(--text) 12%, transparent); }
.ld-shot figcaption { margin-top: 12px; font-size: var(--fs-sm); line-height: 1.45; color: var(--quiet); }
.ld-phone { width: 100%; max-width: 300px; margin: 0 auto; }
.ld-phone img { border: 8px solid var(--ink); border-radius: var(--r-lg); }

/* 6. что видит родитель: на телефоне — лентой вбок внутри блока, на ноутбуке — три колонки */
.ld-gallery { display: grid; grid-auto-flow: column; grid-auto-columns: 80%; gap: 14px; align-items: start;
  overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 8px; scroll-padding: 0 16px; }
.ld-gallery .ld-shot { scroll-snap-align: start; }
.ld-gallery figcaption { margin: 0 0 12px; min-height: 4.4em; font-size: var(--fs-sm); color: var(--text); }
.ld-gallery .ld-shot img { max-height: 420px; object-fit: cover; object-position: top; }   /* длинный снимок — верхняя часть */

/* 7. живые цифры */
.ld-numbers { background: var(--math-soft); padding: 28px 0; text-align: center; }
.ld-numbers p { margin: 0; }
#ld-numbers { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 800; line-height: 1.35; color: var(--text); text-wrap: balance; }
#ld-numbers b { color: var(--math-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ld-numbers-how { margin-top: 6px !important; font-size: var(--fs-sm); color: var(--quiet); }

/* 8. программа, 13. вопросы: раскрывающиеся строки */
.ld-program, .ld-faq { max-width: 780px; }
.ld-program details { border-top: 1px solid var(--line); }
.ld-program details:last-child { border-bottom: 1px solid var(--line); }
.ld-program summary, .ld-faq summary { cursor: pointer; list-style: none; position: relative; padding: 14px 34px 14px 0; }
.ld-program summary::-webkit-details-marker, .ld-faq summary::-webkit-details-marker { display: none; }
.ld-program summary::after, .ld-faq summary::after { content: ''; position: absolute; right: 8px; top: 50%; width: 9px; height: 9px;
  margin-top: -7px; border-right: 2px solid var(--quiet); border-bottom: 2px solid var(--quiet); transform: rotate(45deg); transition: transform .2s; }
.ld-program details[open] > summary::after, .ld-faq details[open] > summary::after { transform: rotate(225deg); margin-top: -2px; }
.ld-program summary:focus-visible, .ld-faq summary:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: var(--r-xs); }
.ld-program summary { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ld-program summary span { font-family: var(--font-head); font-weight: 800; font-size: var(--fs-lg); }
.ld-program summary small { flex: none; font-size: var(--fs-sm); font-weight: 600; color: var(--quiet); }
.ld-program ol { margin: 0 0 16px; padding-left: 30px; }
.ld-program li { margin: 0 0 8px; }
.ld-program li span { display: block; font-size: var(--fs-sm); line-height: 1.4; color: var(--quiet); }
.ld-faq details { background: var(--paper); border-radius: var(--r-md); margin: 0 0 10px; padding: 0 18px; }
.ld-faq summary { font-weight: 700; padding-top: 16px; padding-bottom: 16px; }
.ld-faq p { margin: 0 0 16px; }

/* 9. кто ведёт */
.ld-teacher { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.ld-photo { display: block; width: 160px; height: 160px; border-radius: 50%; object-fit: cover; background: var(--line); }
.ld-role { margin: 0 0 12px; font-size: var(--fs-lg); font-weight: 700; }

/* 11. цены */
.ld-prices { background: var(--ink); color: var(--on-dark); padding: 40px 0 44px; scroll-margin-top: 64px; }
.ld-prices h2 { color: var(--on-dark); }
.ld-price-table { width: 100%; max-width: 720px; border-collapse: collapse; margin: 6px 0 20px; }
.ld-price-table th, .ld-price-table td { display: block; padding: 0; text-align: left; }
.ld-price-table tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--dark-line); }
.ld-price-table th { font-weight: 600; color: var(--on-dark-2); margin-bottom: 2px; }
.ld-price-table td { color: var(--on-dark-2); }
.ld-price-table td b { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 800; color: var(--cta); margin-right: 4px; }
.ld-free { margin: 0 0 6px; font-size: var(--fs-lg); line-height: 1.45; }
.ld-offer { margin: 0 0 22px; }
.ld-prices a:not(.btn), .ld-foot a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }

/* 12. отзывы — как на сайте школы (Матвей: «А», 23.10): буква имени в кружке, метка-пилюля, главная фраза крупно,
   текст свёрнут до 4 строк (без фразы — до 6) — «читать полностью →» */
.ld-reviews { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.ld-review { margin: 0; padding: 24px; background: var(--bg); border-radius: 20px; box-shadow: none;
  display: flex; flex-direction: column; gap: 14px; }
.ld-review-head { display: flex; align-items: center; gap: 14px; }
.ld-ava { flex: none; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  font: 800 24px var(--font-head); color: #fff; }               /* декор: имя — рядом текстом */
.ld-ava.parent { background: linear-gradient(135deg, var(--brand-purple), var(--brand-magenta)); }
.ld-ava.student { background: linear-gradient(135deg, #00874A, var(--brand-cyan)); }
.ld-review-head b { display: block; margin-bottom: 4px; font: 700 var(--fs-lg)/1.25 var(--font-head); color: var(--ink); }
.ld-chip { display: inline-block; padding: 2px 12px; border: 1px solid var(--ink); border-radius: var(--r-pill);
  font-size: var(--fs-xs); color: var(--ink); }
.ld-review-quote { margin: 0; font: 800 21px/1.3 var(--font-head); color: var(--ink); }
.ld-review-text { margin: 0; font-size: 15px; line-height: 1.55; color: var(--text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; overflow: hidden; }
.ld-review.has-quote .ld-review-text { -webkit-line-clamp: 4; color: var(--text-2); }
.ld-review.open .ld-review-text { display: block; overflow: visible; }
.ld-review-more { align-self: flex-start; margin: 0; padding: 4px 0; border: 0; background: none; cursor: pointer;
  font: 700 var(--fs-sm) var(--font-text); color: var(--ink); }
.ld-review-more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 14. запись */
.ld-sec.ld-signup { background: var(--accent-soft); }
.ld-signup .open-form { max-width: 520px; margin: 0 auto; }
.landing .open-consent a { white-space: nowrap; }

/* 15. подвал */
.ld-foot { background: var(--ink); color: var(--on-dark-2); padding: 28px 0 32px; font-size: var(--fs-sm); line-height: 1.6; }
.ld-foot p { margin: 0 0 8px; }
.ld-foot b { color: var(--on-dark); }

/* кнопка «Записаться» внизу экрана — только телефон; прячется, когда форма на экране (landing.js) */
.btn.landing-sticky { display: none; }
@media (max-width: 899px) {
  .btn.landing-sticky { display: flex; position: fixed; left: 16px; right: 16px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30;
    box-shadow: 0 8px 24px color-mix(in srgb, var(--ink) 30%, transparent); transition: transform .25s, opacity .25s, visibility .25s; }
  .btn.landing-sticky.away { transform: translateY(160%); opacity: 0; visibility: hidden; pointer-events: none; }
  .ld-foot { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }   /* последняя строка подвала — выше кнопки */
}
@media (prefers-reduced-motion: reduce) { .btn.landing-sticky { transition: none; } }

@media (min-width: 640px) {
  .ld-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .ld-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ld-cards.ld-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-tasks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-reviews { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-price-table tr { display: table-row; padding: 0; }
  .ld-price-table th, .ld-price-table td { display: table-cell; padding: 16px 0; border-bottom: 1px solid var(--dark-line); vertical-align: baseline; }
  .ld-price-table th { padding-right: 24px; }
  .ld-price-table td { text-align: right; white-space: nowrap; }
}
@media (min-width: 900px) {
  .ld-sec, .ld-prices { padding: 64px 0 68px; }
  .ld-sec h2, .ld-prices h2 { font-size: var(--fs-display); }
  .ld-hero { padding: 76px 0 84px; }
  .ld-hero h1 { font-size: var(--fs-hero); }
  .ld-hero-in { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 40px; }
  .ld-formulas { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; margin: 0; padding: 0; list-style: none; }
  .ld-formulas li { padding: 12px 20px; border-radius: var(--r-md); background: var(--dark-soft); box-shadow: inset 0 0 0 1px var(--dark-line);
    font: 800 var(--fs-lg)/1.2 var(--font-head); color: var(--on-dark); white-space: nowrap; }
  .ld-formulas li:nth-child(2n) { margin-left: 40px; }
  .ld-formulas li:nth-child(3) { color: var(--brand-green); }
  .ld-formulas li:nth-child(5) { color: var(--cta); }
  .ld-lead { font-size: var(--fs-xl); }
  .ld-split { grid-template-columns: minmax(0, 1fr) 320px; column-gap: 64px; align-items: start; }
  .ld-phone { margin: 0; }
  .ld-gallery { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-columns: auto; gap: 24px;
    overflow: visible; margin: 0; padding: 0; }
  .ld-teacher { grid-template-columns: 240px minmax(0, 1fr); column-gap: 48px; align-items: center; }
  .ld-photo { width: 240px; height: 240px; border-radius: var(--r-lg); }
  .ld-reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Несколько курсов (24.10.2026, docs/КУРСЫ.md, задача 3). «Темы»: стрелки ↑↓ слева в строке — порядок уроков группы
   (сохраняется сразу); «Как в курсе» — справа над таблицей, когда порядок свой; передвинутая строка коротко подсвечена.
   «Все группы»: название курса под названием группы; новая группа — название и курс рядом. */
.topics-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.topics-order { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: var(--fs-sm); }
.grid.topics th.topic-move, .grid.topics td.topic-move { width: 1%; padding-right: 2px; white-space: nowrap; }
.topic-arrows { display: inline-flex; gap: 4px; }
.topic-arrow, .topic-arrow-gap { width: 32px; height: 32px; flex: none; }
.topic-arrow { display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: var(--r-sm); cursor: pointer;
  background: var(--field); color: var(--text); transition: background .15s, color .15s; }
.topic-arrow:hover { background: var(--accent-soft-2); color: var(--accent-ink); }
.topic-arrow:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 1px; }
.topic-arrow:active { background: var(--accent-line); }
.grid.topics tr.topic-moved td { animation: topic-moved 1.2s ease-out; }
@keyframes topic-moved { from { background: var(--accent-soft-2); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .grid.topics tr.topic-moved td { animation: none; } }
@media (max-width: 760px) {
  /* карточка темы: стрелки — в правом верхнем углу, название — левее них */
  .grid.topics tr { position: relative; }
  .grid.topics td.topic-move { position: absolute; top: 8px; right: 10px; display: block; padding: 0; width: auto; }
  .grid.topics td.topic-move::before { content: none; }
  .grid.topics.topics-ordered td.topic-title { padding-right: 92px; min-height: 46px; }
  .topic-arrow, .topic-arrow-gap { width: 38px; height: 38px; }
  .grid.topics tr.topic-moved { animation: topic-moved 1.2s ease-out; }
  .grid.topics tr.topic-moved td { animation: none; }
}
.grow-course { flex-basis: 100%; font-size: var(--fs-sm); color: var(--text-2); }
.gnew h3 { margin: 0 0 2px; }
.gnew-row { align-items: flex-end; }
.gnew-field { flex: 1 1 240px; max-width: 360px; min-width: 0; }
.gnew-row .gnew-field .field { max-width: none; }
.gnew-field label.lbl { margin-top: 8px; }
.gnew-course { flex: 1 1 300px; max-width: 340px; }

/* Номера уроков у родителя (24.10.2026): в «Уроки, открытые группе» — тот же номер, что у ребёнка на карточке урока,
   маленьким зелёным квадратиком перед названием. */
.p-num { display: inline-block; min-width: 26px; padding: 0 6px; margin-right: 4px; border-radius: var(--r-sm);
  background: var(--math-soft); color: var(--math-text); font: 800 var(--fs-sm)/24px var(--font-head); text-align: center;
  font-variant-numeric: tabular-nums; }

/* Перетаскивание в «Темах» (решение Матвея 24.10.2026), в дополнение к стрелкам: ручка «⠿» слева от стрелок — за неё
   тянут мышью или пальцем (touch-action: none — страница под пальцем не прокручивается); строка приподнята и идёт за
   указателем, остальные расступаются, место — синяя пунктирная рамка (position: fixed, под строкой и под шапкой). */
.topic-grip { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; padding: 0; border: 0;
  border-radius: var(--r-sm); background: transparent; color: var(--text-2); cursor: grab; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: background .15s, color .15s; }
.topic-grip:hover { background: var(--field); color: var(--text); }
.topics-dragging, .topics-dragging * { cursor: grabbing !important; -webkit-user-select: none; user-select: none; }
.topics-dragging .grid.topics tbody tr:not(.topic-dragging) { transition: transform .15s ease; }
.grid.topics tr.topic-dragging { position: relative; z-index: 4; will-change: transform;
  box-shadow: 0 12px 28px rgba(28, 28, 30, .18), 0 0 0 2px var(--accent-line); }
.grid.topics tr.topic-dragging td { background: var(--paper); animation: none; }
.grid.topics tr.topic-dragging .topic-grip { background: var(--accent-soft-2); color: var(--accent-ink); }
.topic-drop-slot { position: fixed; z-index: 3; box-sizing: border-box; border: 2px dashed var(--accent); border-radius: var(--r-sm);
  background: rgba(var(--accent-rgb), .08); pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .topics-dragging .grid.topics tbody tr:not(.topic-dragging) { transition: none; } }
@media (max-width: 760px) {
  .topic-grip { width: 38px; height: 38px; }
  .grid.topics.topics-ordered td.topic-title { padding-right: 132px; }
  .grid.topics tr.topic-dragging { background: var(--paper); border-radius: var(--r-md); animation: none; }
}

/* Уроки Л2Ш (24.10.2026). Номер из одного пункта (пробник, устный этап) — без буквы «а)»: условие на всю ширину
   карточки у ученика, педагога, родителя и в разборе. Пункт «проверяет педагог» (manual) — без поля ввода: вместо
   него спокойная плашка, что решение смотрит педагог. */
.task.single .item { grid-template-columns: minmax(0, 1fr); }
.task.single .item > .letter { display: none; }
.manual-note { margin-top: 8px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--field); color: var(--text-2);
  font-size: var(--fs-sm); line-height: 1.4; }
