@import url("https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/lxgwwenkai-regular.css");
@import url("https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.7.0/lxgwwenkai-bold.css");

:root {
  --sy-font-body: "LXGW WenKai", "霞鹜文楷", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --sy-font-code: "JetBrainsMono NF", Consolas, "Microsoft YaHei", monospace;

  --sy-text-size: 16px;
  --sy-text-color: #111;
  --sy-line-height: 1.8;
  --sy-para-gap: 1.2rem;
  --sy-panel-bg: rgba(240, 245, 235, .48);

  --sy-panel-grid: linear-gradient(rgba(99, 102, 241, .08) 1px, transparent 1px),
                   linear-gradient(90deg, rgba(99, 102, 241, .08) 1px, transparent 1px);
  --sy-panel-grid-size: 20px 20px;
  --sy-panel-radius: 16px;
  --sy-side-pad: 48px;

  --sy-h1: #9A3412;
  --sy-h2: #B45309;
  --sy-h3: #4D7C0F;
  --sy-h4: #0F766E;
  --sy-h5: #BE123C;
  --sy-h6: #57534E;
  --sy-head-stroke: .018em;
  --sy-head-space: 2px;
  --sy-block-width: 4px;
  --sy-block-distance: 12px;
  --sy-block-radius: 2px;

  --sy-accent: #81b29a;
  --sy-accent-line: rgb(129, 178, 154, .3);

  --sy-bq-bg: #eaefef;
  --sy-bq-text: #999;
  --sy-bq-line: #2e3440;

  --sy-code-bg: #edf5f9;
  --sy-code-border: rgba(129, 178, 154, .22);
  --sy-code-radius: 16px;
  --sy-inline-code: #f5872e;
  --sy-inline-code-bg: #f5f7f9;

  --sy-table-bg: #f7f7f7;
  --sy-table-even: #dbe6e1;
  --sy-table-border: 1.5px solid #e8e8e8;

  --sy-list-indent: 25px;
  --sy-divider-height: 2.5px;
  --sy-divider-color: #ccc;
  --sy-selection: #7caad2;
  --sy-img-max: 85%;
  --sy-img-radius: 4px;

  --sy-ol-badge: 16px;
  --sy-ol-badge-l2: 14px;
}

@font-face {
  font-family: "sy-remixicon";
  src: url("/font/remixicon.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "sy-iconfont";
  src: url("/font/iconfont.woff2") format("woff2");
  font-display: swap;
}

html.page-article body .markdown-body {
  font-family: var(--sy-font-body);
  font-size: var(--sy-text-size) !important;
  line-height: var(--sy-line-height) !important;
  color: var(--sy-text-color);
  background-color: var(--sy-panel-bg);
  background-image: var(--sy-panel-grid);
  background-size: var(--sy-panel-grid-size);
  padding: 12px var(--sy-side-pad) 32px;
  border-radius: var(--sy-panel-radius);
  letter-spacing: 0;
}

html.page-article body .markdown-body p {
  margin: var(--sy-para-gap) 0;
  line-height: var(--sy-line-height);
}

html.page-article body .markdown-body li p {
  margin: .3em 0;
}

html.page-article body .markdown-body ::selection,
html.page-article body .markdown-body::selection {
  background-color: var(--sy-selection);
  color: #fff;
}

html.page-article body .markdown-body hr {
  height: var(--sy-divider-height);
  margin: 2rem 0;
  padding: 0;
  border: none;
  background-color: var(--sy-divider-color);
}

html.page-post #header {
  display: none;
}

html.page-article body .markdown-body :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--sy-font-body);
  font-weight: 700;
  -webkit-text-stroke: var(--sy-head-stroke);
  letter-spacing: var(--sy-head-space);
  border: none !important;
  padding-bottom: 0;
  color: var(--sy-h3);
}

html.page-article body .markdown-body h1,
html.page-article body .markdown-body h1 a {
  font-size: 2rem;
  color: var(--sy-h1);
  line-height: 1.4;
  text-align: center;
  padding-top: 2rem;
  margin: 0 0 2rem !important;
}

html.page-article body .markdown-body h2,
html.page-article body .markdown-body h2 a {
  font-size: 1.7rem;
  color: var(--sy-h2);
  line-height: 1.3;
}

html.page-article body .markdown-body :is(h3, h3 a) { font-size: 1.5rem; color: var(--sy-h3); }
html.page-article body .markdown-body :is(h4, h4 a) { font-size: 1.3rem; color: var(--sy-h4); }
html.page-article body .markdown-body :is(h5, h5 a) { font-size: 1.2rem; color: var(--sy-h5); }
html.page-article body .markdown-body :is(h6, h6 a) { font-size: 1.1rem; color: var(--sy-h6); }

html.page-article body .markdown-body :is(h2, h3, h4, h5, h6) {
  position: relative;
  margin-top: 2rem !important;
}

html.page-article body .markdown-body h2 {
  margin-bottom: calc(1rem + 10px) !important;
}

html.page-article body .markdown-body :is(h3, h4, h5, h6) {
  margin-bottom: .5rem !important;
}

html.page-article body .markdown-body > :is(h2, h3, h4, h5, h6) {
  border-left: var(--sy-block-width) solid currentColor !important;
  border-radius: var(--sy-block-radius) 0 0 var(--sy-block-radius);
  padding-left: var(--sy-block-distance) !important;
}

@media (min-width: 768px) {
  html.page-article body .markdown-body > :is(h2, h3, h4, h5, h6)::after {
    content: "\ede7";
    position: absolute;
    right: calc(100% + var(--sy-block-width) + 6px);
    top: 50%;
    transform: translateY(-50%);
    font-family: "sy-remixicon";
    font-size: 14px;
    font-weight: normal;
    -webkit-text-stroke: 0;
    line-height: 1;
    letter-spacing: 0;
    color: #737373;
    pointer-events: none;
  }

  html.page-article body .markdown-body > h3::after { content: "\ede8"; }
  html.page-article body .markdown-body > h4::after { content: "\ede9"; }
  html.page-article body .markdown-body > h5::after { content: "\edea"; }
  html.page-article body .markdown-body > h6::after { content: "\edeb"; }
}

html.page-article body .markdown-body :is(h1, h2, h3, h4, h5, h6) code {
  padding: 0 .32em;
  border-width: 0;
  font-size: .9em !important;
  line-height: 1.3;
}

html.page-article body .markdown-body strong {
  font-weight: 700 !important;
  -webkit-text-stroke: .02em;
  padding: 0 1px;
}

html.page-article body .markdown-body :is(h1, h2, h3, h4, h5, h6) strong {
  -webkit-text-stroke: calc(var(--sy-head-stroke) + .012em);
}

html.page-article body .markdown-body em {
  padding: 0 2px;
}

html.page-article body .markdown-body del {
  color: #bbb;
  padding: 0 2px;
}

html.page-article body .markdown-body :is(code, tt) {
  display: inline;
  margin: 0 2px;
  padding: 2px 5px;
  font-family: var(--sy-font-code);
  font-size: .9em;
  line-height: normal;
  vertical-align: baseline;
  color: var(--sy-inline-code);
  background-color: var(--sy-inline-code-bg);
  border-radius: 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

html.page-article body .markdown-body a {
  position: relative;
  color: var(--sy-accent);
  font-weight: normal;
  text-decoration: none;
  padding-bottom: 2px;
  background-image: linear-gradient(to right, var(--sy-accent), rgba(129, 178, 154, .5));
  background-size: 0 1.5px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size .5s ease, color .3s ease;
}

html.page-article body .markdown-body a:hover {
  background-size: 100% 1.5px;
  color: var(--sy-accent);
  text-decoration: none;
}

html.page-article body .markdown-body a[href*="http"]::before {
  content: "\e772";
  display: inline-block;
  font-family: "sy-iconfont";
  font-size: 80%;
  font-weight: 400;
  font-style: normal;
  opacity: .7;
  color: var(--sy-accent);
  padding-right: 2px;
  transition: color .5s ease;
}

html.page-article body .markdown-body a[href*="http"]:hover::before {
  opacity: 1;
}

html.page-article body .markdown-body :is(h1, h2, h3, h4, h5, h6) a {
  color: inherit;
  background-image: none;
  padding-bottom: 0;
}

html.page-article body .markdown-body blockquote {
  margin: var(--sy-para-gap) 0;
  padding: 10px 10px 10px 15px !important;
  font-size: 15px;
  color: var(--sy-bq-text);
  background-color: var(--sy-bq-bg);
  border-radius: 3px;
  border-left: none;
  box-shadow: 0 .2rem .5rem #0000000d, 0 0 .05rem #0000001a;
  position: relative;
  overflow: hidden;
}

html.page-article body .markdown-body blockquote p {
  margin: .8rem 0;
}

html.page-article body .markdown-body blockquote::before {
  content: " ";
  position: absolute;
  top: 0;
  left: 0;
  width: 4.5px;
  height: 100%;
  background-color: var(--sy-bq-line);
}

html.page-article body .markdown-body blockquote > :not(:is(h1, h2, h3, h4, h5, h6)):first-child::before {
  content: "\ec81";
  display: block;
  font-family: "sy-iconfont";
  font-size: 1.3rem;
  color: var(--sy-bq-line);
  position: relative;
  top: -10px;
  line-height: 1;
}

html.page-article body .markdown-body blockquote code {
  background-color: var(--sy-inline-code-bg);
}

html.page-article body .markdown-body blockquote > :is(h1, h2, h3, h4, h5, h6):first-child {
  display: flex;
  align-items: center;
  margin: -10px -10px -10px -15px !important;
  padding: 10px 10px 10px 15px !important;
  font-size: 1.1rem !important;
  letter-spacing: 1px;
  text-align: left;
  color: var(--sy-bq-line) !important;
  background-color: rgba(129, 178, 154, .16);
  position: relative;
}

html.page-article body .markdown-body blockquote > :is(h1, h2, h3, h4, h5, h6):first-child span {
  color: inherit;
  background: none;
}

html.page-article body .markdown-body blockquote > :is(h1, h2, h3, h4, h5, h6):first-child::before {
  content: "\e603";
  font-family: "sy-iconfont";
  position: relative;
  top: 0;
  margin-right: 8px;
  font-size: 1.1rem;
  color: var(--sy-bq-line);
}

html.page-article body .markdown-body blockquote > :is(h2, h3, h4, h5, h6):first-child::before {
  content: "\e632";
}

html.page-article body .markdown-body blockquote > :is(h3, h4, h5, h6):first-child::before {
  content: "\e6aa";
}

html.page-article body .markdown-body blockquote > :is(h4, h5, h6):first-child::before {
  content: "\e626";
}

html.page-article body .markdown-body blockquote > :is(h5, h6):first-child::before {
  content: "\e605";
}

html.page-article body .markdown-body blockquote > h6:first-child::before {
  content: "\e67b";
}

html.page-article body .markdown-body blockquote > :is(h1, h2, h3, h4, h5, h6):first-child::after {
  content: " ";
  position: absolute !important;
  top: 0;
  left: 0;
  width: 4.5px;
  height: 10000px;
  transform: none;
  background-color: var(--sy-bq-line);
  font-family: inherit;
  right: auto;
}

html.page-article body .markdown-body blockquote > :is(h1, h2, h3, h4, h5, h6) + p {
  margin-top: 1.1rem;
}

html.page-article body .markdown-body :is(ul, ol) {
  padding-left: var(--sy-list-indent);
  margin: var(--sy-para-gap) 0;
}

html.page-article body .markdown-body > :is(ul, ol):first-child {
  margin-top: 10px;
}

html.page-article body .markdown-body li {
  position: relative;
  line-height: var(--sy-line-height);
}

html.page-article body .markdown-body li + li {
  margin-top: .2em;
}

html.page-article body .markdown-body ul {
  list-style: none;
  position: relative;
}

html.page-article body .markdown-body ul > li::before {
  content: "\e628";
  position: absolute;
  left: -18px;
  top: 3px;
  font-family: "sy-iconfont";
  font-size: .9em;
  color: var(--sy-accent);
}

html.page-article body .markdown-body ul > li > ul > li::before {
  content: "\e601";
  left: -28px;
}

html.page-article body .markdown-body ul > li > ul > li > ul > li::before {
  content: "\e60c";
  left: -18px;
}

html.page-article body .markdown-body ul ul::after {
  content: " ";
  position: absolute;
  left: -11.5px;
  top: -4px;
  bottom: 0;
  border-left: 1.5px solid var(--sy-accent-line);
}

html.page-article body .markdown-body ol {
  list-style: none;
  counter-reset: sy-ol;
}

html.page-article body .markdown-body ol ol { counter-reset: sy-ol-l2; }
html.page-article body .markdown-body ol ol ol { counter-reset: sy-ol-l3; }

html.page-article body .markdown-body ol li::marker {
  color: transparent;
  font-size: 0;
}

html.page-article body .markdown-body ol > li {
  counter-increment: sy-ol;
}

html.page-article body .markdown-body ol > li::before {
  content: counter(sy-ol);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  left: -26px;
  top: calc((1em * var(--sy-line-height) - var(--sy-ol-badge)) / 2);
  min-width: var(--sy-ol-badge);
  height: var(--sy-ol-badge);
  padding: 0 4px;
  box-sizing: border-box;
  border-radius: 999px;
  background: var(--sy-accent);
  color: #fff;
  font-family: "PingFang SC", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

html.page-article body .markdown-body ol ol > li {
  counter-increment: sy-ol-l2;
}

html.page-article body .markdown-body ol ol > li::before {
  content: counter(sy-ol-l2);
  min-width: 0;
  width: var(--sy-ol-badge-l2);
  height: var(--sy-ol-badge-l2);
  left: -24px;
  top: calc((1em * var(--sy-line-height) - var(--sy-ol-badge-l2)) / 2);
  padding: 0;
  border-radius: 50%;
  font-size: 9px;
  opacity: .65;
  box-shadow: none;
}

html.page-article body .markdown-body ol ol ol > li {
  counter-increment: sy-ol-l3;
}

html.page-article body .markdown-body ol ol ol > li::before {
  content: counter(sy-ol-l3);
  width: auto;
  left: -22px;
  top: 0;
  height: calc(1em * var(--sy-line-height));
  line-height: calc(1em * var(--sy-line-height));
  border-radius: 0;
  background: none;
  color: var(--sy-accent);
  opacity: 1;
  font-size: 11px;
}

html.page-article body .markdown-body ol ol::before {
  content: " ";
  position: absolute;
  left: -12px;
  top: 0;
  bottom: 0;
  border-left: 1.5px solid var(--sy-accent-line);
}

html.page-article body .markdown-body ol > li > ol {
  position: relative;
}

html.page-article body .markdown-body li.task-list-item {
  list-style: none;
}

html.page-article body .markdown-body li.task-list-item::before {
  content: none;
}

html.page-article body .markdown-body pre {
  margin: 1.6em 0;
  padding: 2.5em 1.2em .55em !important;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-family: var(--sy-font-code);
  font-size: 15px;
  line-height: 1.6;
  color: #24292f;
  background: var(--sy-code-bg);
  border: 1px solid var(--sy-code-border);
  border-radius: var(--sy-code-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 10px rgba(0, 0, 0, .05), 0 12px 28px rgba(0, 0, 0, .06);
  position: relative;
  tab-size: 4;
  -moz-tab-size: 4;
}

html.page-article body .markdown-body pre code {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  color: inherit;
  font-size: inherit;
  white-space: pre-wrap;
  word-break: break-word;
}

html.page-article body .markdown-body pre::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f5a;
  box-shadow: 18px 0 0 #ffbe2e, 36px 0 0 #2aca44;
  z-index: 2;
}

html.page-article body .markdown-body pre[lang]::after {
  content: attr(lang);
  position: absolute;
  top: 13px;
  right: 14px;
  z-index: 99;
  font-family: "Monaco", monospace;
  font-size: 12px;
  font-weight: bolder;
  line-height: 1;
  letter-spacing: 1px;
  color: #abb7c2;
}

html.page-article body .markdown-body .snippet-clipboard-content > pre[lang]::after,
html.page-article body .markdown-body .highlight > pre[lang]::after {
  content: none;
}

html.page-article body .markdown-body :is(div.highlight, .snippet-clipboard-content) {
  margin: 1.6em 0;
  background: transparent;
  border-radius: var(--sy-code-radius);
  overflow: visible;
}

html.page-article body .markdown-body :is(div.highlight, .snippet-clipboard-content) > pre {
  margin: 0;
  padding-right: 46px !important;
}

html.page-article body .markdown-body table {
  display: table;
  width: 100%;
  margin: var(--sy-para-gap) 0;
  padding: 0;
  border-spacing: 0;
  border-collapse: collapse;
  background-color: var(--sy-table-bg);
  border-radius: 3px;
}

html.page-article body .markdown-body table :is(th, td) {
  padding: 6px 12px;
  border: var(--sy-table-border);
}

html.page-article body .markdown-body table th {
  color: #fff !important;
  font-weight: 700;
  background: var(--sy-accent) !important;
  border-top: none !important;
}

html.page-article body .markdown-body table tr {
  background-color: transparent;
  border-top: none;
}

html.page-article body .markdown-body table tbody tr:nth-child(2n) {
  background-color: var(--sy-table-even) !important;
}

html.page-article body .markdown-body table :is(th, td):first-child {
  border-left: none !important;
}

html.page-article body .markdown-body table :is(th, td):last-child {
  border-right: none !important;
}

html.page-article body .markdown-body table tbody tr:last-child td {
  border-bottom: none !important;
}

html.page-article body .markdown-body table code {
  display: inline-block;
  line-height: 1.4;
  vertical-align: middle;
}

html.page-article body .markdown-body img {
  display: block;
  margin: 20px auto;
  max-width: var(--sy-img-max);
  border-radius: var(--sy-img-radius);
  box-shadow: 0 0 10px rgba(0, 0, 0, .15);
  transition: transform .4s ease;
}

html.page-article body .markdown-body img:hover {
  transform: scale(1.02);
}

@media (max-width: 640px) {
  html.page-article body .markdown-body {
    --sy-text-size: 15.5px;
    --sy-para-gap: 1rem;
    --sy-list-indent: 22px;
    --sy-img-max: 100%;
    --sy-side-pad: 16px;
  }

  html.page-article body .markdown-body h1 { font-size: 1.6rem; }
  html.page-article body .markdown-body h2 { font-size: 1.4rem; }
  html.page-article body .markdown-body h3 { font-size: 1.25rem; }
  html.page-article body .markdown-body :is(h4, h5, h6) { font-size: 1.1rem; }

  html.page-article body .markdown-body pre {
    padding: 2.2em .9em .5em;
    font-size: 13.5px;
  }
}
