:root {
  --hr-bg: #f6f8fb;
  --hr-panel: #ffffff;
  --hr-panel-soft: #f9fbff;
  --hr-border: #e5eaf1;
  --hr-border-strong: #d7dee9;
  --hr-text: #17212b;
  --hr-muted: #607080;
  --hr-link: #0b6bcb;
  --hr-link-hover: #064f9d;
  --hr-sidebar-bg: #0c1424;
  --hr-sidebar-soft: #111c30;
  --hr-sidebar-text: #d7dfec;
  --hr-sidebar-muted: #8190a8;
  --hr-sidebar-active: #ffffff;
  --hr-shadow: 0 22px 70px rgba(18, 32, 54, 0.08);
}

html,
body {
  background: var(--hr-bg);
  color: var(--hr-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.book {
  background: var(--hr-bg);
}

.book .book-body {
  background: var(--hr-bg);
}

.book:not(.with-summary) .book-body {
  left: 0;
}

.book .book-body .page-wrapper .page-inner {
  max-width: 920px;
  padding: 54px 72px 84px;
}

.book:not(.with-summary) .book-body .page-wrapper .page-inner {
  margin: 56px auto 88px;
  background: var(--hr-panel);
  border: 1px solid var(--hr-border);
  border-radius: 20px;
  box-shadow: var(--hr-shadow);
}

.book .book-body .page-wrapper .page-inner section.normal {
  color: var(--hr-text);
  font-size: 17px;
  line-height: 1.78;
}

.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4 {
  color: #0f1b2a;
  font-weight: 750;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.markdown-section h1 {
  margin: 0 0 24px;
  font-size: 2.35em;
}

.markdown-section h2 {
  margin-top: 46px;
  padding-top: 6px;
  border-top: 1px solid var(--hr-border);
  font-size: 1.55em;
}

.markdown-section h3 {
  margin-top: 32px;
  font-size: 1.2em;
}

.markdown-section p,
.markdown-section ul,
.markdown-section ol {
  color: #253342;
}

.markdown-section a {
  color: var(--hr-link);
  font-weight: 650;
  text-decoration: none;
}

.markdown-section a:hover {
  color: var(--hr-link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-section blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  color: #26384c;
  background: linear-gradient(135deg, #eef6ff 0%, #f7fbff 100%);
  border-left: 4px solid #0b6bcb;
  border-radius: 12px;
}

.markdown-section blockquote p:last-child {
  margin-bottom: 0;
}

.markdown-section code {
  padding: 0.16em 0.38em;
  color: #0f3d68;
  background: #eef5ff;
  border: 1px solid #d9e9ff;
  border-radius: 6px;
  font-size: 0.9em;
}

.markdown-section pre {
  border: 1px solid var(--hr-border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(18, 32, 54, 0.06);
}

.markdown-section img {
  max-width: 100%;
}

.markdown-section hr {
  height: 1px;
  margin: 34px 0;
  background: var(--hr-border);
}

.book.with-summary .book-summary {
  width: 320px;
  background: radial-gradient(circle at top left, #17253e 0%, var(--hr-sidebar-bg) 46%, #09101d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 14px 0 38px rgba(5, 12, 24, 0.16);
}

.book.with-summary .book-body {
  left: 320px;
}

.book-summary ul.summary {
  padding: 20px 14px 28px;
}

.book-summary ul.summary li.header {
  padding: 22px 14px 8px;
  color: var(--hr-sidebar-muted);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-summary ul.summary li a,
.book-summary ul.summary li span {
  color: var(--hr-sidebar-text);
  border-radius: 10px;
  font-size: 0.94rem;
  line-height: 1.35;
}

.book-summary ul.summary li a {
  padding: 10px 14px;
  border-bottom: none;
}

.book-summary ul.summary li a:hover {
  color: var(--hr-sidebar-active);
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.book-summary ul.summary li.active > a {
  color: var(--hr-sidebar-active);
  background: linear-gradient(135deg, rgba(23, 111, 214, 0.95), rgba(71, 148, 255, 0.82));
  box-shadow: 0 10px 24px rgba(11, 107, 203, 0.22);
}

.book-summary ul.summary li.divider {
  background: rgba(255, 255, 255, 0.1);
}

.book-summary ul.summary li .gitbook-link {
  color: var(--hr-sidebar-muted);
  font-size: 0.8rem;
}

.book-header {
  height: 56px;
  color: var(--hr-muted);
}

.book-header h1 {
  font-size: 18px;
  line-height: 56px;
}

.navigation {
  color: rgba(11, 107, 203, 0.72);
}

.navigation:hover {
  color: var(--hr-link);
}

@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 16px;
  }

  .book {
    position: relative;
    min-height: 100vh;
    height: auto;
    overflow: visible;
  }

  .book.with-summary {
    overflow: visible;
  }

  .book.with-summary .book-summary {
    float: none;
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    width: auto;
    height: auto;
    max-height: 42vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .book.with-summary .book-body,
  .book:not(.with-summary) .book-body {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: 0;
    float: none;
    clear: both;
    width: 100%;
    margin-left: 0;
    transform: none;
    overflow: visible;
  }

  .book .book-body .body-inner {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    overflow: visible;
  }

  .book .book-body .page-wrapper {
    position: relative;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    overflow: visible;
  }

  .book .book-body .page-wrapper .page-inner,
  .book:not(.with-summary) .book-body .page-wrapper .page-inner {
    margin: 0;
    max-width: none;
    padding: 32px 22px 56px;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .markdown-section h1 {
    font-size: 2em;
  }

  .book-header {
    display: none;
  }
}

