/* Bumblehive 中文文档排版：统一字体、字重和垂直节奏。 */

:root {
  --bumble-brand-yellow: #eabb23;
  --bumble-brand-gold: #9a6a00;
  --bumble-brand-gold-dark: #6f4e00;
  --bumble-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  --bumble-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo,
    monospace;
}

:root > * {
  --md-primary-fg-color: var(--bumble-brand-yellow);
  --md-primary-fg-color--light: #f3d46d;
  --md-primary-fg-color--dark: var(--bumble-brand-gold);
  --md-accent-fg-color: var(--bumble-brand-gold);
  --md-typeset-a-color: var(--bumble-brand-gold);
}

::selection {
  background-color: rgba(234, 187, 35, 0.35);
}

body,
input {
  font-family: var(--bumble-font-sans);
}

/* 顶部品牌栏。 */
.md-header {
  background-color: var(--bumble-brand-yellow);
  color: #171517;
}

.md-header__button.md-logo {
  margin: 0 0.6rem 0 0;
  padding: 0;
}

.md-header__button.md-logo img {
  width: auto;
  height: 2rem;
}

.md-header__title {
  flex: 1 1 auto;
  visibility: hidden;
}

.md-header .md-header__button,
.md-header .md-search__icon {
  color: #171517;
}

.md-header .md-search__input {
  background-color: rgba(23, 21, 23, 0.08);
  color: #171517;
}

.md-header .md-search__input::placeholder {
  color: rgba(23, 21, 23, 0.65);
}

.md-typeset {
  font-size: 0.8rem;
  line-height: 1.75;
}

.md-typeset a:hover,
.md-typeset a:focus {
  color: var(--bumble-brand-gold-dark);
}

/* 标题只使用 400 / 600 / 700 三档字重。 */
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 {
  color: var(--md-default-fg-color);
  letter-spacing: 0;
}

.md-typeset h1 {
  margin: 0 0 1.4rem;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.3;
}

.md-typeset h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
}

.md-typeset h2:not(.doc-heading) {
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.18);
}

.md-typeset h3 {
  margin: 1.5rem 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.md-typeset h2 + h3 {
  margin-top: 1.25rem;
}

.md-typeset h4 {
  margin: 1.25rem 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.55;
}

.md-typeset p,
.md-typeset ul,
.md-typeset ol,
.md-typeset blockquote {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.md-typeset li {
  margin-bottom: 0.25rem;
}

.md-typeset li:last-child {
  margin-bottom: 0;
}

.md-typeset strong {
  font-weight: 600;
}

/* 代码、表格和提示框使用与正文接近的字号。 */
.md-typeset code,
.md-typeset kbd,
.md-typeset pre {
  font-family: var(--bumble-font-mono);
}

.md-typeset .highlight {
  margin: 1rem 0;
}

.md-typeset .highlight pre {
  margin: 0;
}

.md-typeset pre > code {
  font-size: 0.7rem;
  font-weight: 400;
  line-height: 1.65;
}

.md-typeset__scrollwrap {
  margin: 1rem 0 1.1rem;
}

.md-typeset__table {
  margin: 0;
}

.md-typeset table:not([class]) {
  font-size: 0.75rem;
  line-height: 1.6;
}

.md-typeset table:not([class]) th {
  font-weight: 600;
}

.md-typeset table:not([class]) th,
.md-typeset table:not([class]) td {
  padding: 0.65rem 0.75rem;
  vertical-align: top;
}

.md-typeset .admonition,
.md-typeset details {
  margin: 1rem 0;
  font-size: 0.75rem;
  line-height: 1.65;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-weight: 600;
}

.md-typeset .admonition.tip,
.md-typeset details.tip {
  border-color: var(--bumble-brand-yellow);
}

.md-typeset .tip > .admonition-title {
  background-color: rgba(234, 187, 35, 0.14);
}

.md-typeset .tip > .admonition-title::before {
  background-color: var(--bumble-brand-gold);
}

.md-typeset .tabbed-labels > label:hover {
  color: var(--bumble-brand-gold);
}

.js .md-typeset .tabbed-labels::before {
  background: var(--bumble-brand-gold);
}

/* API 条目保持紧凑，并用细线标明层级。 */
.md-typeset .doc-object {
  margin: 1.4rem 0;
}

.md-typeset .doc-children {
  margin-left: 0.5rem;
  padding-left: 1rem;
  border-left: 1px solid var(--md-default-fg-color--lightest);
}

.md-typeset .doc-heading {
  margin: 1.4rem 0 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid var(--md-default-fg-color--lightest);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}

.md-typeset .doc-signature.highlight {
  margin: 0.75rem 0 0.9rem;
}

.md-typeset .doc-label {
  font-weight: 600;
}

/* 导航区只突出分组、当前页和站点标题。 */
.md-header__title,
.md-nav__title,
.md-nav__item--section > .md-nav__link,
.md-nav__link--active {
  font-weight: 600;
}

.md-nav__link {
  line-height: 1.5;
}

.md-nav__link:hover,
.md-nav__link:focus,
.md-nav__link--active {
  color: var(--bumble-brand-gold);
}

.md-nav--primary
  > .md-nav__list
  > .md-nav__item--section
  > .md-nav__link--active {
  color: var(--bumble-brand-gold);
}

.md-nav--primary > .md-nav__list > .md-nav__item--section {
  margin-top: 0.8rem;
}

.md-nav--primary
  > .md-nav__list
  > .md-nav__item--section
  > .md-nav__link {
  margin-top: 0;
  color: var(--md-default-fg-color);
  font-size: 0.75rem;
  font-weight: 700;
}

.md-nav--primary
  > .md-nav__list
  > .md-nav__item--section
  > .md-nav
  > .md-nav__list
  > .md-nav__item {
  padding-left: 0.55rem;
}

.md-nav--primary
  > .md-nav__list
  > .md-nav__item--section
  > .md-nav
  > .md-nav__list
  > .md-nav__item
  > .md-nav__link {
  margin-top: 0.35rem;
  font-size: 0.68rem;
  font-weight: 400;
}

@media screen and (max-width: 44.9844em) {
  .md-typeset h1 {
    font-size: 1.45rem;
  }

  .md-typeset h2 {
    font-size: 1.15rem;
  }

  .md-typeset .doc-children {
    margin-left: 0;
    padding-left: 0.65rem;
  }
}

@media screen and (min-width: 76.25em) {
  .md-sidebar--primary {
    padding-top: 0.4rem;
  }

  .md-nav--primary > .md-nav__title {
    display: none;
  }
}
