html {
    overflow-x: initial !important;
}

/*:root {*/
/*    --bg-color: #ffffff;*/
/*    --text-color: #333333;*/
/*    --select-text-bg-color: #B5D6FC;*/
/*    --select-text-font-color: auto;*/
/*    --monospace: "Lucida Console", Consolas, "Courier", monospace;*/
/*    --title-bar-height: 20px;*/
/*}*/

/*html {*/
/*    font-size: 14px;*/
/*    background-color: var(--bg-color);*/
/*    color: var(--text-color);*/
/*    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;*/
/*    -webkit-font-smoothing: antialiased;*/
/*}*/

h1, h2, h3, h4, h5 {
    white-space: pre-wrap;
}

/*body {*/
/*    margin: 0px;*/
/*    padding: 0px;*/
/*    height: auto;*/
/*    inset: 0px;*/
/*    font-size: 1rem;*/
/*    line-height: 1.42857;*/
/*    overflow-x: hidden;*/
/*    background: inherit;*/
/*}*/

iframe {
    margin: auto;
}

a.url {
    word-break: break-all;
}

a:active, a:hover {
    outline: 0px;
}

/*.in-text-selection, ::selection {*/
/*    text-shadow: none;*/
/*    background: var(--select-text-bg-color);*/
/*    color: var(--select-text-font-color);*/
/*}*/

#write {
    margin: 0px 25px;
    height: auto;
    width: inherit;
    word-break: normal;
    overflow-wrap: break-word;
    position: relative;
    white-space: normal;
    overflow-x: visible;
    /*padding-top: 36px;*/
}

#write.first-line-indent p {
    text-indent: 2em;
}

#write.first-line-indent li p, #write.first-line-indent p * {
    text-indent: 0px;
}

#write.first-line-indent li {
    margin-left: 2em;
}

.for-image #write {
    padding-left: 8px;
    padding-right: 8px;
}


#write li > figure:last-child {
    margin-bottom: 0.5rem;
}

#write ol, #write ul {
    position: relative;
}

.typora-content img {
    max-width: 100%;
    vertical-align: middle;
    image-orientation: from-image;
}

button, input, select, textarea {
    color: inherit;
    font: inherit;
}

input[type="checkbox"], input[type="radio"] {
    line-height: normal;
    padding: 0px;
}

/**, ::after, ::before {*/
/*    box-sizing: border-box;*/
/*}*/

#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p, #write pre {
    width: inherit;
}

#write h1, #write h2, #write h3, #write h4, #write h5, #write h6, #write p {
    position: relative;
}

p {
    line-height: inherit;
}

h1, h2, h3, h4, h5, h6 {
    break-after: avoid-page;
    break-inside: avoid;
    orphans: 4;
}

p {
    orphans: 4;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.6rem;
}

h4 {
    font-size: 1.4rem;
}

h5 {
    font-size: 1.2rem;
}

h6 {
    font-size: 1rem;
}

/*.md-math-block, .md-rawblock, h1, h2, h3, h4, h5, h6, p {*/
/*    margin-top: 1rem;*/
/*    margin-bottom: 1rem;*/
/*}*/

.hidden {
    display: none;
}

.md-blockmeta {
    color: rgb(204, 204, 204);
    font-weight: 700;
    font-style: italic;
}

a {
    cursor: pointer;
}

sup.md-footnote {
    padding: 2px 4px;
    background-color: rgba(238, 238, 238, 0.7);
    color: rgb(85, 85, 85);
    border-radius: 4px;
    cursor: pointer;
}

sup.md-footnote a, sup.md-footnote a:hover {
    color: inherit;
    text-transform: inherit;
    text-decoration: inherit;
}

#write input[type="checkbox"] {
    cursor: pointer;
    width: inherit;
    height: inherit;
}

.CodeMirror-gutters {
    border-right: 0px;
    background-color: inherit;
}

.CodeMirror-linenumber {
    user-select: none;
}

.CodeMirror {
    text-align: left;
}

.CodeMirror-placeholder {
    opacity: 0.3;
}

.CodeMirror pre {
    padding: 0px 4px;
}

.CodeMirror-lines {
    padding: 0px;
}

div.hr:focus {
    cursor: none;
}

#write pre {
    white-space: pre-wrap;
}

#write.fences-no-line-wrapping pre {
    white-space: pre;
}

#write pre.ty-contain-cm {
    white-space: normal;
}

.CodeMirror-gutters {
    margin-right: 4px;
}

.md-fences {
    font-size: 0.9rem;
    display: block;
    break-inside: avoid;
    text-align: left;
    overflow: visible;
    white-space: pre;
    background: inherit;
    position: relative !important;
}

.md-fences-adv-panel {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    padding-top: 0px;
    padding-bottom: 8px;
    overflow-x: auto;
}

#write .md-fences.mock-cm {
    white-space: pre-wrap;
}

.md-fences.md-fences-with-lineno {
    padding-left: 0px;
}

#write.fences-no-line-wrapping .md-fences.mock-cm {
    white-space: pre;
    overflow-x: auto;
}

.md-fences.mock-cm.md-fences-with-lineno {
    padding-left: 8px;
}

.CodeMirror-line, twitterwidget {
    break-inside: avoid;
}

svg {
    break-inside: avoid;
}

.footnotes {
    opacity: 0.8;
    font-size: 0.9rem;
    margin-top: 1em;
    margin-bottom: 1em;
}

.footnotes + .footnotes {
    margin-top: 0px;
}

.md-reset {
    margin: 0px;
    padding: 0px;
    border: 0px;
    outline: 0px;
    vertical-align: top;
    background: 0px 0px;
    text-decoration: none;
    text-shadow: none;
    float: none;
    position: static;
    width: auto;
    height: auto;
    white-space: nowrap;
    cursor: inherit;
    -webkit-tap-highlight-color: transparent;
    line-height: normal;
    font-weight: 400;
    text-align: left;
    box-sizing: content-box;
    direction: ltr;
}

li div {
    padding-top: 0px;
}

blockquote {
    margin: 1rem 0px;
}

li .mathjax-block, li p {
    margin: 0.5rem 0px;
}

li blockquote {
    margin: 1rem 0px;
}

li {
    margin: 0px;
    position: relative;
}

blockquote > :last-child {
    margin-bottom: 0px;
}

blockquote > :first-child, li > :first-child {
    margin-top: 0px;
}

.footnotes-area {
    color: rgb(136, 136, 136);
    margin-top: 0.714rem;
    padding-bottom: 0.143rem;
    white-space: normal;
}

#write .footnote-line {
    white-space: pre-wrap;
}

.footnote-line {
    margin-top: 0.714em;
    font-size: 0.7em;
}

a img, img a {
    cursor: pointer;
}

pre.md-meta-block {
    font-size: 0.8rem;
    min-height: 0.8rem;
    white-space: pre-wrap;
    background: rgb(204, 204, 204);
    display: block;
    overflow-x: hidden;
}

p > .md-image:only-child:not(.md-img-error) img, p > img:only-child {
    display: block;
    margin: auto;
}

#write.first-line-indent p > .md-image:only-child:not(.md-img-error) img {
    left: -2em;
    position: relative;
}

p > .md-image:only-child {
    display: inline-block;
    width: 100%;
}

#write .MathJax_Display {
    margin: 0.8em 0px 0px;
}

.md-math-block {
    width: 100%;
}

.md-math-block:not(:empty)::after {
    display: none;
}

.MathJax_ref {
    fill: currentcolor;
}

[contenteditable="true"]:active, [contenteditable="true"]:focus, [contenteditable="false"]:active, [contenteditable="false"]:focus {
    outline: 0px;
    box-shadow: none;
}

.md-task-list-item {
    position: relative;
    list-style-type: none;
}

.task-list-item.md-task-list-item {
    padding-left: 0px;
}

.md-task-list-item > input {
    position: absolute;
    top: 0px;
    left: 0px;
    margin-left: -1.2em;
    margin-top: calc(1em - 10px);
    border: none;
}

.math {
    font-size: 1rem;
}


.footnote-line a:not(.reversefootnote) {
    color: inherit;
}

.reversefootnote {
    font-family: ui-monospace, sans-serif;
}

.md-attr {
    display: none;
}

.md-fn-count::after {
    content: ".";
}

code, pre, samp, tt {
    font-family: var(--monospace);
}

kbd {
    margin: 0px 0.1em;
    padding: 0.1em 0.6em;
    font-size: 0.8em;
    color: rgb(36, 39, 41);
    background: rgb(255, 255, 255);
    border: 1px solid rgb(173, 179, 185);
    border-radius: 3px;
    box-shadow: rgba(12, 13, 14, 0.2) 0px 1px 0px, rgb(255, 255, 255) 0px 0px 0px 2px inset;
    white-space: nowrap;
    vertical-align: middle;
}

.md-comment {
    color: rgb(162, 127, 3);
    opacity: 0.6;
    font-family: var(--monospace);
}

code {
    text-align: left;
    vertical-align: initial;
}

a.md-print-anchor {
    white-space: pre !important;
    border-width: initial !important;
    border-style: none !important;
    border-color: initial !important;
    display: inline-block !important;
    position: absolute !important;
    width: 1px !important;
    right: 0px !important;
    outline: 0px !important;
    background: 0px 0px !important;
    text-decoration: initial !important;
    text-shadow: initial !important;
}

.md-diagram-panel > svg {
    max-width: 100%;
}

[lang="flow"] svg, [lang="mermaid"] svg {
    max-width: 100%;
    height: auto;
}

[lang="mermaid"] .node text {
    font-size: 1rem;
}

table tr th {
    border-bottom: 0px;
}

video {
    max-width: 100%;
    display: block;
    margin: 0px auto;
}

iframe {
    max-width: 100%;
    width: 100%;
    border: none;
}

.highlight td, .highlight tr {
    border: 0px;
}

mark {
    background: rgb(255, 255, 0);
    color: rgb(0, 0, 0);
}

.md-html-inline .md-plain, .md-html-inline strong, mark .md-inline-math, mark strong {
    color: inherit;
}

.md-expand mark .md-meta {
    opacity: 0.3 !important;
}

mark .md-meta {
    color: rgb(0, 0, 0);
}

.md-diagram-panel .messageText {
    stroke: none !important;
}

.md-diagram-panel .start-state {
    fill: var(--node-fill);
}

.md-diagram-panel .edgeLabel rect {
    opacity: 1 !important;
}

.md-fences.md-fences-math {
    font-size: 1em;
}

.md-fences-advanced:not(.md-focus) {
    padding: 0px;
    white-space: nowrap;
    border: 0px;
}

.md-fences-advanced:not(.md-focus) {
    background: inherit;
}

.outline-content li, .outline-content ul {
    margin-left: 0px;
    margin-right: 0px;
    padding-left: 0px;
    padding-right: 0px;
    list-style: none;
    overflow-wrap: anywhere;
}

.outline-content ul {
    margin-top: 0px;
    margin-bottom: 0px;
}

.outline-content strong {
    font-weight: 400;
}

.outline-expander {
    width: 1rem;
    height: 1.42857rem;
    position: relative;
    display: table-cell;
    vertical-align: middle;
    cursor: pointer;
    padding-left: 4px;
}

.outline-expander::before {
    content: "";
    position: relative;
    font-family: Ionicons;
    display: inline-block;
    font-size: 8px;
    vertical-align: middle;
}

.outline-item {
    padding-top: 3px;
    padding-bottom: 3px;
    cursor: pointer;
}

.outline-expander:hover::before {
    content: "";
}

.outline-h1 > .outline-item {
    padding-left: 0px;
}

.outline-h2 > .outline-item {
    padding-left: 1em;
}

.outline-h3 > .outline-item {
    padding-left: 2em;
}

.outline-h4 > .outline-item {
    padding-left: 3em;
}

.outline-h5 > .outline-item {
    padding-left: 4em;
}

.outline-h6 > .outline-item {
    padding-left: 5em;
}

.outline-label {
    cursor: pointer;
    display: table-cell;
    vertical-align: middle;
    text-decoration: none;
    color: inherit;
}

.outline-label:hover {
    text-decoration: underline;
}

.outline-item:hover {
    border-color: rgb(245, 245, 245);
    background-color: var(--item-hover-bg-color);
}

.outline-item:hover {
    margin-left: -28px;
    margin-right: -28px;
    border-left: 28px solid transparent;
    border-right: 28px solid transparent;
}

.outline-item-single .outline-expander::before, .outline-item-single .outline-expander:hover::before {
    display: none;
}

.outline-item-open > .outline-item > .outline-expander::before {
    content: "";
}

.outline-children {
    display: none;
}

.info-panel-tab-wrapper {
    display: none;
}

.outline-item-open > .outline-children {
    display: block;
}

.md-inline-math-container mjx-container {
    zoom: 0.95;
}

mjx-container {
    break-inside: avoid;
}

.md-alert.md-alert-note {
    border-left-color: rgb(9, 105, 218);
}

.md-alert.md-alert-important {
    border-left-color: rgb(130, 80, 223);
}

.md-alert.md-alert-warning {
    border-left-color: rgb(154, 103, 0);
}

.md-alert.md-alert-tip {
    border-left-color: rgb(31, 136, 61);
}

.md-alert.md-alert-caution {
    border-left-color: rgb(207, 34, 46);
}

.md-alert {
    padding: 0px 1em;
    margin-bottom: 16px;
    color: inherit;
    border-left: 0.25em solid rgb(0, 0, 0);
}

.md-alert-text-note {
    color: rgb(9, 105, 218);
}

.md-alert-text-important {
    color: rgb(130, 80, 223);
}

.md-alert-text-warning {
    color: rgb(154, 103, 0);
}

.md-alert-text-tip {
    color: rgb(31, 136, 61);
}

.md-alert-text-caution {
    color: rgb(207, 34, 46);
}

.md-alert-text {
    font-size: 0.9rem;
    font-weight: 700;
}

.md-alert-text svg {
    fill: currentcolor;
    position: relative;
    top: 0.125em;
    margin-right: 1ch;
    overflow: visible;
}

.md-alert-text-container::after {
    content: attr(data-text);
    text-transform: capitalize;
    pointer-events: none;
    margin-right: 1ch;
}


/*:root {*/
/*    --side-bar-bg-color: #fff;*/
/*    --control-text-color: #777;*/
/*    --font-sans-serif: 'Ubuntu', 'Source Sans Pro', sans-serif !important;*/
/*    --font-monospace: 'Fira Code', 'Roboto Mono', monospace !important;*/
/*}*/

/*html {*/
/*    font-size: 16px;*/
/*}*/


#write p {
    line-height: 1.6rem;
    word-spacing: .05rem;
}

#write ol li {
    padding-left: 0.5rem;
}

#write > ul:first-child,
#write > ol:first-child {
    margin-top: 30px;
}

body > *:first-child {
    margin-top: 0 !important;
}

body > *:last-child {
    margin-bottom: 0 !important;
}

.typora-content a {
    color: #42b983;
    font-weight: 600;
    padding: 0 2px;
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    margin-top: 1rem;
    margin-bottom: 1rem;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}

h1:hover a.anchor,
h2:hover a.anchor,
h3:hover a.anchor,
h4:hover a.anchor,
h5:hover a.anchor,
h6:hover a.anchor {
    text-decoration: none;
}

h2 a,
h3 a {
    color: #34495e;
}

h1 {
    padding-bottom: .4rem;
    font-size: 2.2rem;
    line-height: 1.3;
}

h2 {
    font-size: 1.75rem;
    line-height: 1.225;
    /*margin: 35px 0 15px;*/
    padding-bottom: 0.5em;
    border-bottom: 1px solid #ddd;
}

h3 {
    font-size: 1.4rem;
    line-height: 1.43;
    margin: 20px 0 7px;
}

h4 {
    font-size: 1.2rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 1rem;
    color: #777;
}

/*p,*/
/*blockquote,*/
/*ul,*/
/*ol,*/
/*dl,*/
/*table {*/
/*    margin: 0.8em 0;*/
/*}*/

li > ol,
li > ul {
    margin: 0 0;
}

hr {
    height: 2px;
    padding: 0;
    margin: 16px 0;
    background-color: #e7e7e7;
    border: 0 none;
    overflow: hidden;
    box-sizing: content-box;
}

li p.first {
    display: inline-block;
}

ul,
ol {
    padding-left: 30px;
}

ul:first-child,
ol:first-child {
    margin-top: 0;
}

ul:last-child,
ol:last-child {
    margin-bottom: 0;
}

blockquote {
    border-left: 4px solid #42b983;
    padding: 10px 15px;
    color: #777;
    background-color: rgba(66, 185, 131, .1);
}

#write strong {
    padding: 0 1px;
}

#write em {
    padding: 0 5px 0 2px;
}

#write table thead th {
    background-color: #f2f2f2;
}

#write .CodeMirror-gutters {
    border-right: none;
}

#write .md-fences {
    border: 1px solid #F4F4F4;
    -webkit-font-smoothing: initial;
    margin: 0.8rem 0 !important;
    padding: 0.3rem 0 !important;
    line-height: 1.43rem;
    background-color: #F8F8F8 !important;
    border-radius: 2px;
    font-family: var(--font-monospace);
    font-size: 0.85rem;
    word-wrap: normal;
}


#write code, tt {
    padding: 2px 4px;
    border-radius: 2px;
    font-family: var(--font-monospace);
    font-size: 0.92rem;
    color: #e96900;
    background-color: #f8f8f8;
}

tt {
    margin: 0 2px;
}

#write .md-footnote {
    background-color: #f8f8f8;
    color: #e96900;
}

/* heighlight. */
#write mark {
    background-color: #EBFFEB;
    border-radius: 2px;
    padding: 2px 4px;
    margin: 0 2px;
    color: #222;
    font-weight: 500;
}

#write del {
    padding: 1px 2px;
}

.cm-s-inner .cm-link,
.cm-s-inner.cm-link {
    color: #22a2c9;
}

.cm-s-inner .cm-string {
    color: #22a2c9;
}

.md-task-list-item > input {
    margin-left: -1.3em;
}

.md-fences {
    background-color: #f8f8f8;
}

.md-diagram-panel {
    position: static !important;
}

#write pre.md-meta-block {
    padding: 1rem;
    font-size: 85%;
    line-height: 1.45;
    background-color: #f7f7f7;
    border: 0;
    border-radius: 3px;
    color: #777777;
    margin-top: 0 !important;
}

.mathjax-block > .code-tooltip {
    bottom: .375rem;
}

#write > h3.md-focus:before {
    left: -1.5625rem;
    top: .375rem;
}

#write > h4.md-focus:before {
    left: -1.5625rem;
    top: .285714286rem;
}

#write > h5.md-focus:before {
    left: -1.5625rem;
    top: .285714286rem;
}

#write > h6.md-focus:before {
    left: -1.5625rem;
    top: .285714286rem;
}

.sidebar-tabs {
    border-bottom: none;
}


/** focus mode */

.on-focus-mode blockquote {
    border-left-color: rgba(85, 85, 85, 0.12);
}

/*header,*/
/*.context-menu,*/
/*.megamenu-content,*/
/*footer {*/
/*    font-family: var(--font-sans-serif);*/
/*}*/

.file-node-content:hover .file-node-icon,
.file-node-content:hover .file-node-open-state {
    visibility: visible;
}

.typora-content {

}

/*****************************/

header a {
    color: inherit; /* 继承父元素的文字颜色 */
    text-decoration: none; /* 去掉下划线 */
}


.wenzhang .header {
    display: flex;
    justify-content: space-between;
    font-size: 1.1em;
    font-weight: bold;
}

.wenzhang .header-list {
    display: flex;
    flex-wrap: wrap; /* 允许子元素换行 */
}

.wenzhang .header-list .section {
    display: flex;
    flex: 0 0 25%; /* 每个元素占父容器的25%，即一行4个 */
    box-sizing: border-box; /* 包括padding和border在内计算宽度 */
    padding: 5px; /* 可根据需要调整间距 */
    justify-content: flex-start;
    flex-direction: column;
}

/*.wenzhang .header {*/
/*    border: none;*/
/*    !*height: 1px;*!*/
/*    background-color: #dddddd; !* 白色横线，在深色背景上可见 *!*/
/*    flex: 1; !* 使横线填充剩余空间 *!*/
/*}*/

.wenzhang a {
    color: inherit; /* 继承父元素的文字颜色 */
    text-decoration: none; /* 去掉下划线 */
}


.categoryinfo {
    color: inherit;
    text-decoration: none;
}

a.categoryinfo:hover {
    color: #4d7fd0; /* 鼠标悬停时链接文字变为红色 */
    /*background-color: yellow; !* 鼠标悬停时背景变为黄色 *!*/
    font-size: 1.1em;
    text-decoration: underline; /* 鼠标悬停时添加下划线 */
}

.wenzhang .header-list .section img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

/* ===== 平板端适配 ===== */
@media (max-width: 768px) {
    #write {
        margin: 0 10px;
    }

    h1 {
        font-size: 1.6rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    h4 {
        font-size: 1.1rem !important;
    }

    .typora-content img {
        max-width: 100%;
        height: auto;
    }

    .wenzhang .header-list .section {
        flex: 0 0 50% !important;
    }
}

/* ===== 手机端适配 ===== */
@media (max-width: 480px) {
    h1 {
        font-size: 1.4rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1.1rem !important;
    }

    h4 {
        font-size: 1rem !important;
    }

    #write {
        margin: 0 5px;
    }

    .wenzhang .header-list .section {
        flex: 0 0 100% !important;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    iframe {
        width: 100%;
        height: auto;
    }
}
