:root {
  color-scheme: dark light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #111216;
  color: #f1f1f4;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 280px;
  margin: 0;
  background:
    radial-gradient(circle at 20% 0%, rgb(89 99 190 / 18%), transparent 35rem),
    #111216;
}

main {
  width: min(100% - 2rem, 48rem);
  margin-inline: auto;
  padding-block: clamp(3rem, 10vw, 7rem);
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 13ch;
  margin-bottom: 1rem;
  font-size: clamp(2.35rem, 8vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 code {
  font: inherit;
}

.lede {
  max-width: 42rem;
  margin-bottom: 3rem;
  color: #c7c8cf;
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  line-height: 1.6;
}

section {
  margin-block: 2rem;
}

h2 {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

pre {
  overflow-x: auto;
  margin: 0;
  border: 1px solid #353842;
  border-radius: 0.75rem;
  background: #1a1b21;
  padding: 1rem 1.125rem;
  color: #f8f8fb;
  font-size: 0.9rem;
  line-height: 1.6;
  -webkit-overflow-scrolling: touch;
}

pre:focus-visible {
  border-color: #8993e8;
  outline: 3px solid rgb(137 147 232 / 30%);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
}

.note {
  margin-top: 3rem;
  border-top: 1px solid #353842;
  padding-top: 1.5rem;
  color: #c7c8cf;
  line-height: 1.65;
}

.note h2 {
  color: #f1f1f4;
}

@media (prefers-color-scheme: light) {
  :root {
    background: #f7f7fa;
    color: #17181c;
  }

  body {
    background:
      radial-gradient(circle at 20% 0%, rgb(89 99 190 / 12%), transparent 35rem),
      #f7f7fa;
  }

  .lede,
  .note {
    color: #555963;
  }

  pre {
    border-color: #d9dae2;
    background: #ffffff;
    color: #17181c;
  }

  .note {
    border-color: #d9dae2;
  }

  .note h2 {
    color: #17181c;
  }
}

@media (max-width: 32rem) {
  main {
    width: min(100% - 1.25rem, 48rem);
  }

  pre {
    padding: 0.875rem;
    font-size: 0.8rem;
  }
}
