/* =========================================================
   RUSTOFILYA — KNOWLEDGE BASE
   Помощь, руководства, документы и контакты
   ========================================================= */

.kb-page {
    --kb-bg: #101113;
    --kb-surface: #191b20;
    --kb-surface-raised: #212329;

    --kb-orange: #ff7547;
    --kb-ink: #f4f2ee;
    --kb-muted: #96979f;

    --kb-line: rgba(255, 255, 255, 0.09);
    --kb-line-strong: rgba(255, 255, 255, 0.16);
    --kb-accent-rgb: 255, 117, 71;
    --kb-ease: cubic-bezier(.22, 1, .36, 1);

    min-width: 0;
    min-height: 72vh;
    padding: 40px 0 75px;
    background:
            radial-gradient(
                    ellipse at 90% 0,
                    rgba(var(--kb-accent-rgb), 0.045),
                    transparent 48%
            ),
            var(--kb-bg);
    color: var(--kb-ink);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   БАЗА
   ========================================================= */

.kb-page *,
.kb-page *::before,
.kb-page *::after {
    box-sizing: border-box;
}

.kb-page [hidden] {
    display: none !important;
}

.kb-page :is(h1, h2, h3, p) {
    margin: 0;
}

.kb-page :is(h1, h2, h3) {
    font-family: inherit;
    text-wrap: balance;
}

.kb-page a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.kb-page button,
.kb-page input,
.kb-page textarea,
.kb-page select {
    font: inherit;
}

.kb-page button {
    cursor: pointer;
}

.kb-page button:disabled {
    cursor: not-allowed;
}

.kb-page :is(a, button, input, textarea, select):focus-visible {
    outline: 2px solid var(--kb-orange);
    outline-offset: 5px;
}

.kb-page ::selection {
    background: var(--kb-orange);
    color: var(--kb-bg);
}

/* =========================================================
   ОСНОВНАЯ СЕТКА
   ========================================================= */

.kb-page .kb-layout {
    display: grid;
    grid-template-columns: 235px minmax(0, 1fr);
    align-items: start;
    gap: 28px;
    width: min(1240px, calc(100% - 64px));
    margin-inline: auto;
}

.kb-page .kb-main {
    display: grid;
    min-width: 0;
    gap: 32px;
}

/* =========================================================
   БОКОВАЯ ПАНЕЛЬ
   ========================================================= */

.kb-page .kb-sidebar {
    position: sticky;
    top: 160px;
    min-width: 0;
    padding: 22px 13px 18px;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    background:
            linear-gradient(
                    145deg,
                    rgba(255, 255, 255, 0.018),
                    transparent 70%
            ),
            var(--kb-surface);
    box-shadow:
            inset 0 1px rgba(255, 255, 255, 0.025),
            0 15px 40px rgba(0, 0, 0, 0.07);
}

.kb-page .kb-side-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 8px 23px;
    color: var(--kb-ink);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.5;
}

.kb-page .kb-side-brand > span:last-child {
    min-width: 0;
}

.kb-page .kb-side-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 45px;
    flex-shrink: 0;
    padding-right: 3px;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.3);
    border-radius: 11px;
    background: linear-gradient(
            145deg,
            rgba(var(--kb-accent-rgb), 0.12),
            rgba(var(--kb-accent-rgb), 0.035)
    );
    color: var(--kb-orange);
    box-shadow: inset 0 1px rgba(255, 199, 168, 0.05);
    font-size: 21px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -2px;
}

.kb-page .kb-side-brand small {
    display: block;
    margin-top: 6px;
    color: #7b7f89;
    font-size: 7px;
    font-weight: 400;
    letter-spacing: 1.3px;
    line-height: 1.7;
}

.kb-page .kb-nav-label {
    margin: 15px 10px 11px;
    color: #747984;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.3px;
    line-height: 1.8;
}

/* =========================================================
   МЕНЮ
   ========================================================= */

.kb-page .kb-side-nav {
    display: grid;
    gap: 5px;
}

.kb-page .kb-side-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #a0a3ad;
    font-size: 11px;
    line-height: 1.7;
    transition:
            background 0.2s,
            color 0.2s,
            border-color 0.2s;
}

.kb-page .kb-side-nav a > span:first-child {
    width: 17px;
    flex-shrink: 0;
    color: #818590;
    font-size: 16px;
    line-height: 1;
    text-align: center;
}

.kb-page .kb-side-nav a > span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.kb-page .kb-side-nav a.is-active {
    border-color: rgba(var(--kb-accent-rgb), 0.2);
    background: linear-gradient(
            100deg,
            rgba(var(--kb-accent-rgb), 0.11),
            rgba(var(--kb-accent-rgb), 0.025)
    );
    color: #ffad88;
}

.kb-page .kb-side-nav a.is-active > span:first-child {
    color: var(--kb-orange);
}

.kb-page .kb-sidebar-bottom {
    margin: 24px 8px 0;
    padding-top: 19px;
    border-top: 1px solid var(--kb-line);
}

.kb-page .kb-sidebar-bottom p {
    color: #9598a2;
    font-size: 11px;
    line-height: 1.7;
}

.kb-page .kb-sidebar-bottom a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 11px;
    color: #e3a07f;
    font-size: 12px;
    line-height: 1.6;
}

.kb-page .kb-sidebar-bottom a > span:last-child {
    font-size: 18px;
}

.kb-page .kb-sidebar-bottom small {
    display: block;
    margin-top: 10px;
    color: #777d88;
    font-size: 10px;
    line-height: 1.8;
}

/* =========================================================
   ГЛАВНЫЙ БЛОК
   ========================================================= */

.kb-page .kb-hero {
    position: relative;
    isolation: isolate;
    padding: 38px;
    overflow: hidden;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.16);
    border-radius: 20px;
    background:
            radial-gradient(
                    ellipse at 100% 0,
                    rgba(var(--kb-accent-rgb), 0.11),
                    transparent 65%
            ),
            linear-gradient(125deg, #222126, #191b20);
    box-shadow:
            inset 0 1px rgba(255, 255, 255, 0.025),
            0 18px 45px rgba(0, 0, 0, 0.07);
}

.kb-page .kb-hero::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background-image:
            linear-gradient(
                    rgba(255, 255, 255, 0.02) 1px,
                    transparent 1px
            ),
            linear-gradient(
                    90deg,
                    rgba(255, 255, 255, 0.02) 1px,
                    transparent 1px
            );
    background-size: 45px 45px;
    mask-image: linear-gradient(
            90deg,
            transparent 25%,
            #000
    );
    pointer-events: none;
}

.kb-page .kb-hero-decor {
    position: absolute;
    z-index: -1;
    top: -40px;
    right: 25px;
    color: rgba(255, 168, 125, 0.055);
    font-size: 280px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;
    transform: rotate(-8deg);
    pointer-events: none;
    user-select: none;
}

.kb-page .kb-eyebrow {
    position: relative;
    color: var(--kb-orange);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.8;
}

.kb-page h1 {
    position: relative;
    margin-top: 16px;
    color: var(--kb-ink);
    font-size: clamp(33px, 3.8vw, 50px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.12;
}

.kb-page h1 > span {
    color: var(--kb-orange);
}

.kb-page .kb-lead {
    position: relative;
    max-width: 630px;
    margin-top: 20px;
    color: #a1a2ab;
    font-size: 14px;
    line-height: 1.9;
}

.kb-page .kb-hero-tags {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 25px;
}

.kb-page .kb-hero-tags span {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.015);
    color: #aaa4a9;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.7px;
    line-height: 1.6;
}

/* =========================================================
   ПОИСК
   ========================================================= */

.kb-page .kb-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    max-width: 700px;
    min-height: 52px;
    margin-top: 27px;
    padding-inline: 16px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;
    background: rgba(9, 10, 13, 0.38);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.08);
    transition:
            border-color 0.2s,
            box-shadow 0.2s;
}

.kb-page .kb-search > span:first-child {
    flex-shrink: 0;
    color: #c58c71;
    font-size: 26px;
    line-height: 1;
}

.kb-page .kb-search input {
    width: 100%;
    min-width: 0;
    padding: 15px 0;
    border: 0;
    background: transparent;
    color: var(--kb-ink);
    font-size: 13px;
    line-height: 1.7;
}

.kb-page .kb-search input::placeholder {
    color: #777d88;
    opacity: 1;
}

.kb-page .kb-search input:focus {
    outline: none;
}

.kb-page .kb-search:focus-within {
    border-color: rgba(var(--kb-accent-rgb), 0.6);
    outline: 2px solid var(--kb-orange);
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(var(--kb-accent-rgb), 0.035);
}

.kb-page .kb-search-hint {
    flex-shrink: 0;
    color: #777681;
    font-size: 8px;
    letter-spacing: 1px;
    white-space: nowrap;
}

.kb-page .kb-search-empty {
    padding: 23px;
    border: 1px dashed rgba(var(--kb-accent-rgb), 0.25);
    border-radius: 12px;
    background: rgba(var(--kb-accent-rgb), 0.02);
    color: #bcaca4;
    font-size: 13px;
    line-height: 1.9;
}

/* =========================================================
   ЗАГОЛОВКИ РАЗДЕЛОВ
   ========================================================= */

.kb-page .kb-section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 21px;
}

.kb-page .kb-section-title > div {
    min-width: 0;
}

.kb-page .kb-section-title h2 {
    margin-top: 9px;
    color: var(--kb-ink);
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -0.9px;
    line-height: 1.25;
}

.kb-page .kb-section-title > a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding-bottom: 3px;
    color: #e0a080;
    font-size: 11px;
    line-height: 1.7;
}

.kb-page .kb-section-note {
    padding-bottom: 3px;
    color: #777d87;
    font-size: 8px;
    letter-spacing: 0.8px;
    line-height: 1.7;
}

/* =========================================================
   КАРТОЧКИ РУКОВОДСТВ И РАЗДЕЛОВ
   ========================================================= */

.kb-page .kb-topic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 17px;
}

.kb-page .kb-topic {
    position: relative;
    isolation: isolate;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--kb-line);
    border-radius: 16px;
    background:
            linear-gradient(
                    140deg,
                    rgba(255, 255, 255, 0.012),
                    transparent 70%
            ),
            var(--kb-surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
    transition:
            transform 0.3s var(--kb-ease),
            border-color 0.3s,
            box-shadow 0.3s;
}

.kb-page .kb-topic::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background: radial-gradient(
            ellipse at 90% 0,
            rgba(var(--kb-accent-rgb), 0.08),
            transparent 70%
    );
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.kb-page .kb-topic-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 24px;
    color: inherit;
}

.kb-page .kb-topic-link:focus-visible {
    outline-offset: -5px;
    border-radius: inherit;
}

.kb-page .kb-topic-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.kb-page .kb-topic-icon {
    display: grid;
    place-items: center;
    width: 41px;
    height: 43px;
    flex-shrink: 0;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.2);
    border-radius: 11px;
    background: rgba(var(--kb-accent-rgb), 0.045);
    color: #e19b7b;
    box-shadow: inset 0 1px rgba(255, 199, 168, 0.035);
    font-size: 22px;
    line-height: 1;
}

.kb-page .kb-card-state {
    max-width: 100%;
    padding: 5px 7px;
    border: 1px solid var(--kb-line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.012);
    color: #85848f;
    font-size: 7px;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.kb-page .kb-topic h3 {
    margin-top: 23px;
    color: var(--kb-ink);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.kb-page .kb-topic p {
    margin-top: 12px;
    margin-bottom: 24px;
    color: var(--kb-muted);
    font-size: 12px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.kb-page .kb-topic-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--kb-line);
    color: #dda080;
    font-size: 11px;
    line-height: 1.7;
}

.kb-page .kb-topic-bottom > span:last-child {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.25s var(--kb-ease);
}

/* =========================================================
   ЧАСТЫЕ ВОПРОСЫ
   ========================================================= */

.kb-page .kb-faq {
    overflow: hidden;
    border: 1px solid var(--kb-line);
    border-radius: 16px;
    background: var(--kb-surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.kb-page .kb-faq details + details {
    border-top: 1px solid var(--kb-line);
}

.kb-page .kb-faq details[open] {
    background: rgba(var(--kb-accent-rgb), 0.025);
}

.kb-page .kb-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 23px 25px;
    color: #e3dfe2;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.7;
    list-style: none;
    cursor: pointer;
}

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

.kb-page .kb-faq summary > span:last-child {
    color: #e09977;
    transition: transform 0.25s var(--kb-ease);
}

.kb-page .kb-faq details[open] summary > span:last-child {
    transform: rotate(45deg);
}

.kb-page .kb-faq details > p {
    max-width: 850px;
    padding: 0 25px 24px;
    color: #a1a1ad;
    font-size: 13px;
    line-height: 1.95;
}

/* =========================================================
   БЛОК ПОДДЕРЖКИ
   ========================================================= */

.kb-page .kb-contact-strip {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 32px;
    overflow: hidden;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.2);
    border-radius: 18px;
    background:
            radial-gradient(
                    ellipse at 100% 0,
                    rgba(var(--kb-accent-rgb), 0.09),
                    transparent 65%
            ),
            linear-gradient(125deg, #221e22, #191b20);
    box-shadow: inset 0 1px rgba(255, 199, 168, 0.025);
}

.kb-page .kb-contact-strip > div {
    min-width: 0;
}

.kb-page .kb-contact-strip h2 {
    margin-top: 10px;
    color: var(--kb-ink);
    font-size: 30px;
    font-weight: 750;
    letter-spacing: -1px;
    line-height: 1.2;
}

.kb-page .kb-contact-strip p:not(.kb-eyebrow) {
    max-width: 560px;
    margin-top: 14px;
    color: #aaa0a4;
    font-size: 13px;
    line-height: 1.9;
}

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

.kb-page .kb-button {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 21px;
    min-height: 47px;
    flex-shrink: 0;
    padding: 13px 19px;
    overflow: hidden;
    border: 1px solid rgba(255, 188, 157, 0.25);
    border-radius: 9px;
    background: linear-gradient(125deg, #ff936e, #ff7547 70%);
    color: #19110e;
    box-shadow:
            inset 0 1px rgba(255, 225, 209, 0.3),
            0 8px 25px rgba(var(--kb-accent-rgb), 0.1);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    transition:
            transform 0.25s var(--kb-ease),
            background 0.25s,
            border-color 0.25s,
            box-shadow 0.25s;
}

.kb-page .kb-button::before {
    position: absolute;
    z-index: 2;
    top: -100%;
    bottom: -100%;
    left: -45%;
    width: 18%;
    content: "";
    background: linear-gradient(
            100deg,
            transparent,
            rgba(255, 255, 255, 0.6),
            transparent
    );
    opacity: 0;
    transform: skewX(-18deg);
    pointer-events: none;
}

.kb-page .kb-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.kb-page .kb-button:disabled::before {
    display: none;
}

/* =========================================================
   УВЕДОМЛЕНИЯ О ЧЕРНОВИКАХ
   ========================================================= */

.kb-page .kb-draft-notice {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 19px 21px;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.18);
    border-radius: 12px;
    background: rgba(var(--kb-accent-rgb), 0.035);
}

.kb-page .kb-notice-icon {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.25);
    border-radius: 50%;
    background: rgba(var(--kb-accent-rgb), 0.07);
    color: #f1ad88;
    font-size: 12px;
    line-height: 1;
}

.kb-page .kb-draft-notice strong {
    color: #dfbaa5;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.7;
}

.kb-page .kb-draft-notice p {
    margin-top: 6px;
    color: #aa958b;
    font-size: 12px;
    line-height: 1.9;
}

/* =========================================================
   ХЛЕБНЫЕ КРОШКИ И ЗАГОЛОВОК СТАТЬИ
   ========================================================= */

.kb-page .kb-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #777d89;
    font-size: 10px;
    line-height: 1.8;
}

.kb-page .kb-breadcrumb a {
    color: #aaa7af;
    transition: color 0.2s;
}

.kb-page .kb-article-heading {
    min-width: 0;
}

.kb-page .kb-article-heading h1 {
    font-size: clamp(29px, 3vw, 42px);
    letter-spacing: -1.3px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.kb-page .kb-article-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    margin-top: 22px;
    color: #858894;
    font-size: 10px;
    line-height: 1.8;
}

.kb-page .kb-article-meta > span:first-child {
    color: #cb987b;
    letter-spacing: 1px;
}

.kb-page .kb-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 31px;
    padding: 6px 10px;
    border: 1px solid var(--kb-line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.025);
    color: #bbb1ae;
    font-size: 10px;
    line-height: 1.6;
    transition:
            color 0.2s,
            background 0.2s,
            border-color 0.2s;
}

/* =========================================================
   ДОКУМЕНТЫ И СТАТЬИ
   ========================================================= */

.kb-page .kb-reading-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 185px;
    align-items: start;
    gap: 25px;
}

.kb-page .kb-document {
    min-width: 0;
    padding: 34px;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    background: var(--kb-surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
}

.kb-page .kb-document-section {
    scroll-margin-top: 170px;
}

.kb-page .kb-document-section + .kb-document-section {
    margin-top: 30px;
    padding-top: 29px;
    border-top: 1px solid var(--kb-line);
}

.kb-page .kb-document-section h2,
.kb-page .kb-external-documents h2 {
    margin-bottom: 17px;
    color: #e8e3e0;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: -0.6px;
    line-height: 1.4;
}

.kb-page .kb-document-section p {
    color: #a9a8b1;
    font-size: 14px;
    line-height: 1.95;
    overflow-wrap: anywhere;
}

.kb-page .kb-document-section p + p {
    margin-top: 15px;
}

.kb-page .kb-document-section ul,
.kb-page .kb-document-section ol {
    margin: 15px 0 0;
    padding-left: 21px;
    color: #a9a8b1;
    font-size: 14px;
    line-height: 1.95;
}

.kb-page .kb-document-section li + li {
    margin-top: 10px;
}

.kb-page .kb-document-section li::marker {
    color: #d09171;
}

.kb-page .kb-document-section a {
    color: #efa685;
    text-decoration: underline;
    text-decoration-color: rgba(var(--kb-accent-rgb), 0.3);
    text-underline-offset: 4px;
}

.kb-page .kb-document-section strong {
    color: #ded8d5;
}

/* =========================================================
   СОДЕРЖАНИЕ ДОКУМЕНТА
   ========================================================= */

.kb-page .kb-toc {
    position: sticky;
    top: 160px;
    min-width: 0;
    padding-left: 18px;
    border-left: 1px solid var(--kb-line);
}

.kb-page .kb-toc > p {
    margin-bottom: 16px;
    color: #7d7d88;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.3px;
    line-height: 1.8;
}

.kb-page .kb-toc nav {
    display: grid;
    gap: 13px;
}

.kb-page .kb-toc nav a {
    color: #9798a3;
    font-size: 11px;
    line-height: 1.8;
    overflow-wrap: anywhere;
    transition: color 0.2s;
}

.kb-page .kb-toc nav a.is-active {
    color: #ffac87;
}

.kb-page .kb-toc-contact {
    display: block;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--kb-line);
    color: #d49b7c;
    font-size: 11px;
    line-height: 1.8;
}

/* =========================================================
   ДОПОЛНИТЕЛЬНЫЕ ДОКУМЕНТЫ И НИЖНЯЯ ПОДПИСЬ
   ========================================================= */

.kb-page .kb-external-documents {
    margin-top: 32px;
    padding-top: 27px;
    border-top: 1px solid var(--kb-line);
}

.kb-page .kb-external-documents > a {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding-block: 8px;
    color: #eda481;
    font-size: 13px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.kb-page .kb-external-documents p {
    margin-top: 14px;
    color: var(--kb-muted);
    font-size: 12px;
    line-height: 1.9;
}

.kb-page .kb-document-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 5px;
    padding-top: 21px;
    border-top: 1px solid var(--kb-line);
    color: #737580;
    font-size: 9px;
    line-height: 1.8;
}

.kb-page .kb-document-footer > span:first-child {
    font-size: 8px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.kb-page .kb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #d09a7e;
    font-size: 11px;
    line-height: 1.8;
}

.kb-page .kb-back-link > span:last-child {
    font-size: 17px;
}

/* =========================================================
   КОНТАКТЫ
   ========================================================= */

.kb-page .kb-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 19px;
}

.kb-page .kb-contact-card {
    position: relative;
    min-width: 0;
    padding: 29px;
    overflow: hidden;
    border: 1px solid var(--kb-line);
    border-radius: 17px;
    background:
            radial-gradient(
                    ellipse at 100% 0,
                    rgba(var(--kb-accent-rgb), 0.03),
                    transparent 65%
            ),
            var(--kb-surface);
    box-shadow: inset 0 1px rgba(255, 255, 255, 0.02);
    transition:
            border-color 0.25s,
            box-shadow 0.25s;
}

.kb-page .kb-contact-icon {
    display: grid;
    place-items: center;
    width: 45px;
    height: 47px;
    margin-bottom: 23px;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.2);
    border-radius: 12px;
    background: rgba(var(--kb-accent-rgb), 0.035);
    color: #e59c7a;
    font-size: 22px;
    font-weight: 700;
}

.kb-page .kb-contact-card h2 {
    margin-top: 9px;
    color: var(--kb-ink);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.7px;
    line-height: 1.3;
}

.kb-page .kb-contact-card > p:not(.kb-eyebrow) {
    margin-top: 13px;
    color: var(--kb-muted);
    font-size: 12px;
    line-height: 1.9;
}

.kb-page .kb-contact-value,
.kb-page .kb-placeholder-value {
    display: block;
    margin-top: 24px;
    color: #f0aa87;
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.kb-page .kb-placeholder-value {
    color: #8f929e;
    font-family: monospace;
    font-size: 12px;
}

.kb-page .kb-contact-card small {
    display: block;
    margin-top: 11px;
    color: #7f828e;
    font-size: 11px;
    line-height: 1.8;
}

/* =========================================================
   ПОЯСНЕНИЯ НА СТРАНИЦЕ КОНТАКТОВ
   ========================================================= */

.kb-page .kb-contact-guidance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 32px;
    padding: 32px;
    border: 1px solid var(--kb-line);
    border-radius: 18px;
    background: var(--kb-surface);
}

.kb-page .kb-contact-guidance > div {
    min-width: 0;
}

.kb-page .kb-contact-guidance h2 {
    margin-top: 13px;
    color: var(--kb-ink);
    font-size: 29px;
    font-weight: 750;
    letter-spacing: -0.9px;
    line-height: 1.2;
}

.kb-page .kb-contact-guidance > div > p:last-child {
    margin-top: 18px;
    color: var(--kb-muted);
    font-size: 12px;
    line-height: 1.9;
}

.kb-page .kb-contact-guidance ol {
    display: grid;
    gap: 23px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kb-page .kb-contact-guidance li {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.kb-page .kb-contact-guidance li > span {
    display: grid;
    place-items: center;
    min-width: 30px;
    min-height: 30px;
    flex-shrink: 0;
    padding: 7px;
    border: 1px solid rgba(var(--kb-accent-rgb), 0.18);
    border-radius: 7px;
    background: rgba(var(--kb-accent-rgb), 0.025);
    color: #d6997a;
    font-family: monospace;
    font-size: 10px;
    line-height: 1;
}

.kb-page .kb-contact-guidance li > div {
    min-width: 0;
}

.kb-page .kb-contact-guidance li strong {
    display: block;
    color: #ded9df;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}

.kb-page .kb-contact-guidance li p {
    margin-top: 7px;
    color: #9597a3;
    font-size: 12px;
    line-height: 1.85;
}

/* =========================================================
   ОБЩИЙ ФУТЕР
   Сохранён здесь, поскольку уже использовался сайтом
   ========================================================= */

.footer .rf-footer-layout {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 1fr;
    align-items: start;
    gap: 36px;
    padding-top: 46px;
    padding-bottom: 38px;
}

.footer .rf-footer-project {
    min-width: 0;
}

.footer .rf-footer-project > p {
    max-width: 280px;
    margin: 20px 0 15px;
    color: #858891;
    font-size: 12px;
    line-height: 1.9;
}

.footer .rf-footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8c8380;
    font-size: 8px;
    letter-spacing: 1px;
    line-height: 1.8;
}

.footer .rf-footer-column {
    display: grid;
    min-width: 0;
    gap: 12px;
}

.footer .rf-footer-column h2 {
    margin: 3px 0 9px;
    color: #cfccd2;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.5;
}

.footer .rf-footer-column a,
.footer .rf-footer-column button {
    width: fit-content;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: #8e909c;
    font-family: inherit;
    font-size: 11px;
    line-height: 1.8;
    text-align: left;
    text-decoration: none;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: color 0.2s;
}

.footer .rf-footer-legal-note {
    color: #b08b76;
    font-size: 9px;
    line-height: 1.8;
    text-decoration: none;
}

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

@media (hover: hover) {

    .kb-page .kb-side-nav a:hover {
        background: rgba(255, 255, 255, 0.035);
        color: var(--kb-ink);
    }

    .kb-page .kb-side-nav a.is-active:hover {
        border-color: rgba(var(--kb-accent-rgb), 0.3);
        background: rgba(var(--kb-accent-rgb), 0.1);
        color: #ffb28e;
    }

    .kb-page .kb-topic:hover {
        border-color: rgba(var(--kb-accent-rgb), 0.32);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
        transform: translateY(-4px);
    }

    .kb-page .kb-topic:hover::before {
        opacity: 1;
    }

    .kb-page .kb-topic:hover .kb-topic-bottom > span:last-child {
        transform: translate(2px, -2px);
    }

    .kb-page .kb-button:hover:not(:disabled) {
        background: linear-gradient(125deg, #ffa17e, #ff936e 70%);
        box-shadow:
                inset 0 1px rgba(255, 225, 209, 0.4),
                0 11px 30px rgba(var(--kb-accent-rgb), 0.17);
        transform: translateY(-2px);
    }

    .kb-page .kb-button:hover:not(:disabled)::before {
        animation: kb-button-shine 0.48s var(--kb-ease) both;
    }

    .kb-page .kb-print-button:hover {
        border-color: rgba(var(--kb-accent-rgb), 0.3);
        background: rgba(var(--kb-accent-rgb), 0.04);
        color: #efb091;
    }

    .kb-page .kb-contact-card:hover {
        border-color: rgba(var(--kb-accent-rgb), 0.25);
        box-shadow: 0 16px 35px rgba(0, 0, 0, 0.1);
    }

    .kb-page .kb-toc nav a:hover,
    .kb-page .kb-breadcrumb a:hover,
    .kb-page .kb-back-link:hover,
    .kb-page .kb-sidebar-bottom a:hover,
    .kb-page .kb-section-title > a:hover {
        color: #ffb08b;
    }

    .footer .rf-footer-column a:hover,
    .footer .rf-footer-column button:hover,
    .footer .rf-footer-legal-note:hover {
        color: #ffad88;
    }

}

/* =========================================================
   АНИМАЦИЯ БЛИКА
   ========================================================= */

@keyframes kb-button-shine {
    0% {
        left: -45%;
        opacity: 0;
    }

    12% {
        opacity: 1;
    }

    85% {
        opacity: 0.7;
    }

    100% {
        left: 135%;
        opacity: 0;
    }
}

/* =========================================================
   АДАПТИВ — ДО 1100px
   ========================================================= */

@media (max-width: 1100px) {

    .kb-page .kb-layout {
        grid-template-columns: 210px minmax(0, 1fr);
        width: calc(100% - 40px);
        gap: 23px;
    }

    .kb-page .kb-sidebar {
        padding-inline: 10px;
    }

    .kb-page .kb-side-brand {
        gap: 9px;
        padding-inline: 5px;
        font-size: 12px;
    }

    .kb-page .kb-side-brand small {
        font-size: 6px;
        letter-spacing: 1px;
    }

    .kb-page .kb-hero {
        padding: 32px;
    }

    .kb-page .kb-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .kb-page .kb-reading-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
    }

    .kb-page .kb-toc {
        position: static;
        grid-row: 1;
        padding: 20px;
        border: 1px solid var(--kb-line);
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.012);
    }

    .kb-page .kb-toc nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 18px;
    }

    .kb-page .kb-toc-contact {
        margin-top: 16px;
        padding-top: 14px;
    }

    .kb-page .kb-contact-strip {
        align-items: flex-start;
        flex-direction: column;
        gap: 23px;
        padding: 29px;
    }

    .kb-page .kb-contact-guidance {
        gap: 25px;
        padding: 29px;
    }

}

/* =========================================================
   АДАПТИВ — ДО 850px
   ========================================================= */

@media (max-width: 850px) {

    .kb-page {
        padding-top: 25px;
        padding-bottom: 55px;
    }

    .kb-page .kb-layout {
        grid-template-columns: 1fr;
        width: calc(100% - 32px);
        gap: 25px;
    }

    .kb-page .kb-sidebar {
        position: static;
        padding: 18px;
        border-radius: 16px;
    }

    .kb-page .kb-side-brand {
        padding: 0 0 14px;
        font-size: 14px;
    }

    .kb-page .kb-side-brand small {
        font-size: 7px;
        letter-spacing: 1.3px;
    }

    .kb-page .kb-nav-label {
        margin: 12px 0 10px;
    }

    .kb-page .kb-side-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
    }

    .kb-page .kb-side-nav a {
        min-height: 38px;
        padding: 8px 11px;
        border-color: rgba(255, 255, 255, 0.055);
        font-size: 11px;
    }

    .kb-page .kb-sidebar-bottom {
        display: none;
    }

    .kb-page .kb-main {
        gap: 28px;
    }

    .kb-page .kb-hero {
        padding: 32px;
    }

    .kb-page h1 {
        font-size: 43px;
    }

    .kb-page .kb-topic-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kb-page .kb-contact-strip {
        align-items: center;
        flex-direction: row;
        gap: 22px;
    }

    .footer .rf-footer-layout {
        grid-template-columns: 1.4fr 1fr;
        gap: 30px;
    }

}

/* =========================================================
   АДАПТИВ — ДО 600px
   ========================================================= */

@media (max-width: 600px) {

    .kb-page .kb-contact-strip {
        align-items: flex-start;
        flex-direction: column;
    }

    .kb-page .kb-contact-grid,
    .kb-page .kb-contact-guidance {
        grid-template-columns: 1fr;
    }

    .kb-page .kb-contact-guidance {
        gap: 28px;
    }

    .kb-page .kb-section-title {
        align-items: flex-start;
    }

    .kb-page .kb-section-note {
        display: none;
    }

}

/* =========================================================
   АДАПТИВ — ДО 520px
   ========================================================= */

@media (max-width: 520px) {

    .kb-page {
        padding-top: 20px;
        padding-bottom: 42px;
    }

    .kb-page .kb-layout {
        width: calc(100% - 24px);
        gap: 22px;
    }

    .kb-page .kb-sidebar {
        padding: 15px;
    }

    .kb-page .kb-side-mark {
        width: 37px;
        height: 40px;
        border-radius: 10px;
        font-size: 19px;
    }

    .kb-page .kb-side-nav {
        gap: 6px;
    }

    .kb-page .kb-side-nav a {
        gap: 7px;
        padding: 8px 9px;
        font-size: 10px;
    }

    .kb-page .kb-side-nav a > span:first-child {
        width: 14px;
        font-size: 14px;
    }

    .kb-page .kb-nav-label {
        font-size: 7px;
        letter-spacing: 1px;
    }

    .kb-page .kb-main {
        gap: 25px;
    }

    .kb-page .kb-hero {
        padding: 28px 24px;
        border-radius: 17px;
    }

    .kb-page .kb-hero-decor {
        top: -8px;
        right: 7px;
        font-size: 215px;
    }

    .kb-page .kb-eyebrow {
        font-size: 8px;
        letter-spacing: 1.1px;
    }

    .kb-page h1 {
        margin-top: 14px;
        font-size: 35px;
        letter-spacing: -1.5px;
    }

    .kb-page .kb-lead {
        margin-top: 17px;
        font-size: 13px;
    }

    .kb-page .kb-hero-tags {
        gap: 7px;
        margin-top: 22px;
    }

    .kb-page .kb-hero-tags span {
        padding: 6px 8px;
        font-size: 7px;
        letter-spacing: 0.5px;
    }

    .kb-page .kb-search {
        gap: 9px;
        min-height: 49px;
        padding-inline: 12px;
        margin-top: 23px;
    }

    .kb-page .kb-search input {
        font-size: 12px;
    }

    .kb-page .kb-search-hint {
        display: none;
    }

    .kb-page .kb-section-title {
        gap: 15px;
        margin-bottom: 18px;
    }

    .kb-page .kb-section-title h2 {
        font-size: 24px;
        letter-spacing: -0.7px;
    }

    .kb-page .kb-section-title > a {
        gap: 8px;
        font-size: 10px;
    }

    .kb-page .kb-topic-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .kb-page .kb-topic-link {
        padding: 25px;
    }

    .kb-page .kb-topic h3 {
        margin-top: 21px;
        font-size: 22px;
    }

    .kb-page .kb-topic p {
        font-size: 12px;
    }

    .kb-page .kb-card-state {
        font-size: 7px;
    }

    .kb-page .kb-faq summary {
        padding: 21px 23px;
        font-size: 13px;
    }

    .kb-page .kb-faq details > p {
        padding: 0 23px 23px;
        font-size: 12px;
    }

    .kb-page .kb-contact-strip {
        gap: 22px;
        padding: 27px 24px;
        border-radius: 16px;
    }

    .kb-page .kb-contact-strip h2 {
        font-size: 27px;
    }

    .kb-page .kb-contact-strip p:not(.kb-eyebrow) {
        font-size: 12px;
    }

    .kb-page .kb-button {
        min-height: 45px;
        padding: 12px 17px;
        gap: 18px;
        font-size: 11px;
    }

    .kb-page .kb-draft-notice {
        gap: 11px;
        padding: 16px;
    }

    .kb-page .kb-draft-notice strong,
    .kb-page .kb-draft-notice p {
        font-size: 11px;
    }

    .kb-page .kb-breadcrumb {
        gap: 8px;
        font-size: 9px;
    }

    .kb-page .kb-article-heading h1 {
        font-size: 30px;
        letter-spacing: -1px;
    }

    .kb-page .kb-article-meta {
        gap: 10px 13px;
        margin-top: 18px;
        font-size: 9px;
    }

    .kb-page .kb-document {
        padding: 25px;
        border-radius: 16px;
    }

    .kb-page .kb-document-section h2,
    .kb-page .kb-external-documents h2 {
        font-size: 20px;
    }

    .kb-page .kb-document-section p,
    .kb-page .kb-document-section ul,
    .kb-page .kb-document-section ol {
        font-size: 13px;
        line-height: 1.95;
    }

    .kb-page .kb-document-section + .kb-document-section {
        margin-top: 25px;
        padding-top: 24px;
    }

    .kb-page .kb-toc {
        padding: 19px;
    }

    .kb-page .kb-toc nav {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .kb-page .kb-contact-card,
    .kb-page .kb-contact-guidance {
        padding: 25px;
    }

    .kb-page .kb-contact-card h2 {
        font-size: 24px;
    }

    .kb-page .kb-contact-guidance h2 {
        font-size: 27px;
    }

    .kb-page .kb-contact-value {
        font-size: 15px;
    }

    .kb-page .kb-document-footer {
        gap: 12px;
        padding-top: 18px;
    }

    .kb-page .kb-document-footer > span:first-child {
        font-size: 7px;
        letter-spacing: 1px;
    }

    .kb-page .kb-back-link {
        font-size: 10px;
    }

    .footer .rf-footer-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 22px;
        padding-top: 38px;
        padding-bottom: 32px;
    }

    .footer .rf-footer-project {
        grid-column: 1 / -1;
    }

    .footer .rf-footer-project > p {
        max-width: 380px;
    }

    .footer .rf-footer-column h2 {
        font-size: 11px;
    }

    .footer .rf-footer-column a,
    .footer .rf-footer-column button {
        font-size: 11px;
    }

}

/* =========================================================
   УМЕНЬШЕННОЕ ДВИЖЕНИЕ
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .kb-page,
    .kb-page *,
    .kb-page *::before,
    .kb-page *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .kb-page .kb-topic:hover,
    .kb-page .kb-button:hover,
    .kb-page .kb-topic:hover .kb-topic-bottom > span:last-child {
        transform: none;
    }

}

/* =========================================================
   ПЕЧАТЬ ДОКУМЕНТОВ
   ========================================================= */

@media print {

    body > .header,
    body > .footer,
    .kb-page .kb-sidebar,
    .kb-page .kb-toc,
    .kb-page .kb-breadcrumb,
    .kb-page .kb-back-link,
    .kb-page .kb-print-button,
    .kb-page .kb-contact-strip,
    dialog,
    .toast,
    .portal-toast {
        display: none !important;
    }

    .kb-page {
        --kb-bg: #ffffff;
        --kb-surface: #ffffff;
        --kb-ink: #111111;
        --kb-muted: #333333;
        --kb-orange: #111111;
        --kb-line: #cccccc;

        min-height: 0;
        padding: 0;
        background: #ffffff !important;
        color: #111111 !important;
    }

    .kb-page .kb-layout,
    .kb-page .kb-reading-layout,
    .kb-page .kb-main {
        display: block;
        width: 100%;
    }

    .kb-page .kb-document {
        padding: 0;
        border: 0;
        background: #ffffff !important;
        box-shadow: none;
    }

    .kb-page .kb-hero {
        padding: 0 0 20px;
        border: 0;
        background: #ffffff !important;
        box-shadow: none;
    }

    .kb-page .kb-hero::before,
    .kb-page .kb-hero-decor {
        display: none;
    }

    .kb-page :is(h1, h2, h3, p, li),
    .kb-page h1 > span,
    .kb-page .kb-document-section a,
    .kb-page .kb-document-section strong,
    .kb-page .kb-article-meta {
        color: #111111 !important;
    }

    .kb-page .kb-draft-notice {
        margin-bottom: 20px;
        border: 1px solid #888888;
        background: #ffffff;
    }

    .kb-page .kb-draft-notice strong {
        color: #222222;
    }

    .kb-page .kb-document-section h2 {
        break-after: avoid;
    }

    .kb-page .kb-document-section li {
        break-inside: avoid;
    }

    .kb-page .kb-document-section a {
        text-decoration: underline;
        text-decoration-color: #666666;
    }

    .kb-page .kb-topic,
    .kb-page .kb-contact-card,
    .kb-page .kb-contact-guidance {
        background: #ffffff !important;
        box-shadow: none;
        break-inside: avoid;
    }

}
/* =========================================================
   ИСПРАВЛЕНИЕ ЛЕВОЙ ПАНЕЛИ БАЗЫ ЗНАНИЙ
   ========================================================= */

.kb-page .kb-layout {
    align-items: start;
}

.kb-page .kb-sidebar {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    align-self: start;
    margin-top: 0;
    transform: none;
}

.kb-page .kb-main {
    align-self: start;
    margin-top: 0;
}