@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&display=swap");

* {
  box-sizing: border-box;
}
:root {
  --bg: #1b1b1b;
  --bg-darker: #0e0e0e;
  --picker-bg: #080808;
  --fg: #d5d5d5;

  font-size: 16px;

  font-family: "IBM Plex Sans", sans-serif;
  font-optical-sizing: auto;
  font-style: normal;
  font-variation-settings: "wdth" 100;
}

html {
  /* Remove touch delay: */
  touch-action: manipulation;
}

body {
  background: var(--bg-darker);
  color: var(--fg);
}

html,
body {
  position: relative;
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
}

.site-header {
  width: 100%;
  height: 48px;
  min-height: 48px;
}

.site-header > div {
  height: 100%;
  width: 100%;
  max-width: 1280px;
  margin: auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 0px 46px;
}

a.title,
a.title:visited {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

a.title:hover,
a.title:active {
  text-decoration: none;
}

a.title:focus-visible {
  border-radius: 5px;
  outline: 2px solid #6687ed;
  outline-offset: 4px;
}

h1 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0px;
  padding: 0px;
  color: var(--fg);
}

.header-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-action,
.header-action:visited {
  height: 36px;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #b8b8b8;
  font: inherit;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.header-action:hover {
  background: #1c1c1c;
  color: #eeeeee;
  text-decoration: none;
}

.header-action:active {
  background: #303030;
  color: #ffffff;
  text-decoration: none;
}

.header-action:focus-visible {
  outline: 2px solid #6687ed;
  outline-offset: 2px;
}

div.about-image {
  background-color: currentColor;
  -webkit-mask: url("assets/info.svg") center / contain no-repeat;
  mask: url("assets/info.svg") center / contain no-repeat;
  opacity: 0.8;
  width: 24px;
  height: 24px;
}

div.fullscreen-image {
  background-color: currentColor;
  -webkit-mask: url("assets/fullscreen.svg") center / contain no-repeat;
  mask: url("assets/fullscreen.svg") center / contain no-repeat;
  opacity: 0.8;
  width: 24px;
  height: 24px;
}

.fullscreen-button[aria-pressed="true"] .fullscreen-image {
  -webkit-mask-image: url("assets/fullscreen-exit.svg");
  mask-image: url("assets/fullscreen-exit.svg");
}

a {
  color: #5077eb;
  text-decoration: none;
}
a:visited {
  color: #9352e1;
}
a:hover {
  text-decoration: underline;
}
a:active {
  text-decoration: underline;
}

div.canvas-wrapper {
  min-width: 0;
  min-height: 0;
  flex-grow: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

div.canvas-wrapper2 {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background-color: var(--bg);
}

main {
  display: block;
}

.picker {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  height: calc(100svh - 48px);
  min-height: 480px;
  background-color: var(--picker-bg);
}

.scroll-cue {
  position: absolute;
  z-index: 0;
  bottom: 12px;
  left: 48%;
  width: 44px;
  height: 44px;
  opacity: 1;
  transform: translateX(-50%);
}

.scroll-cue::before {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 16px;
  height: 16px;
  border-right: 2px solid #555555;
  border-bottom: 2px solid #555555;
  transform: translateX(-50%) rotate(45deg);
  transition: border-color 120ms ease;
  content: "";
}

.scroll-cue:hover::before,
.scroll-cue:focus-visible::before {
  border-color: #999999;
}

.scroll-cue:focus-visible {
  border-radius: 5px;
  outline: 2px solid #6687ed;
  outline-offset: -4px;
}

.content {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 32px 96px;
}

.content section + section {
  margin-top: 64px;
}

.content h2 {
  margin: 0 0 16px;
  color: #eeeeee;
  font-size: 1.5rem;
  line-height: 1.25;
}

.content h3 {
  margin: 0 0 8px;
  color: #eeeeee;
  font-size: 1.05rem;
  line-height: 1.35;
}

.content h2[id],
.content h3[id] {
  scroll-margin-top: 24px;
}

.heading-link,
.heading-link:visited {
  width: 1em;
  height: 1em;
  margin-left: 0.3em;
  display: inline-flex;
  vertical-align: -0.12em;
  color: #777777;
  text-decoration: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.content h2:hover > .heading-link,
.content h3:hover > .heading-link {
  opacity: 0.45;
}

.content h2:hover > .heading-link:hover,
.content h3:hover > .heading-link:hover,
.heading-link:focus-visible {
  color: #bbbbbb;
  text-decoration: none;
  opacity: 1;
}

.heading-link-icon {
  width: 100%;
  height: 100%;
  background: currentColor;
  -webkit-mask: url("assets/link.svg") center / contain no-repeat;
  mask: url("assets/link.svg") center / contain no-repeat;
}

.heading-link:focus-visible {
  border-radius: 2px;
  outline: 2px solid #6687ed;
  outline-offset: 2px;
}

.content p,
.content li {
  line-height: 1.65;
}

.content p {
  margin: 0;
}

.content p + p {
  margin-top: 12px;
}

.content ol,
.content ul {
  margin: 0;
  padding-left: 24px;
}

.content li + li {
  margin-top: 8px;
}

.content code {
  border-radius: 3px;
  background: #242424;
  padding: 2px 5px;
  color: #eeeeee;
  font-family: "IBM Plex Mono", monospace;
}

.format-list {
  list-style: none;
}

.content .format-list {
  margin-top: 10px;
  padding: 0;
}

.format-group {
  margin-top: 28px;
}

.content .format-group + .format-group {
  margin-top: 40px;
}

.format-list li {
  display: grid;
  grid-template-columns: 28px 200px minmax(0, 1fr);
  gap: 8px 16px;
  align-items: center;
  border-top: 1px solid #303030;
  padding: 12px 0;
}

.format-list li + li {
  margin-top: 0;
}

.css-format-list li {
  grid-template-columns: 28px 100px minmax(0, 1fr);
}

.format-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.format-list code {
  color: var(--format-color);
}

.color-swatch {
  width: 28px;
  height: 28px;
  border: 1px solid #ffffff80;
  border-radius: 4px;
  background: var(--format-color);
  box-shadow: 0 0 0 1px #00000060 inset;
}

.format-example {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.syntax-label {
  color: #9b9b9b;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.term-with-tooltip {
  position: relative;
  display: inline-block;
}

.term-trigger {
  padding: 0;
  border: 0;
  border-bottom: 1px dotted currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: help;
}

.term-trigger:hover,
.term-trigger:focus-visible {
  color: #eeeeee;
  border-bottom-style: solid;
}

.term-trigger:focus-visible {
  border-radius: 2px;
  outline: 2px solid #6687ed;
  outline-offset: 2px;
}

.term-tooltip {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 8px);
  left: 50%;
  width: 320px;
  padding: 10px 12px;
  border: 1px solid #444444;
  border-radius: 5px;
  background: #292929;
  box-shadow: 0 6px 18px #00000080;
  color: #eeeeee;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
  transform: translateX(-50%);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.term-tooltip-paragraph {
  display: block;
}

.term-tooltip-paragraph + .term-tooltip-paragraph {
  margin-top: 8px;
}

.term-trigger:hover + .term-tooltip,
.term-trigger:focus-visible + .term-tooltip {
  visibility: visible;
  opacity: 1;
}

.content-lede {
  max-width: 780px;
  font-size: 1.1rem;
}

.content .section-marker {
  margin-bottom: 32px;
  text-align: center;
  color: #777777;
  font-size: 1.1rem;
  font-weight: 500;
  /* letter-spacing: 0.04em; */
  text-transform: uppercase;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
}

.page-footer {
  border-top: 1px solid #303030;
  margin-top: 72px;
  padding-top: 24px;
  color: #a8a8a8;
  line-height: 1.6;
}

@media (min-width: 1000px) {
  div.canvas-wrapper2.small {
    max-width: 1300px;
    max-height: 920px;
    padding: 30px 20px 20px;
    border-radius: 10px;
  }
}
@media (min-width: 2000px) {
  div.canvas-wrapper2.small {
    max-width: 1560px;
    max-height: 1120px;
  }
}

@media (max-width: 999px) {
  button.fullscreen-button {
    visibility: hidden;
  }
}

@media (max-width: 700px) {
  .site-header > div {
    padding: 0 16px;
  }

  .header-links {
    gap: 12px;
  }

  .content {
    padding: 28px 20px 72px;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .format-list li {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .format-examples {
    grid-column: 2;
  }

  .term-tooltip {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    width: auto;
    transform: none;
  }
}

canvas {
  width: 100%;
  height: 100%;
}

.centered {
  margin-right: auto;
  margin-left: auto;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-family: Ubuntu-Light, Helvetica, sans-serif;
  text-align: center;
}

/* ---------------------------------------------- */
/* Loading animation from https://loading.io/css/ */
.lds-dual-ring {
  display: inline-block;
  width: 24px;
  height: 24px;
}

.lds-dual-ring:after {
  content: " ";
  display: block;
  width: 24px;
  height: 24px;
  margin: 0px;
  border-radius: 50%;
  border: 3px solid var(--fg);
  border-color: var(--fg) transparent var(--fg) transparent;
  animation: lds-dual-ring 1.2s linear infinite;
}

@keyframes lds-dual-ring {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
