/* ============================================================================
   Пульс — документация. Продолжение дизайн-системы панели (web/assets/css/app.css):
   фон #F4F7FB, белые карточки с радиусом 16, синий #2F6FED, мягкие тени.
   Файл самодостаточен: внешних шрифтов и CDN нет.
   ========================================================================== */

:root {
  --bg:            #F4F7FB;
  --bg-soft:       #EDF2F9;
  --surface:       #FFFFFF;
  --border:        #E9EEF5;
  --border-strong: #D8E1EC;

  --text:          #101828;
  --text-body:     #344054;
  --text-2:        #667085;
  --text-3:        #98A2B3;

  --primary:       #2F6FED;
  --primary-dark:  #255FD6;
  --primary-soft:  #EAF1FE;

  --ok:            #12B76A;
  --ok-soft:       #E7F8F0;
  --warn:          #F79009;
  --warn-soft:     #FEF4E6;
  --crit:          #F04438;
  --crit-soft:     #FEECEB;
  --accent:        #22C7E0;
  --accent-soft:   #E4F8FB;
  --violet:        #7A5AF8;
  --violet-soft:   #EFEBFE;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-full: 999px;

  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-sm: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .07);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

  --sidebar-w: 296px;
  --topbar-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text-body);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--primary-soft); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--primary); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ─────────────────────────────── Каркас ─────────────────────────────────── */

.doc-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

.doc-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 16px 28px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  z-index: 90;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 8px 18px;
  color: inherit;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #2F6FED 0%, #22C7E0 60%, #12B76A 100%);
  box-shadow: var(--shadow-sm);
}
.brand-name { display: block; font-weight: 600; font-size: 16px; color: var(--text); line-height: 1.2; }
.brand-sub { display: block; font-size: 12.5px; color: var(--text-3); }

/* Поиск */
.search-box { position: relative; margin-bottom: 8px; }
.search-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 34px 10px 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  transition: border-color .14s, box-shadow .14s;
}
.search-input::placeholder { color: var(--text-3); }
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.search-input::-webkit-search-cancel-button { display: none; }
.search-hint {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: 5px; padding: 1px 6px;
  pointer-events: none;
}
.search-input:focus ~ .search-hint { display: none; }

.search-results {
  position: absolute;
  top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  max-height: 340px;
  overflow-y: auto;
  z-index: 120;
  padding: 6px;
}
.search-item {
  display: block;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.35;
  cursor: pointer;
}
.search-item:hover, .search-item.active { background: var(--primary-soft); text-decoration: none; }
.search-item .si-page { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.search-item mark { background: #FDECC8; color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { padding: 14px 12px; color: var(--text-3); font-size: 13px; text-align: center; }

/* Меню */
.doc-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.nav-group-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-3);
  padding: 16px 10px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  transition: background .14s, color .14s;
}
.nav-item:hover { background: var(--bg-soft); color: var(--text); text-decoration: none; }
.nav-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 111, 237, .28);
}
.nav-item.active:hover { background: var(--primary); color: #fff; }

.sidebar-foot { margin-top: auto; padding: 20px 10px 0; }
.side-link { font-size: 13.5px; color: var(--text-2); }
.side-link:hover { color: var(--primary); }
.side-version { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* Верхняя панель */
.doc-main { min-width: 0; display: flex; flex-direction: column; }

.doc-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  background: rgba(244, 247, 251, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-3); min-width: 0; }
.crumb-current { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-cta { margin-left: auto; }

.burger {
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  border-radius: var(--r-md);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  cursor: pointer;
}
.burger:hover { background: var(--bg-soft); }

.scrim { position: fixed; inset: 0; background: rgba(16, 24, 40, .35); z-index: 80; }

/* Тело: статья + оглавление страницы */
.doc-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 216px;
  gap: 48px;
  padding: 40px 44px 96px;
  max-width: 1240px;
  width: 100%;
}
.doc-article { max-width: 880px; min-width: 0; }

.doc-toc {
  position: sticky;
  top: calc(var(--topbar-h) + 28px);
  align-self: start;
  border-left: 1px solid var(--border);
  padding-left: 16px;
  font-size: 13.5px;
  max-height: calc(100vh - var(--topbar-h) - 60px);
  overflow-y: auto;
}
.toc-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3); font-weight: 600; margin-bottom: 8px;
}
.doc-toc a {
  display: block;
  padding: 5px 0;
  color: var(--text-2);
  line-height: 1.35;
  border-left: 2px solid transparent;
  margin-left: -18px;
  padding-left: 16px;
}
.doc-toc a:hover { color: var(--text); text-decoration: none; }
.doc-toc a.lvl3 { font-size: 12.5px; padding-left: 28px; color: var(--text-3); }
.doc-toc a.active { color: var(--primary); font-weight: 600; border-left-color: var(--primary); }

/* ────────────────────────────── Типографика ─────────────────────────────── */

.doc-article h1 {
  font-size: 38px;
  line-height: 1.12;
  letter-spacing: -.025em;
  font-weight: 650;
  color: var(--text);
  margin: 0 0 14px;
}
.doc-article .lead {
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0 0 34px;
  max-width: 44em;
}
.doc-article h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 650;
  color: var(--text);
  margin: 52px 0 16px;
  scroll-margin-top: 88px;
  position: relative;
}
.doc-article h3 {
  font-size: 18.5px;
  font-weight: 600;
  color: var(--text);
  margin: 32px 0 10px;
  scroll-margin-top: 88px;
  position: relative;
}
.doc-article h4 {
  font-size: 15.5px; font-weight: 600; color: var(--text); margin: 22px 0 8px;
}
.doc-article p { margin: 0 0 16px; max-width: 46em; }
.doc-article ul, .doc-article ol { margin: 0 0 18px; padding-left: 24px; max-width: 46em; }
.doc-article li { margin-bottom: 8px; }
.doc-article li > ul, .doc-article li > ol { margin: 8px 0 0; }
.doc-article strong { color: var(--text); font-weight: 600; }
.doc-article hr { height: 1px; background: var(--border); border: 0; margin: 40px 0; }

.doc-article :not(pre) > code {
  font-family: var(--mono);
  font-size: .875em;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 5px;
  color: #1D2939;
  white-space: nowrap;
}

.anchor {
  position: absolute;
  left: -22px;
  color: var(--text-3);
  opacity: 0;
  font-weight: 400;
  text-decoration: none;
  transition: opacity .14s;
}
.doc-article h2:hover .anchor,
.doc-article h3:hover .anchor,
.anchor:focus-visible { opacity: 1; }
.anchor:hover { text-decoration: none; color: var(--primary); }

/* ────────────────────────────── Компоненты ──────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card > :last-child { margin-bottom: 0; }
.card-title { font-size: 15.5px; font-weight: 600; color: var(--text); margin-bottom: 6px; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 22px; }
.cards .card { margin-bottom: 0; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  margin-bottom: 12px;
}
.card-icon.ok     { background: var(--ok-soft);     color: var(--ok); }
.card-icon.warn   { background: var(--warn-soft);   color: var(--warn); }
.card-icon.crit   { background: var(--crit-soft);   color: var(--crit); }
.card-icon.violet { background: var(--violet-soft); color: var(--violet); }
.card-icon.accent { background: var(--accent-soft); color: #0E9BB2; }

/* Заметки */
.note {
  display: flex;
  gap: 12px;
  border-radius: var(--r-lg);
  padding: 14px 18px;
  margin: 0 0 20px;
  background: var(--primary-soft);
  border: 1px solid #D7E4FD;
  color: #1E4FB0;
  font-size: 15px;
  max-width: 46em;
}
.note > div { min-width: 0; }
.note p { margin: 0 0 8px; max-width: none; }
.note > div > :last-child { margin-bottom: 0; }
.note-mark { font-weight: 700; flex: 0 0 auto; }
.note-title { font-weight: 600; display: block; margin-bottom: 2px; }
.note code { background: rgba(255, 255, 255, .6) !important; border-color: rgba(255, 255, 255, .8) !important; }
.note-ok   { background: var(--ok-soft);   border-color: #C7EEDA; color: #0A6E42; }
.note-warn { background: var(--warn-soft); border-color: #F8E1BC; color: #93590B; }
.note-crit { background: var(--crit-soft); border-color: #F9CFCC; color: #A32B23; }

/* Шаги */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 26px; max-width: 46em; }
.steps > li {
  position: relative;
  padding: 0 0 4px 56px;
  margin-bottom: 26px;
  min-height: 38px;
}
.steps > li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute; left: 0; top: -3px;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--primary); color: #fff;
  font-weight: 600; font-size: 16px;
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(47, 111, 237, .25);
}
.steps > li > h3 { margin-top: 0 !important; }
.steps > li > :last-child { margin-bottom: 0; }

/* Таблицы */
.table-wrap { overflow-x: auto; margin: 0 0 22px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
table.doc-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.doc-table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: #FBFCFE;
}
table.doc-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.doc-table tbody tr:last-child td { border-bottom: 0; }
table.doc-table td code { white-space: nowrap; }
table.doc-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Код */
.code-wrap {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: var(--r-md);
  overflow: hidden;
  margin: 0 0 22px;
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 7px 10px 7px 16px;
  background: #131F38;
  border-bottom: 1px solid #1E293B;
}
.code-lang {
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: #7C8CA6; font-weight: 600;
}
.code-copy {
  background: rgba(255, 255, 255, .08);
  border: 0; color: #CBD5E1;
  padding: 5px 11px; border-radius: var(--r-sm);
  font: inherit; font-size: 12px; cursor: pointer;
  transition: background .14s, color .14s;
}
.code-copy:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.code-copy.done { background: rgba(18, 183, 106, .22); color: #6EE7B7; }

pre.code-block {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  color: #E2E8F0;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre;
  tab-size: 2;
}
pre.code-block .k   { color: #93C5FD; }  /* ключевые слова */
pre.code-block .s   { color: #86EFAC; }  /* строки */
pre.code-block .c   { color: #64748B; font-style: italic; }  /* комментарии */
pre.code-block .n   { color: #FDBA74; }  /* числа */
pre.code-block .f   { color: #FDE68A; }  /* вызовы функций */
pre.code-block .v   { color: #7DD3FC; }  /* переменные */
pre.code-block .key { color: #C4B5FD; }  /* ключи JSON */

/* Клавиши и ключи */
kbd.k {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--bg-soft); border: 1px solid var(--border-strong);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--text);
}
.key-box {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 13px;
  margin-bottom: 18px;
  word-break: break-all;
}

/* Чипы */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 12.5px; font-weight: 500;
  background: var(--bg-soft); color: var(--text-2);
  white-space: nowrap;
}
.chip-ok    { background: var(--ok-soft);      color: #0A8A50; }
.chip-warn  { background: var(--warn-soft);    color: #B76E00; }
.chip-crit  { background: var(--crit-soft);    color: #C4342B; }
.chip-info  { background: var(--primary-soft); color: var(--primary-dark); }
.chip-violet{ background: var(--violet-soft);  color: #5B3ED6; }

.dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; display: inline-block; background: var(--text-3); }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); }
.dot-crit { background: var(--crit); } .dot-info { background: var(--primary); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
  white-space: nowrap; text-decoration: none;
  transition: background .14s, border-color .14s;
}
.btn:hover { background: var(--bg-soft); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(47, 111, 237, .25); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--r-sm); }

/* ───────────────────── Скриншото-подобные блоки (макеты) ────────────────── */

.shot {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin: 0 0 24px;
}
.shot-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: #FBFCFE;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-3);
}
.shot-dots { display: flex; gap: 5px; }
.shot-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.shot-dots i:nth-child(1) { background: #FEBFBA; }
.shot-dots i:nth-child(2) { background: #FBD9A5; }
.shot-dots i:nth-child(3) { background: #B7EBD1; }
.shot-body { padding: 18px 20px; background: var(--bg); }
.shot-body.plain { background: var(--surface); }

.m-row {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 13px 16px;
  margin-bottom: 10px;
}
.m-row:last-child { margin-bottom: 0; }
.m-name { font-weight: 600; color: var(--text); font-size: 14.5px; }
.m-sub { font-size: 12.5px; color: var(--text-3); }
.m-grow { flex: 1; min-width: 0; }
.m-value { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.m-value.ok { color: var(--ok); } .m-value.warn { color: var(--warn); } .m-value.crit { color: var(--crit); }

.m-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 14px; }
.m-tile {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px 16px;
}
.m-tile .m-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); }
.m-tile .m-big { font-size: 24px; font-weight: 650; letter-spacing: -.02em; margin-top: 6px; color: var(--text); }
.m-tile .m-big.ok { color: var(--ok); } .m-tile .m-big.warn { color: var(--warn); } .m-tile .m-big.crit { color: var(--crit); }
.m-tile .m-note { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.uptime-bar { display: flex; gap: 2px; align-items: flex-end; height: 28px; margin-top: 8px; }
.uptime-bar i { flex: 1; min-width: 2px; border-radius: 2px; background: var(--ok); height: 100%; display: block; }
.uptime-bar i.down { background: var(--crit); }
.uptime-bar i.degraded { background: var(--warn); }
.uptime-bar i.none { background: var(--border); }

.meter { height: 6px; background: var(--bg-soft); border-radius: var(--r-full); overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--primary); border-radius: var(--r-full); }
.meter i.warn { background: var(--warn); }
.meter i.crit { background: var(--crit); }

.m-msg {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--crit);
  border-radius: var(--r-md); padding: 14px 16px; font-size: 14px;
}
.m-msg.ok { border-left-color: var(--ok); }
.m-msg.warn { border-left-color: var(--warn); }
.m-msg-title { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.m-msg dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; font-size: 13.5px; }
.m-msg dt { color: var(--text-3); }
.m-msg dd { margin: 0; color: var(--text); }

/* Пагинация внизу статьи */
.pager {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border);
}
.pager a {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 14px 18px; box-shadow: var(--shadow-xs);
  transition: border-color .14s, box-shadow .14s;
}
.pager a:hover { border-color: var(--border-strong); box-shadow: var(--shadow-md); text-decoration: none; }
.pager .pg-label { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 2px; }
.pager .pg-title { font-weight: 600; color: var(--text); font-size: 15px; }
.pager .pg-next { text-align: right; }

/* Загрузка и ошибка */
.loading-block { display: flex; align-items: center; gap: 12px; color: var(--text-2); padding: 40px 0; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }
.doc-article.fade-in { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ─────────────────────────────── Адаптив ────────────────────────────────── */

@media (max-width: 1180px) {
  .doc-body { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .doc-toc { display: none; }
}

@media (min-width: 961px) {
  .only-mobile { display: none !important; }
  .scrim { display: none !important; }
}

@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; }
  .doc-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: min(86vw, var(--sidebar-w));
    transform: translateX(-100%);
    transition: transform .2s ease-out;
    box-shadow: var(--shadow-lg);
  }
  .doc-sidebar.open { transform: none; }
  .doc-body { padding: 26px 18px 72px; }
  .doc-topbar { padding: 0 16px; }
  .topbar-cta { display: none; }
  .doc-article h1 { font-size: 30px; }
  .doc-article h2 { font-size: 22px; margin-top: 40px; }
  .doc-article .lead { font-size: 17px; }
  .anchor { display: none; }
  .steps > li { padding-left: 48px; }
  .steps > li::before { width: 32px; height: 32px; font-size: 14px; }
}

@media print {
  .doc-sidebar, .doc-topbar, .doc-toc, .pager, .code-copy, .scrim { display: none !important; }
  .doc-layout { grid-template-columns: 1fr; }
  body { background: #fff; }
  .doc-body { padding: 0; }
  pre.code-block { color: #101828; background: #F8FAFD; }
  .code-wrap { background: #F8FAFD; border-color: var(--border); }
  .code-head { background: #EDF2F9; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
