@import url(./snippet/mermaid.css);
@import url(./FONT/stylesheet.css);

:root {
  --theme-color-weak: var(--link-color);
  --font-mono: var(--monospace);
  --bg-color: hsl(0, 0%, 100%);
  --write-bg: #fafafa;
  --link-bg: transparent;
  --mark-bg: hsl(0, 100%, 85%);
  --code-bg: hsl(0, 100%, 85%);
  --codeb-bg: hsl(0, 0%, 96%);
  --quota-bg: hsl(0, 0%, 95%);
  --thead-bg: hsl(0, 0%, 90%);
  --tbody-bg: hsl(0, 0%, 96%);
  --title-color: hsl(0, 0%, 5%);
  --text-color: hsl(0, 0%, 20%);
  --link-color: hsl(0, 100%, 75%);
  --mark-color: var(--text-color);
  --code-color: var(--text-color);
  --codeb-color: hsl(0, 0%, 50%);
  --quota-color: hsl(0, 0%, 35%);
  --footer-color: hsl(0, 0%, 50%);
  --md-char-color: hsl(0, 100%, 75%);
  --meta-content-color: hsl(0, 0%, 50%);
  --link-hover: hsl(0, 100%, 65%);
  --thead-hover: hsl(0, 0%, 99%);
  --tbody-hover: hsl(0, 0%, 99%);
  --window-border: 1px solid hsl(0, 0%, 95%);
  --base-border: 1px solid hsl(0, 100%, 80%);
  --base-borderl: 4px solid hsl(0, 100%, 80%);
  --base-borderb: 1px dashed hsl(0, 100%, 80%);
  --opt-borderb: 1px dashed hsl(215, 100%, 65%);
  --mermaid-arrow-color:var(--theme-color-weak);
  --base-font: "Poppins", -apple-system, "Noto Sans", "Helvetica Neue", Helvetica, "Nimbus Sans L", Arial, "Liberation Sans", "Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp", sans-serif;
  --title-font: "EB Garamond", Georgia, "Nimbus Roman No9 L", "Noto Serif CJK SC", "Songti SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;
  --em-font: "EB Garamond", Georgia, "Nimbus Roman No9 L", "Noto Serif CJK SC"， "Songti SC", "Source Han Serif SC", "Source Han Serif CN", STSong, "AR PL New Sung", "AR PL SungtiL GB", NSimSun, SimSun, "TW\-Sung", "WenQuanYi Bitmap Song", "AR PL UMing CN", "AR PL UMing HK", "AR PL UMing TW", "AR PL UMing TW MBE", PMingLiU, MingLiU, serif;
  --quota-font: "EB Garamond", Baskerville, Georgia, "Liberation Serif", "Kaiti SC", STKaiti, "AR PL UKai CN", "AR PL UKai HK", "AR PL UKai TW", "AR PL UKai TW MBE", "AR PL KaitiM GB", KaiTi, KaiTi_GB2312, DFKai-SB, "TW\-Kai", serif;
  --monospace: "Cascadia code", "Sarasa Term SC", Monaco, "Deja Vu Sans Mono", Consolas, "Lucida Console", "Andale Mono", Courier,"Noto Sans CJK SC", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Source Han Sans CN", "Microsoft YaHei", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, "WenQuanYi Zen Hei Sharp",serif;
}

/* 内外边距通常让各个浏览器样式的表现位置不同 */
body,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
  margin: 0;
  padding: 0;
}

/* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
article,
aside,
details,
figcaption,
figure,
footer,
header,
menu,
nav,
section {
  display: block;
}

/* HTML5 媒体文件跟 img 保持一致 */
audio,
canvas,
video {
  display: inline-block;
}

/* 要注意表单元素并不继承父级 font 的问题 */
body,
button,
input,
select,
textarea {
  font: 400 1em/1.75 var(--base-font);
}

button::-moz-focus-inner,
input::-moz-focus-inner {
  padding: 0;
  border: 0;
}

/* 去掉各Table cell 的边距并让其边重合 */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* 去除默认边框 */
fieldset,
img {
  border: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body,
#write {
  font-family: var(--base-font);
  font-weight: 400;
  font-size: 16px;
  font-size: 1rem;
  line-height: 2rem;
  background: var(--write-bg);
  color: var(--text-color);
}

content {
  background-color: var(--write-bg);
  min-width: 400px;
}

.typora-node #write {
  min-height: calc(100vh - 8em);
}

#write {
  max-width: 914px;
  min-width: calc(100vw - 45rem);
  padding: 3rem 4rem;
  text-align: justify;
}

#write * {
  -webkit-text-stroke: 0.25px;
}

/* 目录自动编号 */
.md-toc {
  font-size: 1rem;
  line-height: 1.5rem;
  display: table;
  margin: auto;
}

.md-toc::before {
  content: "Contents";
  font-size: 2rem;
  text-align: center;
  display: block;
  margin: 2rem auto;
  font-family: var(--title-font);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 5px;
}

.md-toc .md-toc-item {
  display: flex;
  display: table-row;
  font-family: var(--title-font);
  width: 100%;
  height: 2.5rem;
}

.md-toc .md-toc-item .md-toc-inner {
  text-decoration: none;
  color: var(--text-color);
  border-bottom: none !important;
  display: table-cell;
  padding-left: 3rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.md-toc .md-toc-h1,
.md-toc .md-toc-h2,
.md-toc .md-toc-h3,
.md-toc .md-toc-h4 {
  margin: 0.75rem;
  text-align-last: right;
}

.md-toc .md-toc-h1::before,
.md-toc .md-toc-h2::before,
.md-toc .md-toc-h3::before,
.md-toc .md-toc-h4::before {
  color: initial;
  display: table-cell;
  vertical-align: baseline;
  color: var(--text-color);
}

.md-toc .md-toc-h1 .md-toc-inner,
.md-toc .md-toc-h2 .md-toc-inner,
.md-toc .md-toc-h3 .md-toc-inner,
.md-toc .md-toc-h4 .md-toc-inner {
  margin-left: 1rem !important;
  word-wrap: normal;
  word-break: break-all;
}

.md-toc .md-toc-h5,
.md-toc .md-toc-h6 {
  display: none;
}

.md-toc .md-toc-h2 {
  margin-left: 1rem;
}

.md-toc .md-toc-h3,
.md-toc .md-toc-h4 {
  margin-left: 4rem;
}

.md-toc .md-toc-h1 {
  font: 600 1.25em var(--title-font);
  counter-increment: counter_md-toc-h1;
  counter-reset: counter_md-toc-h2;
}

.md-toc .md-toc-h1:before {
  content: "第"counter(counter_md-toc-h1, cjk-ideographic) "章";
}

.md-toc .md-toc-h2 {
  counter-increment: counter_md-toc-h2;
  counter-reset: counter_md-toc-h3;
}

.md-toc .md-toc-h2::before {
  content: "第"counter(counter_md-toc-h2, cjk-ideographic) "节";
}

.md-toc .md-toc-h3 {
  counter-increment: counter_md-toc-h3;
  counter-reset: counter_md-toc-h4;
}

.md-toc .md-toc-h3::before {
  content: counter(counter_md-toc-h3);
}

.md-toc .md-toc-h4 {
  counter-increment: counter_md-toc-h4;
  counter-reset: counter_md-toc-h5;
}

.md-toc .md-toc-h4:before {
  content: counter(counter_md-toc-h3) "."counter(counter_md-toc-h4);
}

.md-toc .md-toc-h5 {
  counter-increment: counter_md-toc-h5;
  counter-reset: counter_md-toc-h6;
}

.md-toc .md-toc-h5::before {
  content: counter(counter_md-toc-h3) "."counter(counter_md-toc-h4) "."counter(counter_md-toc-h5);
}

.md-toc .md-toc-h6 {
  counter-increment: counter_md-toc-h6;
  counter-reset: counter_md-toc-h7;
}

.md-toc .md-toc-h6::before {
  content: counter(counter_md-toc-h3) "."counter(counter_md-toc-h4) "."counter(counter_md-toc-h5) "."counter(counter_md-toc-h6);
}

/* 标题样式 */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--title-color);
}

h1,
h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 3rem;
  text-transform: uppercase;
}

#write h1 {
  margin-top: 6rem;
  margin-bottom: 3rem;
  text-align: center;
  font-family: var(--title-font);
}

#write h1::before,
#write h1::after {
  content: "";
  display: block;
  position: relative;
  margin: 1rem auto;
  padding: 1px;
}

#write h1::before {
  border-top: 4px solid var(--title-color);
  border-bottom: 1px solid var(--title-color);
}

#write h1::after {
  border-bottom: 4px solid var(--title-color);
  border-top: 1px solid var(--title-color);
}

#write h2 {
  font-family: var(--title-font);
  margin: 4rem auto 2rem;
  padding-left: 1rem;
  border-left: 4px solid var(--title-color);
}

#write h3 {
  font-size: 1.75rem;
}

#write h3::before {
  content: "H3";
}

#write h4 {
  font-size: 1.5rem;
}

#write h4::before {
  content: "H4";
}

#write h5,
#write h6 {
  font-size: 1.25rem;
}

#write h5::before {
  content: "H5";
}

#write h6::before {
  content: "H6";
}

h3,
h4,
h5,
h6 {
  font-family: var(--base-font);
  font-weight: 600;
  margin: 2rem 0;
  margin-bottom: 1rem;
}

h3::before,
h4::before,
h5::before,
h6::before {
  font-size: 0.9rem !important;
  vertical-align: bottom;
  margin-right: 0.5rem;
  padding: 2px;
  border-radius: 3px;
  background: var(--text-color);
  color: var(--write-bg);
}

p {
  margin-bottom: 1rem;
}

/* 超链接样式 */
a,
ins {
  color: var(--link-color);
}

#write a,
#write ins {
  text-decoration: none;
  border-bottom: var(--base-borderb);
}

#write a:hover,
#write ins:hover {
  border-bottom-color: var(--link-color);
  color: var(--link-hover);
  text-decoration: none;
}

/* em & strong style */
strong,
em {
  font-family: var(--em-font);
  font-weight: 800 !important;
  color: var(--title-color);
}

em {
  text-decoration: underline dotted;
}

/* mark style */
mark {
  color: var(--mark-color);
  background-color: var(--mark-bg);
}

/* code style */
/* yaml style */
pre.md-meta-block {
  min-height: 30px;
  background: var(--codeb-bg);
  color: var(--codeb-color);
  font-weight: 300;
  position: sticky;
  padding: 1.5rem;
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  border-radius: 5px;
  line-height: 1.5rem;
}

/* code & codeblock style */
/* codeblock */
pre.md-fences {
  border: 1px solid var(--codeb-bg);
  margin: 2rem auto;
  padding: 1rem 0.5rem;
  display: block;
  -webkit-overflow-scrolling: touch;
}

pre,
code,
pre tt,
.md-fences,
.CodeMirror pre {
  font-family: var(--code-font);
  font-size: 0.9rem;
  line-height: 1.5rem;
  padding: 2px 4px;
  border-radius: 5px;
  background-color: var(--codeb-bg);
}

/* code style */
code {
  background-color: var(--code-bg);
  color: var(--code-color);
}

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

/* 代码块下的标题颜色过深。修改为浅蓝 */
.cm-s-inner .cm-header,
.cm-s-inner.cm-header {
  color: hsl(215, 100%, 75%);
}

.cm-s-inner .CodeMirror-cursor {
  border-left: solid var(--link-color) !important;
}

/* 列表样式 */
ul,
ol {
  margin: 1.5rem auto;
}

ul {
  margin-left: 1.5rem;
  list-style: disc;
}

ul ul {
  list-style-type: circle;
}

ol {
  list-style: decimal-leading-zero;
  margin-left: 1.5rem;
}

ol ol {
  list-style-type: lower-roman;
}

ol ol,
ul ul,
ul ol,
ol ul {
  margin-top: 0.5rem;
  margin-left: 1rem;
}

/* todo list */
.task-list {
  list-style: none !important;
  padding-left: 0;
}

.task-list-item input {
  top: 3px;
}

.task-list-done {
  text-decoration: line-through;
  color: var(--footer-color);
}

.task-list-not-done {
  color: var(--text-color);
}

/* 块/段落引用 */
blockquote {
  background: var(--quota-bg);
  margin: 2rem -3.8rem;
  padding: 2rem 4rem;
  font-size: 1.2rem;
}

blockquote p {
  color: var(--quota-color);
  line-height: 1.75rem;
  font-family: var(--quota-font);
}

blockquote blockquote {
  padding: 0;
  margin: 0;
  padding-left: 2rem;
  border-left: var(--base-borderl);
}

/* 一致化 horizontal rule */
hr {
  border: none;
  border-bottom: 2px solid hsl(0, 100%, 75%);
  margin: 3rem auto;
  height: 15px;
}

/* img */
#write img {
  margin: 4rem auto;
  box-shadow: 5px 20px 40px 1px hsla(0, 0%, 0%, 0.3);
  border-radius: 5px;
}

/* 使图片去掉阴影 */
img[alt|="no-shadow"] {
  box-shadow: none !important;
}

/* 使图片去掉所有效果 */
img[alt|="normal"] {
  margin: 0 !important;
  box-shadow: none !important;
}

/* 脚注样式 脚注内的文字颜色应当较原字稍淡 */
sup.md-footnote {
  padding: 1px !important;
  background-color: hsl(0, 100%, 75%);
  color: hsl(0, 0%, 50%);
  cursor: pointer;
  font-size: 0.75rem;
}

.footnotes,
.footnotes em,
.footnotes strong {
  color: hsl(0, 0%, 50%);
}

.footnotes a {
  color: hsl(215, 100%, 75%);
}

/* 表格样式 */
figure>table {
  margin: 1.5rem auto;
  width: 98%;
}

/*表格顶行*/
#write table th,
#write table td {
  padding: 0.5rem 1rem;
}

#write table thead tr th {
  background: var(--thead-bg);
  border: 1px solid var(--thead-bg);
}

#write table thead tr th:hover {
  background: var(--thead-hover);
  color: var(--link-hover);
}

#write table caption {
  border-bottom: none;
}

#write table td {
  background-color: var(--tbody-bg);
  border: 1px solid var(--thead-bg);
  padding: 0.5rem 1rem;
  color: var(--text-color);
}

#write table td:hover {
  background-color: var(--tbody-hover);
  color: var(--link-hover);
}

.ty-table-edit {
  margin-top: -10px !important;
}

/*表格大小设置输入框(数字居中)*/
.md-table-resize-popover .md-grid-board-wrap input {
  text-align: center !important;
}

.md-table-resize-popover .md-grid-board-wrap .md-grid-board.md-reset>tbody>tr>td>a {
  border-bottom: 1px solid var(--table-border-color) !important;
}

table.md-grid-board td {
  padding: 0px !important;
}

@media screen and (max-width: 600px) {
  content {
    padding: 2rem;
  }

  #write {
    padding: 2rem 1rem;
  }

  #write figure {
    position: relative;
    left: -2rem;
    min-width: calc(100% + 4rem);
  }

  #write table {
    width: 100%;
  }

  #write h3::before,
  #write h4::before,
  #write h5::before,
  #write h6::before {
    color: var(--bg-color);
  }

  .md-toc {
    padding: 0;
    margin: auto;
  }

  blockquote {
    background: var(--quota-bg);
    margin: 2rem -4rem;
    padding: 2rem 4rem;
  }

  blockquote blockquote {
    padding-left: 1rem;
  }

  .megamenu-menu {
    box-shadow: none !important;
  }
}

@media screen and (max-width: 800px) {
  .typora-node #write {
    min-height: calc(100% - 6rem);
  }

  .md-toc-inner {
    max-width: 20rem;
  }
}

@media screen and (min-width: 1100px) {
  #write {
    background: var(--write-bg);
    margin: 3rem auto 3rem;
    border-width: 0 1px;
    padding: 40px 60px;
  }

  .pin-outline #write {
    border: 0;
    margin: 3rem auto 3rem;
  }

  footer {
    background-color: transparent;
  }
}

@media screen and (min-width: 1300px) {
  #write {
    box-shadow: 0px 2px 2px 2px hsla(0, 0%, 95%, 0.1), 1px 3px 5px 2px hsla(0, 0%, 85%, 0.2), 2px 4px 5px 2px hsla(0, 0%, 75%, 0.3), 3px 5px 10px 2px hsla(0, 0%, 65%, 0.4);
    border-radius: 5px;
    border: 1px solid var(--write-bg);
  }
}

@media print {

  html,
  body {
    border: 1px solid transparent;
    height: 99%;
    page-break-after: avoid;
    page-break-before: avoid;
  }

  .md-toc {
    page-break-after: always;
    padding: 1rem 2rem;
  }

  .md-toc:before {
    margin-bottom: 4rem;
  }

  #write {
    box-shadow: 0px 0px 0px 0px transparent;
    border-radius: 0px;
  }

  #write h1 {
    margin: 3rem auto;
    page-break-before: always;
  }

  #write h1:first-of-type {
    page-break-before: avoid;
  }

  #write h1:before,
  #write h1:after {
    display: none;
  }

  #write h2 {
    border-left: none;
  }

  code,
  mark {
    padding: 2px;
  }

  mark {
    color: var(--text-color);
    background: hsl(60, 100%, 50%);
  }

  blockquote {
    position: relative;
    margin: 2rem 1rem;
    padding: 1.5rem;
    background: var(--quota-bg);
    border: 0px solid transparent;
    border: 2px dotted hsl(0, 100%, 65%);
    border-radius: 5px;
  }

  blockquote blockquote {
    border-radius: 0px;
    border: 0px solid transparent;
    border-left: 4px solid hsl(0, 100%, 65%);
  }

  .typora-export * {
    -webkit-print-color-adjust: exact;
  }
}

.MathJax_Display {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

p.mathjax-block,
.mathjax-block {
  padding-bottom: 0;
}

.mathjax-block>.code-tooltip {
  bottom: 5px;
  box-shadow: none;
}

.md-image>.md-meta {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.md-image>img {
  margin-top: 2px;
}

.md-image>.md-meta:first-of-type:before {
  padding-left: 4px;
}

/** ui for windows **/
::-webkit-scrollbar-corner {
  display: none;
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.05);
  background-clip: padding-box;
}

:root {
  --blur-text-color: hsl(0, 0%, 75%);
  --active-file-bg-color: hsl(0, 0%, 99%);
  /* 文件列表 当前文件激活 背景色*/
  --active-file-text-color: hsl(0, 100%, 75%);
  --active-file-border-color: hsl(0, 100%, 75%);
  /* 树形结构下文件激活边框色 */
  --side-bar-bg-color: hsl(0, 0%, 95%);
  /*文件 大纲 侧边栏 背景色*/
  --item-hover-bg-color: hsl(0, 0%, 90%);
  /* 打开文文件夹、正文菜单、最近使用 hover 效果 */
  --item-hover-text-color: inherit;
  --primary-color: hsl(0, 100%, 75%);
  /* color of primary buttons */
  --primary-btn-border-color: hsl(0, 100%, 75%);
  --primary-btn-text-color: hsl(0, 0%, 100%);
  --select-text-bg-color: hsla(0, 100%, 75%, 0.8);
  --select-text-font-color: hsl(0, 0%, 100%);
  --active-bg: hsl(0, 0%, 95%);
}

/* 语法标记样式 */
.md-meta.md-before,
.md-meta.md-after {
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}

/* 源代码模式 */
#typora-source {
  background: var(--bg-color);
  color: var(--code-color);
  font-family: var(--code-font);
  line-height: 1.5rem;
}

#typora-source pre {
  line-height: 1.5rem;
  border-radius: 0px !important;
}

/* 通知样式 */
#md-notification {
  border-radius: 5px;
  background: transparent !important;
}

#md-notification::before {
  top: 14px;
}

#md-notification::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  z-index: -111;
  backdrop-filter: blur(15px);
  top: 0;
  width: 100%;
  min-height: 5rem;
  -webkit-font-smoothing: antialiased;
  transition: opacity 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

/* 聚焦模式 */
.on-focus-mode .md-focus {
  padding: 1rem;
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
  background: antiquewhite var(--bg-img);
  background-blend-mode: overlay;
  border-radius: 5px;
}

/* 侧边栏文档大纲tab标签 激活 */
.info-panel-tab:hover {
  color: var(--primary-color);
}

/* 侧边栏文档大纲tab标签 激活 */
.active-tab-outline,
.active-tab-files {
  color: var(--primary-color);
}

/* bugfix */
#outline-content,
#file-library {
  color: var(--text-color);
}

#file-library-search-input {
  padding-left: 0.4em;
}

#file-library-search-input .searchpanel-search-option-btn {
  margin-top: 5px;
}

input[type=search],
.form-control:focus {
  border-radius: 5px;
  box-shadow: 0 2px 4px -0.75px hsl(0, 100%, 85%);
}

input[type=search],
#close-outline-filter-btn {
  margin-top: 5px;
}

#md-searchpanel {
  border-bottom: var(--base-borderb);
}

#md-searchpanel #write .btn {
  border: var(--base-border);
}

#md-searchpanel input {
  border-radius: 5px;
}

/* 文件 大纲 激活 */
.file-list-item:hover,
.file-node-content:hover,
.file-tree-node.active>.file-node-background,
.outline-item:hover {
  background-color: var(--bg-color);
  color: var(--primary-color);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
}

/* 大纲目录自动编号 */
.sidebar-content {
  counter-reset: h1;
}

.outline-h1 {
  counter-increment: h1;
  counter-reset: h2;
}

.outline-h2 {
  counter-increment: h2;
  counter-reset: h3;
}

.outline-h3 {
  counter-increment: h3;
  counter-reset: h4;
}

.outline-h4 {
  counter-increment: h4;
  counter-reset: h5;
}

.outline-h5 {
  counter-increment: h5;
  counter-reset: h6;
}

.outline-h1>.outline-item>.outline-label:before {
  content: "章"counter(h1) " ";
}

.outline-h2>.outline-item>.outline-label:before {
  content: "节"counter(h2) " ";
}

.outline-h3>.outline-item>.outline-label:before {
  content: counter(h3) " ";
}

.outline-h4>.outline-item>.outline-label:before {
  content: counter(h3) "."counter(h4) " ";
}

.outline-h5>.outline-item>.outline-label:before {
  content: counter(h3) "."counter(h4) "."counter(h5) " ";
}

.outline-h6>.outline-item>.outline-label:before {
  counter-increment: h6;
  content: counter(h3) "."counter(h4) "."counter(h5) "."counter(h6) " ";
}

/* 书写区右键菜单 */
/* control-menu */
.context-menu.dropdown-menu>li>a:focus {
  background-color: var(--active-bg);
}

.context-menu.dropdown-menu>.active>a,
.context-menu.dropdown-menu>li>a:hover,
.menu-style-btn.active {
  color: var(--primary-color);
}

/* 一体化模式下菜单页 */
/* 菜单侧标栏 */
.megamenu-menu {
  background: var(--write-bg);
  color: var(--text-color);
  box-shadow: rgba(0, 0, 0, 0.22) 0px 25px 50px 0px, rgba(0, 0, 0, 0.18) 0px 5px 15px 0px;
}

.megamenu-menu .megamenu-menu-header {
  background-color: var(--text-color);
}

.megamenu-menu .megamenu-menu-header #megamenu-menu-header-title {
  color: var(--bg-color);
}

.megamenu-menu .megamenu-menu-header #megamenu-back-btn {
  color: hsl(0, 100%, 75%);
  border-color: hsl(0, 100%, 75%);
}

.megamenu-menu #megamenu-menu-list li {
  line-height: 48px;
}

.megamenu-menu #megamenu-menu-list li a {
  color: var(--text-color);
  line-height: 40px;
  height: 40px;
  margin: 10px auto;
}

/* bugfix */
.megamenu-opened .megamenu-menu {
  left: -1px !important;
}

/* 侧边栏item激活 */
.megamenu-menu-list:not(.saved) li a:hover,
.megamenu-menu-list li a.active {
  background-color: var(--bg-color);
  color: var(--primary-color) !important;
  display: block !important;
  width: 85%;
  text-align: center;
  margin-left: 1rem;
  padding-left: 0px;
  border-radius: 5px;
  box-shadow: 0 0px 16px 0 rgba(0, 0, 0, 0.1);
  transition: border-color 0.167s linear, box-shadow 0.167s linear;
}

/* bugfix */
a.menu-style-btn:hover {
  background: var(--active-bg);
}

#megamenu-content {
  background: var(--write-bg);
}

#megamenu-content .megamenu-menu-panel h1,
#megamenu-content .megamenu-menu-panel h2 {
  margin: 2rem auto 3rem;
  text-align: center;
}

#megamenu-content .megamenu-menu-panel .btn {
  border: var(--base-border);
}

#megamenu-content .megamenu-menu-panel .btn:hover {
  border-color: hsl(0, 100%, 75%);
}

#megamenu-content .megamenu-menu-panel .long-btn {
  margin: 2rem;
}

#megamenu-content .megamenu-menu-panel .long-btn:hover {
  background-color: var(--bg-color);
  color: var(--primary-color) !important;
  border-color: var(--primary-btn-border-color);
  box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.1);
}

#megamenu-content .megamenu-menu-panel table tr {
  background: var(--write-bg);
}

#megamenu-content .megamenu-menu-panel table tr:hover {
  background-color: var(--thead-hover) !important;
  color: var(--primary-color) !important;
}

/* 最近文档 */
#recent-file-panel tbody tr:nth-child(2n-1) {
  background-color: var(--tbody-bg);
}

/* 主题页 */
/* 样式预览 */
#megamenu-section-theme #theme-preview-grid {
  max-width: 90%;
}

#megamenu-section-theme #theme-preview-grid .theme-preview-div {
  width: 10rem;
  border: 4px solid #99999950;
}

#megamenu-section-theme #theme-preview-grid .theme-preview-div:hover {
  border-color: #80aaff80;
}

#megamenu-section-theme #theme-preview-grid .theme-preview-div .theme-preview-content {
  width: auto;
}

#megamenu-section-theme #theme-preview-grid .theme-preview-div.active,
#megamenu-section-theme #theme-preview-grid .theme-preview-div.active:hover {
  border-color: var(--primary-color);
}

/* 偏好设定 */
.unibody-window {
  font-family: var(--base-font);
}

/* 偏好设定侧边栏 */
.nav-group-item.active {
  background: var(--item-hover-bg-color) !important;
  color: var(--primary-color);
}

/* 关于页 */
table#typora-help-md-table tr {
  background: transparent;
}

/* fix */
.about-content-meta {
  font-family: var(--title-font);
}

/* titlebar */
#top-titlebar {
  height: 28px;
  background: var(--write-bg);
}

#w-traffic-lights {
  display: flex;
  flex-direction: row;
}

#w-max-group {
  display: contents;
}

/* bugfix */
footer.stopselect.ty-footer {
  right: 0;
}

/* animation */
#write td,
#megamenu-content td,
.file-list-item,
.megamenu-menu li,
.btn,
.long-btn {
  position: relative;
  overflow: hidden;
}

#write td:after,
#megamenu-content td:after,
.file-list-item:after,
.megamenu-menu li:after,
.btn:after,
.long-btn:after {
  content: "";
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #666 10%, transparent 10.01%);
  background-repeat: no-repeat;
  background-position: 50%;
  transform: scale(10, 10);
  opacity: 0;
  transition: transform 0.3s, opacity 0.5s;
}

#write td:active:after,
#megamenu-content td:active:after,
.file-list-item:active:after,
.megamenu-menu li:active:after,
.btn:active:after,
.long-btn:active:after {
  transform: scale(0, 0);
  opacity: 0.3;
  transition: 0s;
}