/* ==========================================================================
   AI Seminars & Wiki — компоненты интерфейса. Цвета/размеры — только из tokens.css
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
[v-cloak] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-base)/1.55 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.015em; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { flex-shrink: 0; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-sm); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Иконки, аватары, чипы ---------- */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.avatar {
  --h: 150;
  display: inline-grid; place-items: center; flex-shrink: 0;
  width: 32px; height: 32px; border-radius: var(--r-full);
  background: hsl(var(--h) var(--avatar-s) var(--avatar-l-bg));
  color: hsl(var(--h) 45% var(--avatar-l-fg));
  font-weight: 600; font-size: 12px; letter-spacing: 0.02em;
}
.avatar--xs { width: 22px; height: 22px; font-size: 9.5px; }
.avatar--lg { width: 52px; height: 52px; font-size: 18px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: var(--r-full);
  background: var(--surface-2); color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 500; white-space: nowrap;
}
.chip .icon { width: 13px; height: 13px; }
.chip--accent { background: var(--accent-soft); color: var(--accent-text); }
.chip--live { background: var(--danger-soft); color: var(--danger); }
.chip--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--warn { background: var(--warn-soft); color: var(--warn); }

.eyebrow {
  font: 500 var(--fs-xs)/1.4 var(--font-mono);
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3);
}
.eyebrow--accent { color: var(--accent-text); }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--text-3); font-size: var(--fs-sm); }
.meta .icon { width: 15px; height: 15px; }
.meta__who { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 500; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-strong); }

/* ---------- Кнопки и поля ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text);
  font-weight: 500; font-size: var(--fs-sm); white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.btn--icon { width: 38px; padding: 0; }
.btn--sm { min-height: 32px; padding: 0 10px; }
.btn--block { width: 100%; }

.link { color: var(--accent-text); font-weight: 500; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link .icon { width: 15px; height: 15px; }

.field { display: grid; gap: 6px; }
.field__label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.field__hint { font-size: var(--fs-xs); color: var(--text-3); }
.input {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
textarea.input { resize: vertical; line-height: 1.5; }

/* ---------- Каркас ---------- */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: var(--s-6);
  padding: var(--s-5) var(--s-3) var(--s-4);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 var(--s-2); }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 10px; background: var(--accent); color: var(--on-accent);
}
.brand__mark .icon { width: 19px; height: 19px; stroke-width: 2; }
.brand__name { display: block; font-weight: 700; font-size: var(--fs-base); line-height: 1.2; letter-spacing: -0.01em; }
.brand__sub { display: block; font-size: var(--fs-xs); color: var(--text-3); }

.nav { display: grid; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 10px;
  min-height: 36px; padding: 0 10px; border-radius: var(--r-md);
  color: var(--text-2); font-weight: 500; font-size: var(--fs-sm);
  transition: background-color .12s, color .12s;
}
.nav__item:hover { background: var(--surface-2); color: var(--text); }
.nav__item.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border); }
.nav__item.is-active .icon { color: var(--accent-text); }
.nav__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav__count { font: 500 11px var(--font-mono); color: var(--text-3); }
.nav-group__title { padding: 0 10px var(--s-2); }

.sidebar__foot { margin-top: auto; display: grid; gap: var(--s-2); }
.usercard { display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.usercard__text { flex: 1; min-width: 0; line-height: 1.25; }
.usercard__name { font-weight: 600; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usercard__sub { font-size: var(--fs-xs); color: var(--text-3); }

.main { min-width: 0; }
html, body { overflow-x: clip; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-8);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__brand { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--text-3); pointer-events: none; }
.search .input { padding-left: 38px; padding-right: 38px; background: var(--surface); border-color: var(--border); }
.search kbd {
  position: absolute; right: 10px; top: 50%; translate: 0 -50%;
  font: 500 11px var(--font-mono); color: var(--text-3);
  border: 1px solid var(--border-strong); border-radius: 5px; padding: 1px 6px;
}
.topbar__spacer { flex: 1; }
.only-mobile { display: none; }

.page { max-width: 1280px; margin: 0 auto; padding: var(--s-10) var(--s-8) 96px; }
.page--narrow { max-width: 760px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-4); margin-bottom: var(--s-8); }
.page-head h1 { font-size: var(--fs-2xl); font-weight: 700; margin-top: 6px; }
.lead { color: var(--text-2); font-size: var(--fs-md); margin-top: var(--s-2); max-width: 62ch; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.section-head h2 { font-size: var(--fs-lg); font-weight: 600; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 500; margin-bottom: var(--s-5); }
.backlink:hover { color: var(--text); }
.backlink .icon { width: 16px; height: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

.empty { padding: var(--s-10) var(--s-6); text-align: center; color: var(--text-2); display: grid; gap: var(--s-3); justify-items: center; }
.empty__title { font-weight: 600; color: var(--text); font-size: var(--fs-md); }

/* ---------- Плитка даты ---------- */
.datetile {
  display: grid; justify-items: center; align-content: center; gap: 2px;
  width: 92px; padding: var(--s-3) var(--s-2);
  border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text);
  text-align: center; flex-shrink: 0;
}
.datetile__month { font: 500 var(--fs-xs) var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.datetile__day { font-size: 36px; font-weight: 700; line-height: 1; letter-spacing: -0.03em; }
.datetile__time { font: 500 var(--fs-xs) var(--font-mono); opacity: .85; }
.datetile--sm { width: 68px; padding: var(--s-2) var(--s-1); }
.datetile--sm .datetile__day { font-size: 26px; }
.is-past .datetile { background: var(--surface-2); color: var(--text-2); }

/* ---------- Главная ---------- */
.feature { display: flex; gap: var(--s-6); padding: var(--s-6); align-items: flex-start; }
.feature__body { flex: 1; min-width: 0; display: grid; gap: var(--s-2); }
.feature__body h2 { font-size: var(--fs-xl); font-weight: 700; }
.feature__body p { color: var(--text-2); max-width: 68ch; }
.feature__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--s-3); margin: var(--s-4) 0 var(--s-10); }
.tile__top, .tile__top span { white-space: nowrap; }
.tile { display: grid; gap: 4px; padding: var(--s-4) var(--s-5); transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.tile__top { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-weight: 600; }
.tile__top span { display: inline-flex; align-items: center; gap: 8px; }
.tile__num { font: 500 var(--fs-sm) var(--font-mono); color: var(--accent-text); }
.tile p { color: var(--text-3); font-size: var(--fs-sm); }

.cols { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--s-10); align-items: start; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-8); }

/* ---------- Список статей ---------- */
.list { overflow: hidden; }
.row { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-5); transition: background-color .12s; }
.row + .row { border-top: 1px solid var(--border); }
.row:hover { background: var(--surface-2); }
.row__main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.row__title { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.row:hover .row__title { color: var(--accent-text); }
.row__excerpt { color: var(--text-2); font-size: var(--fs-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row__go { color: var(--text-3); transition: translate .15s; }
.row:hover .row__go { translate: 3px 0; color: var(--accent-text); }

.mini { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); }
.mini + .mini { border-top: 1px solid var(--border); }
a.mini:hover { background: var(--surface-2); }
.mini__text { flex: 1; min-width: 0; line-height: 1.3; }
.mini__title { font-weight: 500; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini__sub { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- Папки ---------- */
.groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
.folder__head { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-1) var(--s-1) var(--s-2); cursor: pointer; list-style: none; color: var(--text-2); font-weight: 600; border-radius: var(--r-sm); }
.folder__head::-webkit-details-marker { display: none; }
.folder__head:hover { color: var(--text); }
.folder__caret { width: 16px; height: 16px; color: var(--text-3); transition: rotate .15s; }
.folder[open] .folder__caret { rotate: 90deg; }
.folder__path { display: inline-flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.folder__sep { color: var(--text-3); font-weight: 400; }

/* ---------- Ветки ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }
.person { display: grid; gap: var(--s-3); padding: var(--s-5); transition: border-color .15s, box-shadow .15s; }
.person:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.person__head { display: flex; align-items: center; gap: var(--s-3); }
.person__name { font-weight: 600; font-size: var(--fs-md); line-height: 1.25; }
.person__latest { color: var(--text-2); font-size: var(--fs-sm); padding-top: var(--s-3); border-top: 1px solid var(--border); }
.person__latest b { display: block; font-weight: 500; color: var(--text); }
.branch-head { display: flex; align-items: center; gap: var(--s-4); }

/* ---------- Статья ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 220px; gap: var(--s-12); justify-content: space-between; align-items: start; }
.article-layout--solo { grid-template-columns: minmax(0, 720px); }
.article__title { font-size: 36px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; }
.article__head { display: grid; gap: var(--s-4); padding-bottom: var(--s-6); margin-bottom: var(--s-6); border-bottom: 1px solid var(--border); }
.toc { position: sticky; top: 88px; display: grid; gap: 2px; font-size: var(--fs-sm); }
.toc .eyebrow { margin-bottom: var(--s-2); }
.toc a { padding: 4px 0; color: var(--text-2); line-height: 1.35; }
.toc a:hover { color: var(--accent-text); }
.toc a[data-level="3"] { padding-left: var(--s-3); color: var(--text-3); }

.prose { font-size: var(--fs-md); line-height: 1.7; color: var(--text); overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose h1 { font-size: 26px; margin-top: 1.6em; }
.prose h2 { font-size: 22px; margin-top: 1.8em; font-weight: 600; scroll-margin-top: 84px; }
.prose h3 { font-size: 18px; margin-top: 1.5em; font-weight: 600; scroll-margin-top: 84px; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.4em; margin-bottom: 0; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--text-3); }
.prose strong { font-weight: 600; }
.prose blockquote { margin-inline: 0; padding: 2px 0 2px var(--s-4); border-left: 3px solid var(--border-strong); color: var(--text-2); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2em 0; }
.prose img { max-width: 100%; border-radius: var(--r-md); }
.prose code { font: 0.86em var(--font-mono); background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }
.prose pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s-4); overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: 13.5px; }
.table-wrap { overflow-x: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--fs-base); }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.prose th { font-weight: 600; color: var(--text-2); font-size: var(--fs-sm); }
.prose--sm { font-size: var(--fs-base); line-height: 1.65; }
.prose--sm h1 { font-size: 21px; } .prose--sm h2 { font-size: 18px; } .prose--sm h3 { font-size: 16px; }

.hljs-keyword, .hljs-built_in, .hljs-literal, .hljs-selector-tag, .hljs-tag .hljs-name { color: var(--hl-keyword); }
.hljs-string, .hljs-attr, .hljs-symbol, .hljs-addition { color: var(--hl-string); }
.hljs-number, .hljs-meta, .hljs-variable { color: var(--hl-number); }
.hljs-title, .hljs-section, .hljs-type { color: var(--hl-title); }
.hljs-comment, .hljs-quote { color: var(--hl-comment); font-style: italic; }

.blocks > * + * { margin-top: var(--s-6); }
.diagram { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); overflow-x: auto; }
.diagram__canvas { display: flex; justify-content: center; min-height: 60px; align-items: center; }
.diagram__canvas svg { max-width: 100%; height: auto; max-height: 620px; }
.diagram__hint { color: var(--text-3); font-size: var(--fs-sm); }
.diagram__error { color: var(--danger); font-size: var(--fs-sm); background: var(--danger-soft); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); }

/* Просмотрщик слайдов: один слайд на экран, на всю ширину карточки */
.slides { flex-basis: 100%; min-width: 0; border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface-2); }
.slides:focus-visible { border-radius: var(--r-md); }
.slides__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; align-items: center; overflow: hidden; min-height: 220px; padding: var(--s-4); }
.slides__stage canvas { display: block; max-width: 100%; border-radius: 4px; box-shadow: var(--shadow-md); cursor: pointer; background: #fff; }
.slides__note { color: var(--text-2); font-size: var(--fs-sm); text-align: center; }
.slides__nav {
  position: absolute; top: 50%; translate: 0 -50%;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-md);
  transition: opacity .15s, background-color .15s;
}
.slides__nav:hover { background: var(--surface-2); }
.slides__nav:disabled { opacity: 0; pointer-events: none; }
.slides__nav--prev { left: var(--s-3); }
.slides__nav--next { right: var(--s-3); }
.slides__bar { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) var(--s-3); border-top: 1px solid var(--border); background: var(--surface); }
.slides__count { font: 500 var(--fs-sm) var(--font-mono); color: var(--text-2); min-width: 52px; }
.slides__progress { flex: 1; height: 4px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.slides__progress i { display: block; height: 100%; background: var(--accent); border-radius: inherit; transition: width .2s; }
.slides:fullscreen { display: flex; flex-direction: column; border: 0; border-radius: 0; background: #0b0c0b; }
.slides:fullscreen .slides__stage { flex: 1; min-height: 0; padding: var(--s-6); }

/* ---------- Календарь ---------- */
.cal-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.month { padding: var(--s-4); position: sticky; top: 88px; }
.month__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-3); }
.month__title { font-weight: 600; text-transform: capitalize; }
.month__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.month__dow { text-align: center; font: 500 11px var(--font-mono); color: var(--text-3); padding: 6px 0; text-transform: uppercase; }
.day {
  position: relative; aspect-ratio: 1; display: grid; place-items: center;
  border: 0; background: none; border-radius: var(--r-md);
  font-size: var(--fs-sm); color: var(--text-2);
}
.day:disabled { cursor: default; }
.day.is-out { color: var(--border-strong); }
.day.is-today { box-shadow: inset 0 0 0 1.5px var(--border-strong); color: var(--text); font-weight: 600; }
.day.has-events { color: var(--text); font-weight: 700; background: var(--accent-soft); }
.day.has-events:hover { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); }
.day.has-events::after { content: ""; position: absolute; bottom: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.day.is-selected { background: var(--accent); color: var(--on-accent); }
.day.is-selected::after { background: var(--on-accent); }
.month__legend { margin-top: var(--s-3); padding-top: var(--s-3); border-top: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-3); display: flex; align-items: center; gap: 8px; }
.month__legend i { width: 12px; height: 12px; border-radius: 4px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent); }

.tabs { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-2); border-radius: var(--r-md); }
.tab { border: 0; background: none; min-height: 32px; padding: 0 14px; border-radius: 8px; font-weight: 500; font-size: var(--fs-sm); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; }
.tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.tab__n { font: 500 11px var(--font-mono); color: var(--text-3); }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }

.seminars { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
.cal-layout > * { min-width: 0; }
.seminar { display: flex; flex-wrap: wrap; gap: var(--s-4); padding: var(--s-5); align-items: flex-start; }
.seminar__body { flex: 1; min-width: 0; display: grid; gap: var(--s-2); }
.seminar__body h3 { font-size: var(--fs-md); font-weight: 600; line-height: 1.3; }
.seminar__body > p { color: var(--text-2); font-size: var(--fs-sm); }
.seminar__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); }
.seminar__actions { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* ---------- Видеовстреча ---------- */
.page--meet { max-width: none; padding-top: var(--s-5); padding-bottom: var(--s-5); display: flex; flex-direction: column; height: calc(100vh - 64px); min-height: 520px; }
.meet__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-6); margin-bottom: var(--s-4); }
.meet__head .backlink { margin: 0; }
.meet__title h1 { font-size: var(--fs-lg); font-weight: 600; }
.meet__stage { flex: 1; min-height: 0; display: grid; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.meet__frame { min-height: 0; }
.meet__frame iframe { display: block; border: 0; }
.meet__stage .empty { align-content: center; }

/* ---------- Редактор ---------- */
.editor-meta { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: var(--s-4); padding: var(--s-5); margin-bottom: var(--s-4); }
.editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); height: max(520px, calc(100vh - 380px)); }
.pane { display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.pane__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--border); min-height: 48px; }
.pane__title { font-weight: 600; font-size: var(--fs-sm); color: var(--text-2); margin-right: auto; }
.tool { border: 0; background: none; min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-sm); color: var(--text-2); font-weight: 600; font-size: var(--fs-sm); display: inline-flex; align-items: center; gap: 6px; }
.tool:hover { background: var(--surface-2); color: var(--text); }
.tool--accent { color: var(--accent-text); }
.pane__sep { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.editor__ta { flex: 1; width: 100%; border: 0; resize: none; padding: var(--s-5); background: transparent; font: 14px/1.7 var(--font-mono); }
.editor__ta:focus { outline: none; box-shadow: none; }
.editor__ta::placeholder { color: var(--text-3); }
.pane__scroll { flex: 1; overflow-y: auto; padding: var(--s-5) var(--s-6); }
.pane__foot { padding: var(--s-2) var(--s-3); border-top: 1px solid var(--border); font: 500 11px var(--font-mono); color: var(--text-3); display: flex; justify-content: space-between; }
.editor-tabs { display: none; margin-bottom: var(--s-3); }
.hint { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); border-radius: var(--r-md); background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-sm); font-weight: 500; }
.hint span { flex: 1; }
.notice { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s-3); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-4); border-radius: var(--r-md); background: var(--warn-soft); color: var(--warn); font-size: var(--fs-sm); font-weight: 500; }

/* ---------- Диалоги и уведомления ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--s-4); background: var(--overlay); animation: fade .15s ease-out; }
.dialog { width: min(100%, 520px); max-height: calc(100vh - 32px); overflow-y: auto; padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.dialog--sm { width: min(100%, 400px); }
.dialog__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.dialog__head h2 { font-size: var(--fs-lg); font-weight: 600; }
.dialog__head p { color: var(--text-2); font-size: var(--fs-sm); margin-top: 4px; }
.dialog--wide { width: min(100%, 640px); }
.dialog__text { color: var(--text-2); margin-bottom: var(--s-4); }
.snippet { display: grid; gap: var(--s-2); justify-items: end; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.snippet__hint { justify-self: start; color: var(--text-2); font-size: var(--fs-sm); }
.snippet__hint code { font: 0.92em var(--font-mono); }
.snippet pre { margin: 0; width: 100%; font: 12.5px/1.6 var(--font-mono); white-space: pre-wrap; word-break: break-all; }
details > summary.field__label { cursor: pointer; }
details[open] > summary.field__label { margin-bottom: 6px; }
.examples { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--text-2); font-size: var(--fs-sm); }
.sidebar__agent { justify-content: flex-start; color: var(--accent-text); }
.form { display: grid; gap: var(--s-4); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.form__actions { display: flex; justify-content: flex-end; gap: var(--s-2); margin-top: var(--s-2); }
.login-gitlab { min-height: 44px; }
.login-note { margin: var(--s-2) 0 var(--s-3); }
.account { display: flex; align-items: center; gap: var(--s-3); width: 100%; padding: var(--s-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); text-align: left; }
.account:hover { border-color: var(--accent); background: var(--accent-soft); }
.account + .account { margin-top: var(--s-2); }

.toasts { position: fixed; right: var(--s-5); bottom: var(--s-5); z-index: 60; display: grid; gap: var(--s-2); }
.toast { display: flex; align-items: center; gap: 10px; max-width: 380px; padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--text); color: var(--bg); font-size: var(--fs-sm); font-weight: 500; box-shadow: var(--shadow-md); animation: rise .18s ease-out; }
.toast--error { background: var(--danger); color: #fff; }
:root[data-theme="dark"] .toast--error { color: #1a0907; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; translate: 0 8px; } }

.tabbar { display: none; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .article-layout { grid-template-columns: minmax(0, 720px); }
  .toc { display: none; }
  .cal-layout { grid-template-columns: 1fr; }
  .month { position: static; max-width: 360px; }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .only-mobile { display: inline-flex; }
  .topbar { padding: var(--s-2) var(--s-4); gap: var(--s-2); }
  .topbar__brand { display: grid; }
  .search kbd { display: none; }
  .hide-mobile { display: none; }
  .page { padding: var(--s-6) var(--s-4) 112px; }
  .page--meet { height: calc(100vh - 56px - 64px); padding-bottom: var(--s-4); }
  .page-head h1 { font-size: 26px; }
  .lead { font-size: var(--fs-base); }
  .article__title { font-size: 28px; }
  .cols { grid-template-columns: 1fr; gap: var(--s-8); }
  .tiles { grid-template-columns: 1fr; }
  .feature { flex-direction: column; gap: var(--s-4); padding: var(--s-5); }
  .feature .datetile { width: auto; grid-auto-flow: column; gap: var(--s-2); align-items: baseline; padding: var(--s-2) var(--s-3); }
  .feature .datetile__day { font-size: 22px; }
  .seminar { padding: var(--s-4); gap: var(--s-3); }
  .editor-meta { grid-template-columns: 1fr; }
  .editor { grid-template-columns: 1fr; height: 62vh; }
  .editor-tabs { display: inline-flex; }
  .editor[data-tab="write"] .pane--preview, .editor[data-tab="preview"] .pane--write { display: none; }
  .form__row { grid-template-columns: 1fr; }
  .toasts { left: var(--s-4); right: var(--s-4); bottom: 76px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; border-radius: var(--r-md); color: var(--text-3); font-size: 11px; font-weight: 500; }
  .tabbar a.is-active { color: var(--accent-text); }
  .tabbar .icon { width: 21px; height: 21px; }
}
