/* Reading surface inside the existing Fangmu desktop window. */
.app-window[data-window-route="docs"] .window-content { max-height: none; overflow: hidden; }
.docs-window {
  height: 100%; min-height: 0; overflow: hidden;
  grid-template-columns: 248px minmax(0, 1fr) 190px;
  background: #fbfaf7; color: #173b49; color-scheme: light;
}
.docs-sidebar { min-height: 0; padding: 26px 14px 28px; background: #f1f1ec; border-color: #dce3df; overscroll-behavior: contain; }
.docs-sidebar-header { padding: 0 12px 6px; }
.docs-brand { color: #2d6074; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.05em; }
.docs-sidebar-header h2 { margin-top: 4px; color: #173b49; font-size: 1.45rem; }
.docs-search-label, .docs-project-label { color: #476270; text-transform: none; letter-spacing: 0; font-size: 0.78rem; }
.docs-search-label input, .docs-project-label select { box-sizing: border-box; background: #fbfaf7; color: #173b49; border-color: #c5d1cd; min-height: 42px; border-radius: 7px; }
.docs-search-label input::placeholder { color: #657b83; font-size: 0.74rem; }
.docs-search-label input:focus-visible, .docs-project-label select:focus-visible { outline-color: #2d6074; }
.docs-search-status { margin: 16px 12px 10px; color: #516975; font-size: 0.75rem; }
.docs-search-status[data-empty="true"] { color: #9a421f; }
.docs-nav-group { margin-top: 22px; }
.docs-nav-group h3 { margin: 0 12px 7px; color: #516975; font-family: inherit; font-weight: 650; font-size: 0.75rem; letter-spacing: 0; }
.docs-nav-item { box-sizing: border-box; width: 100%; padding: 9px 12px; border-radius: 6px; text-decoration: none; color: #355462; }
.docs-nav-item strong { font-weight: 500; font-size: 0.82rem; line-height: 1.5; }
.docs-nav-item small { display: none; white-space: normal; line-height: 1.6; color: #516975; }
.docs-nav-item:hover, .docs-nav-item[aria-current="page"] { border-color: transparent; background: #e0e9e4; color: #173b49; }
.docs-nav-item[aria-current="page"] strong { font-weight: 700; }
.docs-search-status:not([data-empty="true"]) + .docs-chapters:has(.docs-nav-item[hidden]) .docs-nav-item small { display: block; }
.docs-window [hidden] { display: none !important; }
.docs-reader { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.docs-reader-toolbar { min-height: 48px; flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 0 34px; border-bottom: 1px solid #e0e5df; font-size: 0.75rem; color: #516975; }
.docs-home-link { color: #2d6074; text-decoration: none; }
.docs-reader-location { margin-left: auto; }
.docs-menu-toggle { display: none; border: 1px solid #c5d1cd; background: transparent; color: #173b49; border-radius: 6px; padding: 8px 10px; font: inherit; cursor: pointer; }
.docs-content { position: relative; min-height: 0; padding: 36px clamp(22px, 4vw, 60px) 44px; overflow-y: auto; overscroll-behavior: contain; }
.docs-article-header, .docs-markdown, .docs-pagination { max-width: 800px; margin-right: auto; margin-left: auto; }
.docs-article-header { margin-bottom: 30px; outline: none; }
.docs-breadcrumb { margin: 0 0 14px; color: #637982; font-size: 0.78rem; }
.docs-article-header h1 { margin: 0; color: #173b49; font-size: clamp(1.7rem, 2.4vw, 2.5rem); font-weight: 650; font-family: "Noto Serif SC", "Songti SC", serif; line-height: 1.45; }
.docs-summary { margin: 16px 0 30px; color: #546c77; font-size: 0.88rem; line-height: 1.8; }
.docs-markdown { color: #274754; font-size: 0.95rem; overflow-wrap: anywhere; }
.docs-markdown h2, .docs-markdown h3, .docs-markdown h4 { color: #173b49; scroll-margin-top: 20px; line-height: 1.5; }
.docs-markdown h2 { padding-top: 7px; font-size: 1.35rem; }
.docs-markdown h3 { font-size: 1.1rem; }
.docs-markdown strong { font-weight: 650; }
.docs-markdown code { background: #edf0e8; color: #63582e; font-family: Consolas, monospace; }
.docs-markdown pre { border-color: #dce3df; background: #f0f2eb; }
.docs-markdown pre code { color: #274754; }
.docs-markdown blockquote { background: #f5eee1; color: #715227; border-color: #e96b43; font-size: 0.87rem; }
.docs-markdown a { color: #276f89; text-decoration-color: #8aafbc; }
.docs-markdown img { border-color: #dce3df; border-radius: 8px; box-shadow: none; }
.docs-markdown .docs-image-link { display: block; text-decoration: none; }
.docs-markdown .docs-image-link img { display: block; width: 100%; height: auto; margin: 0; cursor: zoom-in; }
.docs-image-link span { display: block; margin-top: 8px; color: #516975; font-size: 0.75rem; }
.docs-markdown hr { margin: 28px 0; border: 0; border-top: 1px solid #dce3df; }
.docs-table-scroll { margin: 22px 0; overflow-x: auto; border: 1px solid #dce3df; border-radius: 6px; }
.docs-markdown table { width: 100%; border-collapse: collapse; font-size: 0.86rem; line-height: 1.7; }
.docs-markdown th, .docs-markdown td { padding: 11px 14px; min-width: 110px; border-bottom: 1px solid #dce3df; text-align: left; vertical-align: top; }
.docs-markdown th { background: #eff2eb; font-weight: 650; color: #173b49; }
.docs-markdown tr:last-child td { border-bottom: 0; }
.docs-toc { min-height: 0; overflow-y: auto; padding: 32px 18px; border-left: 1px solid #e0e5df; }
.docs-toc h2 { margin: 0 0 14px; font-size: 0.76rem; font-weight: 650; color: #516975; }
.docs-toc a { display: block; margin: 8px 0; color: #516975; text-decoration: none; font-size: 0.75rem; line-height: 1.6; }
.docs-toc a:hover { color: #173b49; text-decoration: underline; }
.docs-toc .docs-toc-sub { padding-left: 12px; font-size: 0.71rem; }
.docs-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 44px; padding-top: 24px; border-top: 1px solid #dce3df; }
.docs-pagination a { display: grid; gap: 5px; padding: 12px; border: 1px solid #dce3df; border-radius: 7px; color: #2d6074; text-decoration: none; font-size: 0.86rem; }
.docs-pagination a:last-child { text-align: right; }
.docs-pagination small { color: #637982; font-size: 0.75rem; }
.docs-pagination strong { font-weight: 500; }
.docs-window a:focus-visible, .docs-window button:focus-visible, .docs-table-scroll:focus-visible { outline: 2px solid #2d6074; outline-offset: 2px; }
@media (max-width: 1180px) {
  .docs-window { grid-template-columns: 240px minmax(0, 1fr); }
  .docs-toc { display: none; }
}
@media (max-width: 900px) {
  .docs-window { grid-template-columns: 220px minmax(0, 1fr); min-height: 0; }
  .docs-sidebar { border-right: 1px solid #dce3df; border-bottom: 0; }
  .docs-nav-group { display: block; overflow: visible; margin-top: 22px; }
  .docs-nav-group h3 { display: block; }
  .docs-content { padding: 30px 24px 38px; }
}
@media (max-width: 720px) {
  .docs-window { grid-template-columns: minmax(0, 1fr); position: relative; }
  .docs-sidebar { display: none; }
  .docs-window[data-contents-open="true"] .docs-sidebar { display: block; position: absolute; inset: 48px 0 0; z-index: 4; background: #f1f1ec; }
  .docs-window[data-contents-open="true"] .docs-content { visibility: hidden; }
  .docs-menu-toggle { display: block; }
  .docs-reader-toolbar { padding: 0 14px; gap: 10px; }
  .docs-reader-location { display: none; }
  .docs-home-link { margin-left: auto; }
  .docs-content { padding: 25px 20px 32px; }
  .docs-article-header h1 { font-size: 1.65rem; }
  .docs-pagination { gap: 9px; }
  .docs-pagination a { padding: 10px; font-size: 0.78rem; }
}
