/** {
  border: solid red 1px;
}*/

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: sans-serif;
  color: #222;
  margin: 0;
  padding: 0;
  background-color: #fffff8;
  display: flex;
  flex-flow: column nowrap;
  justify-content: center;
  align-items: stretch;
}
body * { font-size: 12pt; }

@font-face {
  font-family: "titlefont";
  src: url("../fonts/RaspberryCake.ttf");
}

a {
  color: #06d;
  text-decoration: none;
  padding: 2px;
}
a:visited { color: #82b; }
a:hover, a:focus {
  background-color: #2af;
  color: #000;
}

#errmsg {
  color: red;
}


header {
  border-bottom: solid rgba(127,127,127,0.3) 1px;
  padding: 10px;
}

header h1, header h1 a {
  margin: 0;
  font-size: 24pt;
}
.logo, #logo {
  height: 30pt;
  aspect-ratio: 1/1;
  vertical-align: middle;
}
.logo:hover { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(-270deg); } }
.logoname { font-family: titlefont; }

header, header h2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-weight: 400;
}




main {
  flex-grow: 10;
}




#headerlinks {
  display: flex;
  flex-flow: row nowrap;
  align-content: center;
  gap: 7px;
  align-items: flex-end;
}
#headerlinks > * {
  border: solid #888 1px;
  background-color: #ea5;
  color: black;
  padding: 5px 7px 5px 7px;
  border-radius: 10px;
  transition: border-radius 0.15s;
}
#headerlinks > *:hover, #headerlinks > *:focus {
  border-radius: 0;
}

.tog {
  cursor: pointer;
  font-style: italic;
  color: #88AFFF;
}
tog:hover::after, .tog:focus::after { content: " ►"; }

/* for the hamburger menu */
.hamburger {
  position: relative;
  display: none;
  width: 1.5em;
  height: 0.8em;
  margin-top: 0.5em;
  margin-right: 0.5em;
  border-top: 0.2em solid #6cf;
  border-bottom: 0.2em solid #28c;
}
.hamburger::before {
  content: "";
  position: absolute;
  top: 0.3em;
  left: 0px;
  width: 100%;
  border-top: 0.2em solid #4ae;
}
.hamburger:hover::after, .hamburger:focus::after { content:""; }


#infoarea {
  text-align: center;
  position: fixed;
  top: 10px;
  left: 0;
  right: 0;
  margin: 0 auto;
  max-width: 50%;
  max-height: 50%;
  overflow-y: scroll;
  z-index: 1;
}
.infobox {
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: flex-start;
  border: solid orange 2px;
}
.infocontent {
  flex-grow: 2;
  overflow-x: wrap;
}
.infocontent * {
  display: initial;
  text-align: center;
}
.infobox * {
  margin: 2px;
}



fieldset {
  border: solid #888 1px;
}
legend {
  color: #888;
}

label,legend {
  font-size: 11pt;
}

input, textarea, button, select {
  font-size: 13pt;
  font-family: sans-serif;
}


table {
  border-collapse: collapse;
}
td, th {
  border: solid #888 1px;
  padding: 3px;
}
td {
  white-space: nowrap;
}

input[type=number] { max-width: 10ch; -moz-appearance: textfield; }

footer {
  margin-top: 40px;
  margin: 40px auto 10px auto;
  color: #888;
  font-size: 9pt;
  text-align: center;
}


@media screen and (max-width: 640px) {
  .hamburger {display: inline-block;}

  header {
    align-items: flex-start;
  }


  #headerlinkswrap {
    display: none;
    padding-top: 5px;
  }

  #headerlinks {
    gap: 0px;
    text-align: right;
    flex-direction: column;
    align-items: stretch;
  }
  #headerlinks > * {
    font-size: 14pt;
    border-radius: 0;
  }

  #infoarea {
    max-width: 75%;
  }
  
}


@media (prefers-color-scheme: dark) {
  html, body, .infobox {
    color: #ddd;
    background-color: #222;
  }

  a { color: #2af; }
  a:visited { color: #a4c; }
  a:hover, a:focus { color: initial; }
}
