* {
  margin: 0;
}

html {
  font-size: 18px;
}

html, body {
  min-height: 100vh;
}

body {
  font-family: Charter, 'Source Han Serif SC VF', serif;
  width: 85vw;
  max-width: 33em;
  margin: 0 auto;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: sans-serif;
}

blockquote {
  margin-left: 3em;
}

a {
  text-decoration: none;
  color: #B85C5C;
}

main {
  margin-top: 4px;
  flex: 1;
}

p {
  margin: 1.2em auto;
}


p:lang(zh) {
  text-autospace: normal;
}

ul p, ol p {
  margin: 0.5em auto;
}

img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

#site-header {
  border-bottom: 4px black solid;
  text-align: right;
  padding: 4px 0;
}

#site-title {
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1em;
}

#site-title a {
  color: initial;
}

#site-nav ul {
  list-style: none;
  display: flex;
  justify-content: flex-end;
  gap: 0.25em;
}

#site-nav a {
  color: initial;
}

.active-nav::after {
  content: "°";
  font-weight: bold;

  @media speech {
    display: none;
  }
}

.post-main {
  display: flex;
  flex-direction: column;
}

.post-main article {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 1.2em;
}

.post-main article > p {
  margin: 0;
}

.post-header {
  margin-bottom: 2em;
}

.post-main .post-header {
  margin-bottom: 0.8em
}

.post-header a {
  text-decoration: none;
  color: initial;
}

.post-title {
  font-size: 1.111em;
}

#post-footer {
  margin-top: auto;
}

#post-nav {
  display: flex;
  flex-wrap: wrap;
  padding-top: 4em;
  gap: 1em;
}

#post-nav a {
  color: initial;
}

#next-post {
  margin-left: auto;
}

.paragraph-separator {
  border: 0;
  border-top: 4px double black;
  position: relative;
  overflow: visible;
  margin: 2.5em auto;
  width: 30%;
}

.paragraph-separator::after {
  color: black;
  content: "§";
  position: absolute;
  background-color: white;
  left: 50%;
  transform: translate(-50%, calc(-50% - 4px));
  padding: 4px;
}

.post-separator {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin: 2.5em;
  font-size: 1.5em;
}

.post-separator > div:nth-of-type(odd) {
  transform: rotate(180deg);
}

.separator {
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border: 0;
}

.separator.site-footer-separator {
  background-image: url('/assets/Dotted_crotchet_rest.svg');
  height: 21px;
  margin: 4em 0;
}

#site-footer {
  font-style: italic;
  padding-bottom: 1em;
  text-align: center;
}

.src-code {
  background-color: #F7F4F2;
  padding: 1em;
  border-radius: 1em;
  overflow: auto;
}

.level-1-heading {
  font-size: 1.055em;
}

.level-2-heading {
  font-size: 1em;
}

.level-3-heading {
  font-size: 0.944em;
}

#archive-post-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  list-style: none;
  column-gap: 1em;
  row-gap: 0.5em;
  padding: 0;
}

#archive-post-list a {
  color: initial;
}

#archive-post-list > p {
  grid-column: 1 / 3;
}

#archive-post-list > li {
  display: grid;
  grid-column: 1 / span 2;
  grid-template-columns: subgrid;
  align-items: center;
}

#archive-post-list > li > time {
  color: grey;
  font-size: 90%;
}

#archive-post-list > li:nth-of-type(odd) > time {
  grid-column: 1;
  text-align: right;
}

#archive-post-list > li:nth-of-type(odd) > a {
  grid-column: 2;
}

#archive-post-list > li:nth-of-type(even) > time {
  grid-column: 2;
  grid-row: 1;
}

#archive-post-list > li:nth-of-type(even) > a {
  grid-column: 1;
  grid-row: 1;
  text-align: right;
}

.text-center {
  text-align: center;
}

.color-initial {
  color: initial;
}

[id^="fn."] > p:nth-of-type(1) {
  display: inline;
}
