/* ==========================================================================
   SocienceAI 学术文章版式层（article kind 专用）
   类 PDF 期刊版式：单栏 720px · 宋体系 serif · 首行缩进 · 章节编号
   壳层（nav/footer/head）由 templates/page.html 承载，本文件只管正文。
   ========================================================================== */

/* --- 版心：模拟 A4 单栏版面 --- */
.journal-article {
    font-family: "Noto Serif SC", "Source Han Serif SC", "SimSun",
                 "Songti SC", serif;
    max-width: 720px;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
    font-size: 1.0625rem;           /* 17px，期刊正文感 */
    line-height: 1.9;
    color: #1a1a1a;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* --- 文眉：期刊卷期样式（打印/长文顶部的学术身份）--- */
.journal-header {
    font-family: "Noto Serif SC", serif;
    font-size: 0.78rem;
    color: #8a8a8a;
    border-bottom: 2px solid #1a1a1a;
    padding-bottom: 0.5rem;
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: space-between;
    letter-spacing: 0.04em;
}

/* --- 标题区 --- */
.journal-article .article-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    margin: 0 0 1.75rem;
    letter-spacing: 0.02em;
}

/* --- 摘要块：期刊式缩进框 --- */
.journal-article .abstract-block {
    background: #fafaf8;
    border-left: 3px solid #b8b2a7;
    padding: 1.1rem 1.4rem;
    margin: 0 2.5rem 2rem;
    font-size: 0.92rem;
    line-height: 1.75;
}
.journal-article .abstract-block .abs-label {
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-right: 0.5em;
}
.journal-article .abstract-block .kw-line {
    margin-top: 0.6rem;
}
.journal-article .abstract-block .kw-line .kw-label {
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-right: 0.5em;
}

/* --- 章节：编号由渲染器生成（1 / 1.1 / 1.1.1）--- */
.journal-article h2.jnum {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 2.6rem 0 1.1rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #d8d4cc;
}
.journal-article h3.jnum {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 2rem 0 0.9rem;
}
.journal-article h4.jnum {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.6rem 0 0.75rem;
}

/* --- 正文段落：首行缩进两字 --- */
.journal-article p {
    text-indent: 2em;
    margin: 0 0 0.9rem;
}
.journal-article p.no-indent,
.journal-article .abstract-block p,
.journal-article figcaption,
.journal-article .refs li {
    text-indent: 0;
}

/* --- 引用块：期刊夹注式 --- */
.journal-article blockquote {
    margin: 1.2rem 2.5rem;
    padding: 0.35rem 0 0.35rem 1.1rem;
    border-left: 2px solid #b8b2a7;
    color: #444;
    font-size: 0.95rem;
}
.journal-article blockquote p {
    text-indent: 0;
}

/* --- 图：自动编号 caption --- */
.journal-article figure {
    margin: 1.8rem 0;
    text-align: center;
}
.journal-article figure img {
    max-width: 100%;
    height: auto;
}
.journal-article figcaption {
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* --- 表：三线表（学术标准）--- */
.journal-article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.8rem 0;
    font-size: 0.92rem;
    line-height: 1.6;
}
.journal-article table caption {
    caption-side: top;
    text-align: center;
    font-size: 0.85rem;
    color: #555;
    padding-bottom: 0.5rem;
}
.journal-article thead th {
    border-top: 1.5px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    padding: 0.5rem 0.6rem;
    font-weight: 700;
    text-align: center;
}
.journal-article tbody tr:last-child td {
    border-bottom: 1.5px solid #1a1a1a;
}
.journal-article td {
    padding: 0.45rem 0.6rem;
    vertical-align: top;
}

/* --- 参考文献：悬挂缩进 --- */
.journal-article .refs {
    margin: 2.2rem 0 0;
    padding-left: 1.8rem;
    font-size: 0.9rem;
    line-height: 1.7;
}
.journal-article .refs li {
    margin-bottom: 0.4rem;
    hanging-punctuation: allow-end;
}
.journal-article .refs-h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 2.6rem 0 1rem;
}

/* --- 行内代码/代码块：等宽降一号 --- */
.journal-article code {
    font-family: "Courier New", monospace;
    font-size: 0.88em;
    background: #f4f3ef;
    padding: 0.08em 0.35em;
    border-radius: 2px;
}
.journal-article pre {
    background: #f7f6f2;
    border: 1px solid #e4e1d8;
    padding: 0.9rem 1.1rem;
    overflow-x: auto;
    font-size: 0.86rem;
    line-height: 1.6;
    margin: 1.4rem 0;
}
.journal-article pre code {
    background: none;
    padding: 0;
}

/* --- 脚注标记风格（渲染器输出 sup.fn）--- */
.journal-article sup.fn {
    font-size: 0.72em;
    color: #1a4f8a;
}

/* ==========================================================================
   打印：真正的类 PDF（浏览器打印 → 存 PDF 即期刊版式）
   ========================================================================== */
@media print {
    .modern-nav,
    .site-entry-nav,
    .modern-footer,
    .site-legal-footer,
    .site-footer {
        display: none !important;
    }
    .journal-article {
        max-width: none;
        padding: 0;
        font-size: 11pt;
        line-height: 1.92;
    }
    .journal-article .journal-header {
        display: flex;
    }
    .journal-article h2.jnum {
        page-break-after: avoid;
        break-after: avoid;
    }
    .journal-article figure,
    .journal-article table {
        page-break-inside: avoid;
        break-inside: avoid;
    }
}

/* --- 移动端：版心收缩但版式语义不变 --- */
@media (max-width: 640px) {
    .journal-article {
        font-size: 1rem;
        padding: 2rem 1rem 3rem;
        text-align: left;           /* 窄屏关闭两端对齐，避免大空隙 */
    }
    .journal-article .abstract-block {
        margin: 0 0 1.5rem;
    }
    .journal-article blockquote {
        margin: 1rem 0.8rem;
    }
}