/* EDINF — оформление публичной части.
 *
 * Палитра привязана к иллюстрациям: их фон ровно #F4F6F9, поэтому картинки
 * садятся на страницу без шва. Мотив раздела ИИ — язык самого курса: карточки
 * данных, часть размеченная, часть нет. Никаких светящихся мозгов и роботов.
 */

/* --- токены ------------------------------------------------------------- */
:root {
  --paper: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #12182a;
  --ink-2: #2b3549;
  --muted: #5c667a;
  --faint: #8a93a5;
  --line: #dce1ea;
  --line-strong: #c3cbd8;
  --accent: #1b3fae;
  --accent-ink: #17368f;
  --accent-soft: #e8edfb;
  --ochre: #b5751a;
  --ochre-soft: #fbf2e2;
  --ok: #1a6b48;
  --ok-soft: #e4f2eb;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(18, 24, 42, .05);
  --shadow: 0 1px 2px rgba(18, 24, 42, .05), 0 12px 28px -20px rgba(18, 24, 42, .5);
  --wrap: 1120px;

  --font: "IBM Plex Sans", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;

  /* мотив: карточки данных, размеченные и нет */
  --grid-motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Cg fill='none' stroke='%23c9d2e2' stroke-width='1'%3E%3Crect x='8' y='8' width='18' height='23' rx='3'/%3E%3Crect x='44' y='38' width='18' height='23' rx='3'/%3E%3C/g%3E%3Crect x='11' y='11' width='6' height='6' rx='1.5' fill='%231b3fae' opacity='.18'/%3E%3Crect x='47' y='41' width='6' height='6' rx='1.5' fill='%23b5751a' opacity='.18'/%3E%3C/svg%3E");
}

/* --- основа ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.35em; }
li { margin-bottom: .35em; }
li::marker { color: var(--faint); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: 14.5px; }

/* --- шапка и подвал ----------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 62px;
}
.brand {
  font-weight: 600; font-size: 19px; letter-spacing: .06em;
  color: var(--ink); text-decoration: none;
}
.brand:hover { text-decoration: none; color: var(--accent-ink); }
.brand span { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--ink-2); }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 32px 0 48px;
  margin-top: 72px;
  font-size: 14.5px;
  color: var(--muted);
}
.site-footer__cols { display: flex; flex-wrap: wrap; gap: 12px 48px; }

/* --- секции ------------------------------------------------------------- */
.section { padding: 56px 0; }
.section--tight { padding: 36px 0; }
.section--tint { background: var(--surface); border-block: 1px solid var(--line); }
.section__head { margin-bottom: 28px; }
.section__eyebrow {
  font-size: 12.5px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 10px;
}
.section__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(22px, 3vw, 30px); line-height: 1.22; letter-spacing: -.01em;
}
.section__lead { margin-top: 10px; color: var(--ink-2); max-width: 68ch; }

/* --- герой -------------------------------------------------------------- */
.hero { padding: 64px 0 40px; }
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 5vw, 50px); line-height: 1.08; letter-spacing: -.02em;
  max-width: 19ch;
}
.hero__lead {
  margin-top: 18px; font-size: clamp(17px, 2vw, 19.5px); color: var(--ink-2);
  max-width: 60ch;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero--section {
  position: relative;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 52px 0 44px;
  overflow: hidden;
}
.hero--section::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--grid-motif);
  opacity: .5;
  -webkit-mask-image: linear-gradient(105deg, transparent 42%, #000 100%);
  mask-image: linear-gradient(105deg, transparent 42%, #000 100%);
  pointer-events: none;
}
.hero--section > .wrap { position: relative; }

.hero-figure { margin-top: 34px; border-radius: var(--radius); overflow: hidden; }
.hero-figure img { width: 100%; }

/* --- кнопки ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm);
  font-size: 15.5px; font-weight: 500; line-height: 1.2;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--ink-2); }

/* --- цифры -------------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  margin-top: 34px;
}
.stat { background: var(--surface); padding: 18px 20px; }
.stat__value {
  font-family: var(--font-display); font-size: 27px; font-weight: 600;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.stat__label { margin-top: 4px; font-size: 14px; color: var(--muted); }
.stat__note { margin-top: 6px; font-size: 13px; color: var(--faint); }

/* --- карточки ----------------------------------------------------------- */
.cards { display: grid; gap: 20px; }
.cards--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cards--2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: hidden; display: flex; flex-direction: column;
}
.card__media { background: var(--paper); border-bottom: 1px solid var(--line); }
.card__media img { width: 100%; }
.card__body { padding: 18px 20px 20px; flex: 1; }
.card__title { font-size: 17.5px; font-weight: 600; margin-bottom: 6px; }
.card__text { color: var(--muted); font-size: 15px; }

.feature-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.feature {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
}
.feature__title { font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
.feature__text { color: var(--muted); font-size: 14.5px; }

/* --- метки -------------------------------------------------------------- */
.tag {
  display: inline-block; padding: 3px 9px; border-radius: 100px;
  font-size: 12.5px; font-weight: 500; white-space: nowrap;
}
.tag--ready { background: var(--ok-soft); color: var(--ok); }
.tag--soon { background: var(--surface-2); color: var(--muted); }
.tag--mode { background: var(--accent-soft); color: var(--accent-ink); }
.tag--ai { background: var(--ochre-soft); color: var(--ochre); }

/* --- ход занятия -------------------------------------------------------- */
.timeline { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tl-row {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: baseline;
  padding: 14px 20px; border-bottom: 1px solid var(--line);
}
.tl-row:last-child { border-bottom: 0; }
.tl-time { color: var(--accent-ink); font-variant-numeric: tabular-nums; font-size: 14.5px; }
.tl-title { font-weight: 500; }
.tl-note { display: block; color: var(--muted); font-size: 14.5px; font-weight: 400; margin-top: 2px; }

/* --- витрина урока на главной -------------------------------------------
   Учителю нужно увидеть не описание урока, а сами экраны: свой, ученика и
   класса. Поэтому разметка повторяет настоящий интерфейс, а не рисует его
   картинкой (ADR-017). */
.walk { display: flex; flex-direction: column; gap: 4px; }
.walk-step { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 20px;
  padding: 24px 0; border-top: 1px solid var(--line); }
.walk-step:first-child { border-top: 0; }
.walk-step__aside { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.walk-step__time { font-size: 14px; color: var(--accent-ink);
  font-variant-numeric: tabular-nums; }
.walk-step__title { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.walk-say { font-size: 15.5px; margin-bottom: 8px; }

.lanes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px; align-items: start; }
.lane__label { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.lane__note { margin-top: 10px; font-size: 13.5px; color: var(--muted);
  display: flex; align-items: flex-start; gap: 6px; }

/* три экрана урока */
.screens { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px;
  margin-bottom: 30px; }
.screens__title { font-size: 17px; font-weight: 600; margin: 15px 0 6px;
  display: flex; align-items: center; gap: 7px; }
.screens__text { font-size: 15px; color: var(--ink-2); }

/* корпус устройства: рамка вокруг настоящего интерфейса */
.device { border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.device__bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); }
.device__dots { flex: 0 0 auto; width: 34px; height: 8px; background:
  radial-gradient(circle 4px at 4px 4px, var(--line-strong) 98%, transparent 0)
  0 0 / 13px 8px repeat-x; }
.device__where { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); }
.device__screen { padding: 15px 16px 16px; }
.device .progress-table { margin-top: 12px; }

/* экран класса: его читают с задней парты, поэтому он тёмный и крупный */
.device--board .device__screen { background: var(--ink); color: var(--paper); }
.board__title { font-family: var(--font-display); font-size: 17px; margin-bottom: 12px; }
.board__bar { position: relative; padding: 7px 11px; margin-bottom: 8px; font-size: 14px;
  border-radius: var(--radius-sm); background: rgba(244, 246, 249, .08); overflow: hidden; }
.board__fill { position: absolute; inset: 0 auto 0 0; background: rgba(244, 246, 249, .16); }
.board__cap { position: relative; }

/* панель учителя в миниатюре */
.mini-seg { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px;
  margin-bottom: 8px; font-size: 14px; }
.mini-seg--open { border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
  background: var(--ok-soft); }
.mini-btn { background: var(--accent); color: #fff; border-radius: var(--radius-sm);
  padding: 4px 10px; font-size: 12.5px; white-space: nowrap; }

/* экран ученика в миниатюре: те же элементы, что видит ребёнок */
.mock__prompt { font-weight: 500; margin-bottom: 10px; }
.mock__item { display: flex; gap: 9px; font-size: 14.5px; padding: 3px 0; }
.mock__num { color: var(--faint); }
.mock__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.mock__row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 10px; }
.mock__text { font-size: 14.5px; color: var(--ink-2); }
.mock__foot { margin-top: 13px; padding-top: 10px; border-top: 1px dashed var(--line);
  font-size: 13px; color: var(--muted); }
.mock-opt, .mock-choice { display: inline-block; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 6px 12px; font-size: 14.5px; }
.mock-choice { display: block; margin-bottom: 6px; }
.mock-opt--picked { border-color: var(--accent); background: var(--accent-soft);
  color: var(--accent-ink); }
.mock-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.mock-btn--primary { background: var(--accent); color: #fff; }
.mock-link { font-size: 14px; color: var(--accent-ink); }
.mock-label { font-size: 14px; font-weight: 500; margin: 14px 0 6px; }
.mock-input { border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); padding: 10px 12px; font-size: 15px; }
.mock-input--empty { color: var(--faint); }
.caret { display: inline-block; width: 1.5px; height: 1.05em; margin-left: 2px;
  vertical-align: -2px; background: var(--accent); animation: caret 1.1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }

.mock-ai__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  justify-content: space-between; margin-bottom: 10px; }
.mock-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: 100px; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 13px; font-weight: 600; }
.mock-tries { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  color: var(--muted); }

.mock-peer { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; }
.mock-peer__num { font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; }
.mock-peer__text { border-left: 3px solid var(--line-strong); padding-left: 12px;
  margin-bottom: 12px; font-size: 14.5px; }

/* ответ модели. У него своя рамка, своя подпись и своё появление: и ребёнок на
   уроке, и учитель на витрине должны видеть, что эти слова написала нейросеть,
   а не платформа. Печать «вживую» запускается, когда шаг попадает в кадр. */
.reply { --wait: 1.1s; position: relative; margin: 14px 0 10px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--radius-sm); background: var(--surface-2); }
.reply::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--ochre) 65%, var(--accent)); }
.reply__from { display: flex; align-items: center; gap: 6px; padding: 10px 14px 0;
  font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink); }
.reply__body { position: relative; padding: 7px 14px 13px; min-height: 42px; }
.reply__text { position: relative; overflow: hidden; font-size: 15px; }
.reply__wait { position: absolute; left: 14px; top: 12px; display: flex; gap: 5px;
  opacity: 0; visibility: hidden; }
.reply__wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  opacity: .3; }

.walk-step.is-live .reply__wait { animation: reply-wait .3s var(--wait) both; }
.walk-step.is-live .reply__wait i { animation: reply-pulse 1s infinite; }
.walk-step.is-live .reply__wait i:nth-child(2) { animation-delay: .15s; }
.walk-step.is-live .reply__wait i:nth-child(3) { animation-delay: .3s; }
.walk-step.is-live .reply__text { animation: reply-in .45s var(--wait) both; }
/* Отблеск идёт фоном, а не сдвигом слоя: сдвинутый слой оставил бы внутри
   абзаца лишнюю прокрутку шириной в два экрана. */
.walk-step.is-live .reply__text::after { content: ""; position: absolute; inset: 0;
  animation: reply-sweep 1.1s var(--wait) both; background-size: 300% 100%;
  background-image: linear-gradient(100deg, transparent 34%,
    color-mix(in srgb, var(--accent) 16%, transparent) 50%, transparent 66%); }

@keyframes reply-wait { from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; } }
@keyframes reply-pulse { 0%, 100% { opacity: .3; } 50% { opacity: .9; } }
@keyframes reply-in { from { opacity: 0; transform: translateY(3px); } }
@keyframes reply-sweep { from { background-position: -100% 0; }
  to { background-position: 100% 0; } }

@media (max-width: 980px) {
  .screens { grid-template-columns: 1fr; gap: 26px; }
  .lanes { grid-template-columns: 1fr; gap: 18px; }
}

@media (max-width: 760px) {
  .walk-step { grid-template-columns: 1fr; gap: 10px; }
  .walk-step__aside { flex-direction: row; align-items: center; gap: 12px; }
}

/* --- КТП ---------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip {
  padding: 7px 14px; border-radius: 100px; font-size: 14.5px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.chip:hover { text-decoration: none; border-color: var(--ink-2); }
.chip--on { background: var(--accent); border-color: var(--accent); color: #fff; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.plan { border-collapse: collapse; width: 100%; font-size: 15px; min-width: 560px; }
table.plan th, table.plan td { padding: 11px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.plan th { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface-2); }
table.plan tr:last-child td { border-bottom: 0; }
table.plan td.num { width: 56px; color: var(--faint); font-variant-numeric: tabular-nums; }
table.plan .module-row td { background: var(--paper); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 500; }

/* Готовая тема в КТП — это и есть карточка занятия: описание и ссылка стоят
   прямо в строке, чтобы список «что можно провести» не жил вторым списком. */
table.plan tr.is-ready td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.plan-lesson__title { font-weight: 600; }
.plan-lesson { margin-top: 8px; max-width: 74ch; font-size: 14.5px; color: var(--ink-2); }
.plan-lesson__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 10px; font-size: 14.5px; }

/* --- заметка ------------------------------------------------------------ */
.note {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 15px;
}
.note--plain { border-left-color: var(--line-strong); background: var(--surface); border: 1px solid var(--line); border-left-width: 3px; }

/* --- страница занятия --------------------------------------------------- */
.lesson-head { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: start; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.breadcrumb { font-size: 14.5px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }

.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; }

/* --- иконки -------------------------------------------------------------- */
.icon { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
  stroke-linejoin: round; vertical-align: -0.18em; flex: 0 0 auto; }
.icon--fill { fill: currentColor; stroke: none; }
.icon-row { display: inline-flex; align-items: center; gap: 8px; }
/* Ссылка без подписи: у администратора в шапке и так тесно. */
.icon-link { display: inline-flex; color: var(--muted); padding: 4px; }
.icon-link:hover { color: var(--ink); }

/* --- подсказки ----------------------------------------------------------- */
.tip {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px;
  font-size: 14.5px; color: var(--ink-2);
}
.tip__icon { color: var(--accent); flex: 0 0 auto; margin-top: 1px; }
.tip__body { flex: 1; }
.tip__close {
  background: none; border: 0; font-size: 20px; line-height: 1; cursor: pointer;
  color: var(--muted); padding: 0 2px;
}
.tip__close:hover { color: var(--ink); }
.logout-form { display: inline; }
.row-actions { display: flex; gap: 14px; }
.link-button--quiet { color: var(--muted); }
.link-button--quiet:hover { color: var(--stop); }
.group-settings summary { cursor: pointer; }
.group-settings .form-card { margin-top: 10px; display: flex; flex-wrap: wrap;
  gap: 8px; align-items: flex-end; }
.group-settings .field { margin-bottom: 0; min-width: 180px; }

/* --- проведение занятия ------------------------------------------------- */
.run-head { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between;
  align-items: flex-start; margin-bottom: 26px; }
.run-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
/* Кнопка без объяснения заставляет учителя проверять её на живом уроке. */
.run-action { display: flex; flex-direction: column; align-items: flex-start;
  gap: 8px; max-width: 260px; }
.run-action__note { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.run-action__keep { display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); }
.run-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px;
  align-items: start; }
.run-side { position: sticky; top: 84px; }

.segment-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.segment-card--current { border-color: var(--accent); box-shadow: var(--shadow); }
.segment-card__head { display: flex; gap: 16px; justify-content: space-between;
  align-items: flex-start; }
.segment-card__title { font-size: 17.5px; font-weight: 600; }
.guide { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 15px; }
.guide p { margin-bottom: 8px; }

.panel { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; }
.panel__title { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.progress-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.progress-table td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.progress-table td.num { text-align: right; font-variant-numeric: tabular-nums;
  color: var(--muted); }
.progress-table tr.is-stuck td { color: var(--ochre); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--line-strong); }
.dot--on { background: var(--ok); }
.btn--sm { padding: 7px 14px; font-size: 14px; }

.card--link { transition: border-color .15s ease, box-shadow .15s ease; }
.card--link:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card--link .card__body { position: relative; }
.card__cover-link { text-decoration: none; }
.card__cover-link::after { content: ""; position: absolute; inset: 0; }
.card--link:hover .card__cover-link { text-decoration: underline; }
.card__go { margin-top: 14px; font-size: 14.5px; color: var(--accent-ink); font-weight: 500; }

.next-lesson {
  display: flex; flex-wrap: wrap; gap: 18px 26px; align-items: center;
  justify-content: space-between;
  background: var(--surface); border: 1px solid var(--accent);
  border-left-width: 4px; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.next-lesson__title { font-size: 19px; font-weight: 600; margin: 4px 0 4px; }
.next-lesson__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.card-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.preview-blocks { margin-top: 12px; font-size: 14.5px; }
.preview-blocks summary { cursor: pointer; color: var(--accent-ink); }
.preview-blocks ol { margin-top: 10px; }
.preview-blocks li { margin-bottom: 14px; }
.preview-blocks__kind { font-size: 13px; color: var(--accent-ink); margin-bottom: 3px; }
.preview-blocks__ai { border-left: 3px solid var(--ochre); padding-left: 12px;
  margin-left: -12px; }
.preview-blocks__ai .preview-blocks__kind { color: var(--ochre); }

.panel + .panel, .panel + .panel--feed { margin-top: 14px; }
.panel--feed summary { cursor: pointer; list-style: none; display: flex;
  align-items: center; gap: 8px; }
.panel--feed summary::-webkit-details-marker { display: none; }
.badge { margin-left: auto; background: var(--accent); color: #fff;
  border-radius: 100px; padding: 1px 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.work { border-top: 1px solid var(--line); padding: 10px 0; font-size: 14px; }
.work:first-of-type { border-top: 0; }
.work--on { opacity: .6; }
.work__meta { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.work__prompt { color: var(--accent-ink); margin-bottom: 4px; }
.work__text { margin-bottom: 6px; }
.work__thumb { width: 100%; border-radius: var(--radius-sm); margin-bottom: 6px; }
.ai-mark { color: var(--ochre); }

/* --- экран ученика ------------------------------------------------------- */
.lesson-flow { max-width: 720px; }
.segment { margin-bottom: 34px; }
.segment__title { font-family: var(--font-display); font-size: 21px; font-weight: 600;
  margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.block { margin-bottom: 18px; }
.task { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px; }
.task__prompt { font-weight: 500; margin-bottom: 12px; }
.choices { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.choices--row { flex-direction: row; flex-wrap: wrap; gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.choice:hover { border-color: var(--line-strong); }
.choice--inline { padding: 7px 12px; }
.choice input { margin-top: 3px; }
.field--narrow { max-width: 200px; display: flex; align-items: center; gap: 8px; }
.unit { color: var(--muted); }
.poll-item { border: 0; padding: 0; margin: 0 0 14px; }
.poll-item legend { font-weight: 500; margin-bottom: 8px; padding: 0; }
.verdict { padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14.5px;
  margin-bottom: 12px; }
.verdict--ok { background: var(--ok-soft); color: var(--ok); }
.verdict--partial { background: var(--ochre-soft); color: var(--ochre); }
.verdict--no { background: var(--surface-2); color: var(--ink-2); }
.hint { margin-bottom: 12px; font-size: 14.5px; }
.hint summary { cursor: pointer; color: var(--accent-ink); }

/* --- задание с нейросетью ------------------------------------------------ */
/* Блок намеренно выглядит иначе, чем остальные: ребёнок должен видеть, что
   здесь отвечает не платформа, а настоящая модель. */
.ai-task {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  position: relative;
  overflow: hidden;
}
.ai-task::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--ochre) 65%, var(--accent));
}
.ai-task--done { border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); }
.ai-task__head {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}
.ai-task__badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--accent-soft); color: var(--accent-ink);
  padding: 5px 12px; border-radius: 100px; font-size: 13.5px; font-weight: 600;
  letter-spacing: .02em;
}
.ai-task__tries { display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--muted); }
.try { width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong);
  display: inline-block; }
.try--used { background: var(--accent); }

.ai-run { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 14px;
  margin: 14px 0; }
.ai-run--ok { border-left-color: var(--ok); }
.ai-run__mine { font-size: 14.5px; color: var(--muted); margin-bottom: 8px; }
.ai-run__answer {
  background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 10px; font-size: 15.5px;
  animation: ai-appear .35s ease both;
}
@keyframes ai-appear { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .ai-run__answer { animation: none; } }

.ai-run__image { border-radius: var(--radius-sm); border: 1px solid var(--line);
  max-width: 380px; margin-bottom: 10px; }

.ai-form { margin-top: 14px; }
.ai-form__label { display: block; font-size: 14.5px; font-weight: 500; margin-bottom: 6px; }
.ai-form textarea {
  width: 100%; padding: 11px 13px; font: inherit; font-size: 16px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); resize: vertical;
}
.ai-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px;
  border-color: var(--accent); }
.ai-form__row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  margin-top: 12px; }

.hint-shown { background: var(--ochre-soft); color: var(--ochre);
  padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14.5px;
  margin: 10px 0; display: flex; gap: 8px; align-items: flex-start; }
.hint-form { display: inline; margin-right: 16px; }

.peer-card { border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 14px; }
.peer-card--done { border-color: color-mix(in srgb, var(--ok) 40%, var(--line));
  background: var(--ok-soft); }
.peer-card__num { font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px; }
.peer-card__text { margin: 0 0 14px; padding-left: 14px;
  border-left: 3px solid var(--line-strong); font-size: 15.5px; }

.ai-log { border-left: 3px solid var(--line-strong); padding-left: 14px;
  margin-bottom: 16px; }
.ai-log__meta { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.ai-log__prompt { color: var(--accent-ink); margin-bottom: 6px; }
.ai-log__answer { background: var(--surface-2); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 15px; }
table.plan tr.is-stuck td { background: var(--ochre-soft); }

/* --- экран проектора -----------------------------------------------------
   Отдельная типографика: этот экран читают с задней парты, а не с ноутбука. */
.display-mode .site-header, .display-mode .site-footer { display: none; }
.display { padding: 36px 0 60px; }
.display__eyebrow { font-size: clamp(16px, 1.6vw, 22px); color: var(--muted);
  margin-bottom: 8px; }
.display__title { font-family: var(--font-display); font-size: clamp(32px, 5vw, 60px);
  line-height: 1.08; margin-bottom: 30px; }
.display__card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 30px; margin-bottom: 20px;
  box-shadow: var(--shadow); }
.display__card--idle { text-align: center; color: var(--muted); }
.display__card h2 { font-size: clamp(24px, 3.2vw, 40px); margin-bottom: 12px; }
.display__author { font-size: clamp(15px, 1.5vw, 20px); color: var(--accent-ink);
  font-weight: 600; margin-bottom: 10px; }
.display__prompt { font-size: clamp(17px, 2vw, 26px); color: var(--muted);
  margin-bottom: 14px; }
.display__text { font-size: clamp(19px, 2.2vw, 30px); line-height: 1.45; color: var(--ink); }
.display__text p { margin-bottom: .5em; }
.display__image { max-height: 46vh; width: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--line); }
.display__row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline;
  font-size: clamp(17px, 1.9vw, 26px); padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.display__row:last-child { border-bottom: 0; }
.display__row-num { color: var(--faint); min-width: 1.4em; }
.display__bar b { color: var(--accent-ink); font-variant-numeric: tabular-nums; }

@media (max-width: 1000px) {
  .run-grid { grid-template-columns: 1fr; }
  .run-side { position: static; }
}

/* --- формы и сообщения -------------------------------------------------- */
.form-page { max-width: 560px; }
.form-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px 24px; margin-top: 20px;
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14.5px; font-weight: 500; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent);
}
.field__help { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.field__error { margin: 6px 0 0; font-size: 13.5px; color: #a32e24; }
.form-error {
  background: #fbeae7; color: #a32e24; padding: 10px 14px;
  border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14.5px;
}
.link-button {
  background: none; border: 0; padding: 0; font: inherit; font-size: 14px;
  color: var(--accent-ink); cursor: pointer; text-decoration: underline;
}
.messages { margin-top: 16px; }
.message {
  padding: 11px 16px; border-radius: var(--radius-sm); font-size: 15px;
  border: 1px solid var(--line); background: var(--surface); margin-bottom: 8px;
}
.message--success { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }
.message--error { background: #fbeae7; border-color: #a32e24; color: #a32e24; }
table.pins { margin-top: 10px; border-collapse: collapse; font-size: 15px; }
table.pins td { padding: 3px 18px 3px 0; font-variant-numeric: tabular-nums; }

/* --- адаптив ------------------------------------------------------------ */
@media (max-width: 760px) {
  /* На узком экране в шапке остаётся только имя и вход: разделы дублируются
     на самой странице, а переполненная шапка обрезает кнопку входа. */
  .site-nav a:not(.btn) { display: none; }
  .site-nav { gap: 12px; }
  .site-header__inner { height: 56px; }
  .btn { padding: 9px 14px; font-size: 14.5px; }
  .brand { font-size: 17px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .section { padding: 40px 0; }
  .hero { padding: 40px 0 28px; }
  .lesson-head { grid-template-columns: 1fr; gap: 22px; }
  .tl-row { grid-template-columns: 78px 1fr; }
  .tl-row .tag { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.handout { max-width: 640px; }
.handout__lead { color: var(--muted); margin-bottom: 18px; }
.handout__code { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px;
  align-items: baseline; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; margin-bottom: 20px; }
.handout__join { font-size: 26px; letter-spacing: .12em;
  font-family: var(--font-display); }
.handout__table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.handout__table th, .handout__table td { text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line); }
.handout__pin { font-family: var(--font-display); font-size: 19px;
  letter-spacing: .1em; font-variant-numeric: tabular-nums; }

@media print {
  .no-print { display: none !important; }
  .site-header, .site-footer, .hero__actions, .chips { display: none; }
  body { background: #fff; font-size: 12pt; }
  .card, .timeline, .table-wrap { break-inside: avoid; box-shadow: none; }
}
