:root {
  --textColor: #515651;
  --backgroundColor: #f0fff0;
  --primaryColor: #E4F2E4;
}

::moz-selection {
  background-color: #D9E4D9;
}

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

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  font-size: clamp(16px, 2vw, 20px);
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 100%;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .0125em;
  line-height: 1.5;
  word-break: keep-all;
  color: var(--textColor);
  background-color: var(--backgroundColor);
  cursor: default;
}

a {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50svh;
  padding: 1.5rem;
  text-align: center;
}

.main {
  flex: 1 1 auto;
  margin-top: 50svh;
  scroll-margin-top: 3rem;
}

.footer {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 0 0 100svh;
  position: relative;
  padding: 3rem 1.5rem;
  text-align: center;
  background-color: var(--backgroundColor);
}

.container {
  position: relative;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
}

.section {
  padding: 0 .5rem;
}

.article {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: relative;
  padding: 3rem 1.5rem 6rem;
  border-radius: 1.5rem 1.5rem 0 0;
  background-color: var(--primaryColor);
}

@media screen and (min-width: 900px) {
  .article {
    padding: 3rem 3rem 6rem;
  }
}

.article::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 6rem;
  background-image: linear-gradient(to bottom, transparent, var(--backgroundColor));
}

.cards {
  display: flex;
  flex-direction: column;
  position: relative;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  position: sticky;
  top: 3rem;
  overflow: hidden;
  padding: 3rem 1.5rem;
  border-radius: 1.5rem 1.5rem 0 0;
  background-color: #E4F2E4;
  transition: background-color .25s ease-in-out;
}

@media screen and (min-width: 900px) {
  .card {
    padding: 3rem;
  }
}

.card::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3rem;
  background-image: linear-gradient(to bottom, transparent, var(--backgroundColor));
}

.share {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.share a {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: .5;
  transition: opacity .125s ease-in-out;
}

.share a:hover {
  opacity: 1;
}

.title {
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.content {
  position: relative;
  line-height: 1.625;
}

.content > *:not(:last-child) {
  margin-bottom: 1.5rem;
}

.content *:target {
  scroll-margin-top: 3rem;
}

.content h1,
.content h2 {
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
}

.content h2 a:hover::before {
  content: "#";
  display: inline-block;
  width: 1.5rem;
  margin-left: -1.5rem;
  color: #C2CAC2;
}

.content h2:not(:first-child) {
  margin-top: 3rem;
}

.content ul,
.content ol {
  margin-left: 1.5rem;
}

.content code {
  position: relative;
  padding: .125em .25em;
  font-family: monospace;
  font-size: .75rem;
  color: var(--backgroundColor);
  background-color: var(--textColor);
  border-radius: .25em;
}

.content pre {
  padding: .5rem;
  overflow-x: auto;
  border-radius: .25rem;
}

.content pre code {
  background-color: transparent;
}

.content hr {
  margin: 3rem 0 !important;
  color: inherit;
  border: 0;
}

.content hr::before {
  content: "* * *";
  display: block;
  position: relative;
  top: .125rem;
  text-align: center;
  color: inherit;
}

.footnote-reference a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #00000050;
  background-color: #00000010;
  width: 1.25em;
  height: 1.25em;
  border-radius: 50%;
  font-size: 75%;
  line-height: 1.5;
  text-align: center;
}

.footnotes {
  margin-top: 3rem;
  font-size: .875em;
}

.code {
  display: flex;
  width: auto;
  margin: 0 -1.5rem;
}

@media screen and (min-width: 900px) {
  .code {
    margin: 0 -3rem;
  }
}

.code:not(:first-child) {
  margin-top: 3rem;
}

.code:not(:last-child) {
  margin-bottom: 3rem;
}

.code > * {
  width: 50%;
  aspect-ratio: 1 / 1.5;
}

@media screen and (min-width: 900px) {
  .code > * {
    aspect-ratio: 1 / 1;
  }
}

.code > textarea,
.code > iframe {
  margin: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  resize: none;
}

.code > textarea {
  padding: .5rem;
  font: inherit;
  font-family: monospace;
  color: var(--backgroundColor);
  background-color: #00000075;
}

.code > iframe {
  background-color: white;
}
