code:not(pre code) {
padding: 0.2em 0.4em;
border-radius: 6px;
background: color-mix(in srgb, var(--main-color) 15%, transparent);
color: var(--main-color);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 85%;
text-wrap: nowrap;
white-space: nowrap;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 12px;
line-height: 10px;
color: var(--text-color);
vertical-align: middle;
background-color: var(--bg-color);
border: solid 1px var(--footer-border);
border-bottom-color: var(--footer-border);
border-radius: 3px;
box-shadow: inset 0 -1px 0 var(--footer-border);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
.markdown-body {
word-wrap: break-word;
overflow-wrap: anywhere;
box-sizing: border-box;
min-width: 0;
line-height: 1.8;
font-size: 16px;
color: var(--text-color);
}
.markdown-body .mermaid-wrapper {
--mermaid-node-1-bg: #eee9ff;
--mermaid-node-1-border: #7c5ce5;
--mermaid-node-2-bg: #ddf7f3;
--mermaid-node-2-border: #219a90;
--mermaid-node-3-bg: #e8f6de;
--mermaid-node-3-border: #5a9d3e;
--mermaid-node-4-bg: #fff0d8;
--mermaid-node-4-border: #d9822b;
--mermaid-node-5-bg: #fde4ee;
--mermaid-node-5-border: #c94f7d;
--mermaid-node-6-bg: #e2efff;
--mermaid-node-6-border: #397fc4;
position: relative;
display: flex;
overflow: hidden;
flex-direction: column;
box-sizing: border-box;
width: 100%;
max-width: 100%;
margin: 1.5rem 0;
padding: 0;
border: 1px solid color-mix(in srgb, var(--main-color) 30%, var(--footer-border));
border-radius: 14px;
background:
radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--main-color) 10%, transparent), transparent 28%),
linear-gradient(145deg, color-mix(in srgb, var(--bg-color) 97%, #ffffff), color-mix(in srgb, var(--bg-color) 92%, var(--main-color)));
box-shadow: 0 12px 34px rgba(29, 22, 54, 0.12);
background-clip: padding-box;
isolation: isolate;
transform: translateZ(0);
}
html.dark .markdown-body .mermaid-wrapper {
--mermaid-node-1-bg: #382d5c;
--mermaid-node-1-border: #a78bfa;
--mermaid-node-2-bg: #173f42;
--mermaid-node-2-border: #49c6bd;
--mermaid-node-3-bg: #274329;
--mermaid-node-3-border: #83c96a;
--mermaid-node-4-bg: #4a3424;
--mermaid-node-4-border: #f2a65a;
--mermaid-node-5-bg: #4d293b;
--mermaid-node-5-border: #ee82aa;
--mermaid-node-6-bg: #223b58;
--mermaid-node-6-border: #73ace8;
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}
.markdown-body .mermaid-toolbar {
position: relative;
z-index: 4;
display: flex;
min-height: 52px;
flex: 0 0 auto;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.55rem 1rem;
padding: 0.5rem 0.65rem 0.5rem 0.85rem;
border-bottom: 1px solid color-mix(in srgb, var(--main-color) 22%, var(--footer-border));
border-radius: 13px 13px 0 0;
background: color-mix(in srgb, var(--bg-color) 90%, transparent);
background-clip: padding-box;
backdrop-filter: blur(16px) saturate(1.25);
font-family: var(--bs-body-font-family, system-ui, sans-serif);
}
.markdown-body .mermaid-toolbar__identity,
.markdown-body .mermaid-toolbar__actions {
display: inline-flex;
align-items: center;
}
.markdown-body .mermaid-toolbar__identity {
min-width: 0;
gap: 0.55rem;
}
.markdown-body .mermaid-toolbar__mark {
display: inline-flex;
width: 30px;
height: 30px;
flex: 0 0 auto;
align-items: center;
justify-content: center;
border-radius: 8px;
background: linear-gradient(135deg, #8067dc, #35a99f);
box-shadow: 0 5px 14px rgba(91, 70, 172, 0.28);
color: #fff;
font-size: 0.95rem;
}
.markdown-body .mermaid-toolbar__title {
color: var(--text-color);
font-size: 0.84rem;
font-weight: 720;
letter-spacing: 0.015em;
}
.markdown-body .mermaid-toolbar__actions {
flex: 0 0 auto;
flex-wrap: wrap;
justify-content: flex-end;
gap: 0.28rem;
}
.markdown-body .mermaid-tool-button {
display: inline-flex;
width: 32px;
height: 32px;
align-items: center;
justify-content: center;
padding: 0;
border: 1px solid color-mix(in srgb, var(--text-color) 14%, transparent);
border-radius: 8px;
background: color-mix(in srgb, var(--bg-color) 80%, var(--main-color));
color: var(--text-secondary-color);
font-size: 0.86rem;
cursor: pointer;
transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
.markdown-body .mermaid-tool-button:hover,
.markdown-body .mermaid-tool-button:focus-visible,
.markdown-body .mermaid-tool-button.is-active {
border-color: color-mix(in srgb, var(--main-color) 65%, transparent);
outline: 0;
background: color-mix(in srgb, var(--main-color) 15%, var(--bg-color));
color: var(--main-color);
transform: translateY(-1px);
}
.markdown-body .mermaid-tool-button:disabled {
opacity: 0.38;
cursor: not-allowed;
transform: none;
}
.markdown-body .mermaid-tool-button.is-success {
border-color: rgba(53, 169, 159, 0.62);
background: rgba(53, 169, 159, 0.14);
color: #248f86;
}
.markdown-body .mermaid-tool-button.is-error {
border-color: rgba(220, 91, 104, 0.62);
background: rgba(220, 91, 104, 0.14);
color: #d34d5b;
}
.markdown-body .mermaid-zoom-value {
min-width: 46px;
color: var(--text-secondary-color);
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
font-size: 0.72rem;
font-variant-numeric: tabular-nums;
text-align: center;
}
.markdown-body .mermaid-viewport {
position: relative;
display: block;
min-width: 0;
min-height: clamp(220px, 34vw, 360px);
max-height: none;
flex: 1 1 auto;
overflow: auto;
border-radius: 0 0 13px 13px;
overscroll-behavior: contain;
background-image:
radial-gradient(circle, color-mix(in srgb, var(--main-color) 18%, transparent) 1px, transparent 1px);
background-position: 10px 10px;
background-size: 22px 22px;
cursor: grab;
scrollbar-color: color-mix(in srgb, var(--main-color) 48%, transparent) transparent;
scrollbar-width: thin;
background-clip: padding-box;
}
.markdown-body .mermaid-viewport:focus-visible {
outline: 2px solid color-mix(in srgb, var(--main-color) 65%, transparent);
outline-offset: -2px;
}
.markdown-body .mermaid-viewport.is-panning {
cursor: grabbing;
user-select: none;
}
.markdown-body .mermaid-canvas {
display: flex;
box-sizing: border-box;
width: max-content;
height: max-content;
min-width: 100%;
min-height: 100%;
align-items: center;
justify-content: center;
padding: clamp(1.25rem, 4vw, 3rem);
}
.markdown-body .mermaid-wrapper .mermaid {
display: flex;
min-width: min-content;
min-height: min-content;
flex: 0 0 auto;
align-items: flex-start;
justify-content: center;
}
.markdown-body .mermaid-wrapper svg {
display: block;
max-width: none;
height: auto;
margin: 0 auto;
overflow: visible;
}
.markdown-body .mermaid-wrapper svg .node,
.markdown-body .mermaid-wrapper svg .actor,
.markdown-body .mermaid-wrapper svg .entityBox {
transition: filter 0.18s ease, opacity 0.18s ease;
}
.markdown-body .mermaid-wrapper svg .node:hover,
.markdown-body .mermaid-wrapper svg .actor:hover,
.markdown-body .mermaid-wrapper svg .entityBox:hover {
filter: drop-shadow(0 6px 7px rgba(59, 42, 110, 0.22));
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+1) {
--mermaid-node-fill: var(--mermaid-node-1-bg);
--mermaid-node-stroke: var(--mermaid-node-1-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+2) {
--mermaid-node-fill: var(--mermaid-node-2-bg);
--mermaid-node-stroke: var(--mermaid-node-2-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+3) {
--mermaid-node-fill: var(--mermaid-node-3-bg);
--mermaid-node-stroke: var(--mermaid-node-3-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+4) {
--mermaid-node-fill: var(--mermaid-node-4-bg);
--mermaid-node-stroke: var(--mermaid-node-4-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+5) {
--mermaid-node-fill: var(--mermaid-node-5-bg);
--mermaid-node-stroke: var(--mermaid-node-5-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+6) {
--mermaid-node-fill: var(--mermaid-node-6-bg);
--mermaid-node-stroke: var(--mermaid-node-6-border);
}
.markdown-body .mermaid-wrapper svg .node.default .label-container {
fill: var(--mermaid-node-fill) !important;
stroke: var(--mermaid-node-stroke) !important;
stroke-width: 1.6px !important;
}
.markdown-body .mermaid-wrapper svg .cluster rect {
rx: 14px;
ry: 14px;
stroke-dasharray: 5 3;
}
.markdown-body .mermaid-wrapper svg .flowchart-link,
.markdown-body .mermaid-wrapper svg .messageLine0,
.markdown-body .mermaid-wrapper svg .messageLine1 {
stroke-width: 1.8px;
}
.markdown-body .mermaid-wrapper svg .actor-line {
opacity: 0.72;
stroke-dasharray: 4 4;
}
.markdown-body .mermaid-wrapper svg .messageText,
.markdown-body .mermaid-wrapper svg .loopText {
font-weight: 540;
}
.markdown-body .mermaid-wrapper svg rect.actor,
.markdown-body .mermaid-wrapper svg .note,
.markdown-body .mermaid-wrapper svg .activation0,
.markdown-body .mermaid-wrapper svg .activation1,
.markdown-body .mermaid-wrapper svg .activation2 {
rx: 8px;
ry: 8px;
}
.markdown-body .mermaid-wrapper svg .edgeLabel rect,
.markdown-body .mermaid-wrapper svg .labelBox {
rx: 6px;
ry: 6px;
}
.markdown-body .mermaid-wrapper.is-rendering .mermaid-canvas {
opacity: 0.42;
}
.markdown-body .mermaid-wrapper.is-pending .mermaid-canvas {
visibility: hidden;
}
.markdown-body .mermaid-wrapper.is-pending .mermaid-viewport::after {
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: var(--text-secondary-color);
content: "图表将在内容显示后渲染";
font-size: 0.85rem;
}
html:not([lang^="zh"]) .markdown-body .mermaid-wrapper.is-pending .mermaid-viewport::after {
content: "Diagram will render when visible";
}
.markdown-body .mermaid-wrapper.is-error {
background: var(--bg-color);
}
.markdown-body .mermaid-wrapper.is-error .mermaid-viewport {
min-height: 0;
max-height: none;
background-image: none;
cursor: auto;
}
.markdown-body .mermaid-error-title {
padding: 0.65rem 1rem;
border-bottom: 1px solid var(--footer-border);
background: color-mix(in srgb, #dc5b68 7%, var(--bg-color));
color: #c84150;
font-size: 0.9rem;
font-weight: 600;
}
.markdown-body .mermaid-source {
margin: 0;
padding: 1rem;
border: 0;
border-radius: 0;
background: transparent;
color: var(--text-color);
}
.markdown-body .mermaid-wrapper:fullscreen,
.markdown-body .mermaid-wrapper.is-expanded {
width: auto;
max-width: none;
height: auto;
max-height: none;
margin: 0;
border-radius: 0;
background-color: var(--bg-color);
}
.markdown-body .mermaid-wrapper:fullscreen {
height: 100%;
}
.markdown-body .mermaid-wrapper:fullscreen .mermaid-toolbar,
.markdown-body .mermaid-wrapper:fullscreen .mermaid-viewport {
border-radius: 0;
}
.markdown-body .mermaid-wrapper.is-expanded {
position: fixed;
z-index: 1090;
inset: 1rem;
border-radius: 14px;
box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}
.markdown-body .mermaid-wrapper:fullscreen .mermaid-viewport,
.markdown-body .mermaid-wrapper.is-expanded .mermaid-viewport {
min-height: 0;
max-height: none;
}
body.mermaid-expanded {
overflow: hidden;
}
@media (max-width: 575.98px) {
.markdown-body .mermaid-toolbar {
padding: 0.48rem;
}
.markdown-body .mermaid-toolbar__identity {
width: 100%;
}
.markdown-body .mermaid-toolbar__actions {
width: 100%;
justify-content: flex-end;
gap: 0.2rem;
}
.markdown-body .mermaid-tool-button {
width: 30px;
height: 30px;
}
.markdown-body .mermaid-zoom-value {
min-width: 38px;
font-size: 0.67rem;
}
.markdown-body .mermaid-canvas {
padding: 1rem;
}
.markdown-body .mermaid-wrapper.is-expanded {
inset: 0;
border: 0;
border-radius: 0;
}
.markdown-body .mermaid-wrapper.is-expanded .mermaid-toolbar,
.markdown-body .mermaid-wrapper.is-expanded .mermaid-viewport {
border-radius: 0;
}
}
.markdown-body p {
margin-top: 0;
margin-bottom: 1.2rem;
}
.markdown-body a {
color: var(--link-color);
text-decoration: none;
font-weight: 500;
transition: color 0.2s;
}
.markdown-body a:hover {
color: var(--main-deep-color);
text-decoration: underline;
}
.markdown-body hr {
color: var(--main-color);
background: var(--main-color);
height: 4px;
border-radius: 999px;
margin-top: 25px;
margin-bottom: 25px;
opacity: .5;
}
/* Shared fenced-code presentation for docs, discussions and Git Markdown. */
.markdown-body pre {
position: relative;
overflow: auto;
max-width: 100%;
margin: 1.25rem 0;
padding: 1rem;
border: 1px solid color-mix(in srgb, var(--main-color) 24%, var(--code-block-border, #454545));
border-radius: 12px;
background: var(--code-block-bg, #2b2b2b);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
color: #f1f1f4;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 0.9rem;
line-height: 1.6;
white-space: pre;
scrollbar-color: color-mix(in srgb, var(--main-color) 55%, #696969) var(--code-block-bg, #2b2b2b);
scrollbar-width: thin;
}
pre.code-block-enhanced {
display: flex;
overflow: hidden;
flex-direction: column;
max-width: 100%;
padding: 0;
background: var(--code-block-surface, #323232);
color: #f1f1f4;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 0.9rem;
line-height: 1.6;
white-space: normal;
}
.markdown-body pre code,
.markdown-body pre code.hljs,
pre.code-block-enhanced code,
pre.code-block-enhanced code.hljs {
display: block;
min-width: max-content;
padding: 1rem;
overflow: visible;
border: 0;
background: transparent;
color: inherit;
font: inherit;
white-space: pre;
}
pre.code-block-enhanced .code-block-toolbar {
display: flex;
min-height: 46px;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.45rem 0.6rem 0.4rem 0.85rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
background: var(--code-block-surface, #323232);
font-family: var(--bs-body-font-family, system-ui, sans-serif);
}
pre.code-block-enhanced .code-language-label {
overflow: hidden;
max-width: min(50%, 18rem);
padding: 0.17rem 0.52rem;
border: 1px solid rgba(185, 169, 236, 0.2);
border-radius: 6px;
background: #292929;
color: #c4b5f4;
font-size: 0.76rem;
font-weight: 650;
line-height: 1.35;
text-overflow: ellipsis;
text-transform: lowercase;
white-space: nowrap;
}
pre.code-block-enhanced .code-block-actions {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
gap: 0.28rem;
}
pre.code-block-enhanced .code-tool-button {
display: inline-flex;
width: 32px;
height: 32px;
align-items: center;
justify-content: center;
padding: 0;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 6px;
background: #3a3a3a;
color: #d7d7df;
font-size: 0.86rem;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
pre.code-block-enhanced .code-tool-button:hover,
pre.code-block-enhanced .code-tool-button:focus-visible,
pre.code-block-enhanced .code-tool-button.is-active {
border-color: color-mix(in srgb, var(--main-color) 62%, transparent);
outline: 0;
background: color-mix(in srgb, var(--main-color) 28%, #3a3a3a);
color: #fff;
}
pre.code-block-enhanced .code-tool-button.is-success {
border-color: rgba(63, 185, 80, 0.55);
background: rgba(35, 134, 54, 0.28);
color: #7ee787;
}
pre.code-block-enhanced .code-block-viewport {
display: flex;
min-width: 0;
min-height: 0;
margin: 0.65rem;
overflow: auto;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 9px;
background: var(--code-block-bg, #2b2b2b);
scrollbar-color: color-mix(in srgb, var(--main-color) 55%, #696969) var(--code-block-bg, #2b2b2b);
scrollbar-width: thin;
}
pre.code-block-enhanced .code-line-numbers {
position: sticky;
z-index: 2;
left: 0;
display: none;
min-width: 3.25rem;
flex: 0 0 auto;
padding: 1rem 0.7rem;
border-right: 1px solid rgba(255, 255, 255, 0.08);
background: var(--code-block-gutter, #252525);
color: #6e7681;
font: inherit;
text-align: right;
user-select: none;
}
pre.code-block-enhanced.code-lines-visible .code-line-numbers {
display: block;
}
pre.code-block-enhanced .code-line-numbers > span {
display: block;
min-height: 1.6em;
line-height: 1.6;
}
pre.code-block-enhanced .code-block-viewport::-webkit-scrollbar {
width: 9px;
height: 9px;
}
pre.code-block-enhanced .code-block-viewport::-webkit-scrollbar-thumb {
border: 2px solid var(--code-block-bg, #2b2b2b);
border-radius: 999px;
background: color-mix(in srgb, var(--main-color) 55%, #59586b);
}
pre.code-block-enhanced .code-block-viewport::-webkit-scrollbar-track {
border-radius: 0 0 9px 9px;
background: var(--code-block-bg, #2b2b2b);
}
pre.code-block-enhanced:fullscreen,
pre.code-block-enhanced.is-expanded {
width: auto;
max-width: none;
height: auto;
max-height: none;
margin: 0;
border-radius: 0;
background: var(--code-block-surface, #323232);
}
pre.code-block-enhanced:fullscreen {
height: 100%;
}
pre.code-block-enhanced.is-expanded {
position: fixed;
z-index: 1090;
inset: 1rem;
border-radius: 12px;
box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
}
pre.code-block-enhanced:fullscreen .code-block-viewport,
pre.code-block-enhanced.is-expanded .code-block-viewport {
flex: 1 1 auto;
}
body.code-block-expanded {
overflow: hidden;
}
@media (max-width: 575.98px) {
pre.code-block-enhanced .code-block-toolbar {
padding-left: 0.6rem;
}
pre.code-block-enhanced .code-block-actions {
gap: 0.2rem;
}
pre.code-block-enhanced .code-tool-button {
width: 30px;
height: 30px;
}
pre.code-block-enhanced .code-block-viewport {
margin: 0.45rem;
}
}
.markdown-body h1 {
margin: 2em 0 1em;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--footer-border);
font-weight: 700;
}
.markdown-body h2 {
margin: 1.8em 0 1em;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--footer-border);
font-weight: 600;
}
.markdown-body h3 {
margin: 1.5em 0 1em;
font-weight: 600;
}
.markdown-body h4 {
margin: 1.4em 0 0.6em;
}
.markdown-body h5 {
margin: 1.2em 0 0.5em;
}
.markdown-body h6 {
margin: 1em 0 0.4em;
}
.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child,
.markdown-body h5:first-child,
.markdown-body h6:first-child {
margin-top: 0.5em;
}
.markdown-body img {
max-width: 100%;
height: auto;
border-radius: 8px;
border: 3px solid color-mix(in srgb, var(--main-color) 40%, transparent);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
margin: 1rem 0;
display: inline-block;
transition: all 0.3s ease;
}
.markdown-body img:hover {
border-color: var(--main-color);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
.markdown-body table {
display: block;
width: 100%;
width: max-content;
max-width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
border-spacing: 0;
border-collapse: collapse;
margin-bottom: 1rem;
}
.markdown-body table tr {
background-color: var(--bg-color);
border-top: 1px solid var(--footer-border);
}
.markdown-body table tr:nth-child(2n) {
background-color: color-mix(in srgb, var(--text-color) 3%, transparent);
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--footer-border);
}
.markdown-body table th {
font-weight: 600;
background-color: color-mix(in srgb, var(--text-color) 5%, transparent);
}
.markdown-body blockquote {
color: var(--text-secondary-color);
border-left: 4px solid var(--main-color);
background-color: var(--focus-main-color);
padding: 0.5rem 1rem;
margin: 1rem 0;
border-radius: 0 0.5rem 0.5rem 0;
}
.markdown-body blockquote > :last-child {
margin-bottom: 0;
}
/* List Styles */
.markdown-body ul,
.markdown-body ol {
padding-left: 1.8em;
margin-top: 0.5em;
margin-bottom: 1.2rem;
}
.markdown-body ul {
list-style-type: disc;
}
.markdown-body ol {
list-style-type: decimal;
}
.markdown-body li {
margin-top: 0.4em;
line-height: 1.7;
position: relative;
padding-left: 0.2em;
}
/* Enhancing Markers */
.markdown-body li::marker {
color: var(--main-color);
font-weight: bold;
font-size: 1.05em;
transition: color 0.2s ease;
}
.markdown-body li:hover::marker {
color: var(--main-deep-color);
}
/* Nested Lists */
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0.3em;
margin-bottom: 0.3em;
padding-left: 1.5em;
}
/* Varied bullets for nested lists */
.markdown-body ul ul {
list-style-type: circle;
}
.markdown-body ul ul ul {
list-style-type: square;
}
/* Checkbox Styles */
.markdown-body input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
width: 1.25em;
height: 1.25em;
vertical-align: text-bottom;
background-color: transparent;
border: 2px solid var(--text-secondary-color);
border-radius: 4px;
cursor: default;
position: relative;
margin-right: 0.25em;
transition: all 0.2s ease;
}
.markdown-body input[type="checkbox"]:checked {
background-color: var(--main-color);
border-color: var(--main-color);
}
.markdown-body input[type="checkbox"]:checked::after {
content: "✓";
position: absolute;
color: var(--on-main-color);
font-size: 0.9em;
font-weight: bold;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
line-height: 1;
}
.markdown-body .task-list-item {
list-style-type: none;
margin-left: -1.5em; /* Offset for list items without bullets */
display: flex;
align-items: flex-start;
}
.markdown-body .task-list-item input[type="checkbox"] {
margin-top: 0.15em; /* Vertical alignment with text */
flex-shrink: 0;
}
/* Footnotes Styling */
.markdown-body .footnotes {
margin-top: 4rem;
padding: 2rem;
border-radius: 12px;
background-color: color-mix(in srgb, var(--main-color) 2%, var(--bg-color));
border: 1px solid var(--footer-border);
font-size: 0.9em;
color: var(--text-secondary-color);
position: relative;
}
.markdown-body .footnotes::before {
content: "注释";
position: absolute;
top: -12px;
left: 20px;
background-color: var(--bg-color); /* Match page bg to hide border behind text */
padding: 0 10px;
font-weight: 600;
color: var(--text-secondary-color);
font-size: 0.85em;
border-radius: 4px;
/* Optional: Small border matching the container to make it look like a label */
border: 1px solid var(--footer-border);
}
html:not([lang^="zh"]) .markdown-body .footnotes::before {
content: "Notes";
}
/* If contained in a card with different bg, adjust above. Assuming .markdown-body is on var(--bg-color) */
.markdown-body .footnotes ol {
padding-left: 1.5rem;
list-style-type: decimal;
margin-bottom: 0;
}
.markdown-body .footnotes li {
margin-bottom: 0.8rem;
padding: 1rem 0.8rem 0rem 0.8rem;
border-radius: 8px;
transition: all 0.3s ease;
border: 1px solid transparent;
}
.markdown-body .footnotes li:last-child {
margin-bottom: 0;
}
/* Ensure marker fits the theme */
.markdown-body .footnotes li::marker {
color: var(--main-color);
font-weight: 600;
}
/* Back-to-text link arrow */
.markdown-body .footnote-backref {
color: var(--main-color);
text-decoration: none;
margin-left: 0.5rem;
font-family: system-ui, -apple-system, sans-serif;
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.25em;
height: 1.25em;
border-radius: 50%;
background-color: color-mix(in srgb, var(--main-color) 10%, transparent);
transition: all 0.2s ease;
font-size: 0.9em;
}
.markdown-body .footnote-backref:hover {
background-color: var(--main-color);
color: var(--on-main-color);
transform: translateY(-2px);
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* When clicking a footnote link, highlight the footnote content */
@keyframes highlight-pulse {
0% {
border-color: var(--main-color);
background-color: var(--focus-main-color);
transform: scale(1);
}
50% {
transform: scale(1.01);
}
100% {
border-color: var(--main-color);
background-color: var(--focus-main-color);
transform: scale(1);
}
}
.markdown-body .footnotes li:target {
border-color: var(--main-color);
background-color: var(--focus-main-color);
animation: highlight-pulse 0.5s ease-out;
}
/* Footnote references in text [^1] */
.markdown-body .footnote-ref {
color: var(--main-color);
text-decoration: none;
font-weight: 700;
margin: 0 0.15rem;
padding: 0.4em 0.3em 0.1em 0.3em;
border-radius: 6px;
font-size: 0.75em;
vertical-align: super;
line-height: 1;
background-color: color-mix(in srgb, var(--main-color) 8%, transparent);
transition: all 0.2s ease;
display: inline-block;
}
.markdown-body .footnote-ref sup::before {
content: "[";
opacity: 0.8;
margin-right: 1px;
}
.markdown-body .footnote-ref sup::after {
content: "]";
opacity: 0.8;
margin-left: 1px;
}
code:not(pre code) {
padding: 0.2em 0.4em;
border-radius: 6px;
background: color-mix(in srgb, var(--main-color) 15%, transparent);
color: var(--main-color);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 85%;
text-wrap: nowrap;
white-space: nowrap;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 12px;
line-height: 10px;
color: var(--text-color);
vertical-align: middle;
background-color: var(--bg-color);
border: solid 1px var(--footer-border);
border-bottom-color: var(--footer-border);
border-radius: 3px;
box-shadow: inset 0 -1px 0 var(--footer-border);
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}
.markdown-body {
word-wrap: break-word;
overflow-wrap: anywhere;
box-sizing: border-box;
min-width: 0;
line-height: 1.8;
font-size: 16px;
color: var(--text-color);
}
.markdown-body .mermaid-wrapper {
--mermaid-node-1-bg: #eee9ff;
--mermaid-node-1-border: #7c5ce5;
--mermaid-node-2-bg: #ddf7f3;
--mermaid-node-2-border: #219a90;
--mermaid-node-3-bg: #e8f6de;
--mermaid-node-3-border: #5a9d3e;
--mermaid-node-4-bg: #fff0d8;
--mermaid-node-4-border: #d9822b;
--mermaid-node-5-bg: #fde4ee;
--mermaid-node-5-border: #c94f7d;
--mermaid-node-6-bg: #e2efff;
--mermaid-node-6-border: #397fc4;
position: relative;
display: flex;
overflow: hidden;
flex-direction: column;
box-sizing: border-box;
width: 100%;
max-width: 100%;
margin: 1.5rem 0;
padding: 0;
border: 1px solid color-mix(in srgb, var(--main-color) 30%, var(--footer-border));
border-radius: 14px;
background:
radial-gradient(circle at 8% 8%, color-mix(in srgb, var(--main-color) 10%, transparent), transparent 28%),
linear-gradient(145deg, color-mix(in srgb, var(--bg-color) 97%, #ffffff), color-mix(in srgb, var(--bg-color) 92%, var(--main-color)));
box-shadow: 0 12px 34px rgba(29, 22, 54, 0.12);
background-clip: padding-box;
isolation: isolate;
transform: translateZ(0);
}
html.dark .markdown-body .mermaid-wrapper {
--mermaid-node-1-bg: #382d5c;
--mermaid-node-1-border: #a78bfa;
--mermaid-node-2-bg: #173f42;
--mermaid-node-2-border: #49c6bd;
--mermaid-node-3-bg: #274329;
--mermaid-node-3-border: #83c96a;
--mermaid-node-4-bg: #4a3424;
--mermaid-node-4-border: #f2a65a;
--mermaid-node-5-bg: #4d293b;
--mermaid-node-5-border: #ee82aa;
--mermaid-node-6-bg: #223b58;
--mermaid-node-6-border: #73ace8;
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.34);
}
.markdown-body .mermaid-toolbar {
position: relative;
z-index: 4;
display: flex;
min-height: 52px;
flex: 0 0 auto;
flex-wrap: wrap;
align-items: center;
justify-content: space-between;
gap: 0.55rem 1rem;
padding: 0.5rem 0.65rem 0.5rem 0.85rem;
border-bottom: 1px solid color-mix(in srgb, var(--main-color) 22%, var(--footer-border));
border-radius: 13px 13px 0 0;
background: color-mix(in srgb, var(--bg-color) 90%, transparent);
background-clip: padding-box;
backdrop-filter: blur(16px) saturate(1.25);
font-family: var(--bs-body-font-family, system-ui, sans-serif);
}
.markdown-body .mermaid-toolbar__identity,
.markdown-body .mermaid-toolbar__actions {
display: inline-flex;
align-items: center;
}
.markdown-body .mermaid-toolbar__identity {
min-width: 0;
gap: 0.55rem;
}
.markdown-body .mermaid-toolbar__mark {
display: inline-flex;
width: 30px;
height: 30px;
flex: 0 0 auto;
align-items: center;
justify-content: center;
border-radius: 8px;
background: linear-gradient(135deg, #8067dc, #35a99f);
box-shadow: 0 5px 14px rgba(91, 70, 172, 0.28);
color: #fff;
font-size: 0.95rem;
}
.markdown-body .mermaid-toolbar__title {
color: var(--text-color);
font-size: 0.84rem;
font-weight: 720;
letter-spacing: 0.015em;
}
.markdown-body .mermaid-toolbar__actions {
flex: 0 0 auto;
flex-wrap: wrap;
justify-content: flex-end;
gap: 0.28rem;
}
.markdown-body .mermaid-tool-button {
display: inline-flex;
width: 32px;
height: 32px;
align-items: center;
justify-content: center;
padding: 0;
border: 1px solid color-mix(in srgb, var(--text-color) 14%, transparent);
border-radius: 8px;
background: color-mix(in srgb, var(--bg-color) 80%, var(--main-color));
color: var(--text-secondary-color);
font-size: 0.86rem;
cursor: pointer;
transition: transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
.markdown-body .mermaid-tool-button:hover,
.markdown-body .mermaid-tool-button:focus-visible,
.markdown-body .mermaid-tool-button.is-active {
border-color: color-mix(in srgb, var(--main-color) 65%, transparent);
outline: 0;
background: color-mix(in srgb, var(--main-color) 15%, var(--bg-color));
color: var(--main-color);
transform: translateY(-1px);
}
.markdown-body .mermaid-tool-button:disabled {
opacity: 0.38;
cursor: not-allowed;
transform: none;
}
.markdown-body .mermaid-tool-button.is-success {
border-color: rgba(53, 169, 159, 0.62);
background: rgba(53, 169, 159, 0.14);
color: #248f86;
}
.markdown-body .mermaid-tool-button.is-error {
border-color: rgba(220, 91, 104, 0.62);
background: rgba(220, 91, 104, 0.14);
color: #d34d5b;
}
.markdown-body .mermaid-zoom-value {
min-width: 46px;
color: var(--text-secondary-color);
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
font-size: 0.72rem;
font-variant-numeric: tabular-nums;
text-align: center;
}
.markdown-body .mermaid-viewport {
position: relative;
display: block;
min-width: 0;
min-height: clamp(220px, 34vw, 360px);
max-height: none;
flex: 1 1 auto;
overflow: auto;
border-radius: 0 0 13px 13px;
overscroll-behavior: contain;
background-image:
radial-gradient(circle, color-mix(in srgb, var(--main-color) 18%, transparent) 1px, transparent 1px);
background-position: 10px 10px;
background-size: 22px 22px;
cursor: grab;
scrollbar-color: color-mix(in srgb, var(--main-color) 48%, transparent) transparent;
scrollbar-width: thin;
background-clip: padding-box;
}
.markdown-body .mermaid-viewport:focus-visible {
outline: 2px solid color-mix(in srgb, var(--main-color) 65%, transparent);
outline-offset: -2px;
}
.markdown-body .mermaid-viewport.is-panning {
cursor: grabbing;
user-select: none;
}
.markdown-body .mermaid-canvas {
display: flex;
box-sizing: border-box;
width: max-content;
height: max-content;
min-width: 100%;
min-height: 100%;
align-items: center;
justify-content: center;
padding: clamp(1.25rem, 4vw, 3rem);
}
.markdown-body .mermaid-wrapper .mermaid {
display: flex;
min-width: min-content;
min-height: min-content;
flex: 0 0 auto;
align-items: flex-start;
justify-content: center;
}
.markdown-body .mermaid-wrapper svg {
display: block;
max-width: none;
height: auto;
margin: 0 auto;
overflow: visible;
}
.markdown-body .mermaid-wrapper svg .node,
.markdown-body .mermaid-wrapper svg .actor,
.markdown-body .mermaid-wrapper svg .entityBox {
transition: filter 0.18s ease, opacity 0.18s ease;
}
.markdown-body .mermaid-wrapper svg .node:hover,
.markdown-body .mermaid-wrapper svg .actor:hover,
.markdown-body .mermaid-wrapper svg .entityBox:hover {
filter: drop-shadow(0 6px 7px rgba(59, 42, 110, 0.22));
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+1) {
--mermaid-node-fill: var(--mermaid-node-1-bg);
--mermaid-node-stroke: var(--mermaid-node-1-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+2) {
--mermaid-node-fill: var(--mermaid-node-2-bg);
--mermaid-node-stroke: var(--mermaid-node-2-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+3) {
--mermaid-node-fill: var(--mermaid-node-3-bg);
--mermaid-node-stroke: var(--mermaid-node-3-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+4) {
--mermaid-node-fill: var(--mermaid-node-4-bg);
--mermaid-node-stroke: var(--mermaid-node-4-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+5) {
--mermaid-node-fill: var(--mermaid-node-5-bg);
--mermaid-node-stroke: var(--mermaid-node-5-border);
}
.markdown-body .mermaid-wrapper svg .node.default:nth-of-type(6n+6) {
--mermaid-node-fill: var(--mermaid-node-6-bg);
--mermaid-node-stroke: var(--mermaid-node-6-border);
}
.markdown-body .mermaid-wrapper svg .node.default .label-container {
fill: var(--mermaid-node-fill) !important;
stroke: var(--mermaid-node-stroke) !important;
stroke-width: 1.6px !important;
}
.markdown-body .mermaid-wrapper svg .cluster rect {
rx: 14px;
ry: 14px;
stroke-dasharray: 5 3;
}
.markdown-body .mermaid-wrapper svg .flowchart-link,
.markdown-body .mermaid-wrapper svg .messageLine0,
.markdown-body .mermaid-wrapper svg .messageLine1 {
stroke-width: 1.8px;
}
.markdown-body .mermaid-wrapper svg .actor-line {
opacity: 0.72;
stroke-dasharray: 4 4;
}
.markdown-body .mermaid-wrapper svg .messageText,
.markdown-body .mermaid-wrapper svg .loopText {
font-weight: 540;
}
.markdown-body .mermaid-wrapper svg rect.actor,
.markdown-body .mermaid-wrapper svg .note,
.markdown-body .mermaid-wrapper svg .activation0,
.markdown-body .mermaid-wrapper svg .activation1,
.markdown-body .mermaid-wrapper svg .activation2 {
rx: 8px;
ry: 8px;
}
.markdown-body .mermaid-wrapper svg .edgeLabel rect,
.markdown-body .mermaid-wrapper svg .labelBox {
rx: 6px;
ry: 6px;
}
.markdown-body .mermaid-wrapper.is-rendering .mermaid-canvas {
opacity: 0.42;
}
.markdown-body .mermaid-wrapper.is-pending .mermaid-canvas {
visibility: hidden;
}
.markdown-body .mermaid-wrapper.is-pending .mermaid-viewport::after {
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: var(--text-secondary-color);
content: "图表将在内容显示后渲染";
font-size: 0.85rem;
}
html:not([lang^="zh"]) .markdown-body .mermaid-wrapper.is-pending .mermaid-viewport::after {
content: "Diagram will render when visible";
}
.markdown-body .mermaid-wrapper.is-error {
background: var(--bg-color);
}
.markdown-body .mermaid-wrapper.is-error .mermaid-viewport {
min-height: 0;
max-height: none;
background-image: none;
cursor: auto;
}
.markdown-body .mermaid-error-title {
padding: 0.65rem 1rem;
border-bottom: 1px solid var(--footer-border);
background: color-mix(in srgb, #dc5b68 7%, var(--bg-color));
color: #c84150;
font-size: 0.9rem;
font-weight: 600;
}
.markdown-body .mermaid-source {
margin: 0;
padding: 1rem;
border: 0;
border-radius: 0;
background: transparent;
color: var(--text-color);
}
.markdown-body .mermaid-wrapper:fullscreen,
.markdown-body .mermaid-wrapper.is-expanded {
width: auto;
max-width: none;
height: auto;
max-height: none;
margin: 0;
border-radius: 0;
background-color: var(--bg-color);
}
.markdown-body .mermaid-wrapper:fullscreen {
height: 100%;
}
.markdown-body .mermaid-wrapper:fullscreen .mermaid-toolbar,
.markdown-body .mermaid-wrapper:fullscreen .mermaid-viewport {
border-radius: 0;
}
.markdown-body .mermaid-wrapper.is-expanded {
position: fixed;
z-index: 1090;
inset: 1rem;
border-radius: 14px;
box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}
.markdown-body .mermaid-wrapper:fullscreen .mermaid-viewport,
.markdown-body .mermaid-wrapper.is-expanded .mermaid-viewport {
min-height: 0;
max-height: none;
}
body.mermaid-expanded {
overflow: hidden;
}
@media (max-width: 575.98px) {
.markdown-body .mermaid-toolbar {
padding: 0.48rem;
}
.markdown-body .mermaid-toolbar__identity {
width: 100%;
}
.markdown-body .mermaid-toolbar__actions {
width: 100%;
justify-content: flex-end;
gap: 0.2rem;
}
.markdown-body .mermaid-tool-button {
width: 30px;
height: 30px;
}
.markdown-body .mermaid-zoom-value {
min-width: 38px;
font-size: 0.67rem;
}
.markdown-body .mermaid-canvas {
padding: 1rem;
}
.markdown-body .mermaid-wrapper.is-expanded {
inset: 0;
border: 0;
border-radius: 0;
}
.markdown-body .mermaid-wrapper.is-expanded .mermaid-toolbar,
.markdown-body .mermaid-wrapper.is-expanded .mermaid-viewport {
border-radius: 0;
}
}
.markdown-body p {
margin-top: 0;
margin-bottom: 1.2rem;
}
.markdown-body a {
color: var(--link-color);
text-decoration: none;
font-weight: 500;
transition: color 0.2s;
}
.markdown-body a:hover {
color: var(--main-deep-color);
text-decoration: underline;
}
.markdown-body hr {
color: var(--main-color);
background: var(--main-color);
height: 4px;
border-radius: 999px;
margin-top: 25px;
margin-bottom: 25px;
opacity: .5;
}
/* Shared fenced-code presentation for docs, discussions and Git Markdown. */
.markdown-body pre {
position: relative;
overflow: auto;
max-width: 100%;
margin: 1.25rem 0;
padding: 1rem;
border: 1px solid color-mix(in srgb, var(--main-color) 24%, var(--code-block-border, #454545));
border-radius: 12px;
background: var(--code-block-bg, #2b2b2b);
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
color: #f1f1f4;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 0.9rem;
line-height: 1.6;
white-space: pre;
scrollbar-color: color-mix(in srgb, var(--main-color) 55%, #696969) var(--code-block-bg, #2b2b2b);
scrollbar-width: thin;
}
pre.code-block-enhanced {
display: flex;
overflow: hidden;
flex-direction: column;
max-width: 100%;
padding: 0;
background: var(--code-block-surface, #323232);
color: #f1f1f4;
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
font-size: 0.9rem;
line-height: 1.6;
white-space: normal;
}
.markdown-body pre code,
.markdown-body pre code.hljs,
pre.code-block-enhanced code,
pre.code-block-enhanced code.hljs {
display: block;
min-width: max-content;
padding: 1rem;
overflow: visible;
border: 0;
background: transparent;
color: inherit;
font: inherit;
white-space: pre;
}
pre.code-block-enhanced .code-block-toolbar {
display: flex;
min-height: 46px;
flex: 0 0 auto;
align-items: center;
justify-content: space-between;
gap: 0.75rem;
padding: 0.45rem 0.6rem 0.4rem 0.85rem;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
background: var(--code-block-surface, #323232);
font-family: var(--bs-body-font-family, system-ui, sans-serif);
}
pre.code-block-enhanced .code-language-label {
overflow: hidden;
max-width: min(50%, 18rem);
padding: 0.17rem 0.52rem;
border: 1px solid rgba(185, 169, 236, 0.2);
border-radius: 6px;
background: #292929;
color: #c4b5f4;
font-size: 0.76rem;
font-weight: 650;
line-height: 1.35;
text-overflow: ellipsis;
text-transform: lowercase;
white-space: nowrap;
}
pre.code-block-enhanced .code-block-actions {
display: inline-flex;
flex: 0 0 auto;
align-items: center;
gap: 0.28rem;
}
pre.code-block-enhanced .code-tool-button {
display: inline-flex;
width: 32px;
height: 32px;
align-items: center;
justify-content: center;
padding: 0;
border: 1px solid rgba(255, 255, 255, 0.12);
border-radius: 6px;
background: #3a3a3a;
color: #d7d7df;
font-size: 0.86rem;
cursor: pointer;
transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}
pre.code-block-enhanced .code-tool-button:hover,
pre.code-block-enhanced .code-tool-button:focus-visible,
pre.code-block-enhanced .code-tool-button.is-active {
border-color: color-mix(in srgb, var(--main-color) 62%, transparent);
outline: 0;
background: color-mix(in srgb, var(--main-color) 28%, #3a3a3a);
color: #fff;
}
pre.code-block-enhanced .code-tool-button.is-success {
border-color: rgba(63, 185, 80, 0.55);
background: rgba(35, 134, 54, 0.28);
color: #7ee787;
}
pre.code-block-enhanced .code-block-viewport {
display: flex;
min-width: 0;
min-height: 0;
margin: 0.65rem;
overflow: auto;
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 9px;
background: var(--code-block-bg, #2b2b2b);
scrollbar-color: color-mix(in srgb, var(--main-color) 55%, #696969) var(--code-block-bg, #2b2b2b);
scrollbar-width: thin;
}
pre.code-block-enhanced .code-line-numbers {
position: sticky;
z-index: 2;
left: 0;
display: none;
min-width: 3.25rem;
flex: 0 0 auto;
padding: 1rem 0.7rem;
border-right: 1px solid rgba(255, 255, 255, 0.08);
background: var(--code-block-gutter, #252525);
color: #6e7681;
font: inherit;
text-align: right;
user-select: none;
}
pre.code-block-enhanced.code-lines-visible .code-line-numbers {
display: block;
}
pre.code-block-enhanced .code-line-numbers > span {
display: block;
min-height: 1.6em;
line-height: 1.6;
}
pre.code-block-enhanced .code-block-viewport::-webkit-scrollbar {
width: 9px;
height: 9px;
}
pre.code-block-enhanced .code-block-viewport::-webkit-scrollbar-thumb {
border: 2px solid var(--code-block-bg, #2b2b2b);
border-radius: 999px;
background: color-mix(in srgb, var(--main-color) 55%, #59586b);
}
pre.code-block-enhanced .code-block-viewport::-webkit-scrollbar-track {
border-radius: 0 0 9px 9px;
background: var(--code-block-bg, #2b2b2b);
}
pre.code-block-enhanced:fullscreen,
pre.code-block-enhanced.is-expanded {
width: auto;
max-width: none;
height: auto;
max-height: none;
margin: 0;
border-radius: 0;
background: var(--code-block-surface, #323232);
}
pre.code-block-enhanced:fullscreen {
height: 100%;
}
pre.code-block-enhanced.is-expanded {
position: fixed;
z-index: 1090;
inset: 1rem;
border-radius: 12px;
box-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
}
pre.code-block-enhanced:fullscreen .code-block-viewport,
pre.code-block-enhanced.is-expanded .code-block-viewport {
flex: 1 1 auto;
}
body.code-block-expanded {
overflow: hidden;
}
@media (max-width: 575.98px) {
pre.code-block-enhanced .code-block-toolbar {
padding-left: 0.6rem;
}
pre.code-block-enhanced .code-block-actions {
gap: 0.2rem;
}
pre.code-block-enhanced .code-tool-button {
width: 30px;
height: 30px;
}
pre.code-block-enhanced .code-block-viewport {
margin: 0.45rem;
}
}
.markdown-body h1 {
margin: 2em 0 1em;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--footer-border);
font-weight: 700;
}
.markdown-body h2 {
margin: 1.8em 0 1em;
padding-bottom: 0.3em;
border-bottom: 1px solid var(--footer-border);
font-weight: 600;
}
.markdown-body h3 {
margin: 1.5em 0 1em;
font-weight: 600;
}
.markdown-body h4 {
margin: 1.4em 0 0.6em;
}
.markdown-body h5 {
margin: 1.2em 0 0.5em;
}
.markdown-body h6 {
margin: 1em 0 0.4em;
}
.markdown-body h1:first-child,
.markdown-body h2:first-child,
.markdown-body h3:first-child,
.markdown-body h4:first-child,
.markdown-body h5:first-child,
.markdown-body h6:first-child {
margin-top: 0.5em;
}
.markdown-body img {
max-width: 100%;
height: auto;
border-radius: 8px;
border: 3px solid color-mix(in srgb, var(--main-color) 40%, transparent);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
margin: 1rem 0;
display: inline-block;
transition: all 0.3s ease;
}
.markdown-body img:hover {
border-color: var(--main-color);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}
.markdown-body table {
display: block;
width: 100%;
width: max-content;
max-width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
border-spacing: 0;
border-collapse: collapse;
margin-bottom: 1rem;
}
.markdown-body table tr {
background-color: var(--bg-color);
border-top: 1px solid var(--footer-border);
}
.markdown-body table tr:nth-child(2n) {
background-color: color-mix(in srgb, var(--text-color) 3%, transparent);
}
.markdown-body table th,
.markdown-body table td {
padding: 6px 13px;
border: 1px solid var(--footer-border);
}
.markdown-body table th {
font-weight: 600;
background-color: color-mix(in srgb, var(--text-color) 5%, transparent);
}
.markdown-body blockquote {
color: var(--text-secondary-color);
border-left: 4px solid var(--main-color);
background-color: var(--focus-main-color);
padding: 0.5rem 1rem;
margin: 1rem 0;
border-radius: 0 0.5rem 0.5rem 0;
}
.markdown-body blockquote > :last-child {
margin-bottom: 0;
}
/* List Styles */
.markdown-body ul,
.markdown-body ol {
padding-left: 1.8em;
margin-top: 0.5em;
margin-bottom: 1.2rem;
}
.markdown-body ul {
list-style-type: disc;
}
.markdown-body ol {
list-style-type: decimal;
}
.markdown-body li {
margin-top: 0.4em;
line-height: 1.7;
position: relative;
padding-left: 0.2em;
}
/* Enhancing Markers */
.markdown-body li::marker {
color: var(--main-color);
font-weight: bold;
font-size: 1.05em;
transition: color 0.2s ease;
}
.markdown-body li:hover::marker {
color: var(--main-deep-color);
}
/* Nested Lists */
.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
margin-top: 0.3em;
margin-bottom: 0.3em;
padding-left: 1.5em;
}
/* Varied bullets for nested lists */
.markdown-body ul ul {
list-style-type: circle;
}
.markdown-body ul ul ul {
list-style-type: square;
}
/* Checkbox Styles */
.markdown-body input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
width: 1.25em;
height: 1.25em;
vertical-align: text-bottom;
background-color: transparent;
border: 2px solid var(--text-secondary-color);
border-radius: 4px;
cursor: default;
position: relative;
margin-right: 0.25em;
transition: all 0.2s ease;
}
.markdown-body input[type="checkbox"]:checked {
background-color: var(--main-color);
border-color: var(--main-color);
}
.markdown-body input[type="checkbox"]:checked::after {
content: "✓";
position: absolute;
color: var(--on-main-color);
font-size: 0.9em;
font-weight: bold;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
line-height: 1;
}
.markdown-body .task-list-item {
list-style-type: none;
margin-left: -1.5em; /* Offset for list items without bullets */
display: flex;
align-items: flex-start;
}
.markdown-body .task-list-item input[type="checkbox"] {
margin-top: 0.15em; /* Vertical alignment with text */
flex-shrink: 0;
}
/* Footnotes Styling */
.markdown-body .footnotes {
margin-top: 4rem;
padding: 2rem;
border-radius: 12px;
background-color: color-mix(in srgb, var(--main-color) 2%, var(--bg-color));
border: 1px solid var(--footer-border);
font-size: 0.9em;
color: var(--text-secondary-color);
position: relative;
}
.markdown-body .footnotes::before {
content: "注释";
position: absolute;
top: -12px;
left: 20px;
background-color: var(--bg-color); /* Match page bg to hide border behind text */
padding: 0 10px;
font-weight: 600;
color: var(--text-secondary-color);
font-size: 0.85em;
border-radius: 4px;
/* Optional: Small border matching the container to make it look like a label */
border: 1px solid var(--footer-border);
}
html:not([lang^="zh"]) .markdown-body .footnotes::before {
content: "Notes";
}
/* If contained in a card with different bg, adjust above. Assuming .markdown-body is on var(--bg-color) */
.markdown-body .footnotes ol {
padding-left: 1.5rem;
list-style-type: decimal;
margin-bottom: 0;
}
.markdown-body .footnotes li {
margin-bottom: 0.8rem;
padding: 1rem 0.8rem 0rem 0.8rem;
border-radius: 8px;
transition: all 0.3s ease;
border: 1px solid transparent;
}
.markdown-body .footnotes li:last-child {
margin-bottom: 0;
}
/* Ensure marker fits the theme */
.markdown-body .footnotes li::marker {
color: var(--main-color);
font-weight: 600;
}
/* Back-to-text link arrow */
.markdown-body .footnote-backref {
color: var(--main-color);
text-decoration: none;
margin-left: 0.5rem;
font-family: system-ui, -apple-system, sans-serif;
display: inline-flex;
align-items: center;
justify-content: center;
width: 1.25em;
height: 1.25em;
border-radius: 50%;
background-color: color-mix(in srgb, var(--main-color) 10%, transparent);
transition: all 0.2s ease;
font-size: 0.9em;
}
.markdown-body .footnote-backref:hover {
background-color: var(--main-color);
color: var(--on-main-color);
transform: translateY(-2px);
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* When clicking a footnote link, highlight the footnote content */
@keyframes highlight-pulse {
0% {
border-color: var(--main-color);
background-color: var(--focus-main-color);
transform: scale(1);
}
50% {
transform: scale(1.01);
}
100% {
border-color: var(--main-color);
background-color: var(--focus-main-color);
transform: scale(1);
}
}
.markdown-body .footnotes li:target {
border-color: var(--main-color);
background-color: var(--focus-main-color);
animation: highlight-pulse 0.5s ease-out;
}
/* Footnote references in text [^1] */
.markdown-body .footnote-ref {
color: var(--main-color);
text-decoration: none;
font-weight: 700;
margin: 0 0.15rem;
padding: 0.4em 0.3em 0.1em 0.3em;
border-radius: 6px;
font-size: 0.75em;
vertical-align: super;
line-height: 1;
background-color: color-mix(in srgb, var(--main-color) 8%, transparent);
transition: all 0.2s ease;
display: inline-block;
}
.markdown-body .footnote-ref sup::before {
content: "[";
opacity: 0.8;
margin-right: 1px;
}
.markdown-body .footnote-ref sup::after {
content: "]";
opacity: 0.8;
margin-left: 1px;
}