* {
  box-sizing: border-box;
}

html {
  background-color: #111;
  color: #dba;
  padding: 0;
  font-family: "Fira Code", monospace, serif;
  scroll-padding-top: 200px;
}

body {
  padding: 0;
  margin: 0;
  line-height: 1.3;
}

pre {
  max-width: 100%;
  text-wrap: wrap;
}

a {
  color: #fff;
  cursor: pointer;
}

div {
  display: block;
}

div.topstick {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: min(40px, 5vw);
  background-color: #222;
  z-index: 1000;
}

div.hide {
  display: none;
}

div.content {
  margin: auto;
  padding-top: 20px;
  padding-bottom: 20vh;
  width: min(95vw, 1100px);
}

table {
  margin: 1em;
  border-collapse: collapse;
}

table.h th {
  text-align: right;
}

table td, table th {
  margin: 0;
  padding: 0.4em;
  border: 1px dotted #888;
}

form table td, form table th {
  border: 0;
}

img {
  margin: 10px;
  float: right;
  width: 400px;
  max-width: 40vw;
}

img.qr {
  filter: brightness(50%);
}

input,textarea,button {
  font-size: 1.1em;
  background-color: #000;
  color: #fff;
  padding: 0.5em;
  border-radius: 4px;
  border: 1px solid #888;
  display: block;
  margin-top: 3px;
  min-width: 400px;
}

form table input, form table textarea, form table button {
  min-width: 300px;
}

table.formtable {
  min-width: 400px;
  margin: 0;
}

table.formtable td {
  border: 0;
  padding: 0 0.2em 0 0.2em;
}

table.formtable form button {
  min-width: unset;
  width: 100%;
}

.topstick table {
  width: 100%;
  margin: 0;
}

.topstick table td, .topstick table th {
  border: 0;
  padding: 0 0.2em 0 0.2em;
}

.topstick button {
  min-width: 20vw;
  width: 100%;
}

input.flow {
  min-width: initial;
  width: initial;
  display: inline;
}

textarea {
  height: 6em;
}

a.tabhelp {
  width: 0;
  height: 0;
  display: inline-block;
  overflow: hidden;
}

a.tabhelp:focus {
  width: initial;
  height: initial;
  display: inline;
  overflow: initial;
}

div.box {
  display: block;
  border: 2px solid grey;
  background-color: #333;
  color: #ecb;
  margin: 2em 1em 2em 1em;
  padding: 0.5em 2em 1.5em 2em;
}

div.box.warn {
  border-color: #aa3;
  background-color: #441;
}

@media (max-width: 600px) {
  html {
    font-size: 9pt;
  }
  img {
    width: 100%;
  }
  input, textarea, button {
    display: block;
    margin-top: 3px;
    width: 100%;
    min-width: initial;
  }
  form table input, form table textarea, form table button {
    min-width: initial;
    width: 95%;
  }
  table.formtable, table.formtable form {
    width: 100%;
    min-width: initial;
  }
  form {
    max-width: 100%;
  }
  table {
    width: calc(100% - 2em);
  }
  textarea {
    width: 100%;
  }

  img.qr {
    display: none;
  }
}

@media (prefers-color-scheme: light) {
  a {
    color: #000;
  }
  html {
    background-color: #eee;
    color: #124;
  }
  div.topstick {
    background-color: #ccc;
  }
  input,textarea,button {
    background-color: #fff;
    color: #000;
  }
  div.box {
    background-color: #ccc;
    color: #013;
  }
  div.box.warn {
    border-color: #aa3;
    background-color: #ffa;
  }
  img.qr {
    filter: initial;
  }
}

