:root {
  --bg: #fff;
  --card: #edeae3;
  --text: #000;
  --text-muted: rgba(0, 0, 0, .32);
  --border: rgba(0, 0, 0, .10);
  --radius: 24px;
  --font-sans: 'Reddit Sans', system-ui, sans-serif;
  --font-mono: 'Reddit Mono', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
}

a {
  color: var(--text);
}

.page {
  display: flex;
  gap: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px;
}

.sidebar {
  width: 168px;
  flex-shrink: 0;
  padding-top: 32px;
}

.sidebar-brand {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.5px;
  text-decoration: none;
  display: block;
  margin-bottom: 32px;
}

.nav-section {
  margin-bottom: 12px;
}

/* Section title is a normal list item, separated from its siblings. */
.nav-section-title {
  display: block;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  padding-bottom: 12px;
  font-size: 16px;
  line-height: 22px;
  text-decoration: none;
  color: var(--text);
}

.nav-section-title.is-current {
  font-weight: 700;
}

/* Child items share the section-title look: separated by a full-width
   border. The indent is padding-start on the list, not a margin on the
   item, so each bottom border spans the entire sidebar width. */
.nav-children {
  margin: 0 0 12px;
  padding: 0;
  list-style: none;

  .nav-child {
    padding-inline-start: 12px;
  }
}

.nav-child {
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  padding-bottom: 12px;
}

.nav-child-link {
  font-size: 16px;
  line-height: 22px;
  text-decoration: none;
  color: var(--text);
}

.nav-child-link.is-current {
  color: var(--text-muted);
}

.content {
  flex: 1;
  background: var(--card);
  border-radius: var(--radius);
  padding: 40px;
  min-width: 0;
}

.prose {
  h1 {
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -1px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 16px;
  }

  h2 {
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -.5px;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 12px;
  }

  h3 {
    font-size: 18px;
    line-height: 26px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 8px;
  }

  p {
    margin-bottom: 16px;
    line-height: 26px;
  }

  ul,
  ol {
    margin-bottom: 16px;
    padding-left: 24px;
    line-height: 26px;
  }

  li {
    margin-bottom: 4px;
  }

  blockquote {
    border-left: 3px solid var(--border);
    padding-left: 16px;
    margin: 20px 0;
  }

  hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
  }

  table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 15px;
  }

  th {
    text-align: left;
    border-bottom: 2px solid var(--border);
    padding: 8px 12px;
    font-weight: 700;
  }

  td {
    border-bottom: 1px solid var(--border);
    padding: 8px 12px;
  }

  a {
    color: var(--text);
    text-decoration: underline;
  }

  pre {
    background: #1a1a1a;
    color: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: var(--font-mono);
  }

  code {
    font-family: var(--font-mono);
    font-size: .8em;
  }

  :not(pre)>code {
    background: rgba(0, 0, 0, .07);
    padding: 2px 6px;
    border-radius: 4px;
  }
}

.cta {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 700;
  margin: 0 16px 12px 0;

  &.cta-primary {
    background: #000;
    color: #fff;
  }

  &.cta-secondary {
    border: 1px solid var(--border);
  }
}