/* Custom CSS to optimize Chinese typography */

:root {
    /* 1. Normal body text font family: default system sans-serif/Gothic (黑体/无衬线) fonts */
    --md-text-font-family:
        Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans CN", sans-serif;

    /* 2. Global font size for the body text (including paragraphs, lists, blockquotes, etc.)
     Default theme size is 0.75rem. We increase it to 0.85rem.
     Adjust this value to change the base text size of the entire website's content. */
    --custom-body-font-size: 0.8rem;
}

/* Apply the custom font family and size globally to the content area */
body,
input,
.md-typeset {
    font-family: var(--md-text-font-family);
}

.md-typeset p {
    font-size: var(--custom-body-font-size) !important;
}

/* 3. Blockquotes: KaiTi/serif priority, no indentation relative to normal text, same color, no left line */
.md-typeset blockquote {
    font-family:
        /* 核心楷体序列 */
        "Kaiti SC",
        "STKaiti",
        "KaiTi",
        "KaiTi_GB2312",
        "BiauKai",
        "DFKai-SB",
        "AR PL UKai CN",
        "楷体",
        /* 衬线体兜底序列 */ "Noto Serif CJK SC",
        "Source Han Serif SC",
        "Songti SC",
        "SimSun",
        "STSong",
        "宋体",
        /* 最终系统兜底 */ serif;
    font-weight: normal;
    /* color: inherit !important;
    border-left: none !important;
    border-right: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important; */
}

.md-typeset blockquote strong {
    font-weight: normal; /* 【关键】强制设为 normal，阻止 Safari 向后寻找真实粗体并降级到宋体 */
    -webkit-text-stroke: 0.4px currentColor; /* 利用描边在所有浏览器中统一实现“伪加粗”效果 */
}

/* 4. Custom background color for dark mode (slate theme) */
[data-md-color-scheme="slate"] {
    --md-default-bg-color: #363b40 !important;
    --md-default-bg-color--light: rgba(54, 59, 64, 0.54) !important;
    --md-default-bg-color--lighter: rgba(54, 59, 64, 0.26) !important;
}

/* 5. Add more spacing for the sections within a chapter */
.md-typeset h2,
.md-typeset h3,
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
    margin-top: 3.2rem !important;
    margin-bottom: 1.2rem !important;
}

