:root {
  --margin1-max-width-px: 800px;
  --margin1-max-width-pc: 96%;
  --chip-border-radius: 75px;
  --icon-width: min(7.2vw, 30px);
  --icon-height: calc(var(--icon-width) * 8 / 9);
  --button-width: calc(var(--icon-width) * 5 / 3);
  --button-height: calc(var(--icon-height) * 26 / 15);
  --default-chip-box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.4);
}

body {
  font-family: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  color: black;
  font-size: 20px;
  line-height: 1.5;
  background-color: #fffffc;
  padding-bottom: 1px;
}

.headings {
  display: flex !important;
  flex-flow: row wrap;
  align-items: center;
  margin-left: calc(
    (
        100% -
          min(
            60vw + 220px,
            var(--margin1-max-width-px),
            var(--margin1-max-width-pc)
          )
      ) / 2
  );
  padding-top: 1vw;
}

h1 {
  font-family: "moret", "Georgia", "Times New Roman", serif;
  font-weight: 300;
  font-style: normal;
  font-size: 58px;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 0;
  margin-right: clamp(0px, calc(81vw - 337px), 130px);
}

.preamble p:first-of-type {
  /* lead paragraph */
  margin-top: 10px;
}

.preamble p:last-of-type {
  margin-bottom: 0px;
}

.term {
  font-weight: bold;
}

.nowrap {
  white-space: nowrap;
}

@media (max-width: 265px) {
  .hexadecimal-triplets {
    white-space: normal;
  }
}

a:link {
  color: #003eaa;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
}
a:visited {
  color: #800080;
}
a:focus,
a:active {
  color: #2d1e80;
}

code,
dt,
.triplet-input {
  font-family: "Menlo", "droid-sans-mono", "Andale Mono", monospace;
  font-style: normal;
}

code {
  font-size: 19px;
}

.interactive {
  width: 230px;
  margin: 25px auto 30px;
}

.picker-io {
  width: 77%;
  min-width: fit-content;
  margin: 0px auto 8px auto;
  display: flex;
  flex-flow: row nowrap;
  justify-content: space-between;
  align-items: center;
  border: 2.25px solid black;
  border-radius: 100px;
  padding: 2.75% 3.25% 2.75% 5%;
  box-shadow: 0.5px 0.75px 10px 1px #bbbbbb;
  font-size: 28px;
}

/* .picker-io:has(.triplet-input:hover), */
.picker-io.hover {
  border-color: #808080;
}

/* .picker-io:has(.triplet-input:focus), */
.picker-io.focus {
  border-color: #2171ff;
}
/* .picker-io:has(.triplet-input:invalid), */
.picker-io.invalid {
  transition: border-color 350ms 150ms;
  border-color: #dd0000;
}

.triplet-input {
  background-color: transparent;
  font-size: 28px;
  width: 7ch;
  flex-shrink: 0;
  border-width: 0px;
  padding: 0px;
  outline: none;
  z-index: 9998;
}

.color-preview {
  --dimension: 42px;
  width: var(--dimension);
  height: var(--dimension);
  border-radius: 50%; /* circle */
  background-color: black;
  border: 1.75px solid black;
  z-index: 9998;
}

dt {
  font-size: 60px;
  overflow-wrap: break-word;
  line-height: 1;
  margin: 16px 0px;
}

.chip {
  margin: 55px auto;
  max-width: min(675px, 100%);
  width: calc(50vw + 220px);
  overflow: hidden;
  scroll-margin-top: 3vh;

  box-shadow: var(--default-chip-box-shadow);
  border-radius: var(--chip-border-radius);
  background: linear-gradient(to right, white, #efefef);
}

.chip:first-of-type {
  margin-top: 0px;
}

.margin1 {
  display: block;
  margin: 1em auto;
  max-width: min(var(--margin1-max-width-px), var(--margin1-max-width-pc));
  width: calc(60vw + 220px);
}

#pixel-art {
  display: block;
  width: calc(55vw + 200px);
}

.button-to-go-back-to-top {
  display: block;
  width: fit-content;
  height: var(--icon-height);
  padding: calc(var(--icon-height) * 2 / 5) calc(var(--icon-width) / 3)
    calc(var(--icon-height) / 3);
  background: #07063a;
  border-radius: 48%;

  position: sticky;
  top: calc(100vh - 3vw - var(--button-height)); /* fallback */
  top: calc(100dvh - 3vw - var(--button-height)); /* 3vw from bottom */
  left: calc(97vw - var(--button-width)); /* 3vw from right */
  z-index: 9999;
  -webkit-touch-callout: none;

  /*   filter: drop-shadow(0px 0px 4px #555555); */
  box-shadow: 0px 0px 7px rgba(0, 0, 0, 0.4);
  transition: all 200ms;
}

.button-to-go-back-to-top svg {
  width: 7.2vw;
  max-width: 30px;
  overflow: visible;
  vertical-align: top;
}

dl {
  padding: 40px calc(3% + 25px) 50px;
}
dl:first-child {
  margin-top: 0px;
}
dl:last-child {
  margin-bottom: 0px;
  padding-bottom: 57px;
}

dd {
  margin-top: 1em;
}

.pos,
.tense,
.credit {
  margin-left: 0px;
}

.pos,
.tense {
  font-style: italic;
}

.no-italics {
  font-style: normal;
}

.logo {
  width: 62px;
  height: calc(62px * 405 / 651);
  margin-right: 5px;
  vertical-align: bottom;
  filter: drop-shadow(0.5px 0.75px 3.5px #555555);
}

.copyright {
  font-size: 17px;
  margin: 35px auto 100px;
}

#accede {
  background-color: #accede;
}
#acceed {
  background-color: #acceed;
}
#babbed {
  background-color: #babbed;
}
#baccae {
  background-color: #baccae;
}
#badded {
  background-color: #badded;
}
#baffed {
  background-color: #baffed;
}
#beaded {
  background-color: #beaded;
}
#bedaff {
  background-color: #bedaff;
}
#bedded {
  background-color: #bedded;
}
#beefed {
  background-color: #beefed;
}
#cabbed {
  background-color: #cabbed;
}
#dabbed {
  background-color: #dabbed;
}
#dadded {
  background-color: #dadded;
}
#daffed {
  background-color: #daffed;
}
#deaced {
  background-color: #deaced;
}
#deaded {
  background-color: #deaded;
}
#deafed {
  background-color: #deafed;
}
#decade {
  background-color: #decade;
}
#decaff {
  background-color: #decaff;
}
#decede {
  background-color: #decede;
}
#deeded {
  background-color: #deeded;
}
#deface {
  background-color: #deface;
}
#efface {
  background-color: #efface;
}
#fabbed {
  background-color: #fabbed;
}
#facade {
  background-color: #facade;
}
#faffed {
  background-color: #faffed;
}
#feeded {
  background-color: #feeded;
}

#green {
  color: #3e2961;
}
#teal {
  color: #613361;
}
#cerulean {
  color: #133c55;
}
#blue {
  color: #3e1e39;
}
#purple {
  color: #3c1466;
}
#violet {
  color: #242c60;
}
#pink {
  color: #32386b;
}

/* animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .chip:target {
    animation: 1.2s cubic-bezier(0.86, 0, 0.52, 0.96) 0s 1 bump;
    /* delay is embedded in keyframes so
       as to disable hover effect while waiting */
  }

  @keyframes bump {
    from,
    41.67%,
    to {
      transform: scale(1);
      box-shadow: var(--default-chip-box-shadow);
    }
    70.83% {
      transform: scale(1.008);
      box-shadow: 0px 0px 28px rgba(0, 0, 0, 0.35);
    }
  }

  .chip:active {
    transition: all 100ms !important;
  }

  @media (hover: hover) {
    .chip {
      transition: all 500ms;
    }
    .chip:hover {
      transition: all 200ms;
    }

    .button-to-go-back-to-top:hover {
      transform: scale(1.05);
      box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4);
      /*       filter: drop-shadow(0px 0px 5.5px #555555); */
    }
  }
}

.button-to-go-back-to-top:active {
  transform: scale(0.97);
  transition: all 150ms;
  box-shadow: 0px 0px 3.5px rgba(0, 0, 0, 0.4);
  /*   filter: drop-shadow(0px 0px 2px #555555); */
}

button.glitchButtonElement:active {
  transform: scale(0.98);
  filter: drop-shadow(0px 0px 2.5px #777777);
  transition: all 200ms;
}
