/* Some styling cribbed from krasjet.com */

html {
  font-size: 2.4vw;
  height: 100%;
  font-family: garibaldi, alegreya, palatino, serif;
}
@media all and (min-width: 960px) {
  html {
    font-size: 23px;
  }
}
@media all and (max-width: 715px) {
  html {
    font-size: 20px;
  }
  body {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}
@media print {
  html {
    font-size: 12pt;
  }
}

::selection {
  background-color: #c1feae;
}

body {
  background-color: #f9fffa;
  color: #222;
  font-size: 1rem;
  margin: 40px auto;
  max-width:700px;
  padding: 2.5rem 0.5rem;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;
  hyphens: auto;
}

.subtitle {
  font-size: 0.8rem;
}

.tags {
  list-style: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.tags li {
  float: left;
}

.tag {
  background: #eee;
  border-radius: 3px 0 0 3px;
  color: #999;
  display: inline-block;
  height: 26px;
  line-height: 26px;
  padding: 0 20px 0 23px;
  position: relative;
  margin: 0 10px 10px 0;
  text-decoration: none;
  transition: color 0.2s;
}

.tag::before {
  background: #f9fffa;
  border-radius: 10px;
  box-shadow: inset 0 1px rgba(0, 0, 0, 0.25);
  content: '';
  height: 6px;
  left: 10px;
  position: absolute;
  width: 6px;
  top: 10px;
}

.tag::after {
  background: #f9fffa;
  border-bottom: 13px solid transparent;
  border-left: 10px solid #eee;
  border-top: 13px solid transparent;
  content: '';
  position: absolute;
  right: 0;
  top: 0;
}

.tag:hover {
  background-color: #049d67;
  color: #fff;
}

.tag:hover::after {
   border-left-color: #049d67;
}

h1,h2,h3 {
  line-height:1.2
}

a {
  text-decoration: none;
  color: #049d67;
}
a:focus {
  outline-width: 2px;
  outline-style: dashed;
  outline-color: #00b374;
}
a:hover {
  text-decoration: underline;
}

p {
  line-height: 1.48;
}
p em {
  font-style: italic;
}

blockquote {
  font-style: italic;
  font-size: 0.95em;
  padding-left: 0.5rem;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}
blockquote p {
  margin-bottom: 0.5rem;
}

.mgnote::before {
  content: " (";
}
.mgnote::after {
  content: ")";
}
.mgnote.darkzone {
  display: none;
}
@media screen and (min-width: 1120px) {
  .mgnote {
    float: right;
    margin-right: -10.2rem;
    width: 7.7rem;
    font-size: 0.75rem;
    line-height: 1.32;
    border-left: 2px solid #00cf86;
    padding-left: 0.4rem;
    margin-top: 0.28rem;
  }
  .mgnote.left {
    float: left;
    margin-left: -10.7rem;
    margin-right: 0;
    border-left: none;
    padding-left: 0;
    border-right: 2px solid #00cf86;
    padding-right: 0.4rem;
    text-align: right;
  }
  .mgnote.darkzone {
    display: inherit;
    border-left: inherit;
  }
  .mgnote::before {
    content: "";
  }
  .mgnote::after {
    content: ".";
  }
  .mgnote.no-period::after {
    content: "";
  }
}

img {
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  display: block;
  border-radius: 20px;
  box-shadow: 5px 5px 5px gray;
}

pre {
  background-color: #f4f7f7;
  font-size: 0.86rem;
  padding: 0.5rem 1rem;
  overflow-x: auto;
  word-break: keep-all;
  border-radius: 0.4rem;
  box-shadow: 1px 1px 4px #d5d9d9;
  margin-bottom: 0.9rem;
}
pre ::selection {
  background-color: #dce0e0;
}
pre code {
  display: block;
}

code {
  font-family: "k.iosevka", "fira mono", monospace;
  font-size: 0.82em;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

div > code, li code, p code {
  font-weight: 500;
  font-size: 0.76em;
}

@media (prefers-color-scheme: dark) {
  body {
      color: #CCCCCC;
      background-color: #121212;
  }

  pre {
    background-color: #404040;
    box-shadow: none;
  }

  img {
    box-shadow: none;
  }

  .tag {
    background: #404040;
  }
  .tag::before {
    background: #121212;
  }
  .tag::after {
    background: #121212;
    border-bottom: 13px solid transparent;
    border-left: 10px solid #404040;
    border-top: 13px solid transparent;
  }
  .tag:hover {
    background-color: #049d67;
    color: #404040;
  }
  .tag:hover::after {
    border-left-color: #049d67;
 }
}
