body {
  background-color: var(--body-bg);
}

.post {
  margin: 128px 0;
}

.meta .categories {
  color: var(--link);
  margin-bottom: 6px;
  font-weight: 600;
}

.meta .categories a {
  font-size: 13px;
  margin-right: 6px;
  text-decoration: none;
}

.meta .date {
  color: var(--grey);
  font-weight: 600;
}

.meta .title {
  font-size: 48px;
  margin-top: 16px;
}

.content {
  font-size: 19px;
  line-height: 1.4211;
  font-weight: 400;
  letter-spacing: 0.012em;
}

.content p,
.content h1,
.content h2,
.content h3,
.content h4,
.content h5,
.content h6,
.meta .categories,
.meta .date,
.content figure,
/* only `.content>pre`, do not include <pre /> in <figure /> */
.content>pre,
.divider,
.container,
hr,
.meta .title,
.toc,
.content blockquote,
.content table,
.content video,
.content ul,
.content ol,
.content > mjx-container,
.content > .katex,
.about {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 16px;
}

.content p img,
.content .block-large img {
  border-radius: 10px;
}

.content table,
.content video {
  display: block;
}

.content table {
  padding: 0;
  border-collapse: collapse;
  border-radius: 15px;
  max-width: 800px;
  overflow-x: auto;
}

.content table tr {
  background-color: var(--card-bg);
}

.content table tr:nth-child(even) {
  background-color: transparent;
}

.content table th,
.content table td {
  margin: 0;
  padding: 6px 12px;
}

.content table th {
  border-bottom: 1px solid var(--border-color);
}

.content table thead tr th:first-child {
  border-top-left-radius: 15px;
}

.content table thead tr th:last-child {
  border-top-right-radius: 15px;
}

.content table tbody tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}

.content table tbody tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

@media screen and (max-width: 800px) {
  .content table,
  .content table thead tr th:first-child,
  .content table thead tr th:last-child,
  .content table tbody tr:last-child td:first-child,
  .content table tbody tr:last-child td:last-child {
    border-radius: 0;
  }
}

.content video {
  max-width: 100%;
  padding: 0;
}

.content .highlight,
.content > pre {
  overflow-x: auto;
  overflow-y: hidden;
  background-color: var(--card-bg);
  border-radius: 15px;
  max-width: calc(800px - 16px * 2);
}

@media screen and (max-width: 800px) {
  .content .highlight,
  .content > pre {
    border-radius: 0;
  }
}

.content .highlight * {
  border: none;
}

.content .highlight .gutter {
  padding-right: 16px;
}

.content > pre {
  max-width: calc(800px - 24px * 2);
  padding: 20px 24px;
}

.content > pre > code {
  background-color: transparent;
}

.content ul,
.content ol {
  padding: 0 16px;
  padding-left: 32px;
  margin-block-start: 1em;
  margin-block-end: 1em;
  max-width: calc(800px - 16px * 2);
}

.content blockquote {
  max-width: calc(800px - 16px * 2);
  padding: 0 8px;
}

/* for [hexo-math](https://github.com/hexojs/hexo-math): */
.content > mjx-container,
.content > .katex {
  display: block;
  text-align: center;
}

.tags {
  display: flex;
  flex-wrap: wrap;
}

.tags .icon {
  --size: 14px;
  background-position: center;
  background-size: var(--size) var(--size);
  background-repeat: no-repeat;
  display: block;
  width: var(--size);
  height: var(--size);
  margin-right: 6px;
}

body[data-color-scheme="auto"] .tags .icon {
  background-image: url(/theme-img/tags-dark.svg);
}

@media (prefers-color-scheme: dark) {
  body[data-color-scheme="auto"] .tags .icon {
    background-image: url(/theme-img/tags-light.svg);
  }
}

body[data-color-scheme="dark"] .tags .icon {
  background-image: url(/theme-img/tags-light.svg);
}

.tags .tag {
  font-size: 14px;
  display: block;
  height: 14px;
  margin-right: 4px;
}

.about {
  border-radius: 7px;
  background-color: var(--card-bg);
  max-width: calc(800px - 16px * 2);
  padding: 16px;
  margin: 64px auto;
}

@media screen and (max-width: 800px) {
  .about {
    border-radius: 0;
  }
}

.about h1 {
  margin: 0;
}

.about .details {
  margin: 16px 0;
}

.about .details p {
  margin: 6px 0;
}

.content h1 > .headerlink,
.content h2 > .headerlink,
.content h3 > .headerlink,
.content h4 > .headerlink,
.content h5 > .headerlink,
.content h6 > .headerlink {
  opacity: 0;
  color: var(--grey);
  font-weight: normal;
  position: absolute;
  padding-right: 6px;
  transform: translateX(-100%);
  transition: opacity 0.2s;
}

.content h1:hover > .headerlink,
.content h2:hover > .headerlink,
.content h3:hover > .headerlink,
.content h4:hover > .headerlink,
.content h5:hover > .headerlink,
.content h6:hover > .headerlink {
  opacity: 1;
  text-decoration: none;
}

.content h1 > .headerlink::before,
.content h2 > .headerlink::before,
.content h3 > .headerlink::before,
.content h4 > .headerlink::before,
.content h5 > .headerlink::before,
.content h6 > .headerlink::before {
  content: "#";
}

.content > h1 {
  font-size: 36px;
}

.content > h2 {
  font-size: 30px;
}

.content > h3 {
  font-size: 26px;
}

.content > h4 {
  font-size: 20px;
}

.content > h5 {
  font-size: 16px;
}

.content > h6 {
  font-size: 14px;
}

.post-prev-next {
  display: flex;
  justify-content: space-between;
}

.post-prev-next > a {
  width: 50%;
  color: var(--black-4);
  text-decoration: none;
}

.post-prev-next > a:hover {
  color: var(--black-2);
}

.post-prev-next > a > div {
  display: flex;
}

.post-prev-next .text {
  display: flex;
  flex-direction: column;
}

.post-prev-next .prev > div {
  justify-content: flex-end;
  text-align: right;
}

.post-prev-next .prev .text {
  align-items: flex-end;
}

.post-prev-next .text * {
  margin: 0;
}

.post-prev-next .text .label {
  margin-bottom: 4px;
  color: var(--grey);
}
