html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: 100vw;
  padding-bottom: 200px;
}

[table-wrapper] {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  display: block;
  position: relative;
  overflow-x: scroll;
}

table {
  width: fit-content;
  border-collapse: collapse;
  border: none;
  align-self: center;
  display: block;
  max-width: -moz-fit-content;
  max-width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow-x: auto;
  white-space: nowrap;
  width: 100%;
  overflow: hidden;
  overflow-x: scroll;
}

table th, table td {
  border: 1px solid black;
  padding: 10px;
}

[image-wrapper] {
  width: 100%;
  overflow-x: scroll;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

[image-wrapper] img {
  margin: 0 auto;
}

a {
  font-family: "Roboto";
  text-rendering: optimizeLegibility;
  color: #02c195;
  font-weight: 400;
}

hr {
  border: none;
  border-bottom: 1px solid #d4d4d4;
  max-width: 90%;
  margin: 0 auto;
  justify-self: center;
  align-self: center;
  width: 100%;
}

ul {
  margin: 0;
}

dl[center] {
  margin: 0 auto !important;
}

mark[font] {
  background-color: unset;
  color: #0fffae;
}

html, body {
  background-color: #343941;
}

table th, table td {
  border: 1px solid #616161;
}

hr {
  border-bottom: 1px solid #696969;
}
/* ========================================================================= */
/* LATEX */
/* ========================================================================= */

[macro=equation][latex=block] {
  font-size: 1.5rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

[macro=equation][latex=inline] {
  font-size: 1rem;
}

[macro=equation] > mjx-container {
  margin: 10px 0 !important;
}
/* ========================================================================= */
/* LAYOUT */
/* ========================================================================= */

[macro=layout] {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  width: 100%;
  column-gap: 8px;
  row-gap: 8px;
  padding: 0 10px;
}

[macro=note] {
  display: flex;
  flex-direction: column;
  align-items: normal;
  grid-row-gap: 12px;
  overflow: hidden;
  padding: 12px 0;
}

[macro=note][compact] {
  grid-row-gap: 8px;
}

[macro=note][compact] p {
  padding-top: 0;
  padding-bottom: 0;
}

[macro=note][compact] mjx-container.MathJax {
  margin: 0 !important;
}

[macro=layout][compact] [macro=note] {
  grid-row-gap: 0px;
  padding-top: 15px 10px;
}

[macro=layout][compact] [macro=note] p {
  padding-top: 0;
  padding-bottom: 0;
}

[macro=layout][compact] > [macro=equation] > mjx-container.MathJax {
  margin: 0 !important;
  padding: 10px;
}

[macro=layout][boxed] > [macro=note] {
  border-radius: 3px;
  border-color: #fff;
  box-shadow: 0 0 0px 1px #eeeeee;
}

[macro=layout][boxed] > [macro=equation] {
  border-radius: 3px;
  border-color: #fff;
  box-shadow: 0 0 0px 1px #eeeeee;
}
@media (min-width: 800px) {
  [macro=layout] {
    display: grid;
  }
  [macro=layout][columns="2"] {
    grid-template-columns: repeat(2, 1fr);
  }
  [macro=layout][columns="3"] {
    grid-template-columns: repeat(3, 1fr);
  }
  [macro=layout][columns="4"] {
    grid-template-columns: repeat(4, 1fr);
  }
  [macro=layout] > [macro=note] img {
    min-width: unset !important;
  }
}

[macro=note] h1,
[macro=note] h2,
[macro=note] h3,
[macro=note] h4,
[macro=note] h5,
[macro=note] h6 {
  margin: 0;
  margin-left: 12px;
}

[macro=note] h1 {
  font-size: 3rem;
}

[macro=note] h2 {
  font-size: 2.6rem;
}

[macro=note] h3 {
  font-size: 2.2rem;
}

[macro=note] h4 {
  font-size: 1.8rem;
}

[macro=note] h5 {
  font-size: 1.4rem;
}

[macro=note] h6 {
  font-size: 1.2rem;
}
@media (max-width: 650px) {
  [macro=note] h1 {
    font-size: 2rem;
  }
  [macro=note] h2 {
    font-size: 1.8rem;
  }
  [macro=note] h3 {
    font-size: 1.6rem;
  }
  [macro=note] h4 {
    font-size: 1.4rem;
  }
  [macro=note] h5 {
    font-size: 1.2rem;
  }
  [macro=note] h6 {
    font-size: 1rem;
  }
}

[macro=note] h1:first-child,
[macro=note] h2:first-child,
[macro=note] h3:first-child,
[macro=note] h4:first-child,
[macro=note] h5:first-child,
[macro=note] h6:first-child {
  text-align: center;
  margin: 8px auto;
  font-weight: 800;
}

[macro=layout] > h1,
[macro=layout] > h2,
[macro=layout] > h3,
[macro=layout] > h4,
[macro=layout] > h5,
[macro=layout] > h6 {
  text-align: center;
  margin: 8px auto;
}

[macro=note] p {
  text-align: justify;
}

[macro=note] ul {
  padding-left: 18px;
}

[macro=note] ul > li {
  padding-left: 0;
}

[macro=layout] [macro=layout] [latex=block] {
  font-size: 1.5rem;
}

[macro=equation] {
  font-size: 2.5rem;
}

[macro=note][small] p,
[macro=note][small] h1,
[macro=note][small] h2,
[macro=note][small] h3,
[macro=note][small] h4,
[macro=note][small] h5,
[macro=note][small] h6,
[macro=note][small] [macro=equation] {
  font-size: smaller;
}

[macro=note] table {
  margin: 0 auto;
  width: fit-content;
}
@media (min-width: 650px) {
  [macro=note] {
    padding: 10px;
  }
  [macro=note] [macro=note] {
    padding: 5px;
  }
}

[macro=layout][boxed] > [macro=note] {
  box-shadow: 0px 0px 1px 1px #655f65;
}

[macro=layout][boxed] > [macro=equation] {
  box-shadow: 0px 0px 1px 1px #655f65;
}

[macro=equation] {
  color: #ffb7e4;
}

[macro=tex] {
  color: #ffb7e4;
}

main {
  overflow-x: hidden;
}

main > h1,
main > h2,
main > h3,
main > h4,
main > h5,
main > h6 {
  font-family: "Sail", cursive;
  width: 100%;
  padding: 8px 20px;
  border-bottom: 1px solid #444;
  margin: 0;
  margin-bottom: 10px;
}

main > h1[top-level] {
  text-align: center;
  border-bottom: 2px solid #a5a5a5;
  border-top: 2px solid #a5a5a5;
  font-size: 3.8rem;
}

main > h1 {
  padding-left: 10px;
  font-size: 3.8rem;
}

main > h2 {
  padding-left: 20px;
  font-size: 3.4rem;
}

main > h3 {
  padding-left: 40px;
  font-size: 3rem;
}

main > h4 {
  padding-left: 60px;
  font-size: 2.8rem;
}

main > h5 {
  padding-left: 80px;
  font-size: 2.2rem;
}

main > h6 {
  padding-left: 100px;
  font-size: 2rem;
}
@media (max-width: 650px) {
  main > h1[top-level] {
    font-size: 2.8rem;
  }
  main > h1 {
    padding-left: 0px;
    font-size: 2.8rem;
  }
  main > h2 {
    padding-left: 20px;
    font-size: 2.4rem;
  }
  main > h3 {
    padding-left: 40px;
    font-size: 2.2rem;
  }
  main > h4 {
    padding-left: 60px;
    font-size: 1.8rem;
  }
  main > h5 {
    padding-left: 80px;
    font-size: 1.4rem;
  }
  main > h6 {
    padding-left: 100px;
    font-size: 1.2rem;
  }
}
@media (max-width: 800px) {
  main > h1,
main > h2,
main > h3,
main > h4,
main > h5,
main > h6 {
    max-width: unset;
  }
  main > h1 {
    padding-left: 0px;
  }
  main > h2 {
    padding-left: 10px;
  }
  main > h3 {
    padding-left: 20px;
  }
  main > h4 {
    padding-left: 30px;
  }
  main > h5 {
    padding-left: 40px;
  }
  main > h6 {
    padding-left: 50px;
  }
}

main > [macro=layout]:last-child {
  margin-bottom: 1px;
}
@media (max-width: 900px) {
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Playfair Display", serif;
  text-align: left;
  text-rendering: optimizeLegibility;
  hyphens: auto;
}

h1 {
  font-size: 3.5em;
  font-weight: 700;
  color: #303233;
}

h2 {
  font-size: 3em;
  font-weight: 700;
  color: #303233;
}

h3 {
  font-size: 2.5em;
  color: #32403f;
  font-weight: 400;
}

h4 {
  font-size: 2em;
  color: #32403f;
  font-weight: 100;
}

h5 {
  font-size: 1.8em;
  color: #32403f;
  font-weight: 100;
}

h6 {
  font-size: 1.4em;
  color: #32403f;
  font-weight: 100;
}
@media (max-width: 900px) {
  h1, h2, h3, h4, h5, h6 {
    max-width: unset;
  }
  h1 {
    font-size: 2.5em;
  }
  h2 {
    font-size: 2em;
  }
  h3 {
    font-size: 1.6em;
  }
  h4 {
    font-size: 1.2em;
  }
  h5 {
    font-size: 1em;
  }
  h6 {
    font-size: 0.8em;
  }
}

dl, ul, ol {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}

p, a {
  font-family: "Source Sans Pro", sans-serif;
  text-rendering: optimizeLegibility;
  hyphens: auto;
}

pre {
  font-family: "Source Code Pro", monospace;
  text-rendering: optimizeLegibility;
}

p {
  margin: 0;
  padding: 12px 20px;
}

p[center] {
  text-align: center;
}

p[justify] {
  text-align: justify;
}

li, dt, dd, th, td {
  font-family: "Source Code Pro", monospace;
  text-rendering: optimizeLegibility;
  text-align: justify;
  hyphens: auto;
  padding: 0 10px;
}

li p, dt p, dd p, th p, td p {
  margin: 0;
  padding: 0;
}

li > *, li > p {
  margin-bottom: 4px;
}

li > *:last-child, li > p:last-child {
  margin-bottom: 0;
}

li, dd {
  margin-bottom: 4px;
}

li:last-child,
dd:last-child {
  margin-bottom: 0;
}
@media (min-width: 800px) {
  p[justify] {
    margin: 0 auto;
  }
}
@media (max-width: 800px) {
  p {
    margin: 0;
    padding: 10px 8px;
  }
}

h1, h2, h3, h4, h5, h6, p, dl, dd, dt, ul, ol, th, td {
  color: #dec3c3;
}
/* ========================================================================= */
/* PAGE-NAV */
/* ========================================================================= */

[toc] > h1[page-title] {
  font-size: 2em;
  padding: 5px 0;
  margin: 0;
  font-family: "Dancing Script", cursive;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
  border-bottom: 1px solid #a5a5a5;
  border-top: 1px solid #a5a5a5;
  margin-bottom: 20px;
}

[toc] > ul[macro=page-nav] {
  list-style: none;
  padding-bottom: 20px;
  max-width: 90%;
  margin: 0 auto;
  font-family: "Yomogi", cursive;
}

[toc] > ul[macro=page-nav] > li {
  font-size: 1.5rem;
  text-align: left;
}

[toc] > ul[macro=page-nav] > li > a {
  text-decoration: none;
}

[toc] > ul[macro=page-nav] > li,
[toc] > ul[macro=page-nav] > li > a {
  color: #dba4f9;
  font-family: "Yomogi", cursive;
}
/* SUB-SECTIONS */

[toc] > ul[macro=page-nav] ul {
  list-style: none;
  padding-bottom: 20px;
}

[toc] > ul[macro=page-nav] ul > li {
  font-size: 1.5rem;
  text-align: left;
  font-family: "Yomogi", cursive;
}

[toc] > ul[macro=page-nav] ul > li > a {
  text-decoration: none;
}

[toc] > ul[macro=page-nav] ul > li,
[toc] > ul[macro=page-nav] ul > li > a {
  color: #dba4f9;
  font-family: "Yomogi", cursive;
}
/* ========================================================================= */
/* TOC */
/* ========================================================================= */

[toc] {
  padding: 12px;
  border-radius: 3px;
  overflow: hidden;
}

[toc] > header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

[toc] > h1[site-title] {
  font-family: "Sail", cursive;
  text-align: center;
}

[toc] > h1[site-title] > span[date] {
  font-family: monospace;
  font-weight: 100;
  margin-left: 20px;
  border: 1px solid #929292;
  padding: 8px;
  border-radius: 3px;
  color: #b3b3b3;
}

[toc] > h1[toc-title] {
  font-size: 2em;
  padding: 5px 0;
  margin: 0;
  font-family: "Dancing Script", cursive;
  text-align: center;
  max-width: 90%;
  margin: 0 auto;
  border-bottom: 1px solid #a5a5a5;
  border-top: 1px solid #a5a5a5;
  margin-bottom: 20px;
}
@media (max-width: 650px) {
  [toc] > h1[site-title] {
    display: flex;
    flex-direction: column;
  }
}

[macro=toc] {
  list-style: none;
  margin-bottom: 0;
}

[macro=toc] {
  max-width: 90%;
  margin: 0 auto;
}

[macro=toc] > li, [macro=toc] > li a {
  font-family: "Yomogi", cursive;
  color: #e10286;
}

[macro=toc] > li {
  font-size: 1.5rem;
  text-align: left;
}

[macro=toc] > li a {
  text-decoration: none;
}

ul[macro=toc] > li[for=h1][top-level]:not(:first-child) {
  margin-top: 10px;
}

[macro=toc] > li[for=h1][top-level] {
  margin-left: 0;
  border-bottom: 1px solid #a5a5a5;
  border-top: 1px solid #a5a5a5;
  width: 100%;
  padding: 2px 0px;
  text-align: center;
}

[macro=toc] > li[for=h1]:not([top-level]) {
  margin-left: 15;
}

[macro=toc] > li[for=h2] {
  margin-left: 30px;
}

[macro=toc] > li[for=h3] {
  margin-left: 60px;
}

[macro=toc] > li[for=h4] {
  margin-left: 90px;
}

[macro=toc] > li[for=h5] {
  margin-left: 120px;
}

[macro=toc] > li[for=h6] {
  margin-left: 150px;
}
@media (max-width: 900px) {
  [macro=toc] > li[for=h1][top-level] {
    margin-left: 0;
  }
  [macro=toc] > li[for=h1]:not([top-level]) {
    margin-left: 0;
  }
  [macro=toc] > li[for=h2] {
    margin-left: 10px;
  }
  [macro=toc] > li[for=h3] {
    margin-left: 15px;
  }
  [macro=toc] > li[for=h4] {
    margin-left: 20px;
  }
  [macro=toc] > li[for=h5] {
    margin-left: 25px;
  }
  [macro=toc] > li[for=h6] {
    margin-left: 30px;
  }
}

[macro=toc] > li, [macro=toc] > li a {
  color: #dba4f9;
}
