:root {
  --color-primary: #605987;
  --color-secondary: #00B2AD;
  --color-body: #363534;
  --color-panel: #d8e0e4;
  --color-background: #fff;

  --content-width: 96rem;
  --border-radius: 0;
  --font-stack: 'Montserrat', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
}

.dark {
  color-scheme: dark;
}

*, *:after, *:before {
  box-sizing: inherit;
}
*::selection {
  background-color: var(--color-primary);
  color: var(--color-background);
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
}

body {
  margin: 0;
  font-size: 2em;
  line-height: 1.6;
  font-family: var(--font-stack);
  overflow-y: scroll;
  background-color: var(--color-background);
  color: var(--color-body);
}
main {
  font-size: 2.4rem;
}

hr {
  border: 0;
  border-top: .3rem solid var(--color-panel);
  margin-top: 4rem;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1;
}

h1 {
  font-size: 5rem;
  font-weight: normal;
}
h2 {
  font-size: 5rem;
}
h3 {
  font-size: 4rem;
  margin: 4rem 0;
}
h4 {
  margin: 2rem 0;
}
.margins {
  margin: 4rem 0;
}
@media screen and (min-width: 700px) {
  h1, h2 {
    font-size: 8rem;
  }
  h3 {
    font-size: 5rem;
  }
  nav {
    font-size: 3rem;
  }
}

a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: var(--font-weight-bold);
}

.wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.top {
  background: var(--color-body);
  font-size: 3rem;
}
.top .icon {
  width: 4rem;
  height: 4rem;
  margin-right: 1rem;
}
.top a {
  color: var(--color-background);
  display: flex;
  align-items: center;
}

.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.6rem;
  width: 100%;
}

header {
  position: relative;
  background: var(--color-primary);
  color: var(--color-background);
}
header .content {
  min-height: 50rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3rem;
}

nav {
  background-color: var(--color-panel);
  padding: 1rem 0;
}
nav form {
  display: flex;
  align-items: center;
}
nav form label {
  margin-right: auto;
}


.flex {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.flex-wrap { flex-wrap: wrap; }
.center { justify-content: center; }
.flex.last-right>*:last-child, .pull-right {
  margin-left: auto;
}
.flex > * {
  flex: 1 0;
}
.align-items-start { align-items: flex-start;}

.buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
  align-items: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
}

.tile {
  border-radius: var(--border-radius);
  min-height: 15rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  font-size: 1.2rem;
}

.border, .frame {
  border: .3rem solid var(--color-panel);
}
.frame {
  background-color: var(--color-background);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .4rem;
}

aside {
  background-color: var(--color-panel);
  border-radius: var(--border-radius);
  padding: 2rem 3rem;
  margin: 2rem 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}
aside > .button {
  flex: 1 0 auto;
}

.name {
  font-size: 120%;
  margin-right: auto;
}

.color {
  align-items: flex-start;
  font-size: 1.4rem;
}
.color > article {
  align-self: stretch;
  height: 10rem;
}

input, textarea, select {
  font-family: var(--font-stack);
  background-color: transparent;
  color: currentColor;
  border: 0;
  border-bottom: .3rem solid currentColor;
  padding: .8rem 1.6rem;
  font-size: 2.4rem;
}
button, .button {
  display: inline-block;
  font-size: 1em;
  font-family: var(--font-stack);
  font-weight: bold;
  background-color: var(--color-primary);
  border: .5rem solid var(--color-primary);
  color: var(--color-background);
  border-radius: var(--border-radius);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  padding: .4rem 1.4rem;
  outline: 0;
}
 button:hover, .button:hover {
  border-color: var(--color-body);
  background-color: var(--color-body);
}
*:focus {
  border-color: var(--color-body);
}


.hidden {
  display: none;
}


footer {
  max-width: var(--content-width);
  width: 100%;
  margin: auto auto 0;
  padding: 10rem 0 4rem;
}

.privacy {
  font-size: 1rem;
  column-count: 1;
  gap: 3rem;
  column-rule: .1rem solid var(--color-panel);
  opacity: 45%;
}
@media (min-width: 768px) {
  .privacy {
    column-count: 2;
  }
}
@media (min-width: 1024px) {
  .privacy {
    column-count: 3;
  }
}
.privacy p {
  margin: 0 0 .6rem;
}


#loading {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--color-bg-rgb), .6);
  z-index: 1000;
  font-size: 5rem;
}
#msg {
  display: none;
  position: fixed;
  left: 2rem;
  bottom: 2rem;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  background-color: var(--color-body);
  color: var(--color-background);
  z-index: 1001;
  max-width: 80%;
  text-wrap: wrap;
  cursor: pointer;
}

.canvas-wrapper, .canvas-wrapper > canvas {
  width: 100%;
  max-width: 32rem;
}
.canvas-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
}

*:disabled, .disabled {
  opacity: 45%;
  pointer-events: none;
  cursor: not-allowed;
}

code {
  font-family: monospace;
  font-size: 80%;
  background-color: var(--color-panel);
  padding: .4rem .6rem;
  border: .1rem solid currentColor;
  border-radius: var(--border-radius);
}

pre > code {
  display: block;
}

.center {
  text-align: center;
  justify-content: center;
}