:root {
  --gray-f4: #f4f4f4;
  --gray-ddd: #ddd;
  --gray-aaa: #aaa;
  --gray-666: #666;
  --gray-444: #444;

  --space-xs: 0.36em;
  --space-sm: 0.6em;
  --space-md: 0.9em;
  /* 40 matches offset in traingle.cljs */
  --space-40: 40px;

  --transition-fast: 90ms;
  --transition-medium: 180ms;
}
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}
::selection {
  background: none;
  color: inherit;
}
body {
  font-family: monospace;
  color: var(--gray-aaa);
  font-size: 0.84em;
  letter-spacing: 0.02em;
}
#app {
  display: flex;
  flex-direction: column;
  height: 100%;
}
p {
  margin: 0.8em 0 0.8em;
}
a {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}
a:hover {
  color: var(--gray-666);
}
a.box-button {
  border: 1px solid var(--gray-ddd);
  padding: var(--space-sm) var(--space-md);
}
a.box-button:hover {
  border: 1px solid var(--gray-aaa);
}
a.box-button-left {
  margin-right: var(--space-sm);
}
a.box-button-right {
  margin-left: var(--space-sm);
}
a.inactive {
  cursor: not-allowed;
  opacity: 0.6;
}
a.box-button.inactive:hover {
  color: inherit;
  border: 1px solid var(--gray-ddd);
}

div.header {
  padding-left: 2.5%;
  padding-right: 2.5%;
  height: var(--space-40);
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: black;
  cursor: default;
}
div.footer {
  height: var(--space-40);
  flex-shrink: 0;
}
div.switcher {
  display: inline-block;
}
div.switcher a {
  /* color: var(--gray-aaa); */
}
div.switcher a:hover {
  /* color: var(--gray-666); */
}
div.switcher a.is-active {
  color: var(--gray-444);
}
div.switcher a.is-active:hover {
  color: var(--gray-444);
  cursor: default;
}
div.inc-dec {
  display: inline-block;
  margin-right: var(--space-sm);
}
div.controls {
  position: absolute;
  bottom: 0;
  left: 2.5%;
  height: var(--space-40);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

div.meta {
  position: absolute;
  top: 0;
  right: 2.5%;
  height: var(--space-40);
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: default;
}
@media (min-width: 768px) {
  div.meta {
    top: auto;
    bottom: 0;
  }
}

div.canvas-container {
  position: relative;
  flex: 1;
  width: 95%;
  margin-left: auto;
  margin-right: auto;
}
div.canvas-inner-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}
canvas {
  max-height: 100%;
  max-width: 100% !important;
  background: var(--gray-f4);
}

.hamburger {
  position: absolute;
  bottom: 0;
  right: 0;
  padding: 0 var(--space-sm);
  cursor: pointer;
}
@media (min-width: 768px) {
  .hamburger {
    top: 0;
    bottom: auto;
    padding: var(--space-xs) var(--space-sm);
  }
}
.hamburger svg {
  padding: var(--space-xs);
  width: 26px;
  overflow: initial;
  transition: all var(--transition-medium);
  fill: black;
}
.hamburger.is-nav-active svg {
  fill: white;
}
@media (min-width: 768px) {
  .hamburger svg {
    width: 30px;
  }
}
.hamburger:hover svg {
  transform: rotate(-20deg);
}
.is-nav-active .hamburger {
  background: none;
}
.is-nav-active .hamburger svg {
  fill: white;
}

.nav-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: black;
  color: white;
  pointer-events: none;
  opacity: 0;
  transition: all var(--transition-medium);

  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.nav-container.is-nav-active {
  opacity: 1;
  pointer-events: auto;
}

div.nav {
  padding-right: 40px;
  padding-bottom: 40px;
  margin: 0 auto;
  max-width: 300px;
}
div.nav a {
  display: block;
  padding: var(--space-sm);
  font-size: 1.2em;
}
div.nav a:hover {
  /* color: var(--gray-666); */
}
div.nav a.is-active {
  color: var(--gray-444);
}
div.nav a.is-active:hover {
  color: var(--gray-444);
  cursor: default;
}
