.kb-page { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 40px 0 72px; min-height: calc(100vh - var(--header-h)); }
.kb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.kb-head-text { min-width: 0; }
.kb-head h1 { display: flex; align-items: center; gap: 12px; font-size: clamp(28px, 3vw, 36px); letter-spacing: -0.02em; margin-bottom: 8px; }
.kb-head h1 .bi { font-size: 0.85em; }
.kb-head p { color: var(--text-2); font-size: 17px; max-width: 640px; }
.kb-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kb-search { position: relative; width: 300px; max-width: 100%; }
.kb-search > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 14px; pointer-events: none; }
.kb-search input { width: 100%; height: 42px; padding: 0 14px 0 38px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); font: inherit; font-size: 15px; outline: none; box-shadow: var(--shadow-sm); }
.kb-search input:focus { border-color: var(--navy); }
.kb-lang { height: 42px; max-width: 230px; padding: 0 32px 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center; color: var(--text); font: inherit; font-size: 14.5px; cursor: pointer; outline: none; appearance: none; -webkit-appearance: none; box-shadow: var(--shadow-sm); }
.kb-lang:focus { border-color: var(--navy); }
.flag-font .kb-lang { font-family: 'Twemoji Country Flags', 'IBM Plex Sans', sans-serif; }
.kb-nav-toggle { display: none; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); font-size: 15px; font-weight: 500; cursor: pointer; box-shadow: var(--shadow-sm); }
.kb { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.kb-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.kb-nav { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; padding: 10px; }
.kb-nav-home, .kb-sec-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: transparent; border-radius: 6px; font-size: 14.5px; font-weight: 600; color: var(--text); cursor: pointer; text-align: left; text-decoration: none; }
.kb-nav-home:hover, .kb-sec-btn:hover { background: var(--bg-alt); }
.kb-nav-home.is-on { background: var(--tint); }
.kb-sec-btn > i:first-child, .kb-nav-home > i { color: var(--text-2); font-size: 15px; width: 18px; text-align: center; }
.kb-sec-btn span { flex: 1; min-width: 0; }
.kb-sec-btn .kb-chev { font-size: 11px; color: var(--text-3); transition: transform 0.15s ease; }
.kb-sec.is-open .kb-chev { transform: rotate(90deg); }
.kb-sec-list { display: none; margin: 2px 0 8px 19px; padding-left: 9px; border-left: 1px solid var(--border); }
.kb-sec.is-open .kb-sec-list { display: block; }
.kb-lesson { display: block; padding: 6px 10px; border-radius: 6px; font-size: 14px; color: var(--text-2); line-height: 1.45; text-decoration: none; }
.kb-lesson:hover { background: var(--bg-alt); color: var(--text); }
.kb-lesson.is-on { background: var(--tint); color: var(--text); font-weight: 600; }
.kb-main { min-width: 0; padding: 28px 32px; }
.kb-home-lead { color: var(--text-2); font-size: 16px; margin-bottom: 20px; }
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.kb-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; color: inherit; text-decoration: none; transition: border-color 0.15s ease; }
.kb-card:hover { border-color: var(--navy); }
.kb-card > i { font-size: 19px; color: var(--navy); }
.kb-card b { font-size: 16px; font-weight: 600; }
.kb-card small { font-size: 14px; color: var(--text-2); line-height: 1.55; }
.kb-card em { font-style: normal; font-size: 13px; color: var(--text-3); margin-top: auto; padding-top: 4px; }
.kb-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-3); margin-bottom: 10px; }
.kb-crumb a { color: var(--text-2); text-decoration: none; }
.kb-crumb a:hover { color: var(--text); text-decoration: underline; }
.kb-crumb .bi { font-size: 11px; }
.kb-title { font-size: clamp(22px, 2.4vw, 28px); letter-spacing: -0.015em; line-height: 1.25; margin-bottom: 8px; }
.kb-summary { color: var(--text-2); font-size: 17px; margin-bottom: 14px; }
.kb-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.kb-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg-alt); font-size: 13.5px; color: var(--text-2); }
.kb-chip .bi { color: var(--navy); }
.kb-fallback { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--text-3); margin-bottom: 14px; }
.kb-body { max-width: 820px; font-size: 16px; line-height: 1.75; }
.kb-body p { margin: 0 0 14px; }
.kb-body h3 { font-size: 18px; margin: 28px 0 10px; }
.kb-body ul, .kb-body ol { margin: 0 0 16px; padding-left: 22px; }
.kb-body ul { list-style: disc; }
.kb-body li { margin: 0 0 8px; }
.kb-body ol.kb-steps { list-style: none; padding-left: 0; counter-reset: kbstep; }
.kb-body ol.kb-steps > li { position: relative; padding-left: 38px; counter-increment: kbstep; min-height: 26px; }
.kb-body ol.kb-steps > li::before { content: counter(kbstep); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--text-2); display: flex; align-items: center; justify-content: center; }
.kb-body strong { font-weight: 600; }
.kb-body code { font-family: var(--mono); font-size: 13.5px; padding: 1px 6px; border-radius: 4px; background: var(--bg-alt); border: 1px solid var(--border); }
.kb-link { font-weight: 500; }
.kb-call { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-alt); }
.kb-call > i { color: var(--navy); font-size: 16px; margin-top: 3px; flex-shrink: 0; }
.kb-call div { min-width: 0; }
.kb-call b { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); margin-bottom: 2px; }
.kb-faq { margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.kb-faq details { border-top: 1px solid var(--border); }
.kb-faq details:first-child { border-top: 0; }
.kb-faq summary { cursor: pointer; padding: 13px 16px; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.kb-faq summary::-webkit-details-marker { display: none; }
.kb-faq summary::after { content: '+'; color: var(--text-3); font-weight: 400; }
.kb-faq details[open] summary::after { content: '\2212'; }
.kb-faq details > div { padding: 0 16px 14px; color: var(--text-2); }
.kb-related { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--border); }
.kb-related h4 { font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); margin-bottom: 10px; }
.kb-related-list { display: flex; flex-wrap: wrap; gap: 8px; }
.kb-related-list a { padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 6px; font-size: 14px; color: var(--text); text-decoration: none; }
.kb-related-list a:hover { border-color: var(--navy); }
.kb-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.kb-pager a { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.kb-pager a:hover { border-color: var(--navy); }
.kb-pager a.is-next { grid-column: 2; text-align: right; }
.kb-pager small { font-size: 13px; color: var(--text-3); }
.kb-pager span { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-results-head { font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.kb-result { display: block; padding: 14px 16px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: inherit; text-decoration: none; }
.kb-result:hover { border-color: var(--navy); }
.kb-result b { display: block; font-size: 15px; font-weight: 600; }
.kb-result small { display: block; font-size: 13px; color: var(--text-3); margin: 2px 0 4px; }
.kb-result span { display: block; font-size: 14px; color: var(--text-2); line-height: 1.55; }
.kb-result mark { background: var(--tint); color: inherit; border-radius: 3px; padding: 0 2px; font-weight: 600; }
.kb-empty { padding: 32px 12px; text-align: center; color: var(--text-2); }
[dir="rtl"] .kb-nav-home, [dir="rtl"] .kb-sec-btn, [dir="rtl"] .kb-lesson, [dir="rtl"] .kb-card, [dir="rtl"] .kb-result, [dir="rtl"] .kb-pager a { text-align: right; }
[dir="rtl"] .kb-pager a.is-next { text-align: left; }
[dir="rtl"] .kb-sec-list { margin: 2px 19px 8px 0; padding: 0 9px 0 0; border-left: 0; border-right: 1px solid var(--border); }
[dir="rtl"] .kb-body ul, [dir="rtl"] .kb-body ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .kb-body ol.kb-steps { padding-right: 0; }
[dir="rtl"] .kb-body ol.kb-steps > li { padding-left: 0; padding-right: 38px; }
[dir="rtl"] .kb-body ol.kb-steps > li::before { left: auto; right: 0; }
[dir="rtl"] .kb-sec-btn .kb-chev, [dir="rtl"] .kb-crumb .bi-chevron-right { transform: scaleX(-1); }
[dir="rtl"] .kb-sec.is-open .kb-chev { transform: rotate(90deg); }
[dir="rtl"] .kb-search > i { left: auto; right: 13px; }
[dir="rtl"] .kb-search input { padding: 0 38px 0 14px; }
[dir="rtl"] .kb-lang { background-position: left 12px center; padding: 0 12px 0 32px; }
@media (max-width: 960px) {
    .kb { grid-template-columns: minmax(0, 1fr); }
    .kb-nav { position: static; max-height: none; display: none; }
    .kb-nav.is-open { display: block; }
    .kb-nav-toggle { display: inline-flex; }
    .kb-tools { width: 100%; }
    .kb-search { flex: 1; width: auto; min-width: 180px; }
}
@media (max-width: 720px) {
    .kb-page { padding: 28px 0 56px; }
    .kb-main { padding: 20px; }
    .kb-lang { max-width: none; width: 100%; }
    .kb-pager { grid-template-columns: minmax(0, 1fr); }
    .kb-pager a.is-next { grid-column: auto; }
}
