:root {
  --theme-color: #3b60d6;
  --color-text: #3c3c43;
  --color-bg: #ffffff;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-size: 16px;
  --font-weight: 400;
  --heading-color: #202127;
  --heading-font-weight: 650;
  --strong-color: #25262d;
  --sidebar-width: 248px;
  --sidebar-font-size: 14px;
  --sidebar-bg: #fafafa;
  --sidebar-border-color: #e8e8ed;
  --sidebar-link-color-active: #3458cb;
  --content-max-width: 760px;
  --content-margin-inline: 40px;
  --border-color: #e8e8ed;
  --border-radius: 14px;
  --code-bg: #f2f3f6;
  --code-color: #3b55a5;
  --codeblock-bg: #f6f7f9;
  --codeblock-color: #303540;
  --scroll-padding-top: 96px;
  --site-muted: #787881;
}

body { -webkit-font-smoothing: antialiased; }

.site-header {
  position: fixed;
  z-index: 80;
  inset: 0 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px 0 24px;
  border-bottom: 1px solid var(--border-color);
  background: #ffffffed;
  backdrop-filter: blur(12px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #25262d;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.02em;
  text-decoration: none !important;
}

.site-brand img { display: block; }
.site-navigation { display: flex; align-items: center; gap: 28px; }
.site-header-link { color: #555560; font-size: 13px; text-decoration: none !important; }
.site-header-link:hover, .site-header-link[aria-current="page"], .site-header-link.is-active { color: var(--theme-color); }

.sidebar {
  position: fixed !important;
  top: 64px;
  padding: 20px 0 28px;
  overflow-y: auto;
  border-radius: 0;
}

.app-name { display: none; }
.sidebar .search { margin: 0 16px 22px; padding: 0; border: 0; }
.sidebar .search input {
  height: 40px;
  padding: 0 30px 0 34px;
  border: 1px solid #e2e2e8;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2382828c' stroke-width='1.6' viewBox='0 0 24 24'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") 11px center no-repeat;
  color: var(--color-text);
  font-size: 13px;
  box-shadow: 0 1px 2px #20212704;
}
.sidebar .search input:focus { outline: 2px solid #3b60d630; outline-offset: 1px; }
.sidebar .search .matching-post { padding-inline: 2px; }
.sidebar .search .matching-post h2 { font-size: 14px; }
.sidebar .search .matching-post p { font-size: 12px; line-height: 1.6; }

.sidebar-nav { padding: 0 16px; }
.sidebar-nav ul { margin: 0; padding: 0; }
.sidebar-nav > ul > li { margin: 0 0 8px; }
.sidebar-nav li { margin: 2px 0; }
.sidebar-nav li > ul { margin-top: 10px; padding-left: 0; }
.sidebar-nav li.group { padding: 6px 12px 0; color: #7b7d87; font-size: 12px; font-weight: 600; line-height: 20px; }
.sidebar-nav li.group > ul { margin: 10px -12px 0; padding: 0; }
.sidebar .sidebar-nav a.page-link { display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 400; line-height: 1.5; text-decoration: none !important; }
.sidebar .sidebar-nav a.page-link:hover { background: #f0f0f3; color: #25262d; text-decoration: none !important; }
.sidebar .sidebar-nav li.active > a.page-link { background: #eceff7; color: #3458cb; font-weight: 600; }
.sidebar-nav .sidebar-folder-row { display: flex; align-items: center; }
.sidebar-folder-row > a { flex: 1; min-width: 0; }
.sidebar-nav .sidebar-folder-toggle { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 38px; margin: 0; padding: 8px 12px; border: 0; border-radius: 0; outline: none; box-shadow: none; background: transparent; color: #555560; font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.sidebar-folder-toggle::after { content: ""; width: 5px; height: 5px; margin-left: auto; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.sidebar-folder-toggle[aria-expanded="true"]::after { transform: rotate(45deg); }
.sidebar-nav .sidebar-folder-toggle:hover, .sidebar-nav .sidebar-folder-toggle:focus { outline: none; box-shadow: none; background: transparent; color: #25262d; }
.sidebar-nav .sidebar-folder-toggle:focus-visible { outline: none; box-shadow: none; text-decoration: underline; text-underline-offset: 5px; }
.sidebar-nav .sidebar-folder-toggle-icon { flex: 0 0 32px; width: 32px; padding-inline: 10px; }
.sidebar-nav .sidebar-folder > ul { margin: 3px 0 6px 20px; padding-left: 8px; border-left: 1px solid #e4e6ed; }
.sidebar-nav .sidebar-folder > ul[hidden] { display: none; }

.sidebar-toggle {
  position: fixed !important;
  z-index: 90;
  top: 16px;
  bottom: auto;
  left: 204px;
  width: 28px;
  height: 32px;
  translate: none !important;
  background: transparent !important;
}
.sidebar-toggle-button { height: 32px; width: 28px; margin: 0; border-radius: 10px; background: transparent; color: #74747e; }
.sidebar-toggle-button:hover { background: #f0f0f3 !important; color: #25262d !important; }
.sidebar-toggle-button span { height: 2px; width: 15px; border-radius: 1px; }
.sidebar-toggle-button span:nth-child(2) { margin-block: 4px; }

main > .content { top: 64px; padding: 42px 256px 96px 48px; }
.markdown-section {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 0 80px;
  font-size: 15px;
  line-height: 1.8;
}
.markdown-section h1 { margin: 0 0 24px; font-size: 32px; line-height: 1.35; letter-spacing: -.035em; }
.markdown-section h2 { margin: 44px 0 20px; padding: 24px 0 0; border-top: 1px solid var(--border-color); border-bottom: 0; font-size: 23px; line-height: 1.45; letter-spacing: -.025em; }
.markdown-section h3 { margin: 28px 0 16px; font-size: 18px; line-height: 1.5; }
.markdown-section h4 { margin-top: 24px; font-size: 16px; }
.markdown-section :is(h1, h2, h3, h4) { scroll-margin-top: 0; }
.markdown-section :is(p, li) { line-height: 1.9; }
.markdown-section li + li { margin-top: 6px; }
.markdown-section a:not(.anchor) { font-weight: 500; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.markdown-section > :last-child { margin-bottom: 0; }
.markdown-section pre { margin-block: 20px; padding: 20px 22px; border: 1px solid #ebecf0; border-radius: 14px; }
.markdown-section pre code { font-size: 13px; line-height: 1.8; }
.markdown-section :not(pre) > code { padding: 3px 6px; border-radius: 6px; font-size: .87em; }
.markdown-section blockquote { padding: 6px 16px; border-left: 3px solid #bbc5e8; border-radius: 0 12px 12px 0; background: #f7f8fc; color: #646775; }
.markdown-section table { display: block; max-width: 100%; overflow-x: auto; border-radius: 12px; font-size: 14px; }
.markdown-section th { background: #f6f6f8; font-weight: 600; }

.code-block { position: relative; margin: 20px 0; overflow: hidden; border: 1px solid #e7e9f1; border-radius: 14px; background: var(--codeblock-bg); }
.code-toolbar { position: absolute; z-index: 1; inset: 0 0 auto; height: 0; pointer-events: none; }
.code-language { position: absolute; top: 9px; left: 22px; color: #9297a5; font-family: var(--font-family-mono); font-size: 10px; line-height: 12px; }
.markdown-section .code-copy-button { display: inline-flex; position: absolute; top: 5px; right: 8px; align-items: center; justify-content: center; height: 28px; width: 28px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 7px; background: transparent; color: #8991a3; cursor: pointer; box-shadow: none; opacity: 0; pointer-events: none; transition: opacity var(--duration-fast), color var(--duration-fast); }
.code-copy-button::before { width: 15px; height: 15px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='12' height='12' rx='3'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2'/%3E%3C/svg%3E") center / contain no-repeat; content: ""; }
.markdown-section .code-copy-button:hover { background: transparent; color: var(--theme-color); outline: none; }
.markdown-section .code-copy-button:focus-visible { outline: 2px solid #3b60d640; outline-offset: 1px; opacity: 1; pointer-events: auto; }
.code-block.show-tools .code-copy-button { opacity: 1; pointer-events: auto; }
.markdown-section .code-copy-button[data-state="copied"] { background: transparent; color: #2f6f58; }
.code-copy-button[data-state="copied"]::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4 4L19 6'/%3E%3C/svg%3E"); }
.markdown-section .code-copy-button[data-state="error"] { color: #b04b47; }
.markdown-section .code-block pre { margin: 0; border: 0; border-radius: 0 !important; }
.markdown-section .code-block pre::after { display: none; }
.markdown-section .code-block pre > code { padding: 28px 22px 20px !important; scrollbar-width: thin; scrollbar-color: #d0d4df transparent; }
.code-block pre > code::-webkit-scrollbar { height: 6px; width: 6px; }
.code-block pre > code::-webkit-scrollbar-track { background: transparent; }
.code-block pre > code::-webkit-scrollbar-thumb { border-radius: 999px; background: #d0d4df; }
.code-block pre > code::-webkit-scrollbar-thumb:hover { background: #aeb7c8; }

@media (hover: hover) {
  .code-block:hover .code-copy-button { opacity: 1; pointer-events: auto; }
}

.page-outline {
  position: fixed;
  z-index: 10;
  top: 106px;
  right: 32px;
  width: 184px;
  max-height: calc(100vh - 142px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.outline-panel { margin: 0; padding: 0; border: 0; background: transparent; }
.outline-panel summary { padding: 0 0 12px 16px; color: #34343c; font-size: 12px; font-weight: 650; list-style: none; cursor: pointer; }
.outline-panel summary::-webkit-details-marker { display: none; }
.outline-panel summary::after { content: "⌄"; margin-left: 8px; color: #92929c; font-weight: 400; }
.outline-panel:not([open]) summary::after { content: "›"; }
.outline-panel nav { border-left: 0; }
.outline-panel ul { margin: 0; padding: 0; list-style: none; }
.outline-panel ul[hidden] { display: none; }
.outline-panel li { margin: 0; }
.outline-panel a { display: block; position: relative; padding: 5px 8px 5px 16px; border-radius: 0; color: #85858f; font-size: 12px; line-height: 1.65; text-decoration: none !important; transition: color .15s; }
.outline-panel a:hover { color: #3c3c43; }
.outline-panel a.is-active { background: transparent; color: var(--theme-color); font-weight: 600; }
.outline-panel a.is-active::before { display: none; }
.outline-panel .outline-level-3 > a { padding-left: 28px; }
.outline-panel .outline-level-4 > a { padding-left: 40px; }

@media (max-width: 1179px) {
  main > .content { padding: 32px 44px 80px; }
  .page-outline { position: relative; inset: auto; width: 100%; max-width: var(--content-max-width); max-height: none; margin: 0 auto 28px; overflow: visible; }
  .outline-panel { border: 1px solid var(--border-color); border-radius: 14px; background: #fafafb; }
  .outline-panel summary { padding: 11px 15px; color: #71717c; font-weight: 500; }
  .outline-panel nav { max-height: 280px; margin: 0 15px 14px; overflow-y: auto; }
}
@media (max-width: 640px) {
  .site-header { padding: 0 18px 0 52px; }
  .site-brand { gap: 8px; font-size: 16px; }
  .site-navigation { gap: 20px; }
  .sidebar-toggle { left: 12px; width: 28px !important; }
  .sidebar-toggle-button { width: 28px; }
  .sidebar { width: min(var(--sidebar-width), 85vw); }
  main > .content { padding: 24px 22px 64px; }
  .markdown-section { padding-bottom: 48px; }
  .markdown-section h1 { font-size: 28px; }
  .markdown-section h2 { font-size: 21px; margin-top: 32px; }
  .markdown-section pre { padding: 16px; }
  .code-block { margin-inline: -8px; border-radius: 12px; }
  .code-language { left: 16px; }
  .markdown-section .code-block pre > code { padding: 28px 16px 18px !important; }
}

:root.is-home { --sidebar-width: 0px; }
.is-home .sidebar, .is-home .sidebar-toggle, .is-home .page-outline { display: none !important; }
.is-home .site-header { padding-inline: max(28px, calc((100vw - 1080px) / 2)); }
.is-home main > .content { margin: 0; inset-inline-start: 0; width: 100%; padding: 0 40px; transition: none; }
.is-home .markdown-section { max-width: 1080px; padding: 0; }
.home-page p { margin: 0; line-height: 1.7; }
.home-hero { display: flex; align-items: center; justify-content: center; min-height: calc(100svh - 64px); padding-block: 80px; text-align: center; }
.home-page h1 { margin: 0 0 22px; color: #222630; font-size: clamp(52px, 6vw, 76px); font-weight: 700; line-height: 1.15; letter-spacing: -.055em; }
.home-page .home-welcome { color: #7c808b; font-size: 18px; }
.home-page .home-primary-link { display: inline-flex; align-items: center; justify-content: center; gap: 18px; margin-top: 32px; padding: 12px 22px; border-radius: 9px; background: var(--theme-color); color: #fff; font-size: 14px; font-weight: 550; text-decoration: none; transition: background .15s; }
.home-page .home-primary-link:hover,
.home-page .home-primary-link:focus-visible { background: #2f50c2; color: #fff; text-decoration: none; }
.home-primary-link:focus-visible { outline: 3px solid #3b60d640; outline-offset: 4px; }
.home-primary-link span { font-size: 18px; }

@media (max-width: 640px) {
  .is-home .site-header { padding-inline: 22px; }
  .is-home main > .content { padding: 0 24px; }
  .home-page h1 { font-size: 52px; }
  .home-page .home-welcome { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .home-primary-link { transition: none; }
}
@media print {
  .site-header, .page-outline { display: none; }
  main > .content { position: static; padding: 0; }
  .markdown-section { max-width: none; }
  .code-copy-button { display: none !important; }
}
