:root {
  --mouse-y: 0;
}
body {
  background:var(--background);
  color: var(--text);
  font-family: "Open Sans", "segoe ui", helvetica, arial, sans-serif;
  font-size: calc(.5em + 1vw);
  margin: 0;
}
article {
  padding: 0 2em;
  max-width: 40em;
  margin: 0 auto;
}

h1 {
  font-size: 3vmax;
  font-family: Pacifico,sans-serif;
  font-weight: normal;
  color: var(--h1colour);
}
.index h1 {
  font-family: "Pacifico", sans-serif;
  font-size: max(5vmax, 14px);
  margin: 0;
  padding: 0;
  font-weight: normal;
  color: var(--h1colour);
}
h2 {
  font-size: 1.2em;
  font-weight: normal;
  color: var(--h2colour);
  margin: 0 0 0.5em 0;
}
.back {
  text-align: right;
}
.back a {
  color: var(--link);
  text-decoration: none;
  padding: .2em .5em;
  border: 1px solid var(--link);
  display: inline-block;
  font-size: 1.2em;
  background-image: linear-gradient(to right,var(--tagbackground),var(--headershadow));
  background-size: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 400ms;
}
.back a:hover {
  background-size: 100% 100%;
  transition: background-size 400ms;
}

footer {
  font-size: .8em;
  padding: 1em 2em;
  margin-top: 5em;
  color: var(--footercolour);
  background: var(--footerbackground);
  border-top: 1px solid var(--footershadow);
}
footer a {
  color: var(--footerlink);
}

.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
div#snippets {
  display:flex;
  flex-direction: column;  
}
#snippets li {
  display: flex;
  padding: .2em 0;
}
#snippets li.hidden {
  display: none;
}
ul#snippets {
  margin: 1em 0;
  padding: 0; 
}
@media (min-width:30em) {
  .multicolumn {
    column-count: 2;
  }
}
#snippets li > a {
  display:block;
  padding: .2em .5em;
  line-height: 1.1;
  flex: 7;
  color: var(--link);
  text-decoration: none;
  font-size: .9em;
}
#snippets li:hover,#snippets li:focus-within {
  background: var(--link);
  transition: 400ms;
}
#snippets li:focus-within a, #snippets li:focus-within svg, 
#snippets li:hover a, #snippets li:hover svg {
  color: var(--background);
  stroke: var(--background);
}
button.copy {
  flex: 1;
  font-family: inherit;
  background: transparent;
  border: none;
  text-align: center;
  color: var(--text);
  font-size: 0.9em;
  flex-grow: 0;
  cursor: pointer;
}
div#snippets {
  position: relative;
}
div#snippets button.copy {
  position: absolute;
  top: 1em;
  right: .5em;
}
button.copytext {
  padding: .2em .5em;
  align-self: self-end;
  font-family: inherit;
  background: transparent;
  border: none;
  text-align: center;
  color: var(--text);
  font-size: 0.9em;
  cursor: pointer;
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  border: 1px solid var(--codeborder);
  border: 1px 1px 0 1px;
}
button.copy svg {
  width: 1.5em;
  height: 1.5em;
  stroke: var(--link);
}
figure {
  margin: 0;
  padding: 0;
}
.highlight {
  color: var(--codetext);
  background: var(--codebackground);;
  border: 1px var(--codeborder) solid;
  border-radius: 3px;
  padding: .5em;
}
.highlight .highlight {
  border: none;
  padding: 0;
}
div.highlight {
  padding: 0 .5em;
  overflow: scroll;
}
ol li code {
  color: var(--codetext);
  display: inline-block;
  background: var(--codebackground);;
  border: 1px var(--codeborder) solid;
  border-radius: 3px;
  padding: 2px;
}
p a {
  color: var(--link);
}
output.popup {
  position: fixed;
  top: -20em;
  left: 50%;
  transform: translateX(-50%);
  padding: .5em 1em;
  background: #000;
  color: #fff;
  border: 2px solid #fff;
  transition: 400ms;
  border-radius: .5em;
}
.copied output.popup { 
  top: calc(calc(var(--mouse-y) * 1px) - 2em)
}
.threecol {
  display: flex;
  gap: 1em;
  margin: 2em 0;
  flex-wrap: wrap;
}
.threecol > div {
  flex: 1;
  min-width: 10em;
  background: var(--infoboxbackground);
  color: var(--infoboxtext);
}
.threecol h2 {
  font-family: pacifico, cursive;
  margin: 0 0 .2em 0;
  background: var(--background);
  padding: .2em;
  border-bottom: 2px solid var(--infoboxborder);
}
.threecol > div:hover h2 {
  margin-top: -.2em;
  transition: 400ms;
  padding-bottom: .4em;
}


.threecol a {
  color: var(--infoboxlink);
}
.threecol p {
  padding:.2em .5em;
  line-height: 1.3;
  margin-top: 0;
}
#tags {
  margin: 1em 0;
}
#tags button {
  display: inline-block;
  margin: 0 .5em .5em 0;
  background:var(--tagbackground);
  color: var(--tagbutton);
  font-size: 1em;
  cursor: pointer;
  border: 1px solid var(--tagborder);
  padding: 2px 5px;
  border-radius: 5px;
} 