.kb-page {
    --kb-ink: #1a2744;
    --kb-steel: #5c6b7c;
    --kb-paper: #ffffff;
    --kb-mist: #f3f7fb;
    --kb-line: #dce6ef;
    --kb-accent: #08adef;
    --kb-deep: #066bb3;
}

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

.kb-search {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--kb-paper);
    border: 1px solid var(--kb-line);
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.04);
    margin-bottom: 22px;
}

.kb-search input {
    flex: 1;
    border: 0;
    box-shadow: none;
    height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--kb-ink);
    background: var(--kb-mist);
    border-radius: 8px;
}

.kb-search input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(8, 173, 239, 0.15);
}

.kb-search .btn {
    height: 44px;
    padding: 0 18px;
    border-radius: 8px;
    white-space: nowrap;
}

.kb-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-item {
    display: block;
    background: var(--kb-paper);
    border: 1px solid var(--kb-line);
    border-radius: 14px;
    padding: 22px 24px 20px;
    margin-bottom: 14px;
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.04);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.kb-item:hover {
    border-color: #c5d7e6;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(26, 39, 68, 0.08);
}

.kb-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.kb-item-title {
    margin: 0;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 700;
}

.kb-item-title a {
    color: var(--kb-ink);
    text-decoration: none;
}

.kb-item-title a:hover {
    color: var(--kb-accent);
}

.kb-doc-mark {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e8f6fd;
    color: var(--kb-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
}

.kb-item-summary {
    margin: 0 0 12px;
    color: var(--kb-steel);
    font-size: 14px;
    line-height: 1.75;
}

.kb-item-meta,
.kb-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    color: #7a8794;
    font-size: 13px;
}

.kb-item-meta a,
.kb-meta a {
    color: var(--kb-accent);
    text-decoration: none;
}

.kb-item-meta a:hover,
.kb-meta a:hover {
    color: var(--kb-deep);
}

.kb-empty {
    background: var(--kb-paper);
    border: 1px dashed var(--kb-line);
    border-radius: 14px;
    padding: 56px 24px;
    text-align: center;
    color: var(--kb-steel);
}

.kb-empty h4 {
    color: var(--kb-ink);
    margin-bottom: 8px;
}

.kb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.kb-side-card {
    background: var(--kb-paper);
    border: 1px solid var(--kb-line);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.04);
}

.kb-side-title {
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--kb-line);
    font-size: 18px;
    font-weight: 700;
    color: var(--kb-ink);
}

.kb-cat-list,
.kb-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kb-cat-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    color: #4d5b6a;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: background .2s ease, color .2s ease;
}

.kb-cat-list a em {
    font-style: normal;
    color: #8a97a5;
    font-size: 13px;
}

.kb-cat-list a:hover,
.kb-cat-list li.is-active a {
    background: #eef8fd;
    color: var(--kb-accent);
}

.kb-recent-list li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(26, 39, 68, 0.06);
}

.kb-recent-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.kb-recent-list a {
    display: block;
    color: var(--kb-ink);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
}

.kb-recent-list a:hover,
.kb-recent-list a.is-current {
    color: var(--kb-accent);
}

.kb-recent-list time {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #8a97a5;
}

.kb-article {
    background: var(--kb-paper);
    border: 1px solid var(--kb-line);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(26, 39, 68, 0.04);
    padding: 36px 36px 32px;
    margin-bottom: 24px;
}

.kb-article-title {
    margin: 0 0 14px;
    color: var(--kb-ink);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
}

.kb-article-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 0 16px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--kb-line);
    background: transparent;
}

.kb-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kb-share span {
    font-size: 13px;
    color: #666;
}

.kb-share-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--kb-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all .25s ease;
}

.kb-share-btn:hover {
    background: var(--kb-deep);
    color: #fff;
    transform: translateY(-2px);
}

.kb-summary {
    background: var(--kb-mist);
    border: 0;
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.kb-featured {
    margin: 0 0 22px;
}

.kb-featured img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
}

.kb-summary p {
    margin: 0;
    color: #555;
    line-height: 1.8;
}

.kb-content {
    line-height: 1.9;
    font-size: 16px;
    color: #333;
    word-break: break-word;
}

.kb-content h1,
.kb-content h2,
.kb-content h3,
.kb-content h4,
.kb-content h5,
.kb-content h6 {
    margin: 1.5em 0 0.6em;
    font-weight: 700;
    color: #222;
    line-height: 1.4;
}

.kb-content h1 { font-size: 1.8em; }
.kb-content h2 { font-size: 1.5em; }
.kb-content h3 { font-size: 1.3em; }

.kb-content p { margin-bottom: 18px; }

.kb-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

.kb-content ul,
.kb-content ol {
    padding-left: 2em;
    margin-bottom: 18px;
}

.kb-content li { margin-bottom: 6px; }

.kb-content blockquote {
    border: 0;
    padding: 12px 18px;
    margin: 18px 0;
    background: var(--kb-mist);
    color: #555;
    border-radius: 8px;
}

.kb-content a {
    color: var(--kb-accent);
    text-decoration: underline;
}

.kb-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.kb-content th,
.kb-content td {
    border: 1px solid #dee2e6;
    padding: 10px 14px;
    text-align: left;
}

.kb-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.kb-content .ql-align-center { text-align: center; }
.kb-content .ql-align-right { text-align: right; }
.kb-content .ql-align-justify { text-align: justify; }
.kb-content .ql-indent-1 { padding-left: 3em; }
.kb-content .ql-indent-2 { padding-left: 6em; }
.kb-content .ql-indent-3 { padding-left: 9em; }

.kb-tags {
    padding-top: 18px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.kb-tag {
    display: inline-block;
    padding: 4px 14px;
    background: #e8f4fd;
    color: #0877b9;
    font-size: 13px;
    border-radius: 20px;
    border: 1px solid #b8ddf0;
}

.kb-pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    margin-top: 10px;
    border-top: 1px solid #eee;
}

.kb-pager a {
    color: var(--kb-ink);
    text-decoration: none;
}

.kb-pager a:hover {
    color: var(--kb-accent);
}

.kb-back {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid #eee;
}

.ql-pdf-embed,
.ql-pdf-embed__inner,
.ql-pdf-preview {
    width: 100%;
}

.ql-pdf-embed {
    margin: 8px 0 32px;
    user-select: none;
    -webkit-user-select: none;
}

.ql-pdf-preview__status {
    padding: 18px;
    border: 1px dashed var(--kb-line);
    border-radius: 10px;
    background: var(--kb-mist);
    color: var(--kb-steel);
    text-align: center;
}

.ql-pdf-preview__pages {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ql-pdf-preview__page {
    background: transparent;
    border: 0;
    box-shadow: none;
    overflow: visible;
}

.ql-pdf-preview__page canvas {
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.ql-pdf-embed iframe,
.ql-pdf-embed embed,
.ql-pdf-embed object,
.ql-pdf-embed__actions {
    display: none !important;
}

@media print {
    .ql-pdf-embed,
    .ql-pdf-preview {
        display: none !important;
    }
}

@media (max-width: 991px) {
    .kb-page .kb-sidebar {
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .kb-article {
        padding: 20px 16px;
    }

    .kb-article-title {
        font-size: 1.5rem;
    }

    .kb-article-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .kb-search {
        flex-wrap: wrap;
    }

    .kb-item {
        padding: 18px 16px;
    }

    .kb-item-title {
        font-size: 18px;
    }

    .kb-item-head {
        flex-direction: column;
        gap: 8px;
    }

    .kb-content {
        font-size: 15px;
    }

    .kb-pager {
        flex-direction: column;
    }
}
