#sidebar, #content {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif !important;
  /*font-size: 15px !important;*/
  font-feature-settings: normal;
  font-variation-settings: normal;
}

#content h1, #content h2, #content h3, #content h4 { color: #444; }
#content h2, #content h3, #content h4 { margin-top: 1.4em; }
#content table { min-width: 100%; margin: 1.5em auto; }
#content table th { border: 1px solid #ccc; padding: 0.5em 1em; }
#content table td { border: 1px solid #ccc; padding: 0.2em 0.4em; vertical-align: top;}
#content table th { background: #e5eaee; }
#content p { margin: 0.8em 0; }
#content a { text-decoration: none; }
#content code { font-size: 14px !important; }
#content :not(pre) > code { white-space: nowrap; }

#content blockquote {
  border-left: 2px solid #4E83a9;
  padding: .1em 1em;
  background: #EEF3F9;
  color: #224455ee;
  border-radius: 0 6px 6px 0;
}

#content img { display: block; margin: 1em auto; max-width: 100%; }

/* ── Sidebar ── */

#sidebar {
  border-right: 1px solid #ccc;
  overflow-y: auto;
  max-height: 100vh;
}

#sidebar a {
  display: block;
  color: #3c4257;
  text-decoration: none;
  padding: 2px 12px;
  border-radius: 6px 0 0 6px;
  line-height: 1.4;
  transition: background 0.1s, color 0.1s;
}

#sidebar a.active, #sidebar ul ul a.active, #sidebar a.active:hover  {
  /*background: #e8f0fe;*/
  background: #EEF3F9;
  /*color: #2c82b7;*/
  color: #0a2540;
}

#sidebar a:hover {
  background: #f6f8fa;
  color: #0a2540;
}

#sidebar .nav-section {
  margin-bottom: 24px;
}

#sidebar .nav-section-title {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #3792b2;
  padding: 0 12px;
  margin-bottom: 4px;
}

#sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#sidebar ul ul {
  padding-left: 12px;
  border-left: 2px solid #e6ebf1;
  margin: 2px 0 2px 16px;
  display: none;
}

#sidebar ul ul.open {
  display: block;
}

#sidebar ul ul a {
  font-size: 14.5px;
  color: #4f566b;
  padding: 3px 8px;
}

#sidebar ul ul a:hover {
  color: #0a2540;
  background: #f6f8fa;
}

#sidebar .divider {
  border: none;
  border-top: 1px solid #aaa;
  margin: 4px 2px;
}

#sidebar a.has-children {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#sidebar a.has-children::after {
  content: '';
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-left: 4px;
  background-color: #8792a2;
  transition: transform 0.15s;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M6.22 3.22a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.75.75 0 0 1-1.06-1.06L9.94 8 6.22 4.28a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

#sidebar a.has-children.open::after {
  transform: rotate(90deg);
}
