.article-entry pre,
.article-entry .highlight {
  background: #2d2d2d;
  margin: 0 -20px;
  padding: 15px 20px;
  border-style: solid;
  border-color: color-border;
  border-width: 1px 0;
  overflow: auto;
  color: #ccc;
  line-height: 22.400000000000002px
}

.article-entry .highlight .gutter pre,
.article-entry .gist .gist-file .gist-data .line-numbers {
  color: #666;
  font-size: .85em
}

.article-entry pre,
.article-entry code {
  font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace
}

.article-entry code {
  background: color-background;
  text-shadow: 0 1px #fff;
  padding: 0 .3em
}

.article-entry pre code {
  background: none;
  text-shadow: none;
  padding: 0
}

.article-entry .highlight pre {
  border: none;
  margin: 0;
  padding: 0
}

.article-entry .highlight table {
  margin: 0;
  width: auto
}

.article-entry .highlight td {
  border: none;
  padding: 0
}

.article-entry .highlight figcaption {
  font-size: .85em;
  color: #999;
  line-height: 1em;
  margin-bottom: 1em;
}

.article-entry .highlight figcaption a {
  float: right
}

.article-entry .highlight .gutter pre {
  text-align: right;
  padding-right: 20px
}

.article-entry .highlight .line {
  height: 22.400000000000002px
}

.article-entry .highlight .line.marked {
  background: #515151
}

.article-entry .gist {
  margin: 0 -20px;
  border-style: solid;
  border-color: color-border;
  border-width: 1px 0;
  background: #2d2d2d;
  padding: 15px 20px 15px 0;
}

.article-entry .gist .gist-file {
  border: none;
  font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace;
  margin: 0;
}

.article-entry .gist .gist-file .gist-data {
  background: none;
  border: none;
}

.article-entry .gist .gist-file .gist-data .line-numbers {
  background: none;
  border: none;
  padding: 0 20px 0 0
}

.article-entry .gist .gist-file .gist-data .line-data {
  padding: 0 !important
}

.article-entry .gist .gist-file .highlight {
  margin: 0;
  padding: 0;
  border: none
}

.article-entry .gist .gist-file .gist-meta {
  background: #2d2d2d;
  color: #999;
  font: .85em -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  text-shadow: 0 0;
  padding: 0;
  margin-top: 1em;
  margin-left: 20px;
}

.article-entry .gist .gist-file .gist-meta a {
  color: #258fb8;
  font-weight: normal;
}

.article-entry .gist .gist-file .gist-meta a:hover {
  text-decoration: underline
}

pre .comment,
pre .title {
  color: #999
}

pre .variable,
pre .attribute,
pre .tag,
pre .regexp,
pre .ruby .constant,
pre .xml .tag .title,
pre .xml .pi,
pre .xml .doctype,
pre .html .doctype,
pre .css .id,
pre .css .class,
pre .css .pseudo {
  color: #f2777a
}

pre .number,
pre .preprocessor,
pre .built_in,
pre .literal,
pre .params,
pre .constant {
  color: #f99157
}

pre .class,
pre .ruby .class .title,
pre .css .rules .attribute {
  color: #9c9
}

pre .string,
pre .value,
pre .inheritance,
pre .header,
pre .ruby .symbol,
pre .xml .cdata {
  color: #9c9
}

pre .css .hexcolor {
  color: #6cc
}

pre .function,
pre .python .decorator,
pre .python .title,
pre .ruby .function .title,
pre .ruby .title .keyword,
pre .perl .sub,
pre .javascript .title,
pre .coffeescript .title {
  color: #69c
}

pre .keyword,
pre .javascript .function {
  color: #c9c
}

.markdown-body .highlight {
  color: #ccc;
  background-color: #2d2d2d;
  border-radius: 5px;
}

.markdown-body .highlight table td {
  padding: 0;
  border: none;
}

.markdown-body .highlight table tr {
  border: none;
}

.markdown-body .highlight .gutter pre {
  color: #999;
  background: #1b1b1b;
}

.highlight .code pre {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
  background-color: #2d2d2d !important;
}

.markdown-body .highlight table tbody pre {
  border-radius: 0;
}

details summary {
  outline: none;
  cursor: pointer;
}
figure {
  position: relative;
}

figure figcaption {
  padding-left: 1rem;
  background-color: #1b1b1b;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}

figure table .gutter {
  user-select: none;
}

figure .pin-copy {
  position: absolute;
  top: 0;
  right: 1rem;
  cursor: pointer;
}

@font-face {
  font-family: octicons-link;
  src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==)
    format("woff");
}

.markdown-body .pl-c {
  color: #6a737d;
}

.markdown-body .pl-c1,
.markdown-body .pl-s .pl-v {
  color: #005cc5;
}

.markdown-body .pl-e,
.markdown-body .pl-en {
  color: #6f42c1;
}

.markdown-body .pl-smi,
.markdown-body .pl-s .pl-s1 {
  color: #24292e;
}

.markdown-body .pl-ent {
  color: #22863a;
}

.markdown-body .pl-k {
  color: #d73a49;
}

.markdown-body .pl-s,
.markdown-body .pl-pds,
.markdown-body .pl-s .pl-pse .pl-s1,
.markdown-body .pl-sr,
.markdown-body .pl-sr .pl-cce,
.markdown-body .pl-sr .pl-sre,
.markdown-body .pl-sr .pl-sra {
  color: #032f62;
}

.markdown-body .pl-v,
.markdown-body .pl-smw {
  color: #e36209;
}

.markdown-body .pl-bu {
  color: #b31d28;
}

.markdown-body .pl-ii {
  color: #fafbfc;
  background-color: #b31d28;
}

.markdown-body .pl-c2 {
  color: #fafbfc;
  background-color: #d73a49;
}

.markdown-body .pl-c2::before {
  content: "^M";
}

.markdown-body .pl-sr .pl-cce {
  font-weight: bold;
  color: #22863a;
}

.markdown-body .pl-ml {
  color: #735c0f;
}

.markdown-body .pl-mh,
.markdown-body .pl-mh .pl-en,
.markdown-body .pl-ms {
  font-weight: bold;
  color: #005cc5;
}

.markdown-body .pl-mi {
  font-style: italic;
  color: #24292e;
}

.markdown-body .pl-mb {
  font-weight: bold;
  color: #24292e;
}

.markdown-body .pl-md {
  color: #b31d28;
  background-color: #ffeef0;
}

.markdown-body .pl-mi1 {
  color: #22863a;
  background-color: #f0fff4;
}

.markdown-body .pl-mc {
  color: #e36209;
  background-color: #ffebda;
}

.markdown-body .pl-mi2 {
  color: #f6f8fa;
  background-color: #005cc5;
}

.markdown-body .pl-mdr {
  font-weight: bold;
  color: #6f42c1;
}

.markdown-body .pl-ba {
  color: #586069;
}

.markdown-body .pl-sg {
  color: #959da5;
}

.markdown-body .pl-corl {
  text-decoration: underline;
  color: #032f62;
}

.markdown-body .octicon {
  display: inline-block;
  vertical-align: text-top;
  fill: currentColor;
}

.markdown-body a {
  background-color: transparent;
}

.markdown-body a:active,
.markdown-body a:hover {
  outline-width: 0;
}

.markdown-body strong {
  font-weight: inherit;
}

.markdown-body strong {
  font-weight: bolder;
}

.markdown-body h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

.markdown-body img {
  border-style: none;
}

.markdown-body code,
.markdown-body kbd,
.markdown-body pre {
  font-family: monospace, monospace;
  font-size: 1em;
}

.markdown-body hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
}

.markdown-body input {
  font: inherit;
  margin: 0;
}

.markdown-body input {
  overflow: visible;
}

.markdown-body [type="checkbox"] {
  box-sizing: border-box;
  padding: 0;
}

.markdown-body * {
  box-sizing: border-box;
}

.markdown-body input {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.markdown-body a {
  color: var(--color-text-a);
  text-decoration: none;
  border-bottom: 1px solid var(--color-text-a);
  font-size: 1em;
  transition: color 0.3s;
}

.markdown-body a:hover {
  text-decoration: none;
  color: var(--color-text-a-hover);
  border-bottom: 1px solid var(--color-text-a-hover);
}

.markdown-body strong {
  font-weight: 600;
}

.markdown-body hr {
  height: 0;
  margin: 15px 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #dfe2e5;
}

.markdown-body hr::before {
  display: table;
  content: "";
}

.markdown-body hr::after {
  display: table;
  clear: both;
  content: "";
}

.markdown-body table {
  border-spacing: 0;
  border-collapse: collapse;
}

.markdown-body td,
.markdown-body th {
  padding: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 0;
  margin-bottom: 0;
}

.markdown-body h1 {
  font-size: 32px;
  font-weight: 600;
}

.markdown-body h2 {
  font-size: 24px;
  font-weight: 600;
}

.markdown-body h3 {
  font-size: 20px;
  font-weight: 600;
}

.markdown-body h4 {
  font-size: 16px;
  font-weight: 600;
}

.markdown-body h5 {
  font-size: 14px;
  font-weight: 600;
}

.markdown-body h6 {
  font-size: 12px;
  font-weight: 600;
}

.markdown-body p {
  margin-top: 0;
  margin-bottom: 10px;
}

.markdown-body blockquote {
  margin: 0;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.markdown-body ol ol,
.markdown-body ul ol {
  list-style-type: lower-roman;
}

.markdown-body ul ul ol,
.markdown-body ul ol ol,
.markdown-body ol ul ol,
.markdown-body ol ol ol {
  list-style-type: lower-alpha;
}

.markdown-body dd {
  margin-left: 0;
}

.markdown-body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,
    monospace;
  font-size: 12px;
}

.markdown-body pre {
  margin-top: 0;
  margin-bottom: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,
    monospace;
  font-size: 12px;
}

.markdown-body .octicon {
  vertical-align: text-bottom;
}

.markdown-body .pl-0 {
  padding-left: 0 !important;
}

.markdown-body .pl-1 {
  padding-left: 4px !important;
}

.markdown-body .pl-2 {
  padding-left: 8px !important;
}

.markdown-body .pl-3 {
  padding-left: 16px !important;
}

.markdown-body .pl-4 {
  padding-left: 24px !important;
}

.markdown-body .pl-5 {
  padding-left: 32px !important;
}

.markdown-body .pl-6 {
  padding-left: 40px !important;
}

.markdown-body::before {
  display: table;
  content: "";
}

.markdown-body::after {
  display: table;
  clear: both;
  content: "";
}

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

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

.markdown-body a:not([href]) {
  color: inherit;
  text-decoration: none;
}

.markdown-body .anchor {
  float: left;
  padding-right: 4px;
  margin-left: -20px;
  line-height: 1;
}

.markdown-body .anchor:focus {
  outline: none;
}

.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: #e1e4e8;
  border: 0;
}

.markdown-body blockquote {
  /*margin: 3rem 0;*/
  padding: 15px;
  color: var(--color-block-md-quote);
  border-left: 0.25em solid var(--color-block-md-quote);
  background: var(--bg-block-md-quote);
  border-radius: 3px;
}

.markdown-body blockquote > :first-child {
  margin-top: 0;
}

.markdown-body blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-body kbd {
  display: inline-block;
  padding: 3px 5px;
  font-size: 11px;
  line-height: 10px;
  color: #444d56;
  vertical-align: middle;
  background-color: #fafbfc;
  border: solid 1px #c6cbd1;
  border-bottom-color: #959da5;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 #959da5;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
}

.markdown-body h1 .headerlink,
.markdown-body h2 .headerlink,
.markdown-body h3 .headerlink,
.markdown-body h4 .headerlink,
.markdown-body h5 .headerlink,
.markdown-body h6 .headerlink {
  position: relative;
  text-decoration: none;
}

.markdown-body h1 .headerlink::before,
.markdown-body h2 .headerlink::before,
.markdown-body h3 .headerlink::before,
.markdown-body h4 .headerlink::before,
.markdown-body h5 .headerlink::before,
.markdown-body h6 .headerlink::before {
  content: "#";
  position: absolute;
  right: 5px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s, width 0.3s;
}

.markdown-body h1:hover .headerlink::before,
.markdown-body h2:hover .headerlink::before,
.markdown-body h3:hover .headerlink::before,
.markdown-body h4:hover .headerlink::before,
.markdown-body h5:hover .headerlink::before,
.markdown-body h6:hover .headerlink::before {
  content: "#";
  position: absolute;
  right: 5px;
  opacity: 1;
}

.markdown-body h1 .octicon-link,
.markdown-body h2 .octicon-link,
.markdown-body h3 .octicon-link,
.markdown-body h4 .octicon-link,
.markdown-body h5 .octicon-link,
.markdown-body h6 .octicon-link {
  color: #1b1f23;
  vertical-align: middle;
  visibility: hidden;
}

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

.markdown-body h1:hover .anchor .octicon-link,
.markdown-body h2:hover .anchor .octicon-link,
.markdown-body h3:hover .anchor .octicon-link,
.markdown-body h4:hover .anchor .octicon-link,
.markdown-body h5:hover .anchor .octicon-link,
.markdown-body h6:hover .anchor .octicon-link {
  visibility: visible;
}

.markdown-body h1 {
  padding-bottom: 0.3em;
  font-size: 2em;
}

.markdown-body h2 {
  padding-bottom: 0.3em;
  font-size: 1.5em;
}

.markdown-body h3 {
  font-size: 1.25em;
}

.markdown-body h4 {
  font-size: 1em;
}

.markdown-body h5 {
  font-size: 0.875em;
}

.markdown-body h6 {
  font-size: 0.85em;
  color: #6a737d;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 2em;
}

.markdown-body ul ul,
.markdown-body ul ol,
.markdown-body ol ol,
.markdown-body ol ul {
  margin-top: 0;
  margin-bottom: 0;
}

.markdown-body li {
  word-wrap: break-all;
}

.markdown-body li > p {
  margin-top: 16px;
}

.markdown-body li + li {
  margin-top: 0.25em;
}

.markdown-body dl {
  padding: 0;
}

.markdown-body dl dt {
  padding: 0;
  margin-top: 16px;
  font-size: 1em;
  font-style: italic;
  font-weight: 600;
}

.markdown-body dl dd {
  padding: 0 16px;
  margin-bottom: 16px;
}

.markdown-body table {
  display: block;
  width: 100%;
  overflow: auto;
}

.markdown-body table th {
  font-weight: 600;
}

.markdown-body table th,
.markdown-body table td {
  padding: 6px 13px;
  border: 2px solid var(--color-border-md-table);
}

.markdown-body table tr {
  background-color: var(--bg-block-md-table);
  border-top: 2px solid var(--color-border-md-table);
}

.markdown-body table tr:nth-child(2n) {
  background-color: var(--bg-block-md-table-2);
}

.markdown-body img {
  max-width: 90%;
  display: block;
  margin: 0 auto;
  box-sizing: content-box;
  background-color: #fff;
}

.markdown-body img[align="right"] {
  padding-left: 20px;
}

.markdown-body img[align="left"] {
  padding-right: 20px;
}

.markdown-body code {
  padding: 3px 5px;
  margin: 0 2px;
  font-size: 85%;
  /* font-weight: 600; */
  border-radius: 3px;
  background-color: var(--bg-text-md-code);
  color: var(--color-text-md-code);
}

.markdown-body pre {
  word-wrap: normal;
}

.markdown-body pre > code {
  padding: 0;
  margin: 0;
  font-size: 100%;
  word-break: normal;
  white-space: pre;
  background: transparent;
  border: 0;
  color: #333;
}

.markdown-body .highlight {
  margin-bottom: 16px;
}

.markdown-body .highlight pre {
  margin-bottom: 0;
  word-break: normal;
}

.markdown-body .highlight pre,
.markdown-body pre {
  padding: 10px;
  overflow: auto;
  font-size: 90%;
  line-height: 1.8;
  background-color: var(--bg-block-md-pre);
  border-radius: 5px;
}

.markdown-body pre code {
  display: inline;
  max-width: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
  color: var(--color-text-md-pre)
}

.markdown-body .full-commit .btn-outline:not(:disabled):hover {
  color: #005cc5;
  border-color: #005cc5;
}

.markdown-body kbd {
  display: inline-block;
  padding: 3px 5px;
  font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier,
    monospace;
  line-height: 10px;
  color: #444d56;
  vertical-align: middle;
  background-color: #fafbfc;
  border: solid 1px #d1d5da;
  border-bottom-color: #c6cbd1;
  border-radius: 3px;
  box-shadow: inset 0 -1px 0 #c6cbd1;
}

.markdown-body :checked + .radio-label {
  position: relative;
  z-index: 1;
  border-color: #0366d6;
}

.markdown-body .task-list-item {
  list-style-type: none;
}

.markdown-body .task-list-item + .task-list-item {
  margin-top: 3px;
}

.markdown-body .task-list-item input {
  margin: 0 0.2em 0.25em -1.6em;
  vertical-align: middle;
}

.markdown-body hr {
  border-bottom-color: #eee;
}

/* light scheme */
:root[color-mode="light"] {
  --bg-body: #FFFFFF;
  --color-text-base: #666;
  --color-text-a: #666;
  --color-text-a-hover: #000000;
  --color-text-a-active: #000000;
  --color-text-sub: #8e8e8e;
  --color-text-md-title: #24292e;
  --color-text-md-content: #24292e;
  --color-text-md-code: #e96900;
  --bg-text-md-code: #f8f8f8;
  --bg-block-md-quote: #EEEEEE;
  --color-block-md-quote: #555555;
  --color-divider-md-border: #5858581a;
  --bg-content-search: rgb(255 255 255 / 60%);
  --bg-search-panel: rgb(255 255 255 / 96%);
  --border-search-panel: rgba(0, 0, 0, 0.08);
  --bg-search-item-hover: rgba(0, 0, 0, 0.04);
  --bg-search-item-active: rgba(0, 0, 0, 0.07);
  --bg-block-md-pre: #e6e6e6;
  --color-text-md-pre: #555555;
  --bg-block-md-table: #ffffff;
  --bg-block-md-table-2: #f6f8fa;
  --color-border-md-table: #dfe2e5;
  --bg-ai-panel: rgb(255 255 255 / 97%);
  --border-ai-panel: rgba(0, 0, 0, 0.08);
  --bg-ai-bubble-bot: rgba(0, 0, 0, 0.045);
  --bg-ai-bubble-user: #3a3f49;
  --color-ai-bubble-user: #ffffff;
  --bg-ai-input: rgba(0, 0, 0, 0.035);
  --color-ai-error: #c0504a;
  --color-todo-high: #c0504a;
  --color-todo-doing: #5e81ac;
}

/* dark scheme */
:root[color-mode="dark"] {
  --bg-body: #2E3440;
  --color-text-base: #C1C2C5;
  --color-text-a: #C1C2C5;
  --color-text-a-hover: #FFFFFF;
  --color-text-a-active: #FFFFFF;
  --color-text-sub: #8e8e8e;
  --color-text-md-title: #eceff4;
  --color-text-md-content: #eceff4;
  --color-text-md-code: #e96900;
  --bg-text-md-code: #3b4252;
  --bg-block-md-quote: #3a4252;
  --color-block-md-quote: #abb9cf;
  --color-divider-md-border: #ffffff4f;
  --bg-content-search: rgb(59 66 82 / 60%);
  --bg-search-panel: rgb(46 52 64 / 96%);
  --border-search-panel: rgba(255, 255, 255, 0.08);
  --bg-search-item-hover: rgba(255, 255, 255, 0.05);
  --bg-search-item-active: rgba(255, 255, 255, 0.09);
  --bg-block-md-pre: #3a4252;
  --color-text-md-pre: #abb9cf;
  --bg-block-md-table: #2E3440;
  --bg-block-md-table-2: #313744;
  --color-border-md-table: #4c566a;
  --bg-ai-panel: rgb(41 46 58 / 97%);
  --border-ai-panel: rgba(255, 255, 255, 0.08);
  --bg-ai-bubble-bot: rgba(255, 255, 255, 0.06);
  --bg-ai-bubble-user: #c8ceda;
  --color-ai-bubble-user: #2E3440;
  --bg-ai-input: rgba(255, 255, 255, 0.05);
  --color-ai-error: #e5837b;
  --color-todo-high: #e5837b;
  --color-todo-doing: #81a1c1;
}

* {
  margin: 0;
  padding: 0;
}

html, body {
  font-size: 10px;
  letter-spacing: 0.01rem;
  background-color: var(--bg-body);
  transition: color 400ms ease-in-out 0s, background-color 400ms ease-in-out 0s;
  font-family: Consolas, "Liberation Mono", Menlo, Monaco, "Source Han Sans CN", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif
}

html {
  scrollbar-gutter: stable;
}

body.hidden {
  overflow: hidden;
}

.markdown-body {
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  line-height: 2;
  color: #24292e;
  font-size: 1.6rem;
  line-height: 2;
  word-wrap: break-word;
  color: var(--color-text-md-content)
}

@media (max-width: 768px) {
  .markdown-body {
    font-size: 1.4rem;
  }
}

#app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100dvh;
  margin: 0 auto;
}

/*控制整个滚动条*/
::-webkit-scrollbar {
    background-color: transparent;
    width: 6px;
    height: 6px;
    background-clip: padding-box;
}

/*滚动条中滑块部分*/
::-webkit-scrollbar-thumb {
    background-color: rgba(144,147,153,.5);
    transition: background-color 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #a4a4a4;
}

a {
  color: var(--color-text-a);
  text-decoration: none;
  background-color: transparent;
  transition: color 0.3s;
}

a:hover {
  color: var(--color-text-a-hover);
}

.flex-container {
  display: flex;
  flex-direction: column;
  margin-left: calc(100vw - 100%);
}

.header {
  padding: 50px 0;
}

.container {
  width: 50%;
  margin: 0 auto;
}

.index .post-list,
.archives .post-list,
.tag-index .tag-list,
.about-index .markdown-body {
  padding: 0 40px;
}

.home-intro {
  padding: 0 40px 28px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--color-divider-md-border);
}

.home-intro-head {
  margin-bottom: 10px;
}

.home-intro-name {
  font-size: 2.8rem;
  font-weight: 600;
  color: var(--color-text-a-hover);
  margin-bottom: 8px;
}

.home-intro-role {
  font-size: 1.5rem;
  color: var(--color-text-a);
  margin-bottom: 10px;
}

.home-intro-desc {
  font-size: 1.4rem;
  line-height: 1.8;
  color: var(--color-text-a);
}

/* 技能标签 */
.home-intro-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.skill-chip {
  font-size: 1.2rem;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--color-text-base);
  background: var(--bg-content-search);
  border: 1px solid var(--color-divider-md-border);
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.skill-chip:hover {
  color: var(--color-text-a-hover);
  border-color: var(--color-text-sub);
  transform: translateY(-2px);
}

/* 数据概览：value 大数字 + label 小标签 */
.home-intro-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 18px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text-a-hover);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 1.15rem;
  color: var(--color-text-sub);
}

/* 教育与经历 */
.home-exp {
  margin-top: 22px;
}

.home-exp + .home-exp {
  margin-top: 16px;
}

.home-exp-title {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-text-sub);
  margin-bottom: 12px;
}

.home-exp-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  margin: 0 -10px;
  border-radius: 8px;
  transition: background-color 0.25s ease;
}

.home-exp-item:hover {
  background: var(--bg-content-search);
}

/* 项目经历条目（首页为链接，复用经历条目样式） */
a.home-exp-item {
  text-decoration: none;
  color: inherit;
}

/* 个人信息键值网格 */
.home-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
}

.home-profile-item {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 1.4rem;
  line-height: 1.8;
}

.home-profile-label {
  flex: none;
  color: var(--color-text-sub);
}

.home-profile-value {
  color: var(--color-text-a);
  word-break: break-all;
}

@media (max-width: 888px) {
  .home-profile {
    grid-template-columns: 1fr;
  }
}

/* 项目经历页 */
.project-index {
  padding: 0 40px;
}

.project-intro {
  margin-bottom: 12px;
}

.project-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.project-item {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.project-item:hover {
  border-color: var(--color-text-sub);
  background: var(--bg-content-search);
}

.project-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.project-item-name {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-text-a);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.project-item-period {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--color-text-sub);
  font-variant-numeric: tabular-nums;
}

.project-item-role {
  font-size: 1.25rem;
  color: var(--color-text-sub);
  margin-top: 4px;
}

.project-item-desc {
  font-size: 1.35rem;
  line-height: 1.7;
  color: var(--color-text-a);
  margin-top: 8px;
}

.project-item-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* 技能目录页 */
.skills-index {
  padding: 0 40px;
}

.skills-intro {
  margin-bottom: 20px;
}

.skills-title {
  margin: 0;
  color: var(--color-text-a);
  font-size: 2.2rem;
  font-weight: 600;
}

.skills-description {
  margin: 8px 0 0;
  color: var(--color-text-sub);
  font-size: 1.35rem;
  line-height: 1.7;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.skill-item {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.skill-item:hover {
  border-color: var(--color-text-sub);
  background: var(--bg-content-search);
}

.skill-item-name {
  margin: 0;
  color: var(--color-text-a);
  font-size: 1.6rem;
  font-weight: 600;
}

.skill-item-description {
  margin: 8px 0 0;
  color: var(--color-text-a);
  font-size: 1.35rem;
  line-height: 1.7;
}

.skills-empty {
  color: var(--color-text-sub);
  font-size: 1.4rem;
}

/* Skill-Hub 详情页 */
.skill-index {
  padding: 0 40px;
}

.skill-detail-head {
  margin-bottom: 20px;
}

.skill-back {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: var(--color-text-sub);
  text-decoration: none;
}

.skill-back:hover {
  color: var(--color-text-a-hover);
}

.skill-detail-title {
  margin: 0;
  color: var(--color-text-a);
  font-size: 2.2rem;
  font-weight: 600;
}

.skill-detail-desc {
  margin: 8px 0 0;
  color: var(--color-text-sub);
  font-size: 1.35rem;
  line-height: 1.7;
}

.home-exp-logo {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  /* 垫白底：透明/深色 logo 在深浅两种模式下都清晰 */
  background: #fff;
  border: 1px solid var(--color-divider-md-border);
}

.home-exp-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--color-text-base);
  letter-spacing: 0.05em;
}

.home-exp-logo img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: contain;
}

.home-exp-logo img.hidden,
.home-exp-monogram.hidden {
  display: none;
}

.home-exp-info {
  flex: 1;
  min-width: 0;
}

.home-exp-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-a);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.home-exp-role {
  font-size: 1.25rem;
  color: var(--color-text-sub);
  margin-top: 2px;
}

.home-exp-period {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--color-text-sub);
  font-variant-numeric: tabular-nums;
}

.home-intro-links {
  margin-top: 18px;
}

.home-intro-links a {
  position: relative;
  display: inline-block;
  font-size: 1.3rem;
  margin-right: 20px;
  padding-bottom: 3px;
  color: var(--color-text-a);
}

.home-intro-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--color-text-a-hover);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-intro-links a:hover::after {
  transform: scaleX(1);
}

.home-intro-links a:hover {
  color: var(--color-text-a-hover);
}

.category-index .category-list {
  padding: 0 110px;
}

.btn-catalog {
  display: none;
}

@media (max-width: 888px) {
  .container {
    width: 90%;
  }
  .home-intro {
    padding: 0 0 28px;
  }
  .home-intro-stats {
    gap: 10px 24px;
  }
  .project-index,
  .skills-index,
  .skill-index {
    padding: 0;
  }
  .home-exp-item {
    gap: 10px;
  }
  .home-exp-period {
    font-size: 1.15rem;
  }
  .index .post-list,
  .archives .post-list,
  .tag-index .tag-list,
  .about-index .markdown-body {
    padding: 0;
  }
  .category-index .category-list {
    padding: 0 40px;
  }
  .btn-catalog {
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    height: 24px;
    width: 24px;
    padding: 10px;
    z-index: 999;
    color: var(--color-text-a);
    background-color: rgb(255 255 255 / 50%);
  }
  .btn-catalog i {
    font-size: 24px;
  }
  .post-catalog {
    top: 44px!important;
    bottom: unset!important;
    right: 0!important;
    width: unset!important;
    display: flex;
    justify-content: flex-end;
    padding: 10px!important;
    background-color: #fff;
    box-shadow: -1px 2px 5px 0px #999;
    opacity: .9;
    z-index: 9;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    transition: all 0.2s ease;
  }
  .post-catalog.hidden {
    opacity: 0!important;
    top: 0!important;
    z-index: -1!important;
  }
  .post-catalog .title {
    display: none;
  }
  .post-catalog .catalog-content {
    height: auto!important;
    max-height: calc(100vh - 44px - 24px)!important;
  }
  .back-to-top {
    opacity: 0;
    z-index: -1;
    pointer-events: none;
  }
}

@media (max-width: 1200px) and (min-width: 887px) {
  .index .post-list,
  .archives .post-list,
  .tag-index .tag-list,
  .about-index .markdown-body {
    padding: 0 20px;
  }
}

.post-item {
  display: flex;
  font-size: 1.6rem;
  margin-bottom: 20px;
  align-items: center;
  line-height: 21px;
}

.post-item .time-m-d {
  flex-shrink: 0;
  margin-right: 30px;
  color: var(--color-text-base);
  font-size: 1.5rem;
  line-height: 21px;
  transition: color 0.3s;
}

.post-item .title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-wrap: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-item:hover .time-m-d {
  color: var(--color-text-a);
}

.post-item .title a span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.post-item:hover .title a span {
  transform: translateX(4px);
}

.post-item .title .post-top {
  font-weight: 600;
  font-size: 1.7rem;
  padding-right: 8px;
}

.tag-details .time-m-d, .archives .time-m-d, .category-details .time-m-d {
  margin: 0 30px;
}

.avatar {
  text-align: center;
  padding-bottom: 30px;
  margin-left: calc(100vw - 100%);
}

.avatar img {
  height: 100px;
  width: 100px;
  border-radius: 50%;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.45s ease;
}

.avatar img:hover {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.avatar .nickname {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-a);
  padding-top: 10px;
}

/* 头像可点击放大 */
.avatar > a {
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
}

/* 头像查看器：全屏放大 + 导出 */
.avatar-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: avatar-viewer-in 0.25s ease backwards;
}

.avatar-viewer.closing {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.avatar-viewer-body {
  margin: 0;
}

.avatar-viewer-body img {
  display: block;
  width: min(72vmin, 480px);
  height: auto;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  animation: avatar-viewer-zoom 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

.avatar-viewer-actions {
  display: flex;
  gap: 14px;
}

.avatar-viewer-btn {
  font-size: 1.3rem;
  line-height: 1;
  padding: 10px 22px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.25s ease, transform 0.25s ease;
}

.avatar-viewer-actions a.avatar-viewer-btn {
  text-decoration: none;
}

.avatar-viewer-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

@keyframes avatar-viewer-in {
  from {
    opacity: 0;
  }
}

@keyframes avatar-viewer-zoom {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
}

.content-title {
  font-size: 1.6rem;
  color: var(--color-text-a);
  margin-bottom: 20px;
}

.navbar {
  margin-left: calc(100vw - 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar ul li {
  position: relative;
  display: inline-block;
  margin: 0 15px;
  font-size: 1.65rem;
  font-weight: bold;
  text-align: center;
}

.navbar ul li a {
  position: relative;
  display: inline-block;
  padding-bottom: 5px;
}

.navbar ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background-color: var(--color-text-a-hover);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar ul li a:hover::after,
.navbar ul li.active a::after {
  transform: scaleX(1);
}

.navbar ul li.active a {
  color: var(--color-text-a-active);
}

@media (max-width: 888px) {
  .navbar ul li {
    margin: 0 10px;
  }
}

@media (max-width: 390px) {
  .navbar ul li {
    margin: 0 3px;
  }
}

.post-navigation {
  font-size: 1.5rem;
  padding: 20px 90px;
  text-align: right;
  color: var(--color-text-base);
}

.post-navigation i {
  font-weight: 600;
}

.post-navigation .page-num {
  padding: 0 10px;
}

/* 分页局部刷新的加载态 */
.post-navigation.is-loading,
.post-list.is-loading {
  opacity: 0.45;
  pointer-events: none;
}

.post-list {
  transition: opacity 0.2s ease;
}

.post-navigation {
  transition: opacity 0.2s ease;
}

@media (max-width: 888px) {
  .post-navigation {
    padding: 20px 0;
  }
}

@media (max-width: 1200px) and (min-width: 887px) {
  .post-navigation {
    padding: 20px 20px;
  }
}

.tag-list li {
  font-size: 1.6rem;
  display: inline-block;
  padding: 10px;
}

.tag-list li .tag-list-link {
  position: relative;
  padding: 0 2px;
  border-radius: 2px;
}

.tag-list-count, .category-list-count {
  padding: 0 5px;
  color: #aaa;
  font-size: 1.2rem;
  vertical-align: top;
}

/* 关于页经历行内机构 logo */
.markdown-body img.org-logo {
  height: 2rem;
  width: 2rem;
  object-fit: contain;
  border-radius: 4px;
  vertical-align: -0.35rem;
  margin-right: 6px;
  background: var(--bg-content-search);
}

.markdown-body img.org-logo--lg {
  height: 2.6rem;
  width: 2.6rem;
  vertical-align: -0.55rem;
}

.category-list .category-list-item {
  font-size: 1.6rem;
  padding: 5px 0;
}

.category-list .category-list-item::marker {
  content: "• ";
  color: var(--color-text-base)
}

.category-list .category-list-item .category-list-child {
  padding-left: 30px;
}

.post-details .post-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--color-text-a);
  padding-bottom: 10px;
}

.post-details .post-attach {
  font-size: 1.4rem;
  text-align: center;
  padding-bottom: 30px;
  color: var(--color-text-a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.post-content {
  padding-bottom: 1rem;
}

.prev-or-next {
  font-size: 1.5rem;
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  margin: 3rem 0;
  border-top: 1px solid var(--color-divider-md-border);
}

.prev-or-next .post-foot-next, .prev-or-next .post-foot-prev {
  white-space: nowrap;
}

.prev-or-next .post-attach {
  opacity: 0.9;
  font-size: 1.2rem;
  padding: 0 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.post-attach .post-pubtime, .post-attach .post-tags, .post-attach .post-categories {
  padding: 0 10px;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .time-m-d {
    margin-right: 15px;
  }
  .tag-details .time-m-d, .archives .time-m-d {
    margin: 0 15px;
  }
}

.post-catalog {
  position: absolute;
  top: calc(290px + 88px + 30px);
  right: 50px;
  width: calc(20% - 50px);
  font-size: 1.4rem;
  padding-left: 10px;
}

.post-catalog .title {
  color: var(--color-text-base);
  font-size: 1.65rem;
  font-weight: bold;
  padding: 5px 0;
}

.catalog-content {
  box-sizing: border-box;
  max-height: calc(100vh - 120px);
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(144,147,153,.5) transparent;
}

.catalog-content::-webkit-scrollbar {
  width: 4px;
}

.catalog-content::-webkit-scrollbar-track {
  background: transparent;
}

.catalog-content::-webkit-scrollbar-thumb {
  border-radius: 2px;
  background-color: rgba(144,147,153,.3);
  transition: background-color 0.3s ease;
}

.catalog-content::-webkit-scrollbar-thumb:hover {
  background-color: rgba(144,147,153,.6);
}

.post-catalog .toc-child {
  padding-left: 10px;
}

.post-catalog li {
  list-style-type: none;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 2;
}

.toc-link {
  position: relative;
  padding: 3px 5px;
  opacity: 0.8;
  border-left: 2px solid transparent;
}

.toc-link.active {
  color: var(--color-text-a-active);
  opacity: 1;
}

.toc-link:hover::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 2px;
  width: 6px;
  height: 69%;
  background-color: gray;
  opacity: 0.45;
}

.toc-link.active::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: 2px;
  width: 6px;
  height: 69%;
  background-color: gray;
  opacity: 0.55;
}

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.35);
  transition: background-color 0.25s ease;
  visibility: visible;
  padding-right: 6px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.search-overlay.hidden {
  background-color: transparent;
  visibility: hidden;
  transition: visibility 0s linear 0.25s, background-color 0.25s ease;
  padding-right: 0;
}

.search-content {
  position: relative;
  top: 16%;
  width: 560px;
  max-width: calc(100% - 3rem);
  margin: 0 auto;
  background-color: var(--bg-search-panel);
  border: 1px solid var(--border-search-panel);
  border-radius: 14px;
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, 0.12), 0 24px 48px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.search-overlay.hidden .search-content {
  transform: translateY(-12px) scale(0.98);
  opacity: 0;
}

.search-title {
  display: flex;
  align-items: center;
  padding: 4px 6px 4px 16px;
}

.search-icon-input {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-sub);
  font-size: 1.7rem;
  margin-right: 8px;
  transition: color 0.2s ease;
}

.search-title:focus-within .search-icon-input {
  color: var(--color-text-a-hover);
}

.search-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background-color: transparent;
  height: 42px;
  font-size: 1.6rem;
  font-family: inherit;
  color: var(--color-text-a);
}

.search-input::placeholder {
  color: var(--color-text-sub);
}

.search-clear,
.search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 0;
  background-color: transparent;
  color: var(--color-text-sub);
  cursor: pointer;
  padding: 7px;
  border-radius: 7px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.search-clear:hover,
.search-close:hover {
  color: var(--color-text-a-hover);
  background-color: var(--bg-search-item-hover);
}

.search-clear .iconfont,
.search-close .iconfont {
  font-size: 1.4rem;
}

.search-clear.hidden {
  display: none;
}

.search-close .search-esc-kbd {
  display: inline-flex;
}

.search-close .search-close-icon {
  display: none;
}

.search-esc-kbd kbd {
  font-family: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 3px 6px;
  border: 1px solid var(--color-divider-md-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  color: var(--color-text-sub);
}

.search-result {
  max-height: min(440px, 60vh);
  overflow-y: auto;
  border-top: 1px solid var(--border-search-panel);
}

.search-result.hidden {
  display: none;
}

.search-result-list {
  list-style: none;
  padding: 6px;
}

.search-result-item {
  border-radius: 8px;
  transition: background-color 0.12s ease;
}

.search-result-item:hover {
  background-color: var(--bg-search-item-hover);
}

.search-result-item.active {
  background-color: var(--bg-search-item-active);
}

.search-result-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
}

.search-result-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-text-a-hover);
  margin-bottom: 4px;
}

.search-result-abstract {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 1.25rem;
  line-height: 1.7;
  color: var(--color-text-sub);
  word-break: break-all;
}

.search-result mark {
  background-color: rgba(233, 105, 0, 0.2);
  color: inherit;
  border-radius: 2px;
  padding: 0 1px;
}

.search-result-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  font-size: 1.2rem;
  color: var(--color-text-sub);
  background-color: var(--bg-search-panel);
  border-top: 1px solid var(--border-search-panel);
}

.search-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  padding: 16px;
  font-size: 1.4rem;
  color: var(--color-text-sub);
}

.search-status a {
  color: var(--color-text-a);
  text-decoration: underline;
}

.search-spinner {
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-divider-md-border);
  border-top-color: var(--color-text-sub);
  border-radius: 50%;
  animation: search-spin 0.7s linear infinite;
}

@keyframes search-spin {
  to {
    transform: rotate(1turn);
  }
}

@media (max-width: 768px) {
  .search-content {
    top: 10%;
  }

  .search-close .search-esc-kbd {
    display: none;
  }

  .search-close .search-close-icon {
    display: inline-flex;
  }

  .search-result-footer .search-result-hints {
    display: none;
  }
}

.tools-bar {
  position: fixed;
  right: 2.2rem;
  bottom: 2.2rem;
}

.tools-bar .tools-bar-item {
  margin: 10px 0;
  font-weight: bold;
}

.tools-bar .tools-bar-item a {
  display: inline-block;
  transition: transform 0.25s ease, color 0.25s ease;
}

.tools-bar .tools-bar-item:hover a {
  transform: translateY(-3px);
}

.tools-bar .tools-bar-item:active a {
  transform: scale(0.9);
}

.back-to-top {
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tools-bar .back-to-top.hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.share-icon {
  position: relative
}

.share-content {
  position: absolute;
  top: 0;
  right: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  transition: all 0.3s;
  z-index: 2;
}

.share-content.hidden {
  opacity: 0;
  z-index: -1;
  right: -10px;
}

.share-content .share-item {
  padding: 0 10px;
}

.pin-copy {
  position: relative;
}

.pin-copy:hover::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -0.8rem;
  transform: translateX(-50%);
  border: 0.5rem solid rgba(0, 0, 0, 70%);
  border-bottom-color: transparent;
  border-left-color: transparent;
  border-right-color: transparent;
}

.pin-copy:hover::after {
  content: attr(data-text);
  position: absolute;
  left: 50%;
  top: -3rem;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 70%);
  color: #ffffff;
  border-radius: 3px;
  padding: 6px;
  font-size: 1rem;
  line-height: 1rem;
  white-space: nowrap;
}

@media (min-width: 889px) {
  #app {
    --sidebar-width: 20%;
  }

  .site-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100dvh;
    z-index: 10;
    view-transition-name: site-sidebar;
  }

  .site-sidebar .header {
    box-sizing: border-box;
    height: 100%;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .site-sidebar .avatar {
    margin-left: 0;
    padding-bottom: 36px;
    text-align: center;
  }

  .site-sidebar .avatar img {
    height: 96px;
    width: 96px;
  }

  .site-sidebar .avatar--text .nickname {
    padding-top: 0;
  }

  .site-sidebar .navbar {
    margin-left: 0;
    display: block;
    width: 100%;
  }

  .site-sidebar .navbar ul {
    list-style: none;
  }

  .site-sidebar .navbar ul li {
    display: block;
    margin: 0;
    text-align: center;
  }

  .site-sidebar .navbar ul li a {
    display: inline-block;
    padding: 10px 12px;
  }

  .site-main {
    flex: 1 0 auto;
    min-width: 0;
    margin-left: var(--sidebar-width);
  }

  .site-footer {
    flex: 0 0 auto;
    box-sizing: border-box;
    width: calc(100% - var(--sidebar-width));
    margin-left: var(--sidebar-width);
    padding: 0 48px;
  }

  .site-footer .footer {
    width: 100%;
    margin-inline: auto;
  }

  .site-main .flex-container {
    box-sizing: border-box;
    min-height: 0;
    margin-left: 0;
    padding: 32px 0 40px;
  }

  .site-main .container {
    box-sizing: border-box;
    margin-inline: auto;
    width: calc(100% - 96px);
  }

  .site-main .post-details {
    width: calc(100% - 96px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 48px;
    align-items: start;
  }

  .site-main .post-details > .post-content {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .site-main .post-details > .post-catalog {
    position: sticky;
    top: 32px;
    right: auto;
    width: auto;
    box-sizing: border-box;
    padding-left: 0;
    grid-column: 2;
    grid-row: 1;
  }

  .site-main .post-catalog.hidden {
    opacity: 1;
    visibility: visible;
  }

}

@media (max-width: 888px) {
  .site-sidebar {
    display: block;
  }

  .site-main {
    min-width: 0;
  }

  .site-main .flex-container {
    margin-left: 0;
  }

  .site-main .post-details {
    width: 90%;
  }

  .avatar--text .nickname {
    padding-top: 0;
  }
}

/* ===== 动效与细节 ===== */

/* 同源页面跳转时平滑过渡（Chrome/Edge 渐进增强） */
@view-transition {
  navigation: auto;
}

::view-transition-old(site-sidebar),
::view-transition-new(site-sidebar) {
  animation: none;
}

/* 深/浅色切换（colorscheme.js 触发）：新配色以对角线从左下角扫向右上角 */
html.theme-switching::view-transition-old(root),
html.theme-switching::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

html.theme-switching::view-transition-new(root) {
  animation: theme-wipe 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* 顶点向外越界延伸，扫过的区域在视口内呈现为一条从左下向右上的对角前沿 */
@keyframes theme-wipe {
  from {
    clip-path: polygon(0 100%, 0 100%, 0 100%);
  }
  to {
    clip-path: polygon(0 100%, 0 -150%, 250% 100%);
  }
}

/* 页面内容入场 */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-main .flex-container > .container {
  /* backwards：入场前隐藏、结束后不残留 transform，避免破坏 fixed 子元素定位 */
  animation: fade-up 0.5s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

/* 文章列表逐条错落入场（最多错落 8 条，其后同时入场） */
.index .post-list > *,
.archives .post-list > *,
.tag-details .post-list > *,
.category-details .post-list > * {
  animation: fade-up 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

/* 首页简介各区块错落入场 */
.home-intro > * {
  animation: fade-up 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

.home-intro > :nth-child(1) { animation-delay: 0.06s; }
.home-intro > :nth-child(2) { animation-delay: 0.12s; }
.home-intro > :nth-child(3) { animation-delay: 0.18s; }
.home-intro > :nth-child(4) { animation-delay: 0.24s; }
.home-intro > :nth-child(5) { animation-delay: 0.30s; }
.home-intro > :nth-child(n+6) { animation-delay: 0.36s; }

.index .post-list > :nth-child(1),
.archives .post-list > :nth-child(1),
.tag-details .post-list > :nth-child(1),
.category-details .post-list > :nth-child(1) { animation-delay: 0.06s; }
.index .post-list > :nth-child(2),
.archives .post-list > :nth-child(2),
.tag-details .post-list > :nth-child(2),
.category-details .post-list > :nth-child(2) { animation-delay: 0.12s; }
.index .post-list > :nth-child(3),
.archives .post-list > :nth-child(3),
.tag-details .post-list > :nth-child(3),
.category-details .post-list > :nth-child(3) { animation-delay: 0.18s; }
.index .post-list > :nth-child(4),
.archives .post-list > :nth-child(4),
.tag-details .post-list > :nth-child(4),
.category-details .post-list > :nth-child(4) { animation-delay: 0.24s; }
.index .post-list > :nth-child(5),
.archives .post-list > :nth-child(5),
.tag-details .post-list > :nth-child(5),
.category-details .post-list > :nth-child(5) { animation-delay: 0.30s; }
.index .post-list > :nth-child(6),
.archives .post-list > :nth-child(6),
.tag-details .post-list > :nth-child(6),
.category-details .post-list > :nth-child(6) { animation-delay: 0.36s; }
.index .post-list > :nth-child(7),
.archives .post-list > :nth-child(7),
.tag-details .post-list > :nth-child(7),
.category-details .post-list > :nth-child(7) { animation-delay: 0.42s; }
.index .post-list > :nth-child(8),
.archives .post-list > :nth-child(8),
.tag-details .post-list > :nth-child(8),
.category-details .post-list > :nth-child(8) { animation-delay: 0.48s; }
.index .post-list > :nth-child(n+9),
.archives .post-list > :nth-child(n+9),
.tag-details .post-list > :nth-child(n+9),
.category-details .post-list > :nth-child(n+9) { animation-delay: 0.54s; }

/* 右下角工具栏延后浮现 */
.tools-bar {
  animation: fade-up 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) 0.3s backwards;
}

/* 文本选中的主题色 */
::selection {
  background: rgba(144, 147, 153, 0.35);
}

/* ---------- 归档页：按时间 / 按分组两种视图 ---------- */
.archives-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 40px;
  margin-bottom: 24px;
}

.archives-total {
  font-size: 1.4rem;
  color: var(--color-text-sub);
}

.archives-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 999px;
  background-color: var(--bg-content-search);
}

.archives-switch-item {
  border: 0;
  background-color: transparent;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 1.3rem;
  font-family: inherit;
  color: var(--color-text-sub);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.archives-switch-item:hover {
  color: var(--color-text-a-hover);
}

.archives-switch-item.active {
  color: var(--color-text-a-hover);
  background-color: var(--bg-body);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.archives-view.hidden {
  display: none;
}

.archives-group-title h2 {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.archives-group-count {
  font-size: 1.2rem;
  font-weight: normal;
  color: var(--color-text-sub);
}

/* 切换视图时重放列表错落入场 */
.archives-view.replay > * {
  animation: fade-up 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) backwards;
}

.archives-view.replay > :nth-child(1) { animation-delay: 0.04s; }
.archives-view.replay > :nth-child(2) { animation-delay: 0.08s; }
.archives-view.replay > :nth-child(3) { animation-delay: 0.12s; }
.archives-view.replay > :nth-child(4) { animation-delay: 0.16s; }
.archives-view.replay > :nth-child(5) { animation-delay: 0.20s; }
.archives-view.replay > :nth-child(6) { animation-delay: 0.24s; }
.archives-view.replay > :nth-child(7) { animation-delay: 0.28s; }
.archives-view.replay > :nth-child(8) { animation-delay: 0.32s; }
.archives-view.replay > :nth-child(n+9) { animation-delay: 0.36s; }

@media (max-width: 888px) {
  .archives-toolbar {
    padding: 0;
  }
}

@media (max-width: 1200px) and (min-width: 887px) {
  .archives-toolbar {
    padding: 0 20px;
  }
}

/* 键盘导航的可聚焦轮廓（搜索输入框用行内聚焦态提示，不适用外框） */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-text-a-hover);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 减少动态效果偏好：关闭动画与页面过渡 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }

  /* 深浅色切换的扫入效果为用户明确要求，不在此降级（伪元素也不匹配上面的 * 规则） */

  /* 导航下划线从左往右扫入为用户明确要求，不降级 */
  .navbar ul li a::after {
    transition-duration: 0.35s !important;
  }

  /* AI 阅读助手面板滑入滑出为用户明确要求，不降级（完整覆盖上面的 * 规则） */
  .ai-chat-panel {
    transition: transform 0.24s cubic-bezier(0.55, 0, 0.85, 0.4), visibility 0s linear 0.24s !important;
  }

  .ai-chat-panel.open {
    transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1) !important;
  }

  .ai-chat-backdrop {
    transition: opacity 0.3s ease, visibility 0s linear 0.3s !important;
  }

  .ai-chat-backdrop.open {
    transition: opacity 0.3s ease !important;
  }

  /* 输入框多行长高同理保留平滑过渡 */
  .ai-chat-input {
    transition: height 0.15s ease !important;
  }

  @view-transition {
    navigation: none;
  }
}

/* ---------- 文章页：AI 阅读助手 ---------- */

.ai-chat-icon .ai-chat-svg {
  display: block;
  width: 1.9rem;
  height: 1.9rem;
}

.ai-chat-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  z-index: 989;
  background-color: rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.ai-chat-backdrop.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

.ai-chat-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 990;
  display: flex;
  flex-direction: column;
  width: 400px;
  max-width: 100%;
  background-color: var(--bg-ai-panel);
  border-left: 1px solid var(--border-ai-panel);
  box-shadow: -8px 0 24px -8px rgba(0, 0, 0, 0.15);
  visibility: hidden;
  transform: translateX(calc(100% + 40px));
  /* 关闭时加速滑出，短促利落 */
  transition: transform 0.24s cubic-bezier(0.55, 0, 0.85, 0.4), visibility 0s linear 0.24s;
}

.ai-chat-panel.open {
  visibility: visible;
  transform: translateX(0);
  /* 打开时大幅减速滑入，到位即停不回弹 */
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
}

.ai-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-ai-panel);
}

.ai-chat-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background-color: var(--bg-ai-bubble-bot);
  color: var(--color-text-a-hover);
}

.ai-chat-avatar svg {
  width: 1.9rem;
  height: 1.9rem;
}

.ai-chat-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.ai-chat-name {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-a-hover);
}

.ai-chat-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-sub);
}

.ai-chat-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 0;
  background-color: transparent;
  color: var(--color-text-sub);
  cursor: pointer;
  padding: 7px;
  border-radius: 7px;
  line-height: 0;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.ai-chat-close:hover {
  color: var(--color-text-a-hover);
  background-color: var(--bg-search-item-hover);
}

.ai-chat-close .iconfont {
  font-size: 1.4rem;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 14px;
}

.ai-chat-msg {
  display: flex;
}

.ai-chat-msg-user {
  justify-content: flex-end;
}

.ai-chat-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 1.4rem;
  line-height: 1.75;
  word-break: break-word;
}

/* AI 回复不用气泡，纯文本靠左展示（贴合站点极简风格）；仅用户消息保留深色气泡 */
.ai-chat-msg-bot .ai-chat-bubble {
  max-width: 100%;
  padding: 2px 0;
  color: var(--color-text-md-content);
}

.ai-chat-msg-user .ai-chat-bubble {
  background-color: var(--bg-ai-bubble-user);
  color: var(--color-ai-bubble-user);
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
}

.ai-chat-bubble p {
  margin-bottom: 8px;
}

.ai-chat-bubble p:last-child {
  margin-bottom: 0;
}

.ai-chat-bubble pre {
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 8px;
  background-color: var(--bg-block-md-pre);
  color: var(--color-text-md-pre);
  overflow-x: auto;
  font-size: 1.25rem;
  line-height: 1.6;
}

.ai-chat-bubble code {
  padding: 1px 5px;
  border-radius: 4px;
  background-color: var(--bg-text-md-code);
  color: var(--color-text-md-code);
}

.ai-chat-bubble pre code {
  padding: 0;
  background-color: transparent;
  color: inherit;
}

.ai-chat-bubble a {
  color: var(--color-text-a);
  text-decoration: underline;
}

/* 等待首个分片时的三点动画 */
.ai-chat-bubble.is-thinking {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 0;
}

.ai-chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-text-sub);
  animation: ai-chat-bounce 1.2s ease-in-out infinite;
}

.ai-chat-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.ai-chat-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ai-chat-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* 流式输出光标 */
.ai-chat-cursor {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background-color: currentColor;
  animation: ai-chat-blink 0.9s steps(1) infinite;
}

@keyframes ai-chat-blink {
  50% {
    opacity: 0;
  }
}

.ai-chat-stopped {
  margin-top: 6px;
  font-size: 1.15rem;
  color: var(--color-text-sub);
}

/* 推理模型思考阶段的滚动片段 */
.ai-chat-reasoning {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--color-text-sub);
}

.ai-chat-bubble.is-error {
  background-color: rgba(217, 83, 79, 0.08);
  border: 1px solid rgba(217, 83, 79, 0.25);
  color: var(--color-ai-error);
}

.ai-chat-inputbar {
  padding: 12px 14px 8px;
  border-top: 1px solid var(--border-ai-panel);
}

/* 输入区：输入框与发送按钮合成一个胶囊容器（透明底，贴合站点极简风格） */
.ai-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 16px;
  background-color: transparent;
  transition: border-color 0.2s ease;
}

.ai-chat-composer:focus-within {
  border-color: var(--color-text-a-hover);
}

.ai-chat-input {
  flex: 1;
  min-width: 0;
  max-height: 120px;
  resize: none;
  border: 0;
  outline: 0;
  padding: 8px 2px 8px 10px;
  background-color: transparent;
  color: var(--color-text-a);
  caret-color: var(--color-text-a-hover);
  font-family: inherit;
  font-size: 1.4rem;
  line-height: 1.65;
  /* 多行长高时平滑过渡（配合 JS 的 growInput） */
  transition: height 0.15s ease;
}

.ai-chat-input::placeholder {
  color: var(--color-text-sub);
}

.ai-chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background-color: var(--color-text-a-hover);
  color: var(--bg-body);
  cursor: pointer;
  line-height: 0;
  transition: opacity 0.2s ease, transform 0.15s ease;
}

.ai-chat-send:hover {
  opacity: 0.85;
}

.ai-chat-send:active {
  transform: scale(0.92);
}

/* 输入为空且未在生成时弱化发送按钮，给出「暂无可发送」的 affordance */
.ai-chat-send.is-idle {
  opacity: 0.35;
}

.ai-chat-send.is-idle:hover {
  opacity: 0.65;
}

.ai-chat-send svg {
  width: 1.6rem;
  height: 1.6rem;
}

.ai-chat-send .ai-chat-stop-icon {
  display: none;
}

.ai-chat-send.is-generating .ai-chat-send-icon {
  display: none;
}

.ai-chat-send.is-generating .ai-chat-stop-icon {
  display: block;
}

.ai-chat-footnote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 7px 4px 2px;
  font-size: 1.1rem;
  color: var(--color-text-sub);
}

.ai-chat-hint {
  flex: none;
}

/* 移动端：面板改为底部抽屉 */
@media (max-width: 768px) {
  .ai-chat-panel {
    top: auto;
    left: 0;
    width: 100%;
    height: 78dvh;
    border-left: 0;
    border-top: 1px solid var(--border-ai-panel);
    border-radius: 14px 14px 0 0;
    transform: translateY(calc(100% + 40px));
  }

  .ai-chat-panel.open {
    transform: translateY(0);
  }

  .ai-chat-hint {
    display: none;
  }

  .ai-chat-footnote {
    justify-content: center;
  }
}

/* 划词菜单：正文内选中文字停稳后自动浮现在选区上方（取消选择/滚动即收起）。
   不加入场动画：后台标签页动画时钟可能被节流冻结在 opacity:0 起始帧，导致菜单不可见 */
.ai-chat-selection-menu {
  position: fixed;
  z-index: 995;
  min-width: 176px;
  padding: 5px;
  background-color: var(--bg-ai-panel);
  border: 1px solid var(--border-ai-panel);
  border-radius: 10px;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.2);
}

.ai-chat-selection-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background-color: transparent;
  color: var(--color-text-base);
  font-size: 1.35rem;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.ai-chat-selection-menu-item:hover,
.ai-chat-selection-menu-item:focus-visible {
  color: var(--color-text-a-hover);
  background-color: var(--bg-search-item-hover);
}

.ai-chat-selection-menu-item svg {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--color-text-a-hover);
}

/* 快捷动作与自由提问之间的分组线 */
.ai-chat-selection-menu-separator {
  height: 1px;
  margin: 4px 6px;
  background-color: var(--border-ai-panel);
}

/* ---------- Todo 页：本地待办清单 ---------- */
.todo-index {
  padding: 0 40px;
}

/* 暗色模式下让日期选择器/下拉框的原生控件跟随主题 */
:root[color-mode="dark"] .todo-index {
  color-scheme: dark;
}

.todo-intro {
  margin-bottom: 20px;
}

.todo-title {
  margin: 0;
  color: var(--color-text-a);
  font-size: 2.2rem;
  font-weight: 600;
}

.todo-description {
  margin: 8px 0 0;
  color: var(--color-text-sub);
  font-size: 1.35rem;
  line-height: 1.7;
}

/* 新增表单 */
.todo-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.todo-input,
.todo-project-input,
.todo-dir-input,
.todo-date,
.todo-edit-input,
.todo-edit-project,
.todo-edit-dir,
.todo-edit-date,
.todo-edit-priority {
  padding: 8px 12px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 8px;
  background-color: var(--bg-body);
  color: var(--color-text-md-content);
  font-size: 1.4rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.todo-input {
  flex: 1;
  min-width: 200px;
}

.todo-project-input,
.todo-dir-input {
  flex: 0 1 150px;
  min-width: 110px;
}

.todo-input:focus,
.todo-project-input:focus,
.todo-dir-input:focus,
.todo-date:focus,
.todo-edit-input:focus,
.todo-edit-project:focus,
.todo-edit-dir:focus,
.todo-edit-date:focus,
.todo-edit-priority:focus {
  outline: none;
  border-color: var(--color-text-sub);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-text-a-hover) 12%, transparent);
}

/* 悬停时边框加重一档，与聚焦态拉开层次 */
.todo-input:hover,
.todo-project-input:hover,
.todo-dir-input:hover,
.todo-date:hover,
.todo-edit-input:hover,
.todo-edit-project:hover,
.todo-edit-dir:hover,
.todo-edit-date:hover,
.todo-edit-priority:hover {
  border-color: color-mix(in srgb, var(--color-text-sub) 55%, transparent);
}

.todo-input::placeholder,
.todo-project-input::placeholder,
.todo-dir-input::placeholder,
.todo-edit-input::placeholder,
.todo-edit-project::placeholder,
.todo-edit-dir::placeholder {
  color: var(--color-text-sub);
  opacity: 1;
}

/* 下拉框：去原生外观，自定义箭头随亮暗主题换色 */
.todo-edit-priority {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238e8e8e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 12px;
}

:root[color-mode="dark"] .todo-edit-priority {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23C1C2C5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
}

/* 日期框：自定义日历图标 + 整框可点开选择器（Chromium/WebKit 生效，Firefox 走原生） */
@supports selector(::-webkit-calendar-picker-indicator) {
  .todo-date,
  .todo-edit-date {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238e8e8e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.2' y='3.2' width='11.6' height='10.6' rx='2'/%3E%3Cpath d='M2.2 6.8h11.6M5.3 1.6v3M10.7 1.6v3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 15px 15px;
  }

  :root[color-mode="dark"] .todo-date,
  :root[color-mode="dark"] .todo-edit-date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C1C2C5' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.2' y='3.2' width='11.6' height='10.6' rx='2'/%3E%3Cpath d='M2.2 6.8h11.6M5.3 1.6v3M10.7 1.6v3'/%3E%3C/svg%3E");
  }

  /* 原生日历按钮透明并铺满整框：点框内任意位置都能弹出选择器 */
  .todo-date::-webkit-calendar-picker-indicator,
  .todo-edit-date::-webkit-calendar-picker-indicator {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
  }

  /* 空值时“年 / 月 / 日”占位降为弱色（is-empty 类由 todo.js 维护） */
  .todo-date.is-empty::-webkit-datetime-edit,
  .todo-edit-date.is-empty::-webkit-datetime-edit {
    color: var(--color-text-sub);
  }
}

/* ---------- 控件皮肤：todo.js 用自定义下拉/日历替换原生控件 ---------- */
/* 原生控件藏进皮肤内（display:none），无 JS 时自动回退上方原生增强样式 */
.todo-dd,
.todo-cal {
  position: relative;
  display: inline-flex;
}

.todo-dd-native {
  display: none;
}

.todo-dd-btn,
.todo-cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 8px;
  background-color: var(--bg-body);
  color: var(--color-text-md-content);
  font-size: 1.4rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.todo-dd-btn:hover,
.todo-cal-btn:hover {
  border-color: color-mix(in srgb, var(--color-text-sub) 55%, transparent);
}

.todo-dd-btn:focus-visible,
.todo-cal-btn:focus-visible,
.todo-cal-nav:focus-visible,
.todo-cal-day:focus-visible,
.todo-cal-foot-btn:focus-visible {
  outline: 2px solid var(--color-text-a-hover);
  outline-offset: 1px;
}

.todo-dd-label,
.todo-cal-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.todo-dd-arrow {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 2px;
  border-right: 1.6px solid var(--color-text-sub);
  border-bottom: 1.6px solid var(--color-text-sub);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin-top 0.2s ease;
}

.todo-dd.open .todo-dd-arrow {
  margin-top: -2px;
  transform: rotate(225deg);
}

.todo-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 100%;
  max-width: 280px;
  max-height: 264px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 10px;
  background-color: var(--bg-body);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  display: none;
}

.todo-dd.open .todo-dd-menu {
  display: block;
}

.todo-dd-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--color-text-md-content);
  font-size: 1.3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.todo-dd-option:hover,
.todo-dd-option.cursor {
  background-color: var(--bg-content-search);
}

.todo-dd-option.active {
  color: var(--color-text-a-hover);
  font-weight: 600;
}

.todo-dd-option.active::after {
  content: '✓';
}

/* 胶囊形态：工具栏的项目筛选 */
.todo-dd.pill {
  max-width: 200px;
}

.todo-dd.pill .todo-dd-btn {
  width: 100%;
  justify-content: space-between;
  padding: 5px 12px;
  border-radius: 999px;
  background-color: transparent;
  color: var(--color-text-sub);
  font-size: 1.2rem;
}

.todo-dd.pill .todo-dd-btn:hover {
  color: var(--color-text-a-hover);
  border-color: var(--color-text-sub);
  background-color: var(--bg-content-search);
}

/* 组合框形态：项目输入保留原生 input 供自由键入，叠加下拉面板选择既有项目 */
.todo-dd.combo {
  display: block;
  flex: 0 1 150px;
  min-width: 110px;
}

.todo-dd.combo > input {
  width: 100%;
  /* 站点无全局 border-box，100% 宽再叠 padding/border 会右溢压住相邻控件 */
  box-sizing: border-box;
  padding-right: 30px;
}

.todo-combo-toggle {
  position: absolute;
  top: 50%;
  right: 3px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background-color: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.todo-combo-toggle::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 7px;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--color-text-sub);
  border-bottom: 1.6px solid var(--color-text-sub);
  transform: rotate(45deg);
  transition: transform 0.2s ease, top 0.2s ease;
}

.todo-dd.combo.open .todo-combo-toggle::after {
  top: 5px;
  transform: rotate(225deg);
}

/* 未命中时的「新建」行与空态行弱化显示 */
.todo-dd-option.new {
  color: var(--color-text-sub);
}

.todo-dd-option.new::before {
  content: '+';
  margin-right: 6px;
}

.todo-dd-option.empty {
  color: var(--color-text-sub);
  cursor: default;
}

/* 日历弹层 */
.todo-cal-icon {
  flex: none;
  width: 15px;
  height: 15px;
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%238e8e8e' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.2' y='3.2' width='11.6' height='10.6' rx='2'/%3E%3Cpath d='M2.2 6.8h11.6M5.3 1.6v3M10.7 1.6v3'/%3E%3C/svg%3E");
}

:root[color-mode="dark"] .todo-cal-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C1C2C5' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.2' y='3.2' width='11.6' height='10.6' rx='2'/%3E%3Cpath d='M2.2 6.8h11.6M5.3 1.6v3M10.7 1.6v3'/%3E%3C/svg%3E");
}

.todo-cal-pop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  width: 266px;
  padding: 12px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 12px;
  background-color: var(--bg-body);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
  display: none;
}

.todo-cal.open .todo-cal-pop {
  display: block;
}

.todo-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.todo-cal-title {
  color: var(--color-text-md-content);
  font-size: 1.4rem;
  font-weight: 600;
}

.todo-cal-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  color: var(--color-text-sub);
  font-size: 1.6rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.todo-cal-nav:hover {
  color: var(--color-text-a-hover);
  background-color: var(--bg-content-search);
}

.todo-cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.todo-cal-week span {
  color: var(--color-text-sub);
  font-size: 1.15rem;
  text-align: center;
}

.todo-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.todo-cal-day {
  height: 30px;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  color: var(--color-text-md-content);
  font-size: 1.3rem;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.todo-cal-day:hover {
  background-color: var(--bg-content-search);
}

.todo-cal-day.muted {
  opacity: 0.35;
}

.todo-cal-day.today {
  box-shadow: inset 0 0 0 1px var(--color-text-sub);
}

.todo-cal-day.selected {
  background-color: var(--color-text-a-hover);
  color: var(--bg-body);
  font-weight: 600;
  box-shadow: none;
}

.todo-cal-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--color-divider-md-border);
}

.todo-cal-foot-btn {
  padding: 2px 4px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  color: var(--color-text-sub);
  font-size: 1.25rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease;
}

.todo-cal-foot-btn:hover {
  color: var(--color-text-a-hover);
}

.todo-add {
  padding: 8px 20px;
  border: 0;
  border-radius: 8px;
  background-color: var(--color-text-a-hover);
  color: var(--bg-body);
  font-size: 1.4rem;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.todo-add:hover {
  opacity: 0.85;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.todo-add:active {
  transform: scale(0.94);
}

/* 筛选与批量操作 */
.todo-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.todo-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 999px;
  background-color: var(--bg-content-search);
}

.todo-switch-item {
  border: 0;
  background-color: transparent;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 1.3rem;
  font-family: inherit;
  color: var(--color-text-sub);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.todo-switch-item:hover {
  color: var(--color-text-a-hover);
}

.todo-switch-item.active {
  color: var(--color-text-a-hover);
  background-color: var(--bg-body);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.todo-actions {
  display: flex;
  gap: 8px;
}

/* 状态页签右侧：项目筛选下拉 + 批量操作 */
.todo-side {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.todo-project-filter {
  max-width: 200px;
  padding: 5px 30px 5px 12px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 999px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238e8e8e' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px 11px;
  appearance: none;
  -webkit-appearance: none;
  color: var(--color-text-sub);
  font-size: 1.2rem;
  font-family: inherit;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

:root[color-mode="dark"] .todo-project-filter {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23C1C2C5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
}

.todo-project-filter:focus {
  outline: none;
  border-color: var(--color-text-sub);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-text-a-hover) 12%, transparent);
}

.todo-project-filter:hover {
  color: var(--color-text-a-hover);
  border-color: var(--color-text-sub);
  background-color: var(--bg-content-search);
}

.todo-action {
  padding: 5px 12px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 999px;
  background-color: transparent;
  color: var(--color-text-sub);
  font-size: 1.2rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.todo-action:hover {
  color: var(--color-text-a-hover);
  border-color: var(--color-text-sub);
  background-color: var(--bg-content-search);
}

.todo-action:active {
  transform: scale(0.94);
}

.todo-action:disabled {
  opacity: 0.4;
  cursor: default;
}

.todo-action:disabled:hover {
  color: var(--color-text-sub);
  border-color: var(--color-divider-md-border);
}

/* 任务列表 */
.todo-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}

.todo-list[hidden],
.todo-empty[hidden],
.todo-tips[hidden] {
  display: none;
}

/* 分组树：分组头可折叠，子任务缩进带参考线；计数徽标显示当前可见行数 */
.todo-group {
  display: flex;
  flex-direction: column;
}

.todo-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 5px 10px 5px 8px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 8px;
  background-color: transparent;
  color: var(--color-text-sub);
  font-family: inherit;
  font-size: 1.35rem;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.todo-group-head:hover {
  color: var(--color-text-a-hover);
  background-color: var(--bg-content-search);
}

.todo-group-head:focus-visible {
  outline: 2px solid var(--color-text-a-hover);
  outline-offset: 1px;
}

.todo-group-arrow {
  flex: none;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
}

/* 展开时箭头转向下方；折叠态保持指右 */
.todo-group:not(.collapsed) .todo-group-arrow {
  transform: rotate(45deg);
}

.todo-group-name {
  font-weight: 600;
  word-break: break-word;
}

.todo-group-count {
  flex: none;
  min-width: 2rem;
  padding: 0 8px;
  border-radius: 999px;
  background-color: color-mix(in srgb, var(--color-text-sub) 12%, transparent);
  font-size: 1.15rem;
  line-height: 1.9;
  text-align: center;
}

/* 目录层级：项目分组内的二级折叠头，弱一档字号与项目层拉开层次 */
.todo-group-sub > .todo-group-head {
  padding: 3px 8px;
  font-size: 1.25rem;
}

.todo-group-sub .todo-group-count {
  min-width: 1.6rem;
  padding: 0 6px;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* 收起态由 JS 的 WAAPI 高度动画过渡到位后落地（CSS transition 会被浏览器“减少动态”压成瞬时） */
.todo-group.collapsed .todo-group-list {
  display: none;
}

/* 收起动画进行中暂时压过 display:none，动画收口后由 JS 撤除 */
.todo-group.collapsed .todo-group-list.animating {
  display: flex;
}

.todo-group-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* 只留水平缩进：垂直 margin/padding 会把高度动画的起止高度算歪 */
  padding: 0 0 0 16px;
  border-left: 1px solid var(--color-divider-md-border);
  list-style: none;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--color-divider-md-border);
  border-radius: 10px;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

/* 拖动排序：标题/正文区提示可抓取，拖拽中的行半透明示位 */
.todo-item:not(.editing) .todo-main {
  cursor: grab;
}

.todo-item.dragging {
  opacity: 0.4;
}

.todo-item.dragging .todo-main {
  cursor: grabbing;
}

.todo-item:hover {
  border-color: var(--color-text-sub);
  background: var(--bg-content-search);
}

/* 自定义打勾框：圆形描边，选中填充并对勾弹跳弹入 */
/* 状态圆环（button）：空环=未开始，半填充=进行中，实心对勾=已完成；点击循环三态 */
.todo-check {
  position: relative;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  margin-top: 2px;
  padding: 0;
  border: 2px solid var(--color-text-sub);
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.todo-check:hover {
  border-color: var(--color-text-a-hover);
}

.todo-check:focus-visible {
  outline: 2px solid var(--color-text-a-hover);
  outline-offset: 2px;
}

/* 进行中：环内上半填充（conic 50%），专属蓝与优先级三色区分 */
.todo-check.is-doing {
  border-color: var(--color-todo-doing);
}

.todo-check.is-doing::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: conic-gradient(var(--color-todo-doing) 0 50%, transparent 50% 100%);
}

.todo-check.is-done {
  border-color: var(--color-text-a-hover);
  background-color: var(--color-text-a-hover);
}

/* 对勾颜色随亮暗反转：亮色选中底是黑、勾用白；暗色选中底是白、勾用深底色 */
:root[color-mode="light"] .todo-check.is-done {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

:root[color-mode="dark"] .todo-check.is-done {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E3440' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
}

.todo-main {
  flex: 1;
  min-width: 0;
}

.todo-item-title {
  color: var(--color-text-md-content);
  font-size: 1.5rem;
  line-height: 1.6;
  word-break: break-word;
}

.todo-item.done .todo-item-title {
  color: var(--color-text-sub);
  text-decoration: line-through;
}

.todo-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.todo-badge {
  padding: 1px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 1.1rem;
}

/* 「进行中」行内徽标：专属蓝与半填充圆环呼应 */
.todo-status-doing {
  color: var(--color-todo-doing);
}

.todo-due {
  color: var(--color-text-sub);
  font-size: 1.2rem;
}

.todo-item.overdue .todo-due {
  color: var(--color-todo-high);
}

.todo-item-actions {
  display: flex;
  flex: none;
  gap: 6px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

/* 悬停才显示行内操作按钮（右滑入场），触屏设备常显 */
@media (hover: hover) {
  .todo-item:not(.editing) .todo-item-actions {
    opacity: 0;
    transform: translateX(8px);
  }

  .todo-item:hover .todo-item-actions,
  .todo-item:focus-within .todo-item-actions {
    opacity: 1;
    transform: translateX(0);
  }
}

.todo-item-btn {
  padding: 4px 8px;
  border: 0;
  border-radius: 6px;
  background-color: transparent;
  color: var(--color-text-sub);
  font-size: 1.25rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.todo-item-btn:hover {
  color: var(--color-text-a-hover);
  background-color: var(--bg-search-item-hover);
}

.todo-item-btn:active {
  transform: scale(0.92);
}

/* 状态快捷按钮：胶囊描边突出为主操作，与编辑/删除文字按钮拉开层次 */
.todo-status-btn {
  padding: 3px 10px;
  border: 1px solid color-mix(in srgb, var(--color-text-sub) 45%, transparent);
  border-radius: 999px;
}

.todo-status-btn:hover {
  border-color: var(--color-text-sub);
  background-color: var(--bg-content-search);
}

.todo-item-delete:hover {
  color: var(--color-todo-high);
}

/* 行内编辑态：整行高亮，隐藏原行内容，展示编辑控件 */
.todo-item.editing {
  border-color: var(--color-text-sub);
  background-color: var(--bg-content-search);
}

.todo-item.editing .todo-check,
.todo-item.editing .todo-main,
.todo-item.editing .todo-item-actions {
  display: none;
}

.todo-edit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  flex: 1;
  gap: 8px;
}

.todo-edit-input {
  flex: 1;
  min-width: 160px;
  font-size: 1.4rem;
}

.todo-edit-project {
  flex: 0 1 140px;
  min-width: 100px;
}

/* 编辑行里组合框包裹层取代输入框成为 flex 项，尺寸规则随之迁移 */
.todo-edit .todo-dd.combo {
  flex: 0 1 140px;
  min-width: 100px;
}

.todo-edit-date,
.todo-edit-priority,
.todo-edit-project {
  font-size: 1.3rem;
}

.todo-edit-save {
  color: var(--color-text-a-hover);
}

/* 空状态与提示 */
.todo-empty {
  padding: 28px 20px;
  border: 1px dashed var(--color-divider-md-border);
  border-radius: 10px;
  color: var(--color-text-sub);
  font-size: 1.4rem;
  text-align: center;
  animation: fade-up 0.35s ease backwards;
}

/* 行入场动画由 JS 的 WAAPI 驱动（见 todo.js enterAnimation） */

/* 筛选计数变化时脉冲一下（WAAPI，见 todo.js pulse） */
.todo-switch-item [data-count] {
  display: inline-block;
}

.todo-tips {
  margin: 12px 0 0;
  color: var(--color-todo-high);
  font-size: 1.25rem;
}

/* 存储状态栏：当前数据存哪、是否已落盘 */
.todo-storage {
  margin: 14px 0 0;
  color: var(--color-text-sub);
  font-size: 1.2rem;
  line-height: 1.7;
}

.todo-storage[hidden] {
  display: none;
}

.todo-storage-btn {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background-color: transparent;
  color: var(--color-text-a-hover);
  font-size: 1.2rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.todo-storage-btn:hover {
  opacity: 0.8;
}

/* 响应式：对齐归档页断点 */
@media (max-width: 888px) {
  .todo-index {
    padding: 0;
  }
}

@media (min-width: 887px) and (max-width: 1200px) {
  .todo-index {
    padding: 0 20px;
  }
}

@media (max-width: 600px) {
  .todo-group-list {
    padding-left: 10px;
  }

  .todo-input {
    flex: 1 1 100%;
  }

  .todo-form .todo-dd.combo,
  .todo-project-input,
  .todo-dir-input {
    flex: 1 1 40%;
  }

  .todo-project-filter {
    max-width: 100%;
    flex: 1;
  }

  .todo-dd.pill {
    max-width: 100%;
    flex: 1;
  }

  .todo-add {
    flex: 1;
  }
}

.footer {
  padding-top: 30px;
  font-size: 1.2rem;
  color: #aaa;
}
.footer .social {
  padding-bottom: 5px;
}
.footer .social ul {
  text-align: center;
}
.footer .social ul li {
  display: inline-block;
  padding: 0 5px;
}
.footer .footer-more {
  padding-bottom: 5px;
  text-align: center;
}
.mr-8 {
  margin-right: 8px;
}
.mr-10 {
  margin-right: 10px;
}
.markdown-body code {
  color: #808080;
}
.markdown-body a:hover {
  border-bottom: 2px solid #808080;
}
.markdown-body blockquote {
  border-color: #808080;
}
.toc-link:hover::after {
  background-color: #808080;
}
.toc-link.active::after {
  background-color: #808080;
}
.navbar ul li a:hover::after {
  background-color: #808080;
}
.navbar ul li.active a::after {
  background-color: #808080;
}
.markdown-body h1 .headerlink::before,
.markdown-body h2 .headerlink::before,
.markdown-body h3 .headerlink::before,
.markdown-body h4 .headerlink::before,
.markdown-body h5 .headerlink::before,
.markdown-body h6 .headerlink::before {
  color: #808080;
}
