.highlight {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  code {
    color: #ddd;
  }

  .hljs-comment {
    color: #aaa;
  }
  .hljs-string,
  .hljs-number {
    color: #ccc;
  }
  .hljs-keyword {
    color: #aeb;
  }

  .hljs-attr,
  .hljs-title.class_ {
    color: #eeba8a;
  }
  .hljs-symbol,
  .hljs-name {
    color: #cee;
  }
  .hljs-title.function_ {
    color: #aff;
  }
  .hljs-params {
    color: revert-layer;
  }
}

* {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14pt;
  font-family: "Text Font";
  font-weight: 700;
}

body {
  box-sizing: border-box;
  font-size: 1rem;
  padding: 0;
  margin: 0;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-content: stretch;
  min-height: 100vh;
  background-image: url("/assets/images/bg1.png");
  background-color: #443628;
}

ul.kudos-list {
  list-style: none;
  a {
    text-decoration: none;
  }
  a > li::after {
    content: "⇗";
  }
  li {
    --glowy: #fc8;
    --inner-rad: 0.75em;
    display: inline-block;
    padding: 0 0.5em;
    background: #115;
    color: white;
    border-radius: 0.5em;
    border: 1px solid var(--glowy);
    box-shadow:
      0 0 0.5em var(--glowy),
      inset 0 0 var(--inner-rad) var(--glowy);
    transition:
      border 0.3s,
      box-shadow 0.3s;
  }
  li:hover {
    --glowy: #fe8;
    --inner-rad: 1em;
  }
}

@font-face {
  font-family: "Header Font";
  src: url("/assets/fonts/Bagnard.woff2");
}
@font-face {
  font-family: "Text Font";
  src: url("/assets/fonts/ResagokrLight.woff2");
}
@font-face {
  font-family: "Title Font";
  src: url("/assets/fonts/learning_curve.woff");
}
@font-face {
  font-family: "Self Aware";
  src: url("/assets/fonts/learning_curve.woff");
}
@font-face {
  font-family: "Cursive";
  src: url("/assets/fonts/learning_curve.woff");
}
@font-face {
  font-family: "Mono Font";
  src: url("/assets/fonts/DejaVuSansMono.woff2");
}
@font-face {
  font-family: "Megrim";
  src: url("/assets/fonts/Megrim.woff2");
}
@font-face {
  font-family: "Noto Symbols";
  src: url("/assets/fonts/NotoSansSymbols2-Regular.woff2");
}
.bagnard {
  font-family: "Header Font";
}

.megrim {
  font-family: "Megrim";
}

.resagokr {
  font-family: "Text Font";
}

.dejavu-sans-mono {
  font-family: "Mono Font";
}

.learning-curve {
  font-family: "Title Font";
}

.noto-symbols {
  font-family: "Noto Symbols";
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Header Font", Garamond, "Serif";
}
h1:before,
h2:before,
h3:before,
h4:before,
h5:before,
h6:before {
  color: black;
}

article {
  --side-margin: 2rem;
  font-family: "Text Font";
  /* display: flex; */
  flex-direction: column;
  padding: 1rem;
  width: 55rem;
  max-width: 100vw;
  margin: 1.5rem auto;
  border-radius: 0.5rem;
  box-shadow: 0 0 4rem 0.5rem black;
  flex-grow: 1;
  background: rgba(223, 214, 202, 0.9333333333);
}
article h1 {
  margin: 0;
  display: flex;
  align-items: center;
  font-size: 1.4rem;
}
article h1 div {
  flex: 0 0 auto;
}
article h1:before {
  content: "⁂";
  flex: 0 0 auto;
  width: var(--side-margin);
}
article sup {
  font-family: "Mono Font", monospace;
  font-size: 0.75rem;
}
article > ul > li + li,
article > ol > li + li {
  margin-top: 0.75rem;
}
article > ul li ol > li + li,
article > ul li ul > li + li,
article > ol li ol > li + li,
article > ol li ul > li + li {
  margin-top: 0.25rem;
}
article ul ol,
article ul ul,
article ol ol,
article ol ul {
  padding-left: revert-layer;
}
article > * {
  margin: 0 var(--side-margin);
}
article > * + * {
  margin-top: 0.75rem;
}
article > * + :is(h2, h3, h4, h5, h6) {
  margin-top: 1.5rem;
}
article > :is(h2, h3, h4, h5, h6) + * {
  margin-top: 0.25rem;
}
.blurb > ul,
.blurb > ol {
  margin-left: 1em;
}
article div.nest-list ul {
  padding-left: revert-layer;
}
article h2 {
  font-size: 1.15rem;
}
article h3 {
  font-size: 1rem;
}

@media (max-width: 600px) {
  article {
    --side-margin: 0;
  }
  article h1::before {
    content: unset;
  }
}
pre,
code {
  line-height: 1.25;
  font-size: 0.7rem;
  font-family: "Mono Font", monospace;
  font-weight: 400;
  border-radius: 0.45ch;
}

pre {
  background: rgba(26, 16, 57, 0.9333333333);
  padding: 1ch;
  overflow: auto;
}

figure {
  display: flex;
  flex-direction: column;
  gap: 0.75em;
  background: rgba(255, 255, 255, 0.3764705882);
  padding: 0.5rem;
  border-radius: 0.5rem;
}
figure figcaption {
  font-size: 0.75rem;
}

pre > code {
  color: #bbb;
  padding: 0;
  background: transparent;
}

code {
  background: #cfcfcf;
  padding: 0.11ch 0.66ch;
}

nav {
  display: flex;
  background: linear-gradient(black, transparent);
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 0.5rem;
  overflow: auto hidden;

  a {
    text-decoration: none;
  }
  #garbage-cycler {
    cursor: pointer;
    background-color: transparent;
    border-radius: 0;
    border: none;
    line-height: unset;
  }
  * {
    flex: 0 0 auto;
  }
  #home-holder,
  #lesser-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
  h2 {
    --anim-duration: 0.25s;
    font-size: 1.2rem;
    transition: color 0.25s;
    color: black;
    background-color: rgba(223, 214, 202, 0.9333333333);
    padding: 0.5rem 1rem;
    font-variant: small-caps;
    box-shadow: 0 0 1rem 0.1rem black;
    transition: border-radius var(--anim-duration);
  }
  h2:before {
    font-family: "Noto Symbols";
    transition: color var(--anim-duration);
    content: "🙚";
    color: #725e54;
  }
  h2:hover {
    border-radius: 1em;
  }
  h2:hover:before {
    color: black;
  }
  h1#absolute-home {
    color: #ccc;
    transition: color 0.25s;
    flex: 0 0 auto;
    font-family: "Title Font";
    font-size: 3rem;
    letter-spacing: -0.025em;
  }
  h1#absolute-home:after {
    content: " ↩";
    color: #ddd;
    font-weight: 1;
    font-size: 2rem;
    transition: color 1s;
  }
  h1#absolute-home:hover {
    color: #fff;
  }
  h1#absolute-home:hover:after {
    color: #aaf;
  }
}

nav,
footer {
  padding: 1rem;
  color: #eee;
}

footer {
  display: flex;
  flex-direction: column;
  background: linear-gradient(transparent, rgba(8, 0, 0, 0.8) 20%, black);
  font-size: 0.8rem;
  font-weight: 600;
  a:link {
    color: #ccf;
  }
  a:visited {
    color: #caf;
  }
}

table,
th,
td {
  padding: 0.5rem;
  border-spacing: 0ch;
  text-align: start;
}

th,
td {
  padding: 0.5rem;
}

table {
  background: #def;
}

th {
  background: #cb9;
  color: black;
  font-size: 1.5rem;
  font-variant: small-caps;
  border-spacing: 0.5rem;
}

tr:nth-child(2n) {
  background: #ccb;
}

.tag-title {
  display: block;
}

.cc-license-image {
  border-style: none;
  float: left;
  margin-right: 1ch;
  border-width: 0;
}

details {
  --border-color: black;
  background: rgba(255, 238, 204, 0.6666666667);
  border: 1px var(--border-color) solid;
  border-radius: 1rem;
  summary + * {
    margin-top: 0.25rem;
  }
  * + * {
    margin-top: 1rem;
  }
  ul,
  ol {
    margin-left: 1rem;
  }
  &[open] {
    padding: 0.25rem 1rem 0.5rem 1rem;
  }
  &[open] > summary {
    border-bottom: 1px var(--border-color) solid;
    padding: 0;
    padding-bottom: 0.25rem;
  }
  > summary {
    padding: 0.25rem 1rem;
  }

  &.info {
    --border-color: green;
  }

  &.warning {
    --border-color: orange;
  }
}

li ul,
li ol {
  margin-left: 2ch;
}

ul.bsl-tag-list {
  display: flex;
  flex: 2 0 0;
  flex-wrap: wrap;
  padding: 0;
  list-style-type: none;
  gap: 0.25ch 0.5ch;
  line-height: 1;
  justify-content: end;
}

.bsl-tag-link {
  text-decoration: none;
}

.bsl-tag {
  display: inline;
  font-size: 0.75rem;
  font-variant: small-caps;
  font-family: "Header Font";
  background: #bed6ee;
  border-radius: 0.125ch;
  padding: 0.25ch 0.5ch;
  color: #333;
  transition:
    background 0.5s,
    color 0.5s;
  word-break: keep-all;
}

.bsl-tag:hover,
.bsl-tag:focus,
.section-listing-tag:focus {
  background: Lavender;
  color: #003;
}

span.fun:hover,
span.fun:focus {
  color: black;
}

span.self-aware {
  font-family: "Self Aware";
  font-style: italic;
}

span.fun {
  box-shadow: 1rem black;
  background-image: radial-gradient(#cc0, #c00, #c0c, #00c, #0cc, #0c0);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: bold;
  transition: color 0.25s;
}

#preview-verify[open] {
  --anim-duration: 4s;
  --filter: opacity(0) blur(0) grayscale(0) brightness(1);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: none;
  border-radius: 1ch;
  margin: auto;
  padding: 1rem;
  background: rgba(223, 214, 202, 0.2);
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.968627451);
  transition:
    backdrop-filter var(--anim-duration) ease-in,
    opacity var(--anim-duration) ease-in;
  opacity: 0;
  backdrop-filter: var(--filter);
  -webkit-backdrop-filter: var(--filter);
  > :not(.show-when-closing) {
    display: none;
  }
  > .show-when-closing {
    display: inherit;
  }
  &.open {
    opacity: 1;
    --filter: opacity(1) blur(8px) grayscale(80%) brightness(1.5);
  }
  &.open .responses {
    display: flex;
    flex-direction: column;
    gap: 0.5ch;
  }
  &.open .responses > button {
    border: none;
    background: #443627;
    color: white;
    padding: 1ch;
    width: 100%;
  }
  &.open > :not(.show-when-closing) {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  &.open > .show-when-closing {
    display: none;
  }
}

.spacer {
  flex: 1 5 auto;
}

.smallcaps {
  font-variant: small-caps;
}

.marquee {
  overflow: clip;
  display: flex;
  transition: transform 0.5s linear;
}
.marquee > .spacer {
  flex: 0 0 auto;
  width: 8ch;
}
.marquee > .content {
  flex: 0 0 auto;
  width: 100%;
  min-width: max-content;
  animation: marquee 10s linear infinite;
}
.marquee.paused > .content {
  animation-play-state: paused;
}
.marquee.stopped {
  transform: translateY(-100%);
}

.now-playing {
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  background: black;
  color: white;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 8ch));
  }
}

.footnotes {
  border-top: 1px solid black;
}
.footnotes h2,
.footnotes > ol > li {
  margin-top: 1em;
}
.footnotes h2 > * + *,
.footnotes > ol > li > * + * {
  margin-top: 0.75rem;
}

img.icon {
  width: var(--icon-size);
  height: var(--icon-size);
  border-radius: var(--icon-size);
}

blockquote {
  font-family: "Cursive";
  font-size: 1.5rem;
  padding: 0 2rem;
}

div.toc {
  padding: 1em;
  ul {
    margin-left: 3ch;
  }
}

.blurb,
[role="tabpanel"].blurb {
  background:
    content-box top right no-repeat url("/assets/images/tldr.svg"),
    linear-gradient(#acf, #acf);
  background-size: contain;
}
