/* docs.catodi.tv: the same room as catodi.tv (tokens and type from site.css), quieter. Dark only. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/next-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/next-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/fonts/next-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/fonts/mono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink000: #0b0908;
  --ink100: #12100d;
  --ink200: #1b1713;
  --ink300: #262019;
  --cream: #f6ecdd;
  --sand: #cdbda8;
  --dust: #9a8b7a;
  --line: #3b3128;
  --glow: #f6b648;
  --glow-hot: #ffdfa3;
  --glow-pressed: #d99a2e;
  --on-glow: #1e1206;
  --glow-haze: #f6b64838;
  --spill: #f6b6485c;
  --spillsoft: #f6b6481f;
  --scan: #0b090852;
  --clear: #0b090800;
  --sans: "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, monospace;
  --gutter: 48px;
  --wide: 1184px;
  --text: 680px;
  --shadow-float: 0 16px 48px #0000008c;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--ink000);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--ink000);
  color: var(--sand);
  font: 400 15px / 22px var(--sans);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
.display {
  text-wrap: balance;
}
p,
dd,
li {
  text-wrap: pretty;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
pre {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--glow);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 10;
  padding: 12px 20px;
  border-radius: 9999px;
  background: var(--glow);
  color: var(--on-glow);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}
.skip:focus-visible {
  outline-color: var(--cream);
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

/* Type */
.display {
  color: var(--cream);
  font-weight: 800;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.lede {
  font-size: 17px;
  line-height: 26px;
}
.body-lg {
  font-size: 17px;
  line-height: 26px;
}
.cream {
  color: var(--cream);
}
.caption {
  font-size: 13px;
  line-height: 18px;
}
.label {
  font-size: 15px;
  line-height: 20px;
  font-weight: 700;
}
.h1 {
  color: var(--cream);
  font-size: 32px;
  line-height: 38px;
  font-weight: 800;
}
.h2 {
  color: var(--cream);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}
.h3 {
  color: var(--cream);
  font-size: 17px;
  line-height: 22px;
  font-weight: 700;
}
.num {
  color: var(--cream);
  font-size: 40px;
  line-height: 40px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  border-radius: 6px;
}
.logo:focus-visible {
  border-radius: 12px;
}
.logo img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.wordmark {
  font-size: 28px;
  line-height: 32px;
  font-weight: 800;
  color: var(--cream);
}
.wordmark b {
  color: var(--glow);
  font-weight: 800;
}
.wordmark .sub {
  margin-left: 8px;
  color: var(--sand);
  font-weight: 400;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 16px 24px;
  border: 0;
  border-radius: 9999px;
  background: var(--glow);
  color: var(--on-glow);
  font: 700 17px / 22px var(--sans);
  text-decoration: none;
}
.btn:hover {
  background: var(--glow-hot);
}
.btn:active {
  background: var(--glow-pressed);
}
.btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header: the Logo and "Docs", the way back to catodi.tv */
.docs-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px var(--gutter);
  background: var(--ink100);
}
.docs-header .home {
  margin-left: auto;
  padding: 12px 0;
  color: var(--cream);
  font-weight: 700;
  text-decoration: none;
}
.docs-header .menu {
  display: none;
}

/* Sidebar and reading column */
.docs {
  display: grid;
  grid-template-columns: 248px minmax(0, var(--text));
  gap: 64px;
  width: min(100% - 2 * var(--gutter), 992px + 2 * var(--gutter));
  margin-inline: auto;
  padding: 48px 0 64px;
  flex: 1;
}
.pages {
  display: grid;
  align-content: start;
  gap: 4px;
}
.pages .close {
  display: none;
}
.overline {
  padding-top: 20px;
  color: var(--dust);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.overline:first-of-type {
  padding-top: 0;
}
.pages ul {
  display: grid;
  gap: 4px;
  padding: 0;
  list-style: none;
}
.pages a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--sand);
  font-weight: 700;
  text-decoration: none;
}
.pages a:hover {
  color: var(--cream);
}
.pages a[aria-current="page"] {
  background: var(--ink300);
  color: var(--cream);
}
.article {
  display: grid;
  gap: 24px;
  align-content: start;
}
.article .crumb {
  color: var(--dust);
}
.article .lede {
  margin-top: -12px;
  font-size: 21px;
  line-height: 32px;
}
.article p {
  font-size: 17px;
  line-height: 26px;
}
.article p a:not(.btn),
.note a {
  color: var(--cream);
  text-underline-offset: 3px;
}
.article section {
  display: grid;
  gap: 12px;
  padding-top: 24px;
}
code {
  font: 500 0.88em / 1 var(--mono);
  color: var(--cream);
}
.code {
  overflow-x: auto;
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--ink100);
  color: var(--cream);
  font: 500 13px / 18px var(--mono);
}
.code code {
  font: inherit;
}
.code mark {
  background: none;
  color: var(--glow);
}
.steps {
  display: grid;
  gap: 48px;
  padding: 24px 0 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 16px;
}
.steps li > div {
  display: grid;
  gap: 12px;
}
.note {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 24px;
  background: var(--ink200);
}
.note p {
  font-size: 15px;
  line-height: 22px;
}
.next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 32px;
  color: var(--cream);
  text-decoration: none;
}
.next .caption {
  color: var(--dust);
}
.next:hover .h2 {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.docs-footer {
  padding: 32px var(--gutter);
  border-top: 1px solid var(--line);
  color: var(--dust);
}
.docs-footer a {
  color: var(--sand);
}
.docs-footer a.mail {
  color: var(--glow);
}

/* Phone and tablet: the pages behind the menu button, opened by its #pages link (no script) */
@media (max-width: 959px) {
  :root {
    --gutter: 16px;
  }
  .docs-header {
    padding-block: 16px;
  }
  .docs-header .home {
    display: none;
  }
  .docs-header .menu {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: -4px -10px -4px auto;
    border-radius: 9999px;
    color: var(--cream);
  }
  .menu svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
  }
  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 32px 0 48px;
  }
  .pages {
    display: none;
  }
  .pages:target {
    display: grid;
    padding-bottom: 32px;
  }
  .pages:target .close {
    display: block;
    justify-self: end;
    color: var(--cream);
  }
  .article .display {
    font-size: 52px;
    line-height: 52px;
  }
  .article .lede {
    font-size: 17px;
    line-height: 26px;
  }
  .steps {
    gap: 32px;
  }
}
