html {
  font-size: 16px;
  color: $dark;
  background-color: $light;
  font-family: $defaultFont;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: normal;
  margin: 0;
}

a {
  text-decoration-skip-ink: auto;
  color: $dark;
  text-decoration: underline;
  opacity: 0.8;

  &:hover {
    text-decoration: none;
    opacity: 1;
  }
}

.sic::after {
  content: " [sic]";
  font-style: italic;
}

.latex {
  display: inline !important;
}

pre {
  padding-left: 1em;
  border-left: 2px outset $dark;
  display: inline-block;
  max-width: 85%;
}

pre {
  overflow: hidden;
}

@media only screen and (min-width: 1024px) {
  pre {
    margin: 1em 2em;
  }
}

q.guillemets {
  quotes: "«" "»" "«" "»";
}

q,
blockquote {
  quotes: "‘" "’" "“" "”";
}

q::before {
  content: open-quote;
}

q::after {
  content: close-quote;
}

cite,
cite.book,
cite.film,
cite.tv-show,
cite.comic,
cite.book,
cite.podcast,
cite.album,
cite.report {
  font-style: italic;
}

cite.book--bible {
  font-style: inherit;
}

cite.legislation,
cite.smallcite,
cite.comic-strip,
cite.short-story,
cite.article,
cite.episode,
cite.video,
cite.chapter,
cite.software,
cite.campaign,
cite.song,
cite.speech,
cite.course,
cite.presentation {
  font-style: normal;
}

cite.smallcite::before,
cite.article::before,
cite.comic-strip::before,
cite.short-story::before,
cite.episode::before,
cite.video::before,
cite.chapter::before,
cite.song::before,
cite.poem::before,
cite.campaign::before,
cite.speech::before,
cite.course::before,
cite.presentation::before {
  content: "“";
}

cite.smallcite::after,
cite.article::after,
cite.comic-strip::after,
cite.short-story::after,
cite.episode::after,
cite.video::after,
cite.chapter::after,
cite.song::after,
cite.poem::after,
cite.campaign::after,
cite.speech::after,
cite.course::after,
cite.presentation::after {
  content: "”";
}

cite.article--shortcite::before,
cite.article--shortcite::after {
  content: none;
}

// Schema.org citations

cite,
.cite {
  font-style: italic;

  &[itemtype$="Code"],
  &[itemtype$="SocialMediaPosting"],
  &[itemtype$="SoftwareApplication"],
  &[itemtype$="WebSite"],
  &[itemtype$="WebContent"],
  &[itemtype$="CreativeWorkSeason"],
  &[itemtype$="PodcastSeason"],
  &[itemtype$="RadioSeason"],
  &[itemtype$="TVSeason"],
  &[itemtype$="CreativeWorkSeries"],
  &[itemtype$="BookSeries"],
  &[itemtype$="MovieSeries"],
  &[itemtype$="VideoGameSeries"],
  &[itemtype$="Legislation"],
  &--inherit {
    font-style: inherit;
  }

  &[itemtype$="Article"],
  &[itemtype$="BlogPosting"],
  &[itemtype$="NewsArticle"],
  &[itemtype$="AnalysisNewsArticle"],
  &[itemtype$="ReportageNewsArticle"],
  &[itemtype$="OpinionNewsArticle"],
  &[itemtype$="ScholarlyArticle"],
  &[itemtype$="TechArticle"],
  &[itemtype$="Chapter"],
  &[itemtype$="Clip"],
  &[itemtype$="MovieClip"],
  &[itemtype$="RadioClip"],
  &[itemtype$="TVClip"],
  &[itemtype$="VideoGameClip"],
  &[itemtype$="Comment"],
  &[itemtype$="Course"],
  &[itemtype$="DigitalDocument"],
  &[itemtype$="NoteDigitalDocument"],
  &[itemtype$="PresentationDigitalDocument"],
  &[itemtype$="TextDigitalDocument"],
  &[itemtype$="Episode"],
  &[itemtype$="PodcastEpisode"],
  &[itemtype$="RadioEpisode"],
  &[itemtype$="TVEpisode"],
  &[itemtype$="MusicRecording"],
  &[itemtype$="MusicComposition"],
  &[itemtype$="Message"],
  &--enquote {
    font-style: normal;

    &::before {
      content: "“";
    }

    &::after {
      content: "”";
    }
  }

  &--normal {
    font-style: normal !important;

    &::before {
      content: none !important;
    }

    &::after {
      content: none !important;
    }
  }
}

.episode-number,
.authors--addtional,
.year--original {
  font-size: 0.75em;
  opacity: 0.8;
}

code,
samp,
var,
pre {
  font-family: $codeFont;
  font-size: 1em;
}

pre .nocode {
  font-family: $defaultFont;
  font-size: 1em;
  padding: 1px 3px;
  border-radius: 6px;
  border: dashed 1px black;
}

code,
samp,
var {
  background-color: #d1d1d1;
  border-radius: 5px;
  padding: 2px;
}

pre {
  max-width: 50vw;
  overflow: scroll;
}

h1 code,
.post-title code,
pre code,
h1 samp,
.post-title samp,
pre samp,
h1 var,
.post-title var,
pre var {
  background-color: transparent;
  padding: 0;
}

.heading code,
.subheading code {
  background-color: transparent;
}

pre.prettyprint ol {
  padding-left: 3.5em;
}

pre.prettyprint li {
  background: none !important;
}

samp {
  display: block;
  width: 80ch;
  margin: 1em 4em;
  border-left: 2px solid #ccc;
  color: #333;
}

kbd {
  padding: 0.1em 0.6em;
  border: 1px solid #ccc;
  font-size: 11px;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f7f7f7;
  color: #333;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 2px white inset;
  border-radius: 3px;
  display: inline-block;
  margin: 0 0.1em;
  text-shadow: 0 1px 0 white;
  line-height: 1.4;
  white-space: nowrap;
}

/*
 *  Special Text
 */

:where([title]) {
  text-decoration: underline;
  text-decoration: underline dotted;
}
