/* ==========================================================================
   Овация — центр помощи. Основные стили.

   Палитра, шрифт и геометрия взяты с лендинга и из приложения: тёплый фон,
   чернильный текст, оранжевый акцент — и те же имена переменных, что в
   Landing/css/style.css, только темой управляет переключатель в шапке
   ([data-theme="dark"] на <html>), а не чередование разделов.

   Файл один: справка живёт отдельно от лендинга и не тянет его стили.
   ========================================================================== */

:root {
  /* Цвета — светлая тема */
  --bg:            #ffffff;
  --bg-2:          #ffffff;
  --bg-tint:       #EDEDEF;
  --bg-sand:       #f6efe6;
  --ink:           #1e1d1a;
  --ink-2:         #37352f;
  --muted:         #787774;
  --muted-2:       #9b9a97;
  --line:          #e7e6e1;
  --line-2:        #dedcd6;
  --accent:        #e7571f;
  --accent-hover:  #cf4a16;
  --accent-soft:   #E6E9F3;
  --blue:          #3e7bb6;
  --blue-soft:     #e9f0f8;
  --green:         #2f9e63;
  --red:           #c0392b;

  /* Тени */
  --shadow-sm: 0 1px 2px rgba(30, 29, 26, .05), 0 2px 8px rgba(30, 29, 26, .04);
  --shadow-md: 0 6px 18px rgba(30, 29, 26, .07), 0 2px 6px rgba(30, 29, 26, .04);
  --shadow-lg: 0 26px 60px rgba(30, 29, 26, .13), 0 8px 22px rgba(30, 29, 26, .06);
  --shadow-xl: 0 44px 100px rgba(30, 29, 26, .18), 0 12px 30px rgba(30, 29, 26, .07);

  /* Геометрия */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --container: 1280px;
  --top-h: 66px;
  --sidebar-w: 274px;
  --toc-w: 216px;

  /* Ubuntu — из макета приложения; системные шрифты остаются запасными,
     чтобы справка читалась и без сети. */
  --font: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Helvetica Neue',
          Helvetica, Arial, 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --ease: cubic-bezier(.16, .84, .24, 1);
}

/* ==========================================================================
   ТЁМНАЯ ТЕМА

   Та же палитра, что у тёмной темы приложения (css/theme-tokens.css):
   тёплый графит вместо белого, сливочный текст, оранжевый акцент.
   ========================================================================== */

[data-theme="dark"] {
  --bg:            #241e20;
  --bg-2:          #2b2426;
  --bg-tint:       #2e2729;
  --bg-deep:       #110c0c;
  --ink:           #e3d3bb;
  --ink-2:         #d8c9b3;
  --muted:         #b5a795;
  --muted-2:       #8f8375;
  --line:          #322b2d;
  --line-2:        #3d3437;
  --accent:        #f2682f;
  --accent-hover:  #ff7f4a;
  --accent-soft:   #3a1d12;
  --blue:          #8ec0ea;
  --blue-soft:     #262a33;
  --green:         #5cc07f;
  --red:           #ef8b7d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .34), 0 2px 8px rgba(0, 0, 0, .24);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, .40), 0 2px 6px rgba(0, 0, 0, .26);
  --shadow-lg: 0 26px 60px rgba(0, 0, 0, .52), 0 8px 22px rgba(0, 0, 0, .32);
  --shadow-xl: 0 44px 100px rgba(0, 0, 0, .60), 0 12px 30px rgba(0, 0, 0, .36);

  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.022em;
  line-height: 1.15;
}

p { margin: 0; }

code {
  font-family: var(--mono);
  font-size: .88em;
  background: rgba(30, 29, 26, .06);
  border-radius: 6px;
  padding: 2px 6px;
  white-space: nowrap;
}

[data-theme="dark"] code { background: rgba(227, 211, 187, .1); }

kbd {
  display: inline-block;
  min-width: 22px;
  padding: 2px 7px;
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 7px;
  background: var(--bg-2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  box-shadow: 0 1px 0 rgba(30, 29, 26, .04);
}

::selection { background: var(--accent-soft); color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  transition: top .2s ease;
}

.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* Полоса прогресса чтения — как на лендинге */
.hs-progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #f5a24b);
  z-index: 120;
  border-radius: 0 3px 3px 0;
  transition: width .1s linear;
}

/* ============================== ШАПКА ============================== */

.hs-top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--top-h);
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

.hs-top.is-stuck {
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}

[data-theme="dark"] .hs-top.is-stuck { background: rgba(36, 30, 32, .88); }

.hs-top__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--top-h);
}

.hs-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: var(--ink);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -.01em;
}

.hs-brand:hover { color: var(--ink); text-decoration: none; }

.hs-brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  image-rendering: pixelated;
  box-shadow: 0 4px 12px rgba(231, 87, 31, .18);
}

.hs-brand__tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}

.hs-top__spacer { flex: 1 1 auto; }

/* ---- поиск ---- */

.hs-search {
  position: relative;
  flex: 0 1 380px;
  min-width: 0;
}

.hs-search__field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.hs-search__field:hover { border-color: var(--muted-2); }

.hs-search.is-open .hs-search__field,
.hs-search__field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(231, 87, 31, .14);
}

.hs-search__field svg { width: 16px; height: 16px; flex: none; color: var(--muted-2); }

.hs-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  outline: none;
}

.hs-search__input::placeholder { color: var(--muted-2); }
.hs-search__input::-webkit-search-cancel-button { display: none; }

.hs-search__hint {
  flex: none;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 600;
}

.hs-search__panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(560px, calc(100vw - 40px));
  max-height: min(66vh, 520px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  box-shadow: var(--shadow-xl);
  z-index: 110;
}

.hs-search__panel[hidden] { display: none; }

.hs-search__group {
  padding: 12px 12px 6px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hs-hit {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
}

.hs-hit:hover, .hs-hit.is-active {
  background: var(--bg-tint);
  text-decoration: none;
}

.hs-hit b { display: block; color: var(--ink); font-size: 15.5px; font-weight: 600; }
.hs-hit span { display: block; color: var(--muted); font-size: 13.5px; }
.hs-hit mark { background: rgba(231, 87, 31, .18); color: inherit; border-radius: 4px; padding: 0 2px; }
.hs-hit__crumb { color: var(--muted-2); font-size: 12.5px; }

.hs-search__empty { padding: 22px 14px; color: var(--muted); font-size: 15px; text-align: center; }

.hs-search__foot {
  margin-top: 6px;
  padding: 10px 12px 6px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 12.5px;
}

/* ---- кнопки шапки ---- */

.hs-top__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.hs-icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 11px;
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.hs-icon-btn svg { width: 18px; height: 18px; }
.hs-icon-btn:hover { color: var(--ink); border-color: var(--muted-2); }

/* Иконка темы: в тёмной теме показываем солнце, в светлой — луну */
.hs-icon-btn .hs-icon-sun { display: none; }
[data-theme="dark"] .hs-icon-btn .hs-icon-sun { display: block; }
[data-theme="dark"] .hs-icon-btn .hs-icon-moon { display: none; }

.hs-burger { display: none; }

/* ============================== КНОПКИ ============================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform .28s var(--ease), box-shadow .28s var(--ease),
              background .2s ease, border-color .2s ease, color .2s ease;
}

.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--primary { background: #1e1d1a; color: #fff; }
.btn--primary:hover { background: var(--accent-hover); color: #fff; box-shadow: 0 14px 30px rgba(231, 87, 31, .30); }

[data-theme="dark"] .btn--primary { background: var(--accent); }
[data-theme="dark"] .btn--primary:hover { background: var(--accent-hover); }

.btn--ghost {
  background: var(--bg-2);
  border-color: var(--line-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover { border-color: var(--muted-2); color: var(--ink); box-shadow: var(--shadow-md); }

.btn--sm { padding: 9px 16px; font-size: 14.5px; }
.btn__icon { width: 18px; height: 18px; flex: none; }

/* ============================== КАРКАС ============================== */

.hs-main { padding-top: var(--top-h); }

.hs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  padding: 34px 0 96px;
}

/* ============================== БОКОВОЕ МЕНЮ ============================== */

/* Затемнение под выдвижным меню. На широком экране его нет совсем: пустой
   блок в сетке занимал бы ячейку и выталкивал текст статьи под меню. */
.hs-scrim { display: none; }

.hs-sidebar {
  position: sticky;
  top: calc(var(--top-h) + 22px);
  max-height: calc(100vh - var(--top-h) - 44px);
  overflow-y: auto;
  padding-right: 10px;
  overscroll-behavior: contain;
}

.hs-sidebar::-webkit-scrollbar { width: 7px; }
.hs-sidebar::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }

.hs-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.hs-nav__group { display: grid; gap: 3px; }

.hs-nav__title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 6px 12px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hs-nav__title svg { width: 14px; height: 14px; opacity: .8; }

.hs-nav__link {
  position: relative;
  display: block;
  padding: 8px 12px 8px 13px;
  border-radius: 10px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.4;
  transition: background .2s ease, color .2s ease;
}

.hs-nav__link:hover { background: var(--bg-tint); color: var(--ink); text-decoration: none; }

.hs-nav__link.is-current {
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 600;
}

/* Активный пункт помечен оранжевой чертой слева — как выделение
   в боковой панели приложения. */
.hs-nav__link.is-current::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 3px; height: 17px;
  margin-top: -8.5px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}

.hs-nav__sub { list-style: none; margin: 4px 0 4px; padding: 0 0 0 22px; display: grid; gap: 1px; }

.hs-nav__sub a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
}

.hs-nav__sub a:hover { background: var(--bg-tint); color: var(--ink); text-decoration: none; }
.hs-nav__sub a.is-current { color: var(--accent); font-weight: 600; }

/* Карточка-подсказка внизу меню: овца и ссылка на поддержку */
.hs-side-card {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-sand);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .hs-side-card { background: var(--bg-2); }

.hs-side-card img {
  width: 62px;
  height: auto;
  margin: -46px 0 6px -6px;
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 14px rgba(30, 29, 26, .16));
}

.hs-side-card b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.hs-side-card p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.hs-side-card a { font-size: 13.5px; font-weight: 600; }

/* ============================== СТАТЬЯ ============================== */

.hs-content { min-width: 0; }

.hs-article {
  display: grid;
  gap: 26px;
  max-width: 100%;
}

.hs-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted-2);
  font-size: 13.5px;
}

.hs-crumbs a { color: var(--muted); }
.hs-crumbs a:hover { color: var(--accent); }
.hs-crumbs span[aria-hidden] { opacity: .55; }

.hs-head { display: grid; gap: 14px; }

.hs-head h1 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; }

.hs-head .hs-lead {
  font-size: clamp(16.5px, 1.15vw, 19px);
  color: var(--muted);
  max-width: 70ch;
}

.hs-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: var(--muted-2);
  font-size: 13.5px;
}

.hs-meta__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.hs-meta__chip svg { width: 14px; height: 14px; }

/* ---- типографика статьи ---- */

.hs-body { display: block; max-width: 74ch; }

/* На главной справки тело — это набор широких разделов с карточками,
   поэтому ограничение по ширине строки там снимается. */
.hs-body--home { max-width: none; }
.hs-body--home > * + * { margin-top: 0; }
.hs-body--home h2 { margin-top: 0; }

.hs-body > * + * { margin-top: 18px; }

.hs-body h2 {
  margin-top: 46px;
  font-size: clamp(22px, 2.2vw, 30px);
  scroll-margin-top: calc(var(--top-h) + 20px);
}

.hs-body h3 {
  margin-top: 30px;
  font-size: clamp(18px, 1.6vw, 21px);
  scroll-margin-top: calc(var(--top-h) + 20px);
}

.hs-body h4 { margin-top: 22px; font-size: 17px; scroll-margin-top: calc(var(--top-h) + 20px); }

.hs-body h2 + *, .hs-body h3 + *, .hs-body h4 + * { margin-top: 12px; }

/* Якорь у заголовка: появляется при наведении, ведёт на этот раздел */
.hs-anchor {
  margin-left: 8px;
  color: var(--line-2);
  font-weight: 400;
  opacity: 0;
  transition: opacity .2s ease, color .2s ease;
}

.hs-body h2:hover .hs-anchor,
.hs-body h3:hover .hs-anchor,
.hs-body h4:hover .hs-anchor,
.hs-anchor:focus-visible { opacity: 1; }

.hs-anchor:hover { color: var(--accent); text-decoration: none; }

.hs-body ul, .hs-body ol { margin: 16px 0 0; padding-left: 24px; display: grid; gap: 9px; }
.hs-body li { padding-left: 3px; }
.hs-body li::marker { color: var(--muted-2); }
.hs-body ul ul, .hs-body ol ol, .hs-body ul ol, .hs-body ol ul { margin-top: 9px; }

.hs-body strong { color: var(--ink); font-weight: 600; }

.hs-body a { font-weight: 500; }

.hs-body hr { height: 1px; margin: 34px 0; border: 0; background: var(--line); }

.hs-body blockquote {
  margin: 22px 0;
  padding: 2px 0 2px 20px;
  border-left: 3px solid var(--line-2);
  color: var(--muted);
}

/* ---- таблица ---- */

.hs-table-wrap { margin-top: 22px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }

.hs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  min-width: 460px;
}

.hs-table th, .hs-table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.hs-table th {
  background: var(--bg-tint);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

.hs-table tr:last-child td { border-bottom: 0; }
.hs-table td:first-child { color: var(--ink); font-weight: 600; }

/* ============================== ВЫНОСКИ ============================== */

.callout {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 4px 13px;
  margin: 24px 0;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  font-size: 15.5px;
  color: var(--muted);
}

.callout__icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 26px; height: 26px;
  border-radius: 8px;
  background: var(--bg-tint);
  color: var(--muted);
}

.callout__icon svg { width: 16px; height: 16px; }

/* Весь текст плашки — во второй колонке. Без этого правила второй абзац
   вставал в первую колонку шириной 26px и налезал на соседей: так ломались
   плашки со списком или несколькими абзацами. */
.callout > *:not(.callout__icon) { grid-column: 2; }

.callout__title { color: var(--ink); font-weight: 700; font-size: 15.5px; }
.callout p { margin: 0; }
.callout p + p { margin-top: 8px; }
.callout strong { color: var(--ink-2); }
.callout ul { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }

.callout--tip  { background: linear-gradient(180deg, var(--bg-2), var(--bg-sand)); }
.callout--tip  .callout__icon { background: rgba(231, 87, 31, .12); color: var(--accent); }

.callout--note .callout__icon { background: var(--blue-soft); color: var(--blue); }

.callout--warn { border-color: rgba(192, 57, 43, .28); background: rgba(192, 57, 43, .045); }
.callout--warn .callout__icon { background: rgba(192, 57, 43, .12); color: var(--red); }
[data-theme="dark"] .callout--warn { background: rgba(239, 139, 125, .07); }

/* ============================== ШАГИ ============================== */

.steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }

.steps > li {
  position: relative;
  padding: 2px 0 2px 46px;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
}

[data-theme="dark"] .steps > li::before { background: var(--accent); color: #fff; }

.steps b { color: var(--ink); }
.steps p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.steps ul { margin-top: 8px; }

/* ============================== ФИГУРЫ ============================== */

.figure { margin: 28px 0; }

.figure img,
.figure__frame {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  background: var(--bg-2);
}

.figure figcaption {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 13.5px;
  line-height: 1.5;
}

/* Скриншот приложения в рамке: собственные скругления картинки не мешают */
.figure__frame { overflow: hidden; }

/* ============================== КАРТОЧКИ ============================== */

.cards { display: grid; gap: 16px; margin-top: 26px; }
.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  display: block;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
  text-decoration: none;
  color: var(--ink-2);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--bg-tint);
  color: var(--accent);
}

.card__icon svg { width: 21px; height: 21px; }
.card h3 { font-size: 17.5px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }

.card__more { display: inline-block; margin-top: 12px; color: var(--accent); font-size: 14px; font-weight: 600; }

/* Карточка-категория на главной: список статей внутри */
.cat-card { display: grid; gap: 10px; padding: 24px; }
.cat-card__head { display: flex; align-items: center; gap: 12px; }
.cat-card__head .card__icon { margin: 0; }
.cat-card h3 { margin: 0; font-size: 18.5px; }
.cat-card p { margin: 0; }

.cat-card ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }

.cat-card li a {
  display: block;
  padding: 6px 10px;
  margin-left: -10px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 14.5px;
}

.cat-card li a:hover { background: var(--bg-tint); color: var(--ink); text-decoration: none; }

.cat-card li.is-current a { color: var(--accent); font-weight: 600; }

/* ============================== СПИСКИ-ФИЧИ ============================== */

/* Короткий список возможностей с галочками — как .ticks на лендинге */
.tick-list {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.tick-list li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
  font-size: 15.5px;
}

.tick-list li b { color: var(--ink-2); font-weight: 600; }

.tick-list li::before {
  content: '';
  position: absolute;
  left: 0; top: .42em;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23e7571f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 5'/%3E%3C/svg%3E") center/12px no-repeat;
}

[data-theme="dark"] .tick-list li::before {
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23f2682f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 12.5 5'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* ============================== ЧИПЫ И МЕТКИ ============================== */

.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 14px;
}

.chip b { color: var(--ink); font-weight: 600; }

.hs-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--bg-tint);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
}

.hs-badge--ok { background: rgba(47, 158, 99, .12); color: var(--green); }
.hs-badge--accent { background: var(--accent-soft); color: var(--accent-hover); }
[data-theme="dark"] .hs-badge--accent { color: var(--accent); }

/* ============================== FAQ ============================== */

.faq { display: grid; gap: 12px; margin-top: 26px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  overflow: hidden;
  transition: box-shadow .3s ease, border-color .3s ease;
}

.faq details[open] { box-shadow: var(--shadow-md); border-color: var(--line-2); }

.faq summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 18px 56px 18px 22px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '';
  position: absolute;
  right: 24px; top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--muted-2);
  border-bottom: 2px solid var(--muted-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .3s var(--ease);
}

.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }

.faq__body { padding: 0 22px 20px; color: var(--muted); font-size: 15.5px; display: grid; gap: 12px; }
.faq__body ul, .faq__body ol { margin: 0; padding-left: 22px; display: grid; gap: 7px; }
.faq__body strong { color: var(--ink-2); }

/* ============================== ОГЛАВЛЕНИЕ ============================== */

.hs-toc {
  position: sticky;
  top: calc(var(--top-h) + 22px);
  align-self: start;
  max-height: calc(100vh - var(--top-h) - 44px);
  overflow-y: auto;
  padding-left: 4px;
  font-size: 13.5px;
}

.hs-toc__title {
  margin: 0 0 10px 12px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.hs-toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }

.hs-toc a {
  display: block;
  padding: 6px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  line-height: 1.4;
}

.hs-toc a:hover { color: var(--ink); text-decoration: none; }
.hs-toc a.is-current { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }
.hs-toc li.is-sub a { padding-left: 24px; font-size: 13px; }

/* Статья и оглавление рядом: колонка оглавления появляется только тогда,
   когда для неё действительно есть место. */
.hs-doc {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

@media (min-width: 1240px) {
  .hs-doc { grid-template-columns: minmax(0, 1fr) var(--toc-w); }
}

/* ============================== НИЗ СТАТЬИ ============================== */

.hs-foot-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px 24px;
  align-items: center;
  margin-top: 46px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-sand);
}

[data-theme="dark"] .hs-foot-block { background: var(--bg-2); }

.hs-foot-block b { display: block; color: var(--ink); font-size: 16.5px; margin-bottom: 4px; }
.hs-foot-block p { color: var(--muted); font-size: 14.5px; }

/* Соседние страницы: «назад — далее» */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; }

.pager a {
  display: grid;
  gap: 5px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  color: var(--ink-2);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s ease;
}

.pager a:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); text-decoration: none; }

.pager small { color: var(--muted-2); font-size: 12.5px; }
.pager b { color: var(--ink); font-size: 16px; }
.pager .pager--next { text-align: right; grid-column: 2; }
.pager .pager--next small::after { content: ' →'; }
.pager .pager--prev small::before { content: '← '; }

/* ============================== ГЛАВНАЯ СПРАВКИ ============================== */

.hs-hero {
  position: relative;
  overflow: hidden;
  padding: 26px 0 10px;
}

.hs-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
  padding: 26px 0 8px;
}

.hs-hero h1 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.12; max-width: 20ch; }

.hs-hero .hs-lead { font-size: clamp(16.5px, 1.2vw, 19px); color: var(--muted); max-width: 62ch; }

.hs-hero__search { width: min(620px, 100%); margin-top: 6px; text-align: left; }

.hs-hero__search .hs-search { flex: 1 1 auto; width: 100%; }
.hs-hero__search .hs-search__panel { left: 0; right: 0; width: auto; }

.hs-hero__quick { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }

.hs-hero__sheep {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 118px;
  height: auto;
  margin-left: 320px;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 18px rgba(30, 29, 26, .16));
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hs-hero .hs-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hs-blob--orange {
  width: 520px; height: 520px;
  left: -140px; top: -200px;
  background: radial-gradient(circle at 50% 50%, rgba(231, 87, 31, .26), rgba(231, 87, 31, 0) 68%);
}

.hs-blob--blue {
  width: 460px; height: 460px;
  right: -140px; top: -160px;
  background: radial-gradient(circle at 50% 50%, rgba(62, 123, 182, .22), rgba(62, 123, 182, 0) 70%);
}

.hs-section { padding: 54px 0 0; }

.hs-section__head { display: grid; gap: 10px; margin-bottom: 26px; max-width: 76ch; }
.hs-section__head h2 { font-size: clamp(22px, 2.4vw, 31px); }
.hs-section__head p { color: var(--muted); }

.hs-popular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; margin-top: 8px; }

.hs-popular a {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  color: var(--ink-2);
  font-size: 15.5px;
  box-shadow: var(--shadow-sm);
  transition: transform .28s var(--ease), box-shadow .28s var(--ease), border-color .28s ease;
}

.hs-popular a:hover { transform: translateX(3px); box-shadow: var(--shadow-md); border-color: var(--line-2); text-decoration: none; }
.hs-popular span { flex: none; color: var(--accent); font-weight: 700; font-size: 14px; }

/* ============================== ПОДВАЛ ============================== */

.hs-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-tint);
  padding: 40px 0;
  margin-top: 40px;
}

.hs-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  align-items: center;
}

.hs-footer__brand { display: flex; align-items: center; gap: 11px; flex: none; }
.hs-footer__brand img { width: 34px; height: 34px; border-radius: 9px; image-rendering: pixelated; }
.hs-footer__brand b { display: block; color: var(--ink); font-size: 15.5px; }
.hs-footer__brand span { color: var(--muted-2); font-size: 13px; }

.hs-footer__links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.hs-footer__links a { color: var(--muted); font-size: 14.5px; }
.hs-footer__links a:hover { color: var(--accent); }

.hs-footer__note { width: 100%; color: var(--muted-2); font-size: 13px; }

/* ============================== ПОДСКАЗКА ============================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  max-width: min(560px, calc(100vw - 32px));
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-size: 14.5px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  z-index: 130;
  transition: opacity .3s ease, transform .35s var(--ease), visibility .3s;
}

.toast.is-visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ============================== АДАПТИВ ============================== */

@media (max-width: 1180px) {
  .hs-layout { gap: 36px; }
}

@media (max-width: 1000px) {
  .hs-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }

  /* Меню уезжает в выдвижную панель, как бургерное меню лендинга */
  .hs-sidebar {
    position: fixed;
    top: var(--top-h);
    left: 0;
    bottom: 0;
    width: min(330px, 86vw);
    max-height: none;
    padding: 22px 18px 40px;
    background: var(--bg-2);
    border-right: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    transform: translateX(-104%);
    transition: transform .34s var(--ease);
    z-index: 95;
    overflow-y: auto;
  }

  .hs-sidebar.is-open { transform: none; }
  .hs-burger { display: grid; }

  .hs-scrim {
    display: block;
    position: fixed;
    inset: var(--top-h) 0 0 0;
    background: rgba(30, 29, 26, .42);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s;
    z-index: 94;
  }

  .hs-scrim.is-open { opacity: 1; visibility: visible; }

  .hs-search { flex: 1 1 auto; }
  .hs-search__hint { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 20px; }
  .hs-brand__tag { display: none; }
  .hs-top__actions .btn { display: none; }
  .hs-hero__sheep { display: none; }
  .hs-popular { grid-template-columns: minmax(0, 1fr); }
  .cards--2, .cards--3 { grid-template-columns: minmax(0, 1fr); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .pager--next { grid-column: auto; text-align: left; }
  .pager .pager--next small::after { content: ''; }
  .pager .pager--next small::before { content: '→ '; }
  .hs-foot-block { grid-template-columns: minmax(0, 1fr); }
  .hs-body h2 { margin-top: 38px; }
}

@media (max-width: 520px) {
  .hs-brand .hs-brand__name { display: none; }
  .hs-table { min-width: 380px; }
}

/* ============================== ПЕЧАТЬ ============================== */

@media print {
  .hs-top, .hs-sidebar, .hs-toc, .hs-footer, .hs-progress, .pager, .hs-foot-block { display: none !important; }
  .hs-main { padding-top: 0; }
  .hs-layout, .hs-doc { display: block; }
  .hs-body { max-width: none; }
  .hs-body h2 { page-break-after: avoid; }
  .figure, .callout, .hs-table-wrap { page-break-inside: avoid; }
}

/* ============================== ДВИЖЕНИЕ ============================== */

/* Появление блоков при прокрутке включает только скрипт: класс hs-js ставится
   в <head> до отрисовки. Без скриптов текст статьи просто виден сразу — иначе
   статья осталась бы невидимой. */
.hs-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s ease, transform .8s cubic-bezier(.16, .84, .24, 1);
}

.hs-js [data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .07s; }
[data-reveal-delay="2"] { transition-delay: .14s; }
[data-reveal-delay="3"] { transition-delay: .21s; }
[data-reveal-delay="4"] { transition-delay: .28s; }

#hsBlobA { animation: hsDriftA 24s ease-in-out infinite; }
#hsBlobB { animation: hsDriftB 28s ease-in-out infinite; }

@keyframes hsDriftA {
  0%, 100% { translate: 0 0; scale: 1; }
  50%      { translate: 30px 22px; scale: 1.07; }
}

@keyframes hsDriftB {
  0%, 100% { translate: 0 0; scale: 1; }
  50%      { translate: -26px 28px; scale: 1.05; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  [data-reveal] { opacity: 1; transform: none; }
}
