:root {
  --primary: #645fff;
  --success: #28a745;
  --warning: #df7d00;
  --danger: #c21235;
  --info: #17a2b8;
  --purple: #8545ff;
  --orange: #ffa71a;
  --blue: #2f81f7;

  @media (prefers-color-scheme: dark) {
    color-scheme: dark;
    --text-header: rgb(250, 250, 255);
    --text-body: rgb(220, 220, 225);
    --link: #8885ff;
    --bg-0: #0f0f0f;
    --bg-1: #151515;
    --bg-2: #1a1a1a;
  }

  @media (prefers-color-scheme: light) {
    color-scheme: light;
    --text-header: rgb(0, 0, 5);
    --text-body: rgb(30, 30, 35);
    --link: #423cff;
    --bg-0: #ffffff;
    --bg-1: #fcfcfc;
    --bg-2: #f4f4f4;
  }
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/Inter-Regular.woff2") format("woff2");
  /* https://rsms.me/inter/#features */
  font-feature-settings:
    "ss01" on,
    "ss02" on;
}

* {
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

html {
  height: 100%;
  overflow-y: scroll;
}

body {
  color: var(--text-body);
  line-height: 1.5;
  background-color: var(--bg-0);
  padding-bottom: 2em;
  margin: 0;
}

a {
  text-decoration: none;
  color: var(--link);
  cursor: pointer;
  &:hover {
    text-decoration: underline;
  }
  &[download] {
    flex: 1;
    max-width: 18em;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em 2em;
    background-color: var(--primary);
    color: white;
    font-size: 0.9em;
  }
}

ul,
ol {
  margin: 0;
  padding-left: 22px;
}

button {
  cursor: pointer;
}

input,
textarea,
select,
button,
*[contenteditable] {
  accent-color: var(--primary);
}

pre {
  white-space: pre-wrap;
  font-family: monospace;
  margin: 0;
}

code {
  white-space: pre-wrap;
  font-family: monospace;
  background-color: rgba(128, 128, 128, 0.12);
  padding: 0.2em 0.4em;
}
codeblock {
  display: block;
  white-space: pre;
  overflow: auto;
  font-family: monospace;
  background-color: rgba(128, 128, 128, 0.12);
  padding: 1em;
}

details {
  outline: 2px solid rgba(128, 128, 128, 0.15);
  padding: 1em;
  &[open] summary {
    margin-bottom: 1em;
  }
}

nav {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1em;
  background-color: var(--bg-1);
  outline: 2px solid rgba(128, 128, 128, 0.25);
  display: flex;
  align-items: center;
  white-space: pre;

  .nav-start,
  .nav-center,
  .nav-end {
    flex: 1;
  }

  > .nav-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2em;
  }

  @media screen and (max-width: 580px) {
    .nav-center {
      justify-content: end;
    }
    .nav-end {
      display: none;
    }
  }
}

.title {
  color: var(--text-header);
  font-weight: bold;
  font-size: 1.55em;
  margin: 4px 0;
}

.subtitle {
  color: var(--text-header);
  font-weight: bold;
  font-size: 1.12em;
  margin-top: 4px;
}

.p {
  margin: 12px 0;
}

.bold {
  font-weight: bold;
}

.section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1024px;
  width: 95%;
  margin: 2em auto;
  padding: 1.5em;
  background-color: var(--bg-1);
  outline: 2px solid rgba(128, 128, 128, 0.25);
}

.divider {
  margin: 1em 0;
  outline: 1px solid rgba(128, 128, 128, 0.25);
}
