@font-face {
  font-family: "Unscii16";
  src: url("../fonts/unscii-16.woff") format("woff"),
       url("../fonts/unscii-16.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PixelifySans";
  src: url("../fonts/pixelify-sans-bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-family: "Unscii16", "Courier New", monospace;
  --font-family-title: "PixelifySans", "Unscii16", "Courier New", monospace;
  --line-height: 1.45rem;
  --border-thickness: 2px;
  --text-color: #ffecd6;
  --text-color-alt: #ffd4a3;
  --background-color: #0d2b45;
  --background-color-alt: #203c56;
  --surface-1: transparent;
  --surface-2: transparent;
  --accent-1: #ffecd6;
  --accent-2: #ffd4a3;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-color: #ffecd6;
    --text-color-alt: #ffd4a3;
    --background-color: #0d2b45;
    --background-color-alt: #203c56;
  }
}

html {
  background: var(--background-color);
}

body {
  background: transparent;
  border-left: var(--border-thickness) solid var(--text-color);
  border-right: var(--border-thickness) solid var(--text-color);
  box-shadow: none;
  position: relative;
  margin: 0;
  min-height: 100vh;
}

a {
  color: var(--accent-2);
  text-decoration-color: var(--accent-2);
}

a:hover {
  color: var(--accent-1);
  text-decoration-color: var(--accent-1);
}

.hero {
  border: var(--border-thickness) solid var(--text-color);
  padding: calc(var(--line-height) * 1.2) 2ch;
  background: transparent;
  box-shadow: none;
  margin-top: calc(var(--line-height) * 7);
}

.hero-title {
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 32px;
  line-height: 32px;
  margin: calc(var(--line-height) * 1.25) 0 var(--line-height);
  text-transform: uppercase;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: none;
  font-smooth: never;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.lead {
  font-size: 1.1rem;
}

.hero-quote {
  margin: 0 0 var(--line-height);
  font-size: 0.95rem;
  color: var(--text-color-alt);
}

.hero-quote__source {
  display: inline-block;
  margin-left: 1ch;
  color: var(--text-color);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: var(--line-height);
}

.tag {
  border: var(--border-thickness) solid var(--text-color);
  padding: 0.2rem 0.6rem;
  background: transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.toc {
  margin-top: calc(var(--line-height) * 1.5);
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(22ch, 1fr));
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.toc a {
  border: var(--border-thickness) solid var(--text-color);
  padding: 0.4rem 0.6rem;
  background: transparent;
  text-decoration: none;
  display: inline-flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  min-height: calc(var(--line-height) * 2.2);
  height: 100%;
}

.toc a span {
  color: var(--text-color-alt);
}

.sections {
  display: grid;
  gap: calc(var(--line-height) * 1.5);
  margin-top: calc(var(--line-height) * 2);
}

.section {
  border: var(--border-thickness) solid var(--text-color);
  padding: calc(var(--line-height) * 1.2) 2ch;
  background: transparent;
  position: relative;
  animation: fade-up 0.7s ease both;
}

.section:nth-of-type(1) { animation-delay: 0.05s; }
.section:nth-of-type(2) { animation-delay: 0.12s; }
.section:nth-of-type(3) { animation-delay: 0.19s; }
.section:nth-of-type(4) { animation-delay: 0.26s; }
.section:nth-of-type(5) { animation-delay: 0.33s; }
.section:nth-of-type(6) { animation-delay: 0.4s; }
.section:nth-of-type(7) { animation-delay: 0.47s; }

.fact-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.fact {
  position: relative;
  padding-left: 0;
  border-top: var(--border-thickness) dashed var(--text-color-alt);
  padding-top: var(--line-height);
  padding-bottom: var(--line-height);
}

.fact:first-child {
  border-top: none;
  padding-top: 0;
}

.fact p {
  margin: 0;
}

.fact p + p {
  margin-top: var(--line-height);
}

.fact-choice {
  margin-top: calc(var(--line-height) * 0.6);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  align-items: center;
}

.fact-pick {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-color-alt);
  cursor: pointer;
  font: inherit;
  text-transform: uppercase;
  letter-spacing: inherit;
  text-decoration: none;
}

.fact-pick[aria-pressed="true"] {
  color: var(--text-color);
  text-decoration: none;
}

.fact-pick:hover {
  color: var(--text-color);
  text-decoration: underline;
  text-decoration-thickness: var(--border-thickness);
  text-decoration-color: currentColor;
}

.fact-reveal {
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.fact.is-revealed.is-wrong .fact-reveal {
  color: var(--text-color-alt);
}

.footer {
  margin-top: calc(var(--line-height) * 2);
  padding-top: var(--line-height);
  border-top: var(--border-thickness) solid var(--text-color);
  text-transform: uppercase;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

#pixel-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  image-rendering: pixelated;
  mix-blend-mode: normal;
  opacity: 1;
}

#vector-field-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  z-index: -1;
  pointer-events: none;
  mix-blend-mode: normal;
  opacity: 1;
  touch-action: none;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section {
    animation: none;
  }
}

@media screen and (max-width: 700px) {
  .hero {
    margin-top: calc(var(--line-height) * 3);
  }
  .hero-quote {
    font-size: 0.8rem;
  }
  .toc {
    grid-template-columns: 1fr;
  }
  .footer {
    flex-direction: column;
  }
}
