/* 文章详情页知识词元标记与飘窗样式 */
a.jo4-knowledge-word {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed #1a6fb5;
    cursor: pointer;
}

a.jo4-knowledge-word:hover {
    background: #f2f7ff;
}

body.jo4-knowledge-open {
    overflow: hidden;
}

.jo4-knowledge-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow-y: auto;
    padding: 60px 16px 40px;
    box-sizing: border-box;
}

.jo4-knowledge-mask.jo4-knowledge-show {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.jo4-knowledge-window {
    background: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    position: relative;
    box-sizing: border-box;
}

.jo4-knowledge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding: 12px 16px;
}

.jo4-knowledge-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    word-break: break-all;
}

.jo4-knowledge-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #333;
    padding: 0 4px;
}

.jo4-knowledge-close:hover {
    color: #1a6fb5;
}

.jo4-knowledge-body {
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    color: #333;
    line-height: 1.75;
    text-align: justify;
}

.jo4-knowledge-node {
    padding: 12px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.jo4-knowledge-node:first-child {
    padding-top: 0;
}

.jo4-knowledge-node:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.jo4-knowledge-name {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.jo4-knowledge-name-en {
    font-size: 13px;
    font-weight: 400;
    color: #666;
}

.jo4-knowledge-path {
    margin-top: 4px;
    font-size: 12px;
    color: #8e9fa7;
    word-break: break-all;
}

.jo4-knowledge-desc {
    margin-top: 8px;
    color: #333;
}

.jo4-knowledge-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-top: 8px;
}

.jo4-knowledge-links {
    margin-top: 8px;
    font-size: 13px;
}

.jo4-knowledge-links a {
    color: #1a6fb5;
    margin-right: 12px;
    text-decoration: none;
}

.jo4-knowledge-links a:hover {
    text-decoration: underline;
}

.jo4-knowledge-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

.jo4-knowledge-loading,
.jo4-knowledge-empty {
    padding: 20px 0;
    text-align: center;
    color: #999;
}

/* 节点 HTML 字段（名称/路径/定义/相关链接名） */
.jo4-knowledge-name img,
.jo4-knowledge-name-en img,
.jo4-knowledge-path img,
.jo4-knowledge-desc img,
.jo4-knowledge-links img {
    max-width: 100%;
    height: auto;
}

.jo4-knowledge-desc p {
    margin: 0 0 8px;
}

.jo4-knowledge-desc p:last-child {
    margin-bottom: 0;
}

.jo4-knowledge-desc ul,
.jo4-knowledge-desc ol {
    margin: 6px 0;
    padding-left: 20px;
}

.jo4-knowledge-desc table {
    max-width: 100%;
    border-collapse: collapse;
}

.jo4-knowledge-desc th,
.jo4-knowledge-desc td {
    border: 1px solid #e5e5e5;
    padding: 4px 8px;
}

.jo4-knowledge-desc a,
.jo4-knowledge-name a,
.jo4-knowledge-path a {
    color: #1a6fb5;
}

@media (max-width: 768px) {
    .jo4-knowledge-mask {
        padding: 20px 10px;
    }

    .jo4-knowledge-window {
        max-width: 100%;
    }
}
