@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100..900&family=Newsreader:ital,wght@0,200..800;1,200..800&display=swap");

:root {
  --font-fallback: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-primary: var(--font-inter, var(--font-fallback));
  --font-secondary: var(--font-newsreader, var(--font-fallback));
  --font-code: "SF Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    Courier, monospace;
  --body-color: #111111;
  --body-bg: #fdfdfc;
  --heading-color: #111111;
  --link-color: #2480ed;
  --muted: rgba(0, 0, 0, 0.4);
  --line: #f2f2f2;
  --soft-line: #ededed;
  --selection-bg: #ededed;
  --selection-color: #111111;
  --focus-color: rgba(0, 122, 255, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--body-bg);
  color: var(--body-color);
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
  overflow-anchor: none;
}

html,
html body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow-y: scroll;
  background: var(--body-bg);
  color: var(--body-color);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.25rem;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  text-size-adjust: none;
  backface-visibility: hidden;
}

main {
  width: min(100%, 36.375rem);
  margin: 0 auto;
  padding: 5rem 1rem 2.5rem;
}

@media screen and (max-width: 768px) {
  main {
    padding: 2rem 1.5rem 2.5rem;
  }
}

article {
  max-width: 70ch;
}

blockquote,
dd,
dl,
dt,
fieldset,
figure,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
html,
iframe,
legend,
li,
ol,
p,
pre,
textarea,
ul {
  margin: 0;
  padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  position: relative;
  display: flex;
  text-wrap: balance;
  -webkit-text-stroke: 0.001px transparent;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0;
}

h1 {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.00813rem;
}

h2,
h3 {
  font-size: 0.875rem;
  font-weight: 560;
  letter-spacing: -0.00563rem;
}

h3 {
  font-weight: 500;
}

p,
li,
dl {
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

p strong,
li strong,
dl strong {
  font-weight: 600;
}

time {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 460;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

a {
  color: inherit;
  text-decoration: none;
}

.basic-link,
.nav a {
  position: relative;
  display: inline;
  color: inherit;
  font-weight: inherit;
  line-height: inherit;
  transition: all 0.2s ease;
}

.basic-link::before,
.nav a::before {
  pointer-events: none;
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  border-radius: 2px;
  background: #d9d9d9;
  opacity: 1;
  transition: inherit;
}

.basic-link:hover::before,
.nav a:hover::before {
  background: #666666;
}

.basic-link:focus-visible,
.nav a:focus-visible {
  border-radius: 2px;
  padding: 0 2px;
  margin: 0 -2px;
  transition: none;
  outline: 2px solid var(--focus-color);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding-top: 1rem;
}

hr {
  border: 0;
  display: block;
  width: 3.125rem;
  height: 1px;
  background: var(--soft-line);
  margin: 2.5rem 0 2rem;
}

.shell {
  max-width: 70ch;
}

header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0 0.5rem;
}

header h1 {
  color: #111111;
  font-weight: 500;
}

header h1,
header time {
  font-size: 0.875rem;
  line-height: 1.25rem;
  letter-spacing: -0.00563rem;
}

.lede {
  color: var(--muted);
}

article > p,
article > p + h1 {
  padding-top: 1rem;
}

article > p + h2 {
  padding-top: 2.25rem;
}

article > p + h3,
article > p + h4,
article > p + h5,
article > p + h6 {
  padding-top: 1rem;
}

article h1 + ol,
article h1 + ul,
article h2 + ol,
article h2 + ul,
article h3 + ol,
article h3 + ul,
article h4 + ol,
article h4 + ul,
article h5 + ol,
article h5 + ul,
article h6 + ol,
article h6 + ul {
  padding-top: 1.5rem;
}

article > section {
  padding-top: 2.25rem;
}

article > section > p + p {
  padding-top: 0.5rem;
}

dl {
  width: fit-content;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.375rem;
  padding-top: 2.25rem;
}

dt {
  color: var(--muted);
  font-weight: 460;
}

dd {
  margin: 0;
  color: rgba(0, 0, 0, 0.65);
}

pre {
  margin-top: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 0.5rem;
  background: #f8f8f8;
  color: #333333;
  padding: 0.875rem 1rem;
  font-family: var(--font-code);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.55;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
}

.copy-command {
  appearance: none;
  border: 1px solid var(--soft-line);
  border-radius: 0.375rem;
  background: #f8f8f8;
  color: #333333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 0.625rem 0.875rem;
  text-align: left;
  width: 100%;
  overflow: hidden;
}

.copy-command code {
  display: block;
  padding: 0;
  background: none;
  color: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  min-width: 0;
  line-height: 1.2;
  font-size: 0.8125rem;
}

.copy-command code::before {
  display: none;
}

.copy-command:hover {
  border-color: #e5e5e5;
}

.copy-command:focus-visible {
  outline: 2px solid var(--focus-color);
  outline-offset: 2px;
}

.copy-command-icon {
  flex-shrink: 0;
  color: rgba(0, 0, 0, 0.5);
}

.copy-command[data-copied="true"] .copy-command-icon {
  color: #22c55e;
}

.copy-command-copy,
.copy-command-check {
  transform-origin: center;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.copy-command-copy {
  opacity: 1;
  transform: scale(1);
}

.copy-command-check {
  opacity: 0;
  transform: scale(0.8);
}

.copy-command[data-copied="true"] .copy-command-copy {
  opacity: 0;
  transform: scale(0.8);
}

.copy-command[data-copied="true"] .copy-command-check {
  opacity: 1;
  transform: scale(1);
}

code {
  position: relative;
  display: inline-block;
  font-family: var(--font-code);
  font-size: 0.9em;
  line-height: 1;
  color: rgba(0, 0, 0, 0.75);
  padding: 0.1rem 0.2rem;
}

code::before {
  pointer-events: none;
  content: "";
  position: absolute;
  transform: translateY(-1px);
  inset: -0.1em 0;
  border-radius: 0.25rem;
  background: rgba(0, 0, 0, 0.04);
  z-index: -1;
}

pre code {
  display: block;
  padding: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

pre code::before {
  display: none;
}

ul,
ol {
  list-style: none;
}

.footer {
  padding-top: 2rem;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 460;
  letter-spacing: -0.0025rem;
  line-height: 1.25rem;
}

::selection {
  color: var(--selection-color);
  background: var(--selection-bg);
}

::-moz-selection {
  color: var(--selection-color);
  background: var(--selection-bg);
}

:focus-visible {
  outline: 2px solid var(--focus-color);
}

@media screen and (max-width: 520px) {
  dl {
    grid-template-columns: 1fr;
  }
}
