
* {
	margin: 0;
	padding: 0;
	border: 0;
}

html{
	font-family: microsoft yahei,helvetica,simhei,simsun,sans-serif;
}
:root{
	--bg: #f3f2ee;
	--text: #2b2b2b;
	--muted: #7a746c;
	--accent: #202020;
	--panel: #f3f2ee;
	--sidebar: #f3f2ee;
	--sidebar-text: #2b2b2b;
	--link: #2b2b2b;
	--link-hover: #000;
	--border: #d7d2cb;
	--code-bg: #ebe8e2;
	--pill: #e6e2db;
	--toggle-bg: rgba(32,32,32,0.7);
	--header-height: 50px;
	--footer-height: 36px;
	--sidebar-width: 250px;
}
/* Keep Greek letters lighter in KaTeX */
@font-face{
	font-family: "KaTeX_Main";
	font-style: italic;
	font-weight: 450;
	src: url("https://cdn.staticfile.org/KaTeX/0.16.9/fonts/KaTeX_Main-Italic.woff2") format("woff2"),
		 url("https://cdn.staticfile.org/KaTeX/0.16.9/fonts/KaTeX_Main-Italic.woff") format("woff");
	unicode-range: U+0041-005A, U+0061-007A;
}
@font-face{
	font-family: "KaTeX_Greek";
	font-style: italic;
	font-weight: 400;
	src: url("https://cdn.staticfile.org/KaTeX/0.16.9/fonts/KaTeX_Math-Italic.woff2") format("woff2"),
		 url("https://cdn.staticfile.org/KaTeX/0.16.9/fonts/KaTeX_Math-Italic.woff") format("woff");
	unicode-range: U+0370-03FF, U+1F00-1FFF;
}
@font-face{
	font-family: "KaTeX_Math";
	font-style: italic;
	font-weight: 400;
	src: url("https://cdn.staticfile.org/KaTeX/0.16.9/fonts/KaTeX_Math-Italic.woff2") format("woff2"),
		 url("https://cdn.staticfile.org/KaTeX/0.16.9/fonts/KaTeX_Math-Italic.woff") format("woff");
	unicode-range: U+0370-03FF, U+1F00-1FFF;
}
body{
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background-color: var(--bg);
	color: var(--text);
	padding-top: var(--header-height);
	padding-bottom: var(--footer-height);
	overflow-x: hidden;
}

#article-title,
#article-content{
	font-family: "KaTeX_Main", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
	color: #000;
}

a {
    color: var(--link);
    text-decoration: none;
}
.content-on{
	padding: 14px;
}
.content-off{
 	padding: 14px;
}
.header-on{
	padding-left: 0;
}
.on,
.off{
	transition: all 0.35s ease-in-out;
}
.header-on,
.content-on,
.content-off,
.footer-on,
.footer-off{
	transition: all 0.5s ease-in-out;
}
#sidebar{
	transition: all 0.35s ease-in-out;
}
#content,
#header,
#footer{
	transition: all 0.5s ease-in-out;
}
body.sidebar-resizing #sidebar,
body.sidebar-resizing #content,
body.sidebar-resizing #header,
body.sidebar-resizing #footer,
body.sidebar-resizing #search-input{
	transition: none !important;
}
/* header */
#header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	height: var(--header-height);
	background: var(--accent);
	z-index: 98;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
	box-shadow: none;
}
#title {
	font-size: 20px;
	color: #f3f2ee;
	padding: 10px 15px;
}
#menu {
	position:fixed;
	padding-right: 20px;
	right: 0px;
}
#menu .menu-item {
    display: inline-block;
	padding: 10px;
	list-style: none;
}
#menu .menu-item-link{
	font-size: 12px;
	color: #f3f2ee;
}
#menu .menu-item-link:hover {
	border-bottom: 1px solid;
}

/* sidebar */
#totop-toggle{
	position: fixed;
    bottom: 80px;
    right: 50px;
}
#sidebar-toggle{
	top: 60px;
	left: calc(var(--sidebar-width) + 10px);
	position: absolute;
}
.toggle {
	border: none;
	height: 45px;
	width: 45px;
	border-radius: 50%;
	background-color: var(--toggle-bg);
	color: #fff;
	transition: all 0.3s ease-in-out;
	opacity: 0.5;
}
.toggle:hover {
	opacity: 1;
}
#sidebar {
	position: fixed;
	flex-grow:1;
	flex-shrink:1;
	flex-basis: 0;
	width: var(--sidebar-width);
	left: calc(-1 * var(--sidebar-width));
	top: var(--header-height);
	bottom: var(--footer-height);
	background: var(--sidebar);
	z-index: 99;
	font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
	font-size: 16px;
}
#sidebar.on {
  left: 0;
  border-right: 2px dashed var(--accent);
}
#sidebar.off {
  left: calc(-1 * var(--sidebar-width));
}
#sidebar-resizer{
	position: absolute;
	right: 0;
	top: 0;
	width: 6px;
	height: 100%;
	cursor: col-resize;
	background: transparent;
}
#search-input {
	position: absolute;
	width: calc(var(--sidebar-width) - 20px);
	height: 35px;
	margin: 5px 10px 5px 10px;
	border-radius:5px;
	background: #4a413d;
	text-indent: 20px;
	color: #f1eae2;
}
.sidebar-toc {
	position: absolute;
	top: 0;
	color: var(--sidebar-text);
	width: 50%;
	height: 30px;
	text-align: center;
	line-height: 30px;
	font-size: 13px;
	z-index: 100;
}
.sidebar-toc:hover {
	cursor: pointer;
	color: #202020;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	-o-user-select: none;
}
.toc-active{
	color: #202020;
	border-bottom: 1px solid #202020;
}
#site-toc {
	height: calc( 100% - 5px );
	padding-top: 5px;
}
#tree{
	height: calc( 100% - 50px );
	overflow: auto;
	margin-top: 50px;
	overflow-x: hidden;
}
#tree .directory > ul {
	display: none;
}
#tree li.directory.active > ul {
	display: block;
}
#sidebar{
	overflow-x: hidden;
}
#sidebar ul {
	padding: 0px 2px 5px 20px;
}
#sidebar .article-toc{
	padding-left: 12px;
	box-sizing: border-box;
}
#sidebar .article-toc ul{
	padding-left: 0;
}
#sidebar ul li {
	list-style: none;
	white-space: nowrap;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}
#sidebar .article-toc li{
	white-space: normal;
}
#sidebar a.directory{
	display: block;
}
#sidebar a.directory .dir-caret{
	position: absolute;
	right: 2px;
	top: 0.35em;
	width: 6px;
	height: 6px;
	border-right: 1px solid var(--sidebar-text);
	border-bottom: 1px solid var(--sidebar-text);
	transform: rotate(-45deg);
	transition: transform 0.2s ease-in-out;
}
#sidebar li.directory.open > a.directory .dir-caret{
	transform: rotate(45deg);
}
#sidebar .file-caret{
	position: absolute;
	right: 2px;
	top: 0.35em;
	width: 6px;
	height: 6px;
	border-right: 1px solid var(--sidebar-text);
	border-bottom: 1px solid var(--sidebar-text);
	transform: rotate(-45deg);
	opacity: 0.7;
}
#sidebar li.file.toc-open > a .file-caret{
	transform: rotate(45deg);
}
#sidebar ul li a {
	color: var(--sidebar-text);
	font-size: 14px;
	display: block;
	padding-right: 24px;
}
#sidebar .article-toc{
	position: static;
}

#sidebar ul li a:hover{
	color: #202020;
	border-bottom: none;
}
#sidebar .active a{
	color: #202020;
	border-bottom: none;
}
.article-toc ul li i {
	color: var(--sidebar-text);
	font-size: 8px;
	vertical-align: middle;
}
.article-toc .level_1,
.article-toc .level_2,
.article-toc .level_3,
.article-toc .level_4{
	margin-left: 0;
}
.article-toc .level_2 > .toc-link{
	padding-left: 16px;
}
.article-toc .level_3 > .toc-link{
	padding-left: 26px;
}
.article-toc .level_4 > .toc-link{
	padding-left: 36px;
}
#sidebar .article-toc a.read{
	color: #202020;
	border-bottom: 0;
	-webkit-transition: 0.5s;
	-moz-transition: 0.5s;
	-ms-transition: 0.5s;
	-o-transition: 0.5s;
}
.article-toc .toc-toggle{
	position: absolute;
	right: 2px;
	top: 0.35em;
	width: 6px;
	height: 6px;
	cursor: pointer;
	color: var(--sidebar-text);
	border-right: 1px solid var(--sidebar-text);
	border-bottom: 1px solid var(--sidebar-text);
	transform: rotate(-45deg);
	transition: transform 0.2s ease-in-out;
}
.article-toc .toc-link{
	display: block;
	max-width: 100%;
	padding-right: 16px;
	vertical-align: middle;
}
.article-toc li{
	position: relative;
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding-right: 0;
}
.article-toc,
.article-toc ul{
	width: 100%;
	box-sizing: border-box;
	padding-left: 0;
	margin-left: 0;
}
.article-toc li > ul{
	width: 100%;
	margin-top: 4px;
}
.article-toc li.toc-open > .toc-toggle{
	transform: rotate(45deg);
}
.article-toc ul ul{
	margin-left: 0;
}
/* index */
.content{
	width: 61.8%;
	max-width: 960px;
	min-width: 320px;
	min-height: 0;
	flex: 1 0 auto;
	margin: 0 auto auto auto;
	box-sizing: border-box;
}
.content.content-on{
	width: calc((100% - var(--sidebar-width)) * 0.618);
	max-width: 960px;
	margin-left: calc(var(--sidebar-width) + (100% - var(--sidebar-width) - (100% - var(--sidebar-width)) * 0.618) / 2);
	margin-right: auto;
}
.index-li {
	margin: 20px 0 0 0;
	border-bottom: 1px solid var(--border);
}
.index-li a{
	color: var(--text);
}

.index-brief{
    position: relative;
	padding: 5px 5px 10px 5px;
	font-size: 14px;
	font-style: italic;
	color: var(--muted);
}

.index-li *:hover {
	color: var(--link-hover);
}
.article-meta *{
	position: relative;
	font-style: italic;
	font-size: 12px;
	color: var(--muted);
	padding: 0 5px 0 0;
}

.index-title {
	margin-top: 30px;
	position: relative;
	font-size: 24px;
}


#index-paginator {
  display: flex;
  justify-content: center;
  align-items: center;
}

#index-paginator .current,
#index-paginator .extend:hover,
#index-paginator .page-number:hover {
  color: #fff !important;
  background-color: var(--accent) !important;
}
#index-paginator .extend,
#index-paginator .page-number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0.3rem;
  font-size: 0.9rem;
  border-radius: 5px;
  color: var(--text);
  background-color: var(--pill);
  transition: all 0.2s;
}
/* article */
#article-title {
	border-bottom: 2px solid var(--border);
	padding-bottom: 10px;
	margin-bottom: 18px;
}
#article-content {
	padding: 10px 0;
	border-bottom: 2px solid var(--border);
	font-size: 16px;
	line-height: 1.8;
}
#article-content ol,
#article-content ul {
	padding-left: 40px;
}
#article-content li {
	margin: 6px 0;
	line-height: 1.8;
}
#article-content h1 {
	line-height: 1.3;
	margin: 26px 0 16px;
	font-size: 32px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--border);
}
#article-content h2 {
	line-height: 1.35;
	margin: 22px 0 12px;
	font-size: 24px;
	padding-left: 0;
	border-bottom: 1px solid var(--border);
}
#article-content h3 {
	line-height: 1.4;
	margin: 18px 0 8px;
	font-size: 20px
}
#article-content h4,
#article-content h5,
#article-content h6 {
	line-height: 1.5;
	margin: 12px 0 6px;
}
#article-content a:hover {
	border-bottom: 1px solid;
}
#article-content h1 a:hover{
	border-bottom: none;
}
#article-content img {
	max-width: 100%;
	height: auto;
}
#article-content pre {
	font-size: 14px;
	margin: 20px 0 15px;
}
#article-content blockquote{
	padding: 0 1em;
	color: #444;
	border-left: 4px solid var(--border);
	margin: 0 0 12px;
}
#article-content p {
	line-height: 1.8;
	margin-bottom: 12px;
}
#article-content .katex {
	font-size: 1.08em;
	line-height: 1.2;
}
#article-content .katex-display {
	margin: 0.6em 0;
	font-size: 1.12em;
}
#article-content .katex .scriptstyle {
	font-size: 0.8em;
}
#article-content .katex .scriptscriptstyle {
	font-size: 0.7em;
}
#article-content .katex .vlist > span[style*="top:"]:not([style*="top:-"]) {
	transform: translateY(-3mm);
}
#article-content .katex .op-limits .vlist > span[style*="top:"]:not([style*="top:-"]) {
	transform: none;
}
#article-content .katex .op-limits .vlist {
	transform: translateY(-4mm);
}
#article-content .katex .mathit {
	font-family: "KaTeX_Greek", "KaTeX_Main" !important;
	font-weight: 400 !important;
	font-synthesis: none;
}
#article-content .katex .mathnormal {
	font-weight: 400;
}
#article-content .katex .mbin,
#article-content .katex .mrel,
#article-content .katex .mop,
#article-content .katex .mopen,
#article-content .katex .mclose,
#article-content .katex .mathrm {
	font-weight: 500;
}
#article-content ul code,
#article-content ol code,
#article-content p code {
	margin: 0 5px;
	background-color: var(--code-bg);
	border-radius: 3px;
}
table {
  margin: auto auto 15px;
  width: 100%;
  min-height: .01%;
  overflow-x: auto;
  background: transparent;
  border-collapse: collapse;
  border-spacing: 0;
  text-align: left; 
  border: 1px solid black;
}
table th {
	font-weight: bold;
	padding: 5px 10px;
	border: 1px solid black;
}
table td {
	padding: 5px 10px; 
	border: 1px solid black;
}

figure{
    overflow:auto
}

.post-guide{
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-moz-justify-content: space-between;
	-webkit-justify-content: space-between;
	justify-content: space-between;
	padding: 1rem 0;
	border-bottom: 1px solid var(--border);
}
.post-guide .item {
	width: 50%;
	display: -webkit-box;
	display: -moz-box;
	display: -ms-flexbox;
	display: -webkit-flex;
	display: flex;
	-moz-align-items: center;
	-webkit-align-items: center;
	align-items: center;
}
.post-guide .item a {
	font-size: 0.875rem;
}
.post-guide .left {
	-moz-justify-content: flex-start;
	-webkit-justify-content: flex-start;
	justify-content: flex-start;
}
.post-guide .right {
	-moz-justify-content: flex-end;
	-webkit-justify-content: flex-end;
	justify-content: flex-end;
}
/* footer */
#footer{
	margin-top: auto;
	width:100%;
	font-size: 14px;
	height: var(--footer-height);
	background-color: #202020;
	color: #f3f2ee;
	text-align: center;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	clear: both;
	padding: 0;
}
#footer.footer-on{
	margin-left: 0;
	width: 100%;
}
#footer.footer-off{
	margin-left: 0;
	width: 100%;
}
#footer a {
    color: #f3f2ee;
}
#footer p {
    padding: 0;
}
/* @media */
@media screen and (max-width: 850px) {

	#sidebar {
		opacity: 0.95;
	}
}
