:root {
  --background-color: #fff;
  --text-color: #222;
  --text-secondary-color: #5f5f5f;
  --link-color: #00e;
  --link-secondary-color: #60b;

  --mark-background-color: #fe0;
  --blockquote-border-color: rgba(0, 0, 0, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #222;
    --text-color: #efefef;
    --text-secondary-color: #cbcbcb;
    --link-color: #4589ee;
    --link-secondary-color: #cf7bff;

    --mark-background-color: #fe0;
    --blockquote-border-color: rgba(255, 255, 255, 0.9);
  }
}

/* *************** Post *************** */

.post {
  margin: 30px auto;
  padding: 0 7px;
  max-width: 800px;
}

.date {
  display: block;
  padding-top: 7px;
  font-style: italic;
  color: var(--text-secondary-color);
}

.post img {
  max-width: 100%;
}

pre {
  display: block;
  word-break: break-all;
  word-wrap: break-word;
  white-space: pre-wrap;
}

/* *************** ARCHIVE *************** */

@media only screen and (max-width: 750px) {
  .archive a:before {
    content: "\A";
    white-space: pre;
  }

  .archive {
    list-style: none;
    padding: 0;
    margin: 0;
  }
}

/* *************** PRISM *************** */

pre.line-numbers {
  padding-bottom: 5px;
  padding-top: 5px;
  margin: 0;
}

pre {
  overflow: auto;
  word-break: normal !important;
  word-wrap: normal !important;
  white-space: pre !important;
}

code:not([class*="language-"]) {
  border-radius: 3px;
  white-space: pre;
  padding: 0px 3px;
  font-size: 18px;
}

/*
New
*/

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 18px/1.6;
  line-height: 1.5rem;
}

code:not([class*="language-"]) {
  background: #eee;
  border-radius: 3px;
  white-space: pre;
  padding: 0px 3px;
  font-size: 0.833rem;
}

kbd {
  font-weight: bold;
}

.h1, .h2, .h3, h1, h2, h3, h4, h5, h6, th {
  font-weight: normal;
}

h1, .h1 {
  font-size: 2.488em;
}

h2, .h2 {
  font-size: 2.074em;
}

h3, .h3 {
  font-size: 1.728em;
}

h4 {
  font-size: 1.44em;
}

h5 {
  font-size: 1.2em;
}

h6 {
  font-size: 1em;
}

small {
  font-size: 0.833em;
}

.h1, .h2, .h3, h1, h2, h3 {
  line-height: 3rem;
}

.h1, .h2, .h3, p, ul, blockquote, h1, h2, h3, h4, h5, h6 {
  margin: 1.5rem 0 0;
}

body {
  color: var(--text-color);
  background-color: var(--background-color);
  margin: 1.5rem 1ch;
}

a, header nav a:visited {
  color: var(--link-color);
}

a:visited {
  color: var(--link-secondary-color);
}

mark {
  color: inherit;
  background-color: var(--mark-background-color);
}

.center, body>header {
  text-align: center;
}

.underline {
  text-decoration: underline;
}

main, body>footer {
  display: block;
  /* Just in case */
  max-width: 78ch;
  margin: auto;
}

main figure, main aside {
  float: right;
  margin: 1.5rem 0 0 1ch;
}

main aside {
  max-width: 26ch;
  border-width: 0 0 0 0.5ch;
  padding: 0 0 0 0.5ch;
}

blockquote {
  border: solid var(--blockquote-border-color);
  margin-right: 3ch;
  margin-left: 1.5ch;
  border-width: 0 0 0 0.5ch;
  padding: 0 0 0 1ch;
}

ul {
  padding: 0 0 0 3ch;
}

ul>li {
  list-style-type: disc;
}

nav ul {
  padding: 0;
  list-style-type: none;
}

nav ul li {
  display: inline;
  padding-left: 1ch;
  white-space: nowrap;
}

nav ul li:first-child {
  padding-left: 0;
}

a {
  text-decoration: none;
}

sup, sub {
  font-size: 0.75em;
  line-height: 1em;
}
