:root {
  color-scheme: light;
  --cp-bg: #f7f4ef;
  --cp-bg-elevated: #fcfbf8;
  --cp-surface: #ffffff;
  --cp-surface-soft: #f5f5f5;
  --cp-border: #dedede;
  --cp-border-strong: #919191;
  --cp-text: #242424;
  --cp-text-muted: #5c5c5c;
  --cp-text-soft: #6f6f6f;
  --cp-accent: #b11f4b;
  --cp-accent-hover: #9a1a41;
  --cp-accent-soft: rgba(177, 31, 75, 0.08);
  --cp-accent-fg: #ffffff;
  --cp-success: #16a34a;
  --cp-danger: #dc2626;
  --cp-warning: #f59e0b;
  --cp-link: #0078d4;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
  --cp-overlay: rgba(255, 255, 255, 0.8);
  --cp-panel: rgba(255, 255, 255, 0.86);
  --cp-panel-strong: rgba(255, 255, 255, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.55);
  --cp-highlight: rgba(177, 31, 75, 0.12);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --cp-bg: #3d3b3a;
  --cp-bg-elevated: #343231;
  --cp-surface: #292929;
  --cp-surface-soft: #2e2e2e;
  --cp-border: #474747;
  --cp-border-strong: #5f5f5f;
  --cp-text: #dedede;
  --cp-text-muted: #919191;
  --cp-text-soft: #b0b0b0;
  --cp-accent: #fd8ea1;
  --cp-accent-hover: #fb7b91;
  --cp-accent-soft: rgba(253, 142, 161, 0.14);
  --cp-accent-fg: #1a1a1a;
  --cp-success: #4ade80;
  --cp-danger: #f87171;
  --cp-warning: #fbbf24;
  --cp-link: #4da6ff;
  --cp-shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
  --cp-overlay: rgba(41, 41, 41, 0.88);
  --cp-panel: rgba(41, 41, 41, 0.72);
  --cp-panel-strong: rgba(41, 41, 41, 0.96);
  --cp-sheen: rgba(255, 255, 255, 0.04);
  --cp-highlight: rgba(253, 142, 161, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--cp-surface); color: var(--cp-text); font-family: "Segoe UI", Aptos, Calibri, -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; line-height: 1.6; }
a { color: var(--cp-link); text-decoration: none; overflow-wrap: anywhere; }
a:hover { text-decoration: underline; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cp-accent); outline-offset: 3px; }
.site-header { position: fixed; z-index: 30; inset: 0 0 auto; height: 56px; border-bottom: 1px solid var(--cp-border); background: var(--cp-panel-strong); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 20px; gap: 16px; }
.header-left, .header-actions, .brand { display: flex; align-items: center; gap: 8px; }
.brand { gap: 10px; color: var(--cp-text); flex-shrink: 0; }
.brand:hover { text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; font-weight: 600; }
.brand small { color: var(--cp-text-muted); font-size: 10px; line-height: 1.15; }
.icon-button, .header-button { display: inline-grid; min-width: 34px; height: 34px; padding: 0 10px; place-items: center; border: 1px solid var(--cp-surface); border-radius: 0.625rem; background: var(--cp-surface); color: var(--cp-text); cursor: pointer; font-size: 14px; }
.icon-button:hover, .header-button:hover { border-color: var(--cp-border); background: var(--cp-surface-soft); text-decoration: none; }
.menu-toggle { display: none; }
.search-shell { position: relative; display: flex; align-items: center; width: min(360px, 31vw); height: 34px; padding: 0 10px; gap: 7px; border: 1px solid var(--cp-border-strong); border-radius: 0.625rem; background: var(--cp-surface); }
.search-shell:focus-within { border-color: var(--cp-accent); outline: 2px solid var(--cp-border); }
.search-shell input { width: 100%; min-width: 0; border: 0; outline: 0; background: var(--cp-surface); color: var(--cp-text); font-size: 14px; }
.search-results { position: absolute; top: 40px; right: 0; left: 0; display: none; max-height: 60vh; overflow: auto; border: 1px solid var(--cp-border); border-radius: 0.625rem; background: var(--cp-surface); }
.search-results.visible { display: block; }
.search-results a, .search-empty { display: block; padding: 9px 11px; border-bottom: 1px solid var(--cp-border); font-size: 14px; }
.search-results a:hover { background: var(--cp-surface-soft); text-decoration: none; }
.search-empty { color: var(--cp-text-muted); }
.sidebar { position: fixed; z-index: 20; top: 56px; bottom: 0; left: 0; width: 280px; overflow-y: auto; border-right: 1px solid var(--cp-border); background: var(--cp-bg-elevated); padding: 20px 12px 28px; }
.sidebar-section-title { padding: 0 10px 9px; color: var(--cp-text-muted); font-size: 12px; font-weight: 600; }
.sidebar-link { display: flex; align-items: flex-start; margin: 1px 0; padding: 7px 9px; gap: 7px; border-left: 3px solid var(--cp-bg-elevated); border-radius: 0 0.625rem 0.625rem 0; color: var(--cp-text); font-size: 13px; line-height: 1.35; }
.sidebar-link:hover { background: var(--cp-surface-soft); text-decoration: none; }
.sidebar-link[aria-current="page"] { border-left-color: var(--cp-accent); background: var(--cp-surface-soft); font-weight: 600; }
.nav-number { flex: 0 0 36px; color: var(--cp-text-muted); font-family: Consolas, "Courier New", Courier, monospace; font-size: 11px; }
.sidebar-overlay { display: none; }
.docs-layout { min-height: 100vh; margin-left: 280px; padding-top: 56px; }
.content-shell { display: grid; grid-template-columns: minmax(0, 820px) 220px; width: min(100%, 1160px); margin: 0 auto; gap: 56px; padding: 28px 40px 36px; }
.main-content { min-width: 0; }
.breadcrumbs { display: flex; align-items: center; margin: 0 0 24px; gap: 8px; color: var(--cp-text-muted); font-size: 13px; }
.document-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--cp-text-soft); margin-bottom: 16px; }
.document-meta span { color: var(--cp-accent); letter-spacing: 1px; }
.downloads { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.pdf-download { font-weight: 600; }
.download-panel { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 32px; padding: 20px; border: 1px solid var(--cp-border); border-radius: 0.625rem; background: var(--cp-bg-elevated); font-size: 14px; }
.article { min-height: 65vh; }
.article h1 { margin: 0 0 20px; font-size: clamp(32px, 4vw, 42px); font-weight: 600; line-height: 1.17; letter-spacing: -0.025em; }
.article h2 { margin: 42px 0 14px; padding-bottom: 6px; border-bottom: 1px solid var(--cp-border); font-size: 26px; font-weight: 600; line-height: 1.25; }
.article h3 { margin: 28px 0 10px; font-size: 20px; font-weight: 600; }
.article h4 { margin: 24px 0 8px; font-size: 17px; }
.article h1, .article h2, .article h3 { overflow-wrap: anywhere; }
.article p { margin: 0 0 16px; }
.article li { margin-bottom: 5px; }
.article ul, .article ol { margin: 8px 0 20px; padding-left: 28px; }
.article blockquote { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--cp-border); border-left: 4px solid var(--cp-accent); background: var(--cp-surface-soft); }
.table-scroll { overflow-x: auto; margin: 20px 0 28px; }
.article table { width: 100%; border-collapse: collapse; font-size: 14px; }
.article th, .article td { min-width: 128px; padding: 9px 12px; border: 1px solid var(--cp-border); text-align: left; vertical-align: top; }
.article th { background: var(--cp-surface-soft); font-weight: 600; }
.article pre { overflow-x: auto; margin: 18px 0 24px; padding: 18px; border: 1px solid var(--cp-border); border-radius: 0.625rem; background: var(--cp-bg-elevated); font-family: Consolas, "Courier New", Courier, monospace; font-size: 13px; line-height: 1.5; }
.article code { border-radius: 4px; background: var(--cp-surface-soft); font-family: Consolas, "Courier New", Courier, monospace; font-size: 0.92em; }
.article :not(pre) > code { padding: 2px 5px; overflow-wrap: anywhere; }
.article pre code { background: var(--cp-bg-elevated); font-size: inherit; }
.article img { display: block; max-width: 100%; height: auto; margin: 24px auto; border: 1px solid var(--cp-border); border-radius: 0.625rem; }
.article-toc { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 104px); overflow-y: auto; padding-left: 18px; border-left: 1px solid var(--cp-border); }
.article-toc-title { margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.article-toc-link { display: block; padding: 4px 0; color: var(--cp-text-muted); font-size: 12px; line-height: 1.35; }
.article-toc-link:hover, .article-toc-link.active { color: var(--cp-accent); text-decoration: none; }
.page-nav { display: grid; grid-template-columns: 1fr 1fr; margin-top: 52px; gap: 12px; }
.page-nav-item { display: flex; min-height: 78px; flex-direction: column; justify-content: center; padding: 12px 14px; border: 1px solid var(--cp-border); border-radius: 0.625rem; background: var(--cp-surface); }
.page-nav-item:hover { border-color: var(--cp-accent); text-decoration: none; }
.page-nav-item span { color: var(--cp-text-muted); font-size: 11px; }
.page-nav-item strong { font-size: 14px; font-weight: 600; }
.page-nav-item.next { align-items: flex-end; text-align: right; }
.site-footer { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--cp-border); color: var(--cp-text-muted); font-size: 12px; }
.scroll-top { position: fixed; z-index: 15; right: 20px; bottom: 20px; display: none; border-color: var(--cp-border); }
.scroll-top.visible { display: grid; }
.skip { position: fixed; left: 16px; top: -80px; padding: 12px 20px; border-radius: 0.625rem; background: var(--cp-accent); color: var(--cp-accent-fg); z-index: 40; }
.skip:focus { top: 12px; }
@media (max-width: 1120px) {
  .content-shell { grid-template-columns: minmax(0, 820px); max-width: 900px; }
  .article-toc { display: none; }
}
@media (max-width: 860px) {
  .menu-toggle { display: grid; }
  .brand small { display: none; }
  .search-shell { width: min(280px, 30vw); }
  .sidebar { transform: translateX(-100%); transition: transform 160ms ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; z-index: 19; inset: 56px 0 0; background: var(--cp-overlay); }
  .sidebar-overlay.visible { display: block; }
  .docs-layout { margin-left: 0; }
}
@media (max-width: 640px) {
  .header-inner { padding: 0 10px; gap: 4px; }
  .brand strong { font-size: 12px; }
  .header-left, .header-actions { gap: 4px; }
  .search-shell { position: static; width: 34px; padding: 0 9px; }
  .search-shell input { width: 0; }
  .search-shell:focus-within { position: absolute; right: 10px; left: 10px; width: auto; background: var(--cp-surface); }
  .search-shell:focus-within input { width: 100%; }
  .header-button { padding: 0 7px; font-size: 12px; }
  .content-shell { padding: 20px 18px 28px; }
  .article h1 { font-size: 32px; }
  .article h2 { font-size: 23px; }
  .page-nav { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar { transition: none; }
}
@media print {
  .site-header, .sidebar, .article-toc, .page-nav, .scroll-top, .skip, .downloads, .download-panel { display: none; }
  .docs-layout { margin: 0; padding: 0; }
  .content-shell { display: block; width: 100%; padding: 0; }
}
