:root{
  --text-color: hsl(200, 33%, 20%);
  --comment-color: hsl(200, 10%, 60%);
  --inline-code-color: hsl(200, 75%, 30%);
  --link-color: hsl(230, 45%, 40%);
  --link-color-translucent: hsla(230, 45%, 40%, 0.4);
  --hover-color: hsl(230, 45%, 60%);
  --hover-underline-color: hsla(230, 45%, 70%, 0.6);
  --code-underline-color: hsl(200, 70%, 45%);
  --code-hover-color: hsl(200, 55%, 55%);
  --code-hover-underline-color: hsl(200, 55%, 60%);;
  --background-color: hsl(322, 10%, 84%);
  --highlight-color: hsl(210, 14%, 95%);
  --guide-color-shade: hsl(200, 33%, 45%);
  --guide-color: hsl(200, 33%, 65%);
  --guide-color-tint: hsl(200, 33%, 85%);
  --code-color: hsl(0, 70%, 63%);
  --css-selector-color: hsl(0, 70%, 70%);
  --css-code-color: hsl(50, 70%, 43%);
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50vw;
  margin: auto;
  padding: 2rem;
  color: var(--text-color);
  background-color: var(--background-color);
  font-family: 'IBM Plex Serif', serif;
}
.split {
  display: grid;
  width: 50vw;
  grid-template-columns: 1fr 1fr;
  height: 25vw;
}

@media (max-width: 1112px) {
  body {
    width: 70vw;
  }
  .split {
    width: 70vw;
    height: 35vw;
  }
}
@media (max-width: 768px) {
  body {
    width: 90vw;
  }
  .split {
    width: 90vw;
    height: 45vw;
  }
}

#heading {
  margin: auto;
  text-align: center;
}
#heading h1 {
  margin-bottom: 0;
  padding-bottom: 0;
}
#heading h2 {
  margin-top: 0;
  padding-top: 0;
}
#contents ol {
  line-height: 1.25rem;
}
#contents a {
  border-bottom: 1px solid var(--link-color-translucent);
}
#contents a:hover {
  border-bottom: 2px solid var(--hover-underline-color);
}

.header-link-wrapper {
  margin-top: 3rem;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: baseline;
  padding: 1rem 0 0.5rem 0;
  border-bottom: 1px solid;
  position: relative;
}

h3.lesson, a.link-to-contents {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
}
a {
  color: var(--link-color);
  text-decoration: none;
  border-bottom: 1px solid;
  transition: 200ms;
}
a:hover {
  color: var(--hover-color);
  border-bottom: 2px solid var(--hover-underline-color);
}
.link-to-contents:hover::before {
  content: "back to Contents";
  font-size: 0.8rem;
  font-family: 'Fantasque Sans Mono', monospace;
  color: var(--code-color);
  background: var(--guide-color-tint);
  padding: 0.5rem;
  position: absolute;
  text-align: right;
  right: 1.5rem;
  top: 1.25rem;
  z-index: 1;
}
.chevron {
  width: 1rem;
  height: 1.25rem;
  padding-top: 0.5rem;
  margin: 0;
}

svg > .a1 {
  fill: var(--text-color);
}
svg > .a2 {
  fill: var(--highlight-color);
}
.link-to-contents:hover .a1 {
  fill: var(--code-color);
}
.link-to-contents:hover .a2 {
  fill: var(--css-selector-color);
}
.link-to-contents:hover {
  border-bottom: none;
}


hr {
  margin-bottom: 2rem;
}

code {
  color: var(--inline-code-color);
  font-size: 1.1rem;
  font-family: 'Fantasque Sans Mono', monospace;
}
a code {
  color: var(--guide-color-shade);
}
a:hover code {
  color: var(--code-hover-color);
}
.code-link {
  border-bottom: 1px solid var(--code-underline-color);
}
.code-link:hover {
  border-bottom: 2px solid var(--code-hover-underline-color);
}
h2 > code {
  font-size: 1.5rem;
  color: var(--text-color);
}
pre > code {
  font-size: 0.9rem;
  color: var(--guide-color-shade);
  line-height: 1.4rem;
}
pre > code > span {
  color: var(--text-color);
}
.css {
  color: var(--css-code-color);
}

pre > code > span.css > span {
   color: var(--css-selector-color);
}
.comment, pre > code > span.css > span.comment {
  color: var(--comment-color);
  font-style: italic;
}
pre {
  padding: 1.5rem;
  background-color: var(--highlight-color);
  border-radius: 2px;
  white-space: pre-wrap;
  word-wrap: break-word;
}
ul {
  line-height: 1.8rem;
}
.icon {
  width: 1.5rem;
}
svg {
  margin: 1rem 0;
  overflow: hidden;
}

.two-up {
  position: relative;
  width: 100%;
  height: 100%;
}
.absolute {
  position: absolute;
  width: 100%;
  height: 100%;
}
img {
  object-fit: contain;
}
figure {
  margin: auto;
}
.screenshot {
  max-width: 100%;
  box-shadow:
    0 0.7px 3.6px rgba(0, 0, 0, 0.056),
    0 2px 10px rgba(0, 0, 0, 0.08),
    0 4.8px 24.1px rgba(0, 0, 0, 0.104),
    0 16px 80px rgba(0, 0, 0, 0.16);
}

figcaption {
  text-align: center;
  padding: 1rem 0 2rem 0;
  margin: auto;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('./fonts/IBMPlexSerif-TextItalic.otf');
  font-style: italic;
  font-weight: normal;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('./fonts/IBMPlexSerif-Text.otf');
  font-style: normal;
  font-weight: normal;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('./fonts/IBMPlexSerif-BoldItalic.otf');
  font-style: italic;
  font-weight: bold;
}
@font-face {
  font-family: 'IBM Plex Serif';
  src: url('./fonts/IBMPlexSerif-Bold.otf');
  font-style: normal;
  font-weight: bold;
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  src: url('./fonts/FantasqueSansMono-Italic.otf');
  font-style: italic;
  font-weight: normal;
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  src: url('./fonts/FantasqueSansMono-Regular.otf');
  font-style: normal;
  font-weight: normal;
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  src: url('./fonts/FantasqueSansMono-BoldItalic.otf');
  font-style: italic;
  font-weight: bold;
}
@font-face {
  font-family: 'Fantasque Sans Mono';
  src: url('./fonts/FantasqueSansMono-Bold.otf');
  font-style: normal;
  font-weight: bold;
}
