/********** COLOR VARIABLES **********/
:root {
  /*text*/
  --text: #000;
  --link: #7ac2eb;
  --linkhover: #1a75ab;
  --redlink: #d62261;
  --header: #000;
  --boxheader: #000;

  /*borders and underlines*/
  --mainborder: #1a76ab7e;
  --boxborder: #1a76ab7e;
  --headerunderline: #1a76ab7e;

  /*backgrounds*/
  --bodybg: #f3dd93;
  --mainbg: #fff;
  --boxbg: #ededed;
  --boxheaderbg: #7ac2eb52;
  --sidebarlinkhoverbg: #ededed;
}
:root {
  --yellow: #f3dd93;
  --yellow-50: #f3dd9382;
  --orange: #ff9d62;
  --orange-25: #ff9e6242;
  --orange-75: #ff9e62b8;
  --pink: #f999ba;
  --green: #b3d084;
  --blue: #7ac2eb;
  --purple: #d6beea;
  --purple-med: #a061d3;
  --orange-med: #cc5200;
  --pink-med: #d62261;
  --green-med: #466e17;
  --blue-med: #1a75ab;
  --blue-med50: #1a76ab7e;
  --text-yo: #2c2543;
  --text-gp: #1b3b32;
  --text-by: #4a2834;
  --background: #fffdf6;
  --bgblue: #f4f7f6;
}
@font-face {
  font-family: "Mondwest";
  src: url("../fonts/PPMondwest-Regular.woff2");
}
@font-face {
  font-family: "NeueBit";
  src: url("../fonts/PPNeueBit-Bold.woff2");
}
@font-face {
  font-family: "VT";
  src: url("../fonts/VT323-Regular.woff2");
}
@font-face {
  font-family: "Rascal";
  src: url(".../fonts/RASCAL.woff2");
}
@font-face {
  font-family: "Sparkly";
  src: url("../fonts/Sparkly-x37m.woff2");
}
@font-face {
  font-family: "Risque";
  src: url("../fonts/Risque.woff2");
}
@font-face {
  font-family: "Loungy";
  src: url("../fonts/Loungy.woff2");
}
/********** BASIC STYLING **********/

body {
  background-color: var(--bodybg);
  color: var(--text);
  font-family: "VT", monospace;
  margin: 0;
  padding: 0;
}

a {
  color: var(--link);
  text-decoration: underline;
}
a:hover {
  color: var(--linkhover);
}

h1,
h2,
h3,
h4,
h5 {
  margin-top: 0;
}

h1,
h2 {
  color: var(--header);
  border-bottom: 2px solid var(--headerunderline);
  overflow: hidden;
  clear: left;
}

img {
  max-width: 100%;
}

/********** UTILITY CLASSES **********/

.text-center {
  text-align: center;
}

a.redlink {
  text-decoration: none;
  color: var(--redlink);
}
a.noline {
  text-decoration: none;
}
.big-text {
  font-size: large;
}

.clear-both {
  clear: both;
}

/********** GRID CONTAINER **********/

.container {
  display: grid;
  grid-template-columns: 200px auto;
  grid-template-rows: 1fr auto;
  grid-template-areas:
    "sidebar main"
    "footer footer";
  row-gap: 15px;
  column-gap: 15px;
  margin: 15px 0 0 0;
  min-height: Calc(100vh - 15px);
}

/********** SIDEBAR **********/

sidebar {
  grid-area: sidebar;
}

sidebar .logo-image {
  margin-bottom: 10px;
}

/***** sidebar navs *****/

sidebar nav {
  padding: 10px;
  background-color: var(--mainbg);
  margin-bottom: 10px;

  border-radius: 0 10px 10px 0;
  border: 2px solid var(--mainborder);
  border-left: none;
}

sidebar nav h2 {
  margin: 0 10px;
  font-size: 16pt;
}

sidebar nav ul {
  margin: 10px 5px 5px 5px;
  padding-left: 20px;
}

sidebar nav a {
  display: block;
  padding: 2px;
}

sidebar nav a:hover {
  background-color: var(--sidebarlinkhoverbg);
}

/********** MAIN **********/

main {
  grid-area: main;
  padding: 10px;
  background-color: var(--mainbg);

  border-radius: 10px 0 0 10px;
  border: 2px solid var(--mainborder);
  border-right: none;
}

/***** boxes *****/

.box-row {
  margin-bottom: 10px;
  display: flex;
  flex-direction: row;
  justify-content: stretch;
  column-gap: 10px;
}

.box {
  padding: 10px;
  background-color: var(--boxbg);
  flex: 1 1 0;

  border-radius: 10px;
  border: 2px solid var(--boxborder);
}

.box h1,
.box h2,
.box h3,
.box h4,
.box h5 {
  color: var(--boxheader);
  background-color: var(--boxheaderbg);
  padding: 5px;

  border-radius: 5px;
  border-bottom: none;
}

/***** box navs *****/

ul.box-nav {
  list-style-type: none;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 0;
}

ul.box-nav li {
  flex: 1 1 0;
}

ul.box-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/***** infobox *****/

table.infobox {
  background-color: var(--boxbg);
  padding: 2px;
  border: 2px solid var(--boxborder);
  width: 300px;

  float: right;
  margin-left: 10px;

  text-align: left;
}

table.infobox tbody {
  vertical-align: top;
}

table.infobox th[colspan="2"] {
  text-align: center;
}

.infobox h1,
.infobox h2,
.infobox h3,
.infobox h4,
.infobox h5 {
  border-bottom: none;
  background-color: var(--boxheaderbg);
  color: var(--boxheader);
  margin: 0;
}

table.infobox th {
  padding: 5px 10px 5px 0;
  text-align: right;
}
table.infobox td {
  padding: 5px 0 5px 0;
}
/***** changlog *****/
.changelog {
  font-size: larger;
  list-style: square;
}
/***** table of contents *****/

details.toc {
  background-color: var(--boxbg);
  padding: 5px 10px;
  margin-bottom: 10px;
  display: inline-block;

  border: 2px solid var(--boxborder);
}

details.toc ol {
  margin: 5px 0;
  counter-reset: index;
  list-style-type: none;
}

details.toc li::before {
  counter-increment: index;
  content: counters(index, ".", decimal) ". ";
}

/***** floating images *****/
figure.left-image,
figure.right-image {
  padding: 5px;
  margin: 0 0 5px 0;
  max-width: 253px;

  border: 2px solid var(--boxborder);
}

figure.left-image img,
figure.right-image img {
  max-width: 250px;

  border: 2px solid var(--boxborder);
}

figure.left-image {
  float: left;
  clear: left;
  margin-right: 10px;
}

figure.right-image {
  float: right;
  clear: right;
  margin-left: 10px;
}

/***** gallery *****/
.gallery {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 10px;
  margin-bottom: 10px;
  align-items: start;
}

figure.gallery-image {
  padding: 5px;
  border: 2px solid var(--boxborder);
  margin: 0;
}

figure.gallery-image img {
  border: 2px solid var(--boxborder);
  max-height: 200px;
}

figure.gallery-image figcaption {
  width: 0;
  min-width: 100%;
}
small {
  font-style: italic;
}

/***** notice boxes (for stubs, spoilers, etc) *****/

.notice {
  background-color: var(--boxbg);
  padding: 10px;
  margin: 0 auto 10px auto;

  display: inline-flex;
  flex-direction: row;
  align-items: center;

  border: 2px solid var(--boxborder);
}

.notice p {
  margin: 0 0 0 10px;
  font-style: italic;
}

/********** FOOTER **********/

footer {
  grid-area: footer;
  text-align: center;
  margin-bottom: 10px;
}

/********** MEDIUM/SMALL SCREENS **********/

@media (max-width: 1000px) {
  /*turn the grid into a column*/
  .container {
    display: flex;
    flex-direction: column;
    margin-top: 0;
    margin-bottom: 0;
    min-height: 100vh;
  }

  /*detach main from left side*/
  main {
    flex-grow: 1;
    margin: 0 10px;

    border-radius: 10px;
    border-right: 2px solid var(--mainborder);
  }

  /*hide logo image*/
  .logo-image {
    display: none;
  }

  /*make the sidebar navs horizontal*/
  sidebar nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;

    padding: 0;
    margin: 0;

    border-radius: 0;
    border-right: none;
    border-top: none;
  }

  sidebar nav h2 {
    border-bottom: none;
  }

  sidebar nav ul {
    list-style-type: none;
    margin: 10px 0 0 0;
    padding: 0;
    margin: 0;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    flex-grow: 1;
    justify-content: space-evenly;
  }

  sidebar nav a {
    padding: 4px;
    border-radius: 4px;
  }
}

/********** SMALL SCREENS **********/

@media (max-width: 576px) {
  /*make the sidebar nav headers appear above the links, for space*/
  sidebar nav {
    flex-direction: column;
  }

  /*make the sidebar nav links spread out a bit more*/
  sidebar nav ul {
    margin: 0;
    padding: 0;
    align-self: stretch;
  }

  /*make box rows vertical*/
  .box-row {
    flex-direction: column;
    row-gap: 10px;
  }

  /*unfloat a bunch of stuff*/
  table.infobox {
    float: none;
    width: 90%;
    margin: auto;
  }

  ul.box-nav li {
    flex: 0 0 50%;
    margin: 0 auto 10px auto;
  }

  figure.left-image,
  figure.right-image {
    float: none;
    display: block;
    margin: 0 auto 5px auto;
  }
}
/* TIMELINE */
.tlbox *,
.tlbox *::before,
.tlbox *::after {
  box-sizing: border-box;
}
.tlbox {
  margin: 0;
  font-family: "VT", monospace;
  inherits: false;
  width: 100%;
}
.timeline {
  position: relative;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 15px;
}
.timeline::after {
  content: "";
  position: absolute;
  width: 2px;
  background: var(--blue);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -1px;
}
.tainer {
  padding: 15px 30px;
  position: relative;
  background: inherit;
  width: 50%;
  display: block;
}
.tainer.left {
  left: 0;
}
.tainer.right {
  left: 50%;
}
.tainer::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: calc(50% - 8px);
  right: -8px;
  background: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 50%;
  z-index: 1;
}
.tainer.right::after {
  left: -8px;
}
.tainer::before {
  content: "";
  position: absolute;
  width: 50px;
  height: 2px;
  top: calc(50% - 1px);
  right: 8px;
  background: var(--blue);
  z-index: 1;
}
.tainer.right::before {
  left: 8px;
}
.tainer .date {
  position: absolute;
  display: inline-block;
  top: calc(50% - 8px);
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 1;
}
.tainer.left .date {
  right: -145px;
  text-align: right;
}
.tainer.right .date {
  left: -145px;
  text-align: left;
}
.tainer .icon {
  position: absolute;
  display: inline-block;
  width: 40px;
  height: 40px;
  padding: 9px 0;
  top: calc(50% - 20px);
  background: var(--yellow);
  border: 2px solid var(--blue);
  border-radius: 40px;
  text-align: center;
  font-size: 18px;
  color: var(--blue);
  z-index: 1;
}
.tainer.left .icon {
  right: 56px;
}

.tainer.right .icon {
  left: 56px;
}
.tainer .content {
  padding: 30px 90px 30px 30px;
  background: var(--yellow);
  position: relative;
  border-radius: 0 50px;
}
.tainer.right .content {
  padding: 30px 30px 30px 90px;
  border-radius: 50px 0;
}
.tainer .content h2 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: normal;
  color: var(--blue-med);
  text-decoration: none;
}
.tainer .content p {
  margin: 0;
  font-size: 16px;
  line-height: 22px;
  color: var(--text-by);
}
.fa {
  font-weight: 900;
}
.tainer:has(.fa-cake-candles) {
  display: none;
}
.tainer.keep-visible {
  display: block !important;
}
button {
  background-color: var(--yellow);
  color: var(--blue);
  font-family: "VT";
  border: 2px var(--blue) solid;
  border-radius: 15px;
  padding: 0px 5px;
}
