:root {
  --hm-primary: #00869c;
  --hm-accent: #00a3bf;
  --hm-ink: #0b1f2a;
  --hm-surface: #f7fafb;
  --hm-border: #d6e4e8;
  --hm-warn: #e67e22;
}

body {
  color: var(--hm-ink);
  background-color: var(--hm-surface);
}

#content {
  line-height: 1.66;
}

#content h1,
#content h2,
#content h3,
#content h4 {
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #08202d;
}

#content h2 {
  border-left: 4px solid var(--hm-primary);
  padding-left: 0.65rem;
  margin-top: 2.4rem;
}

#content h3 {
  margin-top: 1.7rem;
}

#content p,
#content ul,
#content ol {
  max-width: 78ch;
}

a {
  color: var(--hm-primary);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition: color 120ms ease;
}

a:hover,
a:focus {
  color: var(--hm-accent);
}

/* Sidebar navigation */
.book .book-summary {
  background: linear-gradient(180deg, #0f2b38 0%, #123646 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.book .book-summary ul.summary li a {
  color: #d7e7ee;
  border-left: 2px solid transparent;
  transition: all 120ms ease;
}

.book .book-summary ul.summary li a:hover {
  color: #ffffff;
  border-left-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.book .book-summary ul.summary li.active > a {
  color: #ffffff;
  border-left-color: #56d2e8;
  background: rgba(86, 210, 232, 0.14);
  font-weight: 600;
}

/* More readable code blocks */
pre,
pre.sourceCode {
  border: 1px solid var(--hm-border);
  border-radius: 10px;
  background: #f2f8fa;
}

code {
  color: #114459;
}

/* Emphasize critical notes and warnings */
blockquote,
.rmdnote,
.rmdimportant,
.rmdwarning,
.rmdcaution {
  border-left: 5px solid var(--hm-primary);
  background: #eef8fb;
  padding: 0.75rem 1rem;
  border-radius: 0 8px 8px 0;
}

.rmdwarning,
.rmdcaution {
  border-left-color: var(--hm-warn);
  background: #fff6ee;
}

@media (max-width: 991px) {
  #content h2 {
    margin-top: 2rem;
  }

  #content p,
  #content ul,
  #content ol {
    max-width: 100%;
  }
}
