body {
  font-family: 'Source Sans Pro', 'Arial', sans-serif;
  font-size: 1.2rem;
  margin: 0;
  padding: 0;
  border: none;
  background: #fdfdfd;
  min-width: fit-content;
}

h1, h2, h3, h4, th {
  margin: 0.3em;
  font-weight: normal;
}

h1 {
  font-size: 3.5vw;
}

ol, ul {
  margin: 0;
}

header {
  text-align: center;
  align-items: center;
}

nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  text-transform: uppercase;
  border-top: 2px solid black;
  border-bottom: 2px solid black;
  padding: 0;
}

nav a {
  text-decoration: none;
  color: #000;
  letter-spacing: 1px;
  padding: 0.8em 1.2em;
}

.current {
  background-color: #cfe1ff;
}

main {
  padding: 2em;
}

section {
  border: 1px solid rgb(194, 225, 249);
  background: rgb(246,251,255);
  margin-bottom: 2em;
}

h2 {
  margin: 0;
  padding: 0.3em 0.6em;
}

h3 {
  background: #ddd;
  margin: 0;
  padding: 0.2em 0.4em;
}

article {
  margin: 1.5em;
  background: #fff;
}

aside {
  margin-top: 1.5em;
  background: #fffee0;
}

article > div,
aside > div {
  padding: 0.5em 1em;
}

.title {
  border-bottom: 1px solid rgb(194, 225, 249);
}

.contentgrid {
  column-count: auto;
  column-width: 20em;
  column-gap: 1.5em;
  padding: 1em;
}

.contentgrid > div:first-child > :first-child {
  margin-top: 0;
}

.articlegrid {
  column-count: auto;
  column-width: 24em;
  column-gap: 1.5em;
  padding: 1.5em;
}

.articlegrid > article {
  margin: 0;
  margin-top: 1.5em;
}

.articlegrid > article:first-child {
  margin-top: 0;
}

.imagegrid {
  column-count: auto;
  column-width: 8em;
  column-gap: 0.5em;
  padding: 0.5em;
}

div, article, aside, table, figure {
  break-inside: avoid;
  max-width: 100%;
  max-height: 100%;
}

video {
  width: 100%;
  height: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  margin: 1em 0;
  text-align: center;
  font-size: 0.8em;
  caption-side: bottom;
  word-break: normal;
  hyphens: auto;
}

thead {
  background-color: #444;
  color: #fff;
  font-weight: normal;
}

tbody tr:nth-child(odd) {
  background-color: #f2f2f2;
}

tbody tr:nth-child(even) {
  background-color: #fff;
}

th, td {
  padding: 0.6em;
  border: 1px solid #ccc;
}

p, li {
  margin: 0.5em 0em;
}

figure {
  margin: 0.8em 0.8em;
}

img {
  width: 100%;
  height: auto;
  padding: 0.1em 0em;
}

textarea.answer {
  resize: none;
  overflow: hidden;
  min-height: 2lh;
  border: 1px solid #000;
}

input.answer {
  max-width: 20em;
  border: none;
  border-bottom: 1px solid #000;
}

.answer {
  background: transparent;
  font: inherit;
  padding: 0.1em;
  margin: 0.2em 0em;
}

div > .answer {
  width: 100%;
}

td > .answer {
  width: 100%;
}

@media (max-width: 600px) {
  .formgrid {
    column-count: 1;
    column-width: auto;
  }
  .entry {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 601px) {
  .formgrid {
    column-count: 1;
    column-width: auto;
  }
  .entry {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1025px) {
  .formgrid {
    column-count: 2;
    column-width: auto;
  }
  .entry {
    grid-template-columns: 1fr 1fr;
  }
}

.entry {
  margin: 0.7em;
  display: grid;
  gap: 1em;
  row-gap: 0;
  align-items: center;
}

.entry * {
  line-height: 1.5em;
  font: inherit;
  font-size: inherit;
}

.entry select {
  height: 1.5em;
}

.entry input {
  margin-bottom: 0.5em;
}

.entry label {
  margin-bottom: 0.5em;
}

.entry textarea {
  resize: vertical;
  min-height: 2lh;
}

.wide {
  grid-template-columns: 1fr;
  row-gap: 0;
  gap: 0;
}

form button {
  margin: 1.5em 0 1.5em 1.5em;
  padding: 0.5em 1.2em;
  border: 1px solid #000;
  font-size: inherit;
  font: inherit;
  background-color: #fff;
}

form button:active {
  background-color: #c0c0c0;
}

footer {
  padding: 0em 0.8em;
  font-size: 1.4em;
}

/* self destruction starts here */

textarea {
  max-height: 15lh;
}

h1 {
  background-image: url("/media/background.png");
  background-repeat: no-repeat;
  background-position: center left;
  background-size: 1.2em;
}

a:visited {
  color: #6a6a6a;
}

nav a:visited {
  color: #000;
}

.skip {
  border: 0;
  margin: 0;
  padding: 0;
}

.skip * {
  left: -10000px;
  top: 0px;
  position: absolute;
  overflow: hidden;
  background: #fff;
}

.skip a:focus {
  position: absolute;
  left: 0px;
  top: 0px;
}

header > div {
  position: relative;
  width: 100%;
}

#contrast-toggle {
  position: absolute;
  display: flex;
  top: 50%;
  transform: translateY(-50%);
  align-items: center;
  font-size: 1.5vw;
  right: 1em;
  height: auto;
}

#contrast-checkbox {
  cursor: pointer;
  margin: 0em 1.6em;
  width: 2vw;
  height: 2vw;
}

body.high-contrast {
  font-size: 150%;
}

.high-contrast * {
  background-color: #fff !important;
  color: #000 !important;
  accent-color: #000 !important;
}

.high-contrast section,
.high-contrast article,
.high-contrast aside,
.high-contrast tr,
.high-contrast th,
.high-contrast td {
  border: 1px solid #000 !important;
}

.high-contrast h2,
.high-contrast h3 {
  border-bottom: 1px solid #000 !important;
}

.high-contrast .title {
  border: 0 !important;
}

.high-contrast form input {
  border: 1px solid #000 !important;
}

.high-contrast form button:active {
  background-color: #f0f0f0 !important;
}

.high-contrast .current {
  background-color: #f0f0f0 !important;
}
