:root {
  --MENU-L-width: 18rem;
  --MENU-M-width: 15.5rem;
  --MENU-MAX-width: 110rem;
  --MAIN-MAX-width: 110rem;
  --PRIMARY-color: rgba(0, 113, 227, 1);
  --PRIMARY-HOVER-color: rgba(0, 98, 201, 1);
  --SECONDARY-color: rgba(75, 159, 255, 1);
  --SECONDARY-HOVER-color: rgba(49, 136, 237, 1);
  --ACCENT-color: rgba(255, 102, 78, 1);
  --ACCENT-HOVER-color: rgba(229, 87, 64, 1);

  --MAIN-BG-color: rgba(245, 245, 247, 1);
  --MAIN-TEXT-color: rgba(29, 29, 31, 1);
  --MAIN-TITLES-TEXT-color: rgba(17, 17, 19, 1);

  --MENU-SECTIONS-BG-color: rgba(252, 252, 253, 0.84);
  --MENU-SECTIONS-ACTIVE-BG-color: rgba(0, 113, 227, 0.1);
  --MENU-SECTIONS-LINK-color: rgba(29, 29, 31, 0.92);
  --MENU-SECTIONS-LINK-HOVER-color: rgba(29, 29, 31, 1);
  --MENU-SECTION-ACTIVE-CATEGORY-color: rgba(0, 102, 204, 1);
  --MENU-SECTION-SEPARATOR-color: rgba(0, 0, 0, 0.08);

  --MENU-HEADER-BG-color: rgba(251, 251, 253, 0.95);
  --MENU-HEADER-BORDER-color: rgba(0, 0, 0, 0.08);
  --MENU-HEADER-color: rgba(29, 29, 31, 1);

  --TOPBAR-BG-color: rgba(255, 255, 255, 0.72);
  --TOPBAR-SEPARATOR-color: rgba(0, 0, 0, 0.08);
  --TOPBAR-TEXT-color: rgba(29, 29, 31, 1);

  --MENU-SEARCH-color: rgba(29, 29, 31, 0.75);
  --MENU-SEARCH-BG-color: rgba(255, 255, 255, 1);
  --MENU-SEARCH-BORDER-color: rgba(0, 0, 0, 0.08);

  --CODE-theme: relearn-light;
  --CODE-BLOCK-color: rgba(29, 29, 31, 1);
  --CODE-BLOCK-BG-color: rgba(245, 246, 247, 1);
  --CODE-BLOCK-BORDER-color: rgba(0, 0, 0, 0.1);
  --CODE-INLINE-color: rgba(29, 29, 31, 1);
  --CODE-INLINE-BG-color: rgba(242, 243, 245, 1);
  --CODE-INLINE-BORDER-color: rgba(0, 0, 0, 0.1);
  --BOX-BG-color: rgba(255, 255, 255, 0.9);
  --BOX-CAPTION-color: rgba(255, 255, 255, 1);

  --MAIN-font: "SF Pro Text", "PingFang SC", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --MAIN-font-weight: 410;
  --MAIN-letter-spacing: 0.006em;
  --MAIN-TITLES-font: "SF Pro Display", "PingFang SC", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --MAIN-TITLES-font-weight: 610;
  --MAIN-TITLES-H1-font-weight: 700;
}

body {
  background:
    radial-gradient(1200px 480px at 10% -12%, rgba(0, 102, 204, 0.08), transparent 62%),
    radial-gradient(900px 400px at 90% -16%, rgba(102, 172, 255, 0.08), transparent 58%),
    #f5f5f7;
  color: #1d1d1f;
}

#R-sidebar {
  inset-inline-start: 0.2rem;
  top: 0.2rem;
  min-height: calc(100% - 0.4rem);
  height: calc(100% - 0.4rem);
  min-width: calc(var(--INTERNAL-MENU-L-width) - 0.4rem);
  max-width: calc(var(--INTERNAL-MENU-L-width) - 0.4rem);
  width: calc(var(--INTERNAL-MENU-L-width) - 0.4rem);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(247, 248, 250, 0.95) 100%),
    rgba(251, 251, 253, 0.92);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.45rem;
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  font-family: "SF Pro Text", "PingFang SC", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#R-body {
  margin-inline-start: calc(var(--INTERNAL-MENU-L-width) - 0.2rem);
  min-width: calc(100% - (var(--INTERNAL-MENU-L-width) - 0.2rem));
  max-width: calc(100% - (var(--INTERNAL-MENU-L-width) - 0.2rem));
  width: calc(100% - (var(--INTERNAL-MENU-L-width) - 0.2rem));
}

#R-header-topbar {
  display: none;
}

#R-header-wrapper,
#R-homelinks,
#R-content-wrapper {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

#R-header-wrapper > *,
#R-homelinks > *,
#R-content-wrapper > * {
  border-inline-end: 0 !important;
}

#R-homelinks hr,
#R-header-wrapper hr {
  display: none;
}

#R-sidebar .ps__rail-y,
#R-sidebar .ps__thumb-y {
  display: none !important;
  opacity: 0 !important;
  width: 0 !important;
}

#R-sidebar .ps__rail-x,
#R-sidebar .ps__thumb-x {
  display: none !important;
  opacity: 0 !important;
  height: 0 !important;
}

#R-sidebar #R-content-wrapper {
  overflow-x: hidden;
}

#R-footer p {
  margin: 0 auto;
  max-width: 100%;
  overflow-wrap: anywhere;
}

#R-sidebar hr.padding {
  padding-top: 0.3rem;
}

#R-sidebar .nav-title,
#R-sidebar #R-homelinks,
#R-sidebar .menu-control,
#R-sidebar select {
  color: #1d1d1f;
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.018em;
  text-transform: none;
}

#R-sidebar .nav-title {
  font-family: "SF Pro Display", "PingFang SC", "Microsoft YaHei UI", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 2.05rem;
  font-weight: 680;
  letter-spacing: -0.018em;
  line-height: 1.04;
}

#R-sidebar ul > li > :is(a, span, label) {
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.34;
}

#R-sidebar ul ul > li > :is(a, span, label) {
  font-size: 13px;
  font-weight: 520;
  color: rgba(29, 29, 31, 0.86);
}

#R-sidebar ul ul ul > li > :is(a, span, label) {
  font-size: 12.5px;
  color: rgba(29, 29, 31, 0.8);
}

#R-topbar {
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.035);
}

#R-topbar {
  display: none;
}

#R-body-inner {
  background: transparent;
  padding-block: 0.2rem;
  padding-inline: 0.2rem;
}

#R-body .flex-block-wrapper {
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  width: 100%;
}

#R-body .main-max-width .flex-block-wrapper,
.main-max-width #R-body .flex-block-wrapper {
  width: 100%;
}

#R-body .flex-block-wrapper:has(article.narrow) {
  max-width: none;
}

.main-max-width #R-body .flex-block-wrapper:has(article.narrow) {
  width: 100%;
}

#R-body-inner:has(> .flex-block-wrapper article.narrow) {
  padding-block: 0.2rem;
  padding-inline: 0.2rem;
}

#R-body-inner > .flex-block-wrapper > article {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 28px;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07);
  padding: clamp(20px, 2.5vw, 38px);
  animation: beehack-fade-in 260ms ease-out;
}

#R-body :is(p, li, td, th, blockquote) {
  color: #1d1d1f;
}

#R-body :is(h1, h2, h3, h4, h5, h6) {
  color: #1d1d1f;
}

#R-body h1 {
  font-size: clamp(2.2rem, 2rem + 1.15vw, 3rem);
  letter-spacing: -0.028em;
  line-height: 1.08;
  margin-bottom: 0.7em;
}

#R-body h2 {
  font-size: clamp(1.58rem, 1.4rem + 0.66vw, 2.08rem);
  letter-spacing: -0.022em;
  line-height: 1.18;
  margin-top: 1.3em;
  margin-bottom: 0.58em;
}

#R-body :is(p, li) {
  font-size: 17px;
  line-height: 1.74;
}

#R-body h3 {
  font-size: clamp(1.26rem, 1.18rem + 0.36vw, 1.52rem);
  letter-spacing: -0.016em;
  line-height: 1.25;
}

#R-body hr {
  border-color: rgba(0, 0, 0, 0.08);
  margin: 1.45rem 0;
}

#R-body .breadcrumbs,
#R-body .article-subheading {
  opacity: 1;
  color: #6e6e73;
}

#R-body a {
  color: rgba(0, 113, 227, 1);
  text-decoration-thickness: 0.075em;
  text-underline-offset: 0.14em;
}

#R-body a:hover {
  color: rgba(0, 98, 201, 1);
}

#R-sidebar .searchbox,
#R-sidebar .searchbox > input,
#R-sidebar .searchbox > button {
  border-radius: 14px;
}

#R-body .box,
#R-body .tab-panel,
#R-body table,
#R-body div.highlight > div {
  border-radius: 16px;
}

#R-body .tab-nav-button.active {
  border-radius: 12px;
}

#R-sidebar ul li.active > a,
#R-sidebar ul li.active > label {
  border-radius: 10px;
}

#R-sidebar .searchbox {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(15, 23, 42, 0.06);
  border-radius: 999px;
}

#R-sidebar .searchbox input,
#R-sidebar .searchbox input::placeholder {
  color: #1d1d1f;
  font-size: 13px;
  opacity: 0.72;
}

#R-sidebar .searchbox > button,
#R-sidebar .searchbox > :first-child,
#R-sidebar .searchbox > :last-child {
  color: rgba(29, 29, 31, 0.72) !important;
}

#R-sidebar :is(a, span, label, .menu-control) {
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

#R-sidebar ul.collapsible-menu > li > :is(a, span, label) {
  border-radius: 12px;
  margin: 1px 0;
  padding: 6px 12px;
}

#R-sidebar ul.collapsible-menu > li.parent,
#R-sidebar ul.collapsible-menu > li.active,
#R-sidebar ul.collapsible-menu > li.alwaysopen {
  background: transparent !important;
}

#R-sidebar ul.collapsible-menu > li.parent > ul,
#R-sidebar ul.collapsible-menu > li.active > ul,
#R-sidebar ul.collapsible-menu > li.alwaysopen > ul {
  background: transparent !important;
}

#R-sidebar ul.collapsible-menu > li:not(.active) > :is(a, span, label):hover {
  background: rgba(120, 120, 128, 0.14);
  color: #1d1d1f;
}

#R-sidebar ul li.active > a {
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.2) 0%, rgba(0, 102, 204, 0.14) 100%);
  border: 1px solid rgba(0, 122, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(0, 113, 227, 0.14);
  color: #0066cc;
  font-weight: 650;
}

#R-sidebar ul.collapsible-menu > li.hidden:has(> a:empty) {
  display: none;
}

body[data-origin^="/about/"] #R-sidebar .R-shortcutmenu-shortcuts a[href="/about/"] {
  background: linear-gradient(180deg, rgba(0, 122, 255, 0.2) 0%, rgba(0, 102, 204, 0.14) 100%);
  border: 1px solid rgba(0, 122, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 4px 10px rgba(0, 113, 227, 0.14);
  color: #0066cc;
  font-weight: 650;
}

#R-sidebar .active > label,
#R-sidebar .active > span {
  color: #0066cc;
  font-weight: 650;
}

#R-sidebar .R-shortcutmenu-shortcuts > .nav-title {
  display: none;
}

#R-sidebar .R-shortcutmenu-shortcuts > ul {
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  margin-top: 0.4rem;
  padding-top: 0.55rem;
}

#R-topbar > .topbar-wrapper {
  border-radius: 0 0 14px 14px;
  min-height: 52px;
}

#R-topbar .topbar-button > .btn > button {
  border-radius: 999px;
}

#R-topbar .topbar-content {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.11);
  backdrop-filter: saturate(175%) blur(16px);
  -webkit-backdrop-filter: saturate(175%) blur(16px);
}

#R-topbar .breadcrumbs {
  font-size: 15px;
  color: #6e6e73;
}

#R-topbar .topbar-content .TableOfContents a {
  border-radius: 10px;
  display: block;
  padding: 6px 10px;
  font-size: 14px;
}

#R-topbar .topbar-content .TableOfContents a:hover {
  background: rgba(0, 0, 0, 0.04);
}

#R-body .card-container .card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.065);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

#R-body .card-container .card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.22);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

#R-body pre:not(.mermaid),
#R-body div.highlight > div:not(.actionbar) {
  background: #f7f8fa;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

#R-body pre:not(.mermaid),
#R-body pre code,
#R-body .highlight,
#R-body .highlight code {
  color: #1d1d1f;
  font-weight: 440;
  font-family: "SFMono-Regular", "SF Mono", ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 14px;
  line-height: 1.65;
}

#R-body .actionbar {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px 16px 0 0;
}

#R-body table {
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

#R-body table th {
  background: rgba(247, 249, 252, 1);
}

#R-body table td,
#R-body table th {
  font-size: 15px;
  line-height: 1.55;
}

#R-body blockquote {
  border-inline-start: 4px solid rgba(0, 113, 227, 0.32);
  background: rgba(245, 249, 255, 0.85);
  border-radius: 0 12px 12px 0;
  padding: 10px 14px;
}

#R-body .children-type-tree li,
#R-body .children-type-flat li,
#R-body .children-type-list li {
  margin: 4px 0;
}

#R-body .children-type-tree li > p,
#R-body .children-type-flat li > p,
#R-body .children-type-list li > p {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 10px;
  padding: 8px 10px;
}

article .R-taxonomy.tags {
  margin-left: 0;
  margin-top: 0.2rem;
}

article .R-taxonomy.tags a.term-link {
  background: rgba(241, 243, 245, 0.96) !important;
  color: #3a3a3c !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.9;
  margin: 0 8px 10px 0;
  padding: 2px 12px;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

article .R-taxonomy.tags a.term-link:before,
article .R-taxonomy.tags a.term-link:after {
  display: none;
}

article .R-taxonomy.tags a.term-link:hover {
  background: rgba(228, 239, 255, 0.96) !important;
  border-color: rgba(0, 102, 204, 0.26);
  color: #0066cc !important;
  transform: translateY(-1px);
}

#R-body .beehack-source-inline {
  display: inline-flex;
  align-items: center;
  margin-left: 0.65rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 249, 255, 0.92);
  border: 1px solid rgba(0, 113, 227, 0.18);
  color: rgba(0, 102, 204, 1);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  vertical-align: middle;
}

#R-body .beehack-source-inline:hover {
  background: rgba(232, 242, 255, 0.96);
  border-color: rgba(0, 102, 204, 0.28);
  text-decoration: none;
}

@keyframes beehack-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1023px) {
  #R-sidebar {
    inset-inline-start: 0;
    top: 0;
    min-height: 100%;
    height: 100%;
    min-width: var(--INTERNAL-MENU-M-width);
    max-width: var(--INTERNAL-MENU-M-width);
    width: var(--INTERNAL-MENU-M-width);
    border-radius: 0;
    border: 0;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  }

  #R-body {
    margin-inline-start: var(--INTERNAL-MENU-M-width);
    min-width: calc(100% - var(--INTERNAL-MENU-M-width));
    max-width: calc(100% - var(--INTERNAL-MENU-M-width));
    width: calc(100% - var(--INTERNAL-MENU-M-width));
  }

  #R-topbar > .topbar-wrapper {
    border-radius: 0;
  }

  #R-body-inner > .flex-block-wrapper > article {
    border-radius: 18px;
    padding: 16px;
  }

  #R-body :is(p, li) {
    font-size: 16px;
  }

  #R-body h1 {
    font-size: clamp(1.8rem, 1.65rem + 1.1vw, 2.25rem);
    line-height: 1.12;
  }

  #R-body h2 {
    font-size: clamp(1.35rem, 1.24rem + 0.7vw, 1.7rem);
  }
}
