@charset "UTF-8";
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family-body);
  min-width: 250px;
  overflow-x: auto;
  word-break: break-all;
}

.main {
  padding-top: var(--header-height);
  /*
   这里不用减去header的高度，因为header是position:absolute的。
   2px是指header和footer的1px的边框。（不是border-box吗，为什么边框还要单独算？）
   */
  min-height: calc(100vh - var(--footer-height) - 2px);
}

.footer {
  border-top: 1px solid var(--divider-color);
}
.footer footer {
  height: var(--footer-height);
  display: flex;
  justify-content: center;
  align-items: center;
}
.footer a {
  color: var(--color);
  text-decoration: none;
}
.footer a:hover {
  color: var(--brand-color-1);
}

.inline-code {
  color: #ff6700;
}

a {
  cursor: pointer;
  color: var(--color);
}
a:hover {
  color: var(--brand-color-1);
}

ol, ul {
  list-style: disc;
  padding-left: 1.25em;
}

.to-top {
  position: fixed;
  z-index: 1000000;
  right: 2em;
  bottom: calc(var(--footer-height) + 2em);
  width: 2em;
  height: 2em;
  padding: 0.25em;
  border-radius: 0.5em;
  /* 默认不显示，在scroll.js中控制显示 */
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background-color: var(--bg-color);
  transition: border 0.25s;
}
.to-top:hover {
  border: 1px solid var(--brand-color-1);
}
.to-top .icon {
  width: 100%;
  height: 100%;
  background-image: var(--to-top-icon-url);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

h1 {
  font-size: 1.8em;
  padding: 0.8em 0;
}

h2 {
  font-size: 1.6em;
  padding: 0.5em 0;
}

h3 {
  font-size: 1.5em;
  padding: 0.35em 0;
}

h4 {
  font-size: 1.3em;
  padding: 0.25em 0;
}

h5 {
  font-size: 1.2em;
  padding: 0.15em 0;
}

h6 {
  font-size: 1.1em;
  padding: 0.5em 0;
}