@font-face {
    font-family: 'HanChanJinShuSong';
    src: url("./寒蝉锦书宋.otf");
}

@font-face {
    font-family: "Noto Sans SC Medium";
    src: url(./NotoSansSC-Medium.otf);
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: "Noto Sans SC Medium", "HanChanJinShuSong", Helvetica, Arial, sans-serif;
    color: rgb(51, 51, 51);
    line-height: 1.6;
}

#write {
    max-width: 860px;
  	margin: 0 auto;
  	padding: 30px;
    padding-bottom: 100px;
    color: var(--main-text-color);
}

@media only screen and (min-width: 1400px) {
	#write {
		max-width: 1024px;
	}
}

@media only screen and (min-width: 1800px) {
	#write {
		max-width: 1200px;
	}
}

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

cursor {
    color: var(--text-cursor-color)
}

a {
    color: var(--a-color);
}
strong {
    font-weight: bold;
    color: var(--text-strong-color);
}
strong code {
    color: var(--text-strong-color);
}
em {
    font-style: italic;
    color: var(--text-em-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    position: relative;
    font-weight: bold;
    line-height: 1.4;
    cursor: text;
}
#write h1:hover a.anchor,
#write h2:hover a.anchor,
#write h3:hover a.anchor,
#write h4:hover a.anchor,
#write h5:hover a.anchor,
#write h6:hover a.anchor {
    text-decoration: none;
}
h1 tt,
h1 code {
    font-size: inherit;
}
h2 tt,
h2 code {
    font-size: inherit;
}
h3 tt,
h3 code {
    font-size: inherit;
}
h4 tt,
h4 code {
    font-size: inherit;
}
h5 tt,
h5 code {
    font-size: inherit;
}
h6 tt,
h6 code {
    font-size: inherit;
}
h1 {
    font-size: 2.1em;
    line-height: 1.2;
    color: var(--h1-4-text-color);
    text-align: center;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    background-color: var(--h1-background-color);
    border-left: 0.5rem solid var(--header-lr-border-color);
    border-right: 0.5rem solid var(--header-lr-border-color);
}
h2 {
    font-size: 1.8em;
    line-height: 1.225;
    color: var(--h1-4-text-color);
    border-bottom: .13rem solid var(--header-bottom-border-color);
}
h3 {
    font-size: 1.5em;
    line-height: 1.43;
    color: var(--h1-4-text-color);
    border-bottom: .12rem dashed var(--header-bottom-border-color);
}
h4 {
    font-size: 1.2em;
    color: var(--h1-4-text-color);
}
h5 {
    font-size: 1.1em;
    color: var(--h5-text-color);
}
h6 {
    font-size: 1em;
    color: var(--h6-text-color);
}
#write h4:before {
    content: "";
    display: inline-block;
    background: var(--header-lr-border-color);
    opacity: 1;
    pointer-events: none;
    width: .3rem;
    vertical-align: middle;
    margin-right: .5rem;
    height: 1.2rem;
    transform: translateY(-0.1rem);
}
#write>h3.md-focus:before,
#write>h4.md-focus:before {
    border: 0px;
    position: unset;
    padding: 0px;
    font-size: 0px;
    line-height: unset;
    border-radius: 0px;
    float: unset;
}

img {
    border: 1px solid var(--img-border-color);
}

mark {
    background: var(--mark-bg-color);
    color: var(--main-text-color);
}

p,
blockquote,
ul,
ol,
dl,
table{
    margin: .7em 0;
}
li>ol,
li>ul {
    margin: 0 0;
}
/* 水平分割线 horizontal rule */
hr {
    height: .1rem;
    padding: 0;
    margin: 16px 0;
    background-color: var(--hr-color);
    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 var(--blockquote-decoration-color);
    background-color: var(--blockquote-bg-color);
    padding: 8px 10px;
}
blockquote blockquote {
    padding-right: 0;
}
table {
    padding: 0;
    word-break: initial;
}
thead {
    background-color: var(--table-thead-bg-color);
}
table th {
    font-weight: bold;
    border: 0.05rem solid var(--table-border-color);
    border-bottom: 0;
    margin: 0;
    padding: 6px 13px;
}
table td {
    border: 0.05rem solid var(--table-border-color);
    margin: 0;
    padding: 6px 13px;
}
table th:first-child,
table td:first-child {
    margin-top: 0;
}
table th:last-child,
table td:last-child {
    margin-bottom: 0;
}

.CodeMirror-lines {
    padding-left: 4px;
}

.code-tooltip {
    box-shadow: 0 1px 1px 0 rgba(0,28,36,.3);
    border-top: 1px solid #eef2f2;
}

/* 代码块 */
.md-fences,
tt {
    font-size: 95%;
    background-color: var(--codeblock-bg-color);
    padding: 12px 4px 9px 4px;
}

/* 行内代码 */
code {
    color: var(--code-inline--color);
    background-color: var(--code-inline-bg-color);
    padding: 2px;
    font-size: 95%;
    display: inline;
    vertical-align: middle;
}

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

@media print {
    html {
        font-size: 13px;
    }
    pre {
        page-break-inside: avoid;
        word-wrap: break-word;
    }
}

#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;
}

.md-mathjax-midline {
    background: #fafafa;
}

.md-image>.md-meta {
    /*border: 1px solid #ddd;*/
    border-radius: 3px;
    padding: 2px 0px 0px 4px;
    font-size: 0.9em;
    color: inherit;
}

.md-tag {
    color: #a7a7a7;
    opacity: 1;
}

.md-toc { 
    margin-top:20px;
    padding-bottom:20px;
}

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

#typora-quick-open {
    border: 1px solid #ddd;
    background-color: #f8f8f8;
}

#typora-quick-open-item {
    background-color: #FAFAFA;
    border-color: #FEFEFE #e5e5e5 #e5e5e5 #eee;
    border-style: solid;
    border-width: 1px;
}

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

header, .context-menu, .megamenu-content, footer{
    font-family: "Segoe UI", "Arial", sans-serif;
}

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

.mac-seamless-mode #typora-sidebar {
    background-color: var(--side-bar-bg-color);
}

.md-lang {
    color: #b4654d;
}

#md-notification .btn {
    border: 0;
}

.ty-preferences .window-content {
    background-color: #fafafa;
}

.ty-preferences .nav-group-item.active {
    color: white;
    background: #999;
}

.menu-item-container a.menu-style-btn {
    background-color: #f5f8fa;
    background-image: linear-gradient( 180deg , hsla(0, 0%, 100%, 0.8), hsla(0, 0%, 100%, 0)); 
}

/****** Sidebar and Quick open******/
#typora-quick-open{
  color: var(--control-text-color); /* 控制侧边栏所有前景色均为控制文本色 */
}

.typora-quick-open-item-path{ /* file path in the Quick open panel*/
  white-space: nowrap;
}

/* 大纲文本覆盖色 */
.outline-item:hover {
    background-color: var(--active-file-bg-color);
}

#sidebar-files-menu {
  border: 1px solid var(--sidebar-border-color); /* 侧边栏下方文件操作板边框色 */
}

#file-library-tree .file-tree-node {
    padding-left: .9em; /* 文件树每级缩进 */
    color: var(--control-text-color);
}

.file-tree-node .file-node-content:hover {
    background-color: var(--sidebar-btn-hover-color); /* 鼠标指向文件时的背景色 */
    cursor: pointer;
}

#typora-sidebar #ty-sidebar-footer .sidebar-footer-item:hover {
  background: var(--sidebar-btn-hover-color); /* 侧边栏下方操作栏按钮 hover 色 */
}

#typora-sidebar #ty-sidebar-footer #sidebar-files-menu .show+.menuitem-group-label.show {
  border-color: var(--sidebar-border-color); /* 侧边栏下方文件操作板里项目边框色 */
}

#typora-sidebar #ty-sidebar-footer {
    border-top: 1px solid var(--sidebar-border-color); /* 侧边栏下方操作栏边框色 */
}

#typora-sidebar #ty-sidebar-footer #sidebar-files-menu li>a:hover {
    background: var(--sidebar-btn-hover-color); /* 侧边栏下方文件操作板 按钮 hover 颜色 */
}

/* 侧边栏下方文件操作板里 文件排序规则选项按钮 active */
#typora-sidebar #ty-sidebar-footer #sidebar-files-menu .ty-side-sort-btn.active,
/* 侧边栏下方文件操作板里 当前文件夹后缀小圆点 */
#typora-sidebar #ty-sidebar-footer #sidebar-files-menu .selected-folder-menu-item a:after {
    color: var(--sidebar-sort-btn-active-color); 
}

#typora-sidebar #ty-sidebar-footer #sidebar-files-menu .ty-side-sort-btn:hover {
    cursor: pointer;
    color: var(--sidebar-sort-btn-active-color); /* 侧边栏下方文件操作板里 文件排序规则选项按钮 hover 颜色 */
}

/* sidebar tab for windows */
.info-panel-tab:hover {
  color: var(--control-text-color);
}

.sidebar-menu {
  color: var(--control-text-color);
}

.sidebar-menu  .dropdown-menu>li>a, .sidebar-menu .dropdown-menu>li>a:focus, .sidebar-menu .dropdown-menu>li>a:hover {
  color: var(--control-text-color);
}

.dropdown-menu .selected-folder-menu-item a:after {
  color: var(--control-text-color);
}

/* sidebar search*/
.sidebar-menu .ty-sidebar-search-panel #file-library-search-input {
    color: var(--control-text-color);
    background: var(--sidebar-search-bg-color);
    border: 1px solid var(--sidebar-border-color);
}

.sidebar-menu .ty-sidebar-search-panel #file-library-search-input:focus {
    border-color: var(--sidebar-search-focus-border-color);
}

.sidebar-menu .ty-sidebar-search-panel {
    border-bottom: 1px solid var(--sidebar-border-color);
}

#typora-sidebar-resizer.dragging{
    color: var(--sidebar-resizer-color); /* 侧边栏宽度设置线颜色 */
}
