
:root {
    color-scheme: dark;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    background: #121212;
    color: #e0e0e0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    max-width: 1080px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
}
h1, h2, h3, h4, h5, h6 { color: #ffffff; margin: 1.5em 0 0.5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }
p { margin: 0.75em 0; }
a { color: #80b4ff; text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.5em; margin: 0.5em 0; }
li { margin: 0.25em 0; }
blockquote { border-left: 3px solid #444; padding-left: 1em; color: #aaa; margin: 1em 0; }
code { background: #1e1e1e; padding: 0.15em 0.4em; border-radius: 4px; font-family: "Cascadia Code", "Fira Code", monospace; font-size: 0.9em; }
pre { background: #1e1e1e; padding: 1em; border-radius: 6px; overflow-x: auto; margin: 1em 0; }
pre code { background: none; padding: 0; border-radius: 0; }
table { border-collapse: collapse; width: 100%; margin: 1em 0; }
th, td { border: 1px solid #333; padding: 0.5em 0.75em; text-align: left; }
th { background: #1e1e1e; }
img { max-width: 100%; height: auto; }
hr { border: none; border-top: 1px solid #333; margin: 2em 0; }



/* ============================================================= */
/* 1. 可折叠列表 — 通用 (.standard-node)                           */
/* ============================================================= */
li.standard-node { list-style-type: none; }

/* 子列表默认隐藏，添加 expanded 类后展开 */
li.standard-node > ul { display: none; }
li.standard-node.expanded > ul { display: block; }

/* 叶子节点：圆点标记 */
li.standard-node:not(.has-child)::before {
    content: "•";
    display: inline-block;
    width: 0.7em;
    margin-right: 0.3em;
    text-align: center;
    color: #bbb;
    vertical-align: middle;
    font-size: 1em;
}

/* 带有子节点的父项防选中 */
li.standard-node.has-child {
    user-select: none;
    -webkit-user-select: none;
}

/* 三角标记 */
li.standard-node > .fold-marker {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.3em;
    margin-right: 0.5em;
    border-style: solid;
    border-color: transparent;
    border-width: 0.35em;
    border-right-width: 0;
    border-left-color: currentColor;
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.15s ease;
}

/* 展开时旋转 */
li.standard-node.expanded > .fold-marker {
    transform: rotate(90deg);
}


/* ============================================================= */
/* 2. 树形列表 (.tree) - 纯 CSS 静态呈现，默认展开                   */
/* ============================================================= */
/* 基础与字体重置 */
.tree, .tree ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}
.tree {
    font-family: Consolas, Monaco, monospace;
    line-height: 1.5em;
    color: #ffffff;
}

/* 强制展开所有子列表并设置缩进 */
.tree ul {
    display: block;
    padding-left: 1.5em;
}

/* 节点相对定位 */
.tree li {
    position: relative;
    padding-left: 1.5em;
    padding-top: 0;
    padding-bottom: 0;
    margin: 0;
    list-style-type: none;
}

/* 垂直连接线 (│) */
.tree li::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: -2px; /* 向下延伸一丁点，消除像素缝隙 */
    left: 0;
    border-left: 1px solid #ffffff;
}

/* 水平连接线 (─) */
.tree li::after {
    content: "";
    position: absolute;
    top: 0.75em; /* 保持在单行文字的垂直居中位置 */
    left: 0;
    width: 1.2em;
    border-top: 1px solid #ffffff;
}

/* 最后一个节点截断垂直线，形成直角拐弯 (└) */
.tree li:last-child::before {
    bottom: auto;
    height: 0.75em;
}

/* 根节点不需要最前面的连线 */
.tree > li {
    padding-left: 0;
}
.tree > li::before,
.tree > li::after {
    display: none;
}









/* 强制清除 highlight.js 主题自带的 padding 和背景 */
/* ------------------------------------------------------------------------ */
pre code.hljs {
    padding: 0 !important;
    background: transparent !important; /* 让 code 标签透明，使用 pre 的背景色 */
}