/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Set every element's box-sizing to border-box */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100vh;
}

/* end of CSS reset */

:root {
  --bg-col: #202c39;
  --bg-shadow-col: #18212b;
  --text-col: #f29559;
  --bg-col-light: #304252;
  --emph-col: #ccc39c;
  --emph-col-bg: #d8ceab;
  --link-col: #ffd000;
  --icon-shadow-col: #ece4c8;

  --button-margin: 8px;
  --button-padding: 8px;

  --content-margin: 0 16px 8px;

  --console-height: 60px;
  --console-padding: 16px;

  --diff-form-flex-direction: row;

  --diff-form-div-align-items: center;
  --diff-form-div-margin: 0 0 0 16px;

  --project-group-data-flex-direction: row;
  --project-group-data-reverse-flex-direction: row-reverse;
}

/* tablet size */
@media (max-width: 800px) {
  :root {
    --button-margin: 8px 4px;
    --button-padding: 4px;

    --console-height: 50px;
    --console-padding: 12px;

    --conway-size-inputs-div-display: flex;
    --conway-size-inputs-div-flex-direction: column;
    --conway-size-inputs-div-align-items: flex-start;

    --project-group-data-flex-direction: column-reverse;
    --project-group-data-reverse-flex-direction: column-reverse;
  }

  .desktop-only {
    display: none;
  }
}

/* mobile size */
@media (max-width: 500px) {
  :root {
    --content-margin: 0 0 8px;

    --console-height: 40px;
    --console-padding: 8px;

    --diff-form-flex-direction: column;
    --diff-form-align-items: flex-start;

    --diff-form-div-align-items: flex-start;
    --diff-form-div-margin: 0;
    --diff-form-div-width: 100%;
  }
}

.cursor-blink {
  animation-name: blink;
  animation-duration: 1s;
  animation-iteration-count: infinite;
  animation-timing-function: step-start;
}

.emph {
  color: var(--emph-col);
}

.ital {
  font-style: italic;
}

.highlight-red {
  color: red;
}

.highlight-green {
  color: green;
}

.highlight-yellow {
  color: yellow;
}

a,
.cmd {
  cursor: pointer;
  color: var(--link-col);
  text-decoration: unset;
}

a:hover,
.cmd:hover {
  text-decoration: underline;
}

li {
  list-style: square;
  list-style-position: outside;
  margin-left: 16px;
}

h1 {
  color: var(--emph-col);
  font-size: 1.4em;
  line-height: 1.4em;

  a {
    color: inherit;
  }
}

h2 {
  color: var(--emph-col);
  text-decoration: underline;
  line-height: 2em;
}

h3 {
  color: var(--emph-col);
  line-height: 2em;
}

input {
  min-width: 100px;
  outline: unset;
  background: var(--bg-col-light);
  color: unset;
  font: unset;
  border: none;
}

button {
  display: block;
  margin: var(--button-margin);
  padding: var(--button-padding);
  outline: unset;
  border: none;
  font: unset;
  background: var(--emph-col);
  color: var(--bg-col-light);
  font-weight: bold;
  cursor: pointer;
}
button:disabled {
  background: var(--bg-col-light);
  color: var(--emph-col);
}

.space {
  width: 16px;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  padding: 0 8px;
  font-family: courier, monospace;
  font-size: 16px;
  line-height: 1.2em;
  word-wrap: break-word;
  background: var(--bg-col);
  color: var(--text-col);
  min-width: 250px;
}

header {
  border-bottom: 1px dashed var(--emph-col);
  margin-bottom: 8px;
}
header h1 {
  text-align: center;
}

#content {
  flex-grow: 1;
  margin: var(--content-margin);
}

main {
  width: 90%;
  max-width: 1000px;
  margin: auto;
}

#console-form {
  display: flex;
  flex-direction: row;
  margin-bottom: 8px;
}

#console-form label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 20px 0 0 20px;
  background: var(--emph-col-bg);
  color: var(--bg-col-light);
  font-weight: bold;
}

#console-wrapper {
  flex-grow: 1;
  position: relative;
}

#console {
  border-radius: 0 20px 20px 0;
  width: 100%;
}

#console-form label,
#console {
  height: var(--console-height);
  padding-left: var(--console-padding);
  padding-right: var(--console-padding);
}

.autocomplete {
  position: absolute;
  z-index: 10;
  min-width: 200px;
  max-width: 100%;
  margin-top: 4px;
  background-color: var(--bg-col-light);
  border-radius: 4px;
}

.autocomplete li:first-child {
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.autocomplete li:last-child {
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.autocomplete li {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 8px 8px 8px var(--console-padding);
  list-style: none;
  cursor: pointer;
}

.option-value {
  font-weight: bold;
}

.option-description {
  color: var(--emph-col);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.option-selected {
  background-color: var(--bg-shadow-col);
}

.about-header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.about-header .img-container {
  position: relative;
  max-width: 360px;
}

.about-header .img-border {
  position: absolute;
  box-sizing: border-box;
  top: 8px;
  left: 8px;
  width: 100%;
  height: 100%;
  border: 4px dashed var(--emph-col);
}

.about-header img {
  position: relative;
  vertical-align: bottom;
  width: 100%;
}

.about-header pre {
  text-align: left;
}

.project-group-data {
  display: flex;
  gap: 8px;
  flex-direction: var(--project-group-data-flex-direction);
}

.project-group-data.row-reverse {
  flex-direction: var(--project-group-data-reverse-flex-direction);
}

.project-group-content {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 8px;
}

.project-group-details {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 8px;
}

.project-group-content img {
  width: 100%;
}

#diff-form {
  display: flex;
  justify-content: center;
  flex-direction: var(--diff-form-flex-direction);
  align-items: var(--diff-form-align-items);
}

#diff-form div {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  align-items: var(--diff-form-div-align-items);
  margin: var(--diff-form-div-margin);
  width: var(--diff-form-div-width);
}

#diff-form div:first-child {
  margin-left: 0;
}

#diff-form input {
  width: 100%;
  flex-grow: 1;
  height: 40px;
  padding: 0 8px;
}

#diff-output {
  color: var(--emph-col);
  text-align: center;
}

.diff-remove {
  background: red;
  margin: 0 4px;
}

.diff-insert {
  background: green;
  margin: 0 4px;
}

.diff-alter-a {
  background: red;
  margin-left: 4px;
}

.diff-alter-b {
  background: green;
  margin-right: 4px;
}

.conway-title {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: baseline;
}

.conway-title span {
  margin-left: 8px;
}

.conway h2 {
  text-align: center;
}

.conway h3 {
  text-align: center;
  color: var(--text-col);
  font-weight: bold;
}

.conway-presets {
  text-align: center;
}

.conway-presets,
.conway-controls {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}

.conway-size-inputs {
  display: flex;
  flex-direction: row;
  justify-content: center;
  flex-wrap: wrap;
}
.conway-size-inputs div {
  margin: 8px;
  display: var(--conway-size-inputs-div-display);
  flex-direction: var(--conway-size-inputs-div-flex-direction);
  align-items: var(--conway-size-inputs-div-align-items);
}

.conway-size-inputs label {
  margin-right: 8px;
}

#conway-size-form button {
  width: 200px;
  height: 30px;
  padding: 0;
  margin: auto;
}

.conway canvas {
  display: block;
  margin: auto;
}

.conway-about h2,
.conway-about h3 {
  text-align: center;
}
.conway-about ul {
  margin: 8px 0;
}

.help {
  text-align: center;
  font-size: 0.8em;
  font-style: italic;
  margin-bottom: 8px;
}
.help .short-border {
  width: 200px;
  padding: 0;
  margin: 8px auto;
  border-top: 1px dashed var(--emph-col);
}

.help p {
  display: inline-block;
}

footer {
  padding: 8px 0;
  border-top: 1px dashed var(--emph-col);
  text-align: center;
}
