/* Helpdesk Integrator.Digital — вариант дизайна A «Классика» */
:root {
    --acc: oklch(0.5 0.17 255);
    --acc-hover: oklch(0.42 0.17 255);
    --acc-btn: oklch(0.53 0.17 255);
    --acc-title: oklch(0.45 0.17 255);
    --acc-soft: oklch(0.955 0.025 255);
    --hl: oklch(0.92 0.1 95);
    --warn-soft: oklch(0.96 0.03 85);
    --ok-soft: oklch(0.96 0.035 155);
    --ink: #1b1e24;
    --ink2: #2f343d;
    --muted: #5d6472;
    --light: #8a909c;
    --line: #e4e6eb;
    --line-input: #dfe2e7;
    --line-soft: #eef0f3;
    --bg: #f6f7f9;
    --hover: #f2f4f8;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: 'Golos Text', system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
input, button { font-family: inherit; }
a { color: var(--acc); text-decoration: none; }
a:hover { color: var(--acc-hover); text-decoration: underline; }
mark { background: var(--hl); color: inherit; border-radius: 2px; }

.hd { min-height: 100vh; display: flex; flex-direction: column; }
.hd-wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.hd-only-mobile { display: none; }

/* ---------- Шапка ---------- */
.hd-header { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--line); }
.hd-header__row { min-height: 64px; display: flex; align-items: center; gap: 20px; }
.hd-header__spacer { flex: 1; }
.hd-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--ink); }
.hd-logo:hover { color: var(--ink); text-decoration: none; }
.hd-logo__name { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.hd-logo__badge { font-size: 12px; color: var(--muted); padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; }
.hd-btn { flex-shrink: 0; display: flex; align-items: center; height: 40px; padding: 0 16px; border-radius: 8px; background: var(--acc-btn); color: #fff; font-size: 14px; font-weight: 500; }
.hd-btn:hover { color: #fff; text-decoration: none; background: var(--acc); }

/* Поиск */
.hd-search { position: relative; margin: 0; }
.hd-search--desktop { width: 100%; max-width: 380px; }
.hd-search--mobile { display: none; padding: 0 16px 12px; }
.hd-search__box { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border: 1px solid var(--line-input); border-radius: 8px; background: var(--bg); color: var(--muted); cursor: text; }
.hd-search__box:focus-within { border-color: var(--acc-btn); }
.hd-search__box input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 14px; color: var(--ink); min-width: 0; padding: 0; -webkit-appearance: none; appearance: none; }
.hd-search__box input::-webkit-search-cancel-button { display: none; }
.hd-sug { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(20, 24, 33, .12); padding: 6px; z-index: 30; }
.hd-sug[hidden] { display: none; }
.hd-search--mobile .hd-sug { top: calc(100% - 6px); left: 16px; right: 16px; }
.hd-sug__item { display: block; padding: 8px 10px; border-radius: 6px; color: var(--ink); }
.hd-sug__item:hover, .hd-sug__item.is-active { background: var(--hover); color: var(--ink); text-decoration: none; }
.hd-sug__title { display: block; font-size: 14px; font-weight: 500; }
.hd-sug__crumb { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.hd-sug__empty { padding: 10px; font-size: 13px; color: var(--muted); }
.hd-sug__all { display: block; width: 100%; text-align: left; border: 0; background: transparent; cursor: pointer; padding: 10px; border-top: 1px solid var(--line-soft); margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--acc); }

/* Меню разделов */
.hd-menu { border-top: 1px solid var(--line-soft); }
.hd-menu__row { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.hd-menu__row::-webkit-scrollbar { display: none; }
.hd-menu__item { padding: 14px 0 12px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.hd-menu__item:hover { color: var(--acc); text-decoration: none; }
.hd-menu__item.is-active { font-weight: 600; color: var(--acc); border-bottom-color: var(--acc); }

/* ---------- Общие блоки ---------- */
.hd-main { padding-top: 44px; padding-bottom: 64px; }
.hd-more { font-size: 14px; font-weight: 500; color: var(--acc); }
.hd-grid { display: grid; gap: 12px; }
.hd-grid--products { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.hd-grid--section { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.hd-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; }
.hd-card--product { padding: 18px 20px; gap: 6px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.hd-card--product:hover { border-color: var(--acc-btn); box-shadow: 0 6px 18px rgba(30, 60, 140, .08); color: var(--ink); text-decoration: none; }
.hd-card__name { font-weight: 600; font-size: 16px; line-height: 1.3; }
.hd-card__desc { font-size: 14px; color: var(--muted); line-height: 1.45; }
.hd-card--section { padding: 20px; gap: 12px; }
.hd-card--section .hd-card__desc { margin-top: 4px; }
.hd-card__name--link { display: block; font-size: 17px; color: var(--ink); }
.hd-card__name--link:hover { color: var(--acc); text-decoration: none; }
.hd-card__quick { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.hd-card__quick a { font-size: 14px; padding: 5px 0; color: var(--ink2); }
.hd-card__quick a:hover { color: var(--acc); text-decoration: none; }
.hd-card--section .hd-more { align-self: flex-start; }
.hd-caption { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--light); margin-bottom: 6px; }

/* Главная */
.hd-home__title { font-size: 34px; letter-spacing: -0.02em; margin: 0 0 8px; text-wrap: balance; }
.hd-home__lead { margin: 0 0 40px; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 620px; text-wrap: pretty; }
.hd-home__sections { display: flex; flex-direction: column; gap: 48px; }
.hd-home__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.hd-home__h2 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.hd-home__desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* Раздел */
.hd-main--section { padding-top: 28px; }
.hd-crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 20px; flex-wrap: wrap; }
.hd-section__title { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 6px; }
.hd-section__desc { margin: 0 0 28px; color: var(--muted); font-size: 16px; }

/* ---------- Статья ---------- */
.hd-artbar { background: #fff; border-bottom: 1px solid var(--line); }
.hd-artbar__row { padding-top: 10px; padding-bottom: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hd-artbar__back { display: flex; align-items: center; border: 1px solid var(--line-input); background: #fff; border-radius: 8px; height: 34px; padding: 0 12px; font-size: 13px; color: var(--ink); }
.hd-artbar__back:hover { border-color: var(--acc-btn); color: var(--ink); text-decoration: none; }
.hd-artbar__crumbs { display: flex; gap: 8px; font-size: 13px; color: var(--muted); flex-wrap: wrap; flex: 1 1 260px; min-width: 0; }
.hd-artbar__crumbs a { color: var(--muted); }
.hd-artbar__crumbs a:hover { color: var(--acc); }
.hd-artbar__current { color: var(--ink); }
.hd-artbar__site { font-size: 13px; }

.hd-artlayout { display: flex; gap: 40px; align-items: flex-start; }
.hd-side { width: 250px; flex-shrink: 0; position: sticky; top: 126px; padding: 28px 0 40px; max-height: calc(100vh - 126px); overflow: auto; }
.hd-side__product { font-weight: 600; font-size: 15px; margin-bottom: 16px; line-height: 1.3; }
.hd-side__group { margin-bottom: 18px; }
.hd-side__caption { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--light); margin-bottom: 6px; }
.hd-side__item { display: block; font-size: 14px; padding: 7px 10px; border-radius: 6px; color: var(--ink2); }
.hd-side__item:hover { color: var(--acc); text-decoration: none; }
.hd-side__item.is-active { color: var(--acc); background: var(--acc-soft); font-weight: 600; }

.hd-article { flex: 1; min-width: 0; padding: 32px 0 64px; max-width: 760px; }
.hd-article__group { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.hd-article__title { font-size: 32px; letter-spacing: -0.02em; margin: 0 0 10px; line-height: 1.2; text-wrap: balance; }
.hd-article__meta { font-size: 13px; color: var(--light); margin-bottom: 28px; }

/* Мобильное меню статей */
.hd-mnav { display: none; margin-bottom: 20px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.hd-mnav summary { display: flex; justify-content: space-between; align-items: center; padding: 0 14px; height: 48px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--ink); list-style: none; }
.hd-mnav summary::-webkit-details-marker { display: none; }
.hd-mnav__icon::before { content: '+'; }
.hd-mnav[open] .hd-mnav__icon::before { content: '−'; }
.hd-mnav__list { padding: 0 8px 10px; border-top: 1px solid var(--line-soft); }
.hd-mnav .hd-side__group { margin: 0; }
.hd-mnav .hd-side__caption { font-size: 11px; margin: 12px 6px 4px; }
.hd-mnav .hd-side__item { padding: 10px 8px; }

/* Оглавление */
.hd-toc { width: 190px; flex-shrink: 0; position: sticky; top: 126px; padding-top: 36px; font-size: 13px; max-height: calc(100vh - 126px); overflow: auto; }
.hd-toc__caption { color: var(--light); margin-bottom: 10px; }
.hd-toc__list { display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; }
.hd-toc__list a { color: var(--ink2); }
.hd-toc__list a:hover, .hd-toc__list a.is-active { color: var(--acc); text-decoration: none; }

/* Текст статьи */
.hd-content { font-size: 16px; line-height: 1.65; color: var(--ink2); }
.hd-content > :first-child { margin-top: 0; }
.hd-content p { margin: 0 0 20px; text-wrap: pretty; }
.hd-content .hd-lead { font-size: 17px; color: var(--muted); }
.hd-content h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 12px; color: var(--ink); scroll-margin-top: 130px; }
.hd-content h3 { font-size: 18px; line-height: 1.35; margin: 28px 0 8px; color: var(--ink); }
.hd-content ul, .hd-content ol { margin: 0 0 20px; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.hd-content code { font-family: 'JetBrains Mono', monospace; font-size: 14px; background: var(--hover); border-radius: 4px; padding: 1px 5px; }
.hd-content .ui { background: var(--hover); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; font-size: 14px; white-space: nowrap; color: var(--ink); }

.hd-step { display: flex; gap: 12px; margin: 24px 0 12px; }
.hd-step__n { flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--acc-soft); color: var(--acc); font-weight: 600; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: -1px; }
.hd-step__b { flex: 1; min-width: 0; }
.hd-step__b > :last-child { margin-bottom: 0; }
.hd-step__b p { margin-bottom: 8px; }

.hd-content figure { margin: 0 0 24px; }
.hd-content figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 10px; background: #f0f2f5; cursor: zoom-in; }
.hd-content figcaption { font-size: 13px; color: var(--light); margin-top: 8px; }

.hd-note { background: var(--warn-soft); border-radius: 10px; padding: 14px 16px; font-size: 15px; margin-bottom: 24px; }
.hd-note--info { background: var(--acc-soft); }
.hd-note--ok { background: var(--ok-soft); }
.hd-note b:first-child { color: var(--ink); }

.hd-table { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.hd-table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.hd-table th, .hd-table td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.hd-table tr:last-child td { border-bottom: 0; }
.hd-table th { background: var(--bg); color: var(--ink); font-weight: 600; font-size: 14px; }
.hd-table td:first-child { color: var(--ink); font-weight: 500; }

.hd-content .hd-check { list-style: none; padding-left: 0; gap: 10px; }
.hd-check li { position: relative; padding-left: 30px; }
.hd-check li::before { content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border: 1.5px solid var(--acc-btn); border-radius: 5px; background: #fff; }

/* Предыдущая / следующая */
.hd-pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 40px; }
.hd-pager__item { display: block; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 14px 16px; color: var(--ink); }
.hd-pager__item:hover { border-color: var(--acc-btn); color: var(--ink); text-decoration: none; }
.hd-pager__item--next { text-align: right; }
.hd-pager__label { display: block; font-size: 12px; color: var(--light); }
.hd-pager__title { display: block; font-size: 15px; font-weight: 500; margin-top: 4px; }

/* Просмотр скриншотов */
.hd-lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(10, 14, 25, .9); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; }
.hd-lightbox[hidden] { display: none; }
.hd-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }

/* ---------- Поиск ---------- */
.hd-main--search { padding-top: 32px; }
.hd-search-page__title { font-size: 28px; letter-spacing: -0.02em; margin: 0 0 6px; }
.hd-search-page__label { margin: 0 0 28px; color: var(--muted); font-size: 15px; }
.hd-search-page__body { display: flex; gap: 40px; align-items: flex-start; flex-wrap: wrap; }
.hd-filters { width: 220px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.hd-filters__item { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 10px; border-radius: 6px; color: var(--ink2); }
.hd-filters__item:hover { color: var(--acc); text-decoration: none; }
.hd-filters__item.is-active { color: var(--acc); background: var(--acc-soft); font-weight: 600; }
.hd-filters__count { color: var(--light); }
.hd-results { flex: 1; min-width: 260px; display: flex; flex-direction: column; gap: 10px; }
.hd-result { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.hd-result:hover { border-color: var(--acc-btn); text-decoration: none; }
.hd-result__crumb { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hd-result__title { display: block; font-size: 17px; font-weight: 600; color: var(--acc-title); }
.hd-result__snippet { display: block; font-size: 14px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.hd-empty { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 28px; font-size: 15px; color: var(--muted); line-height: 1.5; }

/* ---------- Подвал ---------- */
.hd-footer { margin-top: auto; border-top: 1px solid var(--line); background: #fff; }
.hd-footer__row { padding-top: 20px; padding-bottom: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }

/* ---------- Адаптив ---------- */
@media (max-width: 1179px) {
    .hd-toc { display: none; }
}
@media (max-width: 759px) {
    .hd-wrap { padding: 0 16px; }
    .hd-only-desktop, .hd-search--desktop, .hd-side { display: none; }
    .hd-only-mobile { display: inline; }
    .hd-search--mobile { display: block; }
    .hd-search--mobile .hd-search__box { height: 44px; }
    .hd-search--mobile input { font-size: 16px; }
    .hd-btn--site { height: 36px; padding: 0 12px; font-size: 13px; }
    .hd-header__row { gap: 12px; }
    .hd-mnav { display: block; }
    .hd-artbar__site { display: none; }
    .hd-home__title { font-size: 28px; }
    .hd-main { padding-top: 32px; }
    .hd-main--section, .hd-main--search { padding-top: 24px; }
    .hd-article { padding-top: 20px; }
    .hd-article__title { font-size: 26px; }
    .hd-grid--section { grid-template-columns: 1fr; }
    .hd-filters { width: 100%; }
    .hd-step { gap: 10px; }
    .hd-content h2 { scroll-margin-top: 190px; }
}
