:root {
  --color-bg-code: #f6f8fa;
  --color-border: #e1e4e8;
  --color-text-dark: #24292e;
  --color-text-medium: #333;
  --color-link: #0366d6;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  margin: 0;
}

div#root {
  display: grid;
  grid-template-columns: 250px 1fr;
  column-gap: 2em;
  height: 100vh;
}

a:visited {
  color: var(--color-link);
}

nav {
  padding: 0 2em;
  background-color: var(--color-bg-code);
}

nav .header {
  margin: 1em 0 0 0;
  text-align: center;
}

nav .header h1 {
  margin: 0;
  color: var(--color-text-medium);
}

nav ul {
  list-style: none;
  padding: 1em 0 0 0;
}

nav ul li {
  padding: 0 0 1em 0;
}

nav ul li a {
  text-decoration: none;
}

main {
  overflow-y: auto;
  padding-right: 40px;
}

.page-wrapper {
  padding-top: 20px;
  padding-bottom: 20px;
}

.page-wrapper h1 {
  margin-top: 0;
  font-size: 32px;
  font-weight: bold;
}

.code-example {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0;
}

.code-example .content {
  padding-right: 20px;
  max-width: 800px;
}

/* Code block styling for syntax-highlighted code */
.code-example pre {
  background: var(--color-bg-code);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 16px;
  overflow-x: auto;
  margin: 0 0 16px 0;
}

.code-example pre code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  line-height: 1.45;
  color: var(--color-text-dark);
  background: none;
  padding: 0;
  white-space: pre;
  display: block;
}
