:root {
  --bg-page: #f5f8fc;
  --bg-sidebar: #f1f5fa;
  --border-color: #dce5ef;
  --border-strong: #c4d2e1;
  --sidebar-width: 280px;
  --toc-width: 224px;
  --topbar-height: 72px;
}

body { height: 100dvh; }
.docs-container { height: calc(100dvh - var(--topbar-height)); min-height: 0; }
.docs-topbar { gap: 24px; padding: 0 28px; box-shadow: 0 3px 18px rgb(24 49 80 / .03); }
.topbar-left { min-width: 0; gap: 22px; }
.brand-group { flex-shrink: 0; }
.brand-logo-img { height: 36px; }
.brand-section-label { font-weight: 600; }
.topbar-breadcrumb { min-width: 0; }
.breadcrumb-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { flex-shrink: 0; }
.btn-topbar { border-radius: 7px; padding: 8px 13px; }
.btn-topbar:focus-visible,
.docs-nav-toggle:focus-visible,
.docs-nav-close:focus-visible,
.nav-item:focus-visible,
.doc-nav-card:focus-visible { outline: 2px solid #2563eb; outline-offset: 3px; }

.docs-sidebar { background: #f1f5fa; }
.sidebar-search-box { padding: 20px 18px 16px; background: transparent; }
.sidebar-search-input { padding: 11px 12px; border-radius: 7px; background: #fff; }
.sidebar-search-meta { margin-top: 12px; }
.docs-nav-tree { padding: 16px 12px 28px; scrollbar-width: thin; }
.group-header { padding: 8px 10px; font-size: 10px; letter-spacing: .8px; }
.group-count { background: #e4ecf4; border-radius: 5px; }
.group-items { gap: 3px; }
.nav-item { padding: 10px 12px; border-left: 0; border-radius: 7px; line-height: 1.5; }
.nav-item:hover { background: #e7eef7; }
.nav-item.active { background: #e2ecfb; color: #1e40af; box-shadow: inset 3px 0 #2856b4; }
.nav-item-title { min-width: 0; white-space: normal; }
.nav-item-code { border: 0; background: #e8eef5; font-size: 10px; }

.docs-main-content {
  position: relative;
  isolation: isolate;
  min-width: 0;
  overflow-x: hidden;
  background: linear-gradient(#f4f8fc, #fff 280px);
  scrollbar-gutter: stable;
}
.doc-content-wrapper {
  position: relative;
  isolation: isolate;
  max-width: 960px;
  padding: 40px clamp(24px, 4vw, 56px) 64px;
}
.doc-content-wrapper::before {
  content: "";
  position: absolute;
  top: 12px;
  right: 24px;
  width: 260px;
  height: 260px;
  z-index: -1;
  pointer-events: none;
  opacity: .045;
  background: url('/images/Workniverse.png') center / contain no-repeat;
  transform: rotate(-8deg);
}
.doc-header-card { margin-bottom: 28px; padding-bottom: 28px; }
.doc-category-badge { border: 0; padding: 5px 9px; font-weight: 600; letter-spacing: .4px; }
.doc-headline { font-size: clamp(26px, 2.5vw, 34px); line-height: 1.3; text-wrap: balance; }
.doc-description { max-width: 68ch; margin-bottom: 0; line-height: 1.75; }
.btn-open-route { border-radius: 7px; padding: 7px 11px; }
.markdown-body { font-size: 15px; line-height: 1.85; overflow-wrap: anywhere; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { text-wrap: balance; scroll-margin-top: 24px; }
.markdown-body table { display: block; max-width: 100%; overflow-x: auto; }
.markdown-body th { background: #f0f5fa; white-space: nowrap; }
.markdown-body blockquote { background: #f3f7fc; border-left-color: #4771b1; border-radius: 0 7px 7px 0; }
.doc-nav-card { border-radius: 9px; padding: 16px 18px; }
.docs-toc-sidebar { background: #f9fbfd; padding: 28px 16px; scrollbar-width: thin; }
.toc-title { font-size: 11px; letter-spacing: .7px; }
.toc-link { padding: 8px 10px; border-radius: 6px; line-height: 1.6; }
.btn-toc-action { background: #fff; border-radius: 7px; padding: 9px 10px; }
.docs-nav-toggle, .docs-mobile-nav-head, .docs-nav-overlay { display: none; }
.docs-nav-overlay[hidden] { display: none; }

@media (max-width: 1300px) {
  .topbar-breadcrumb { display: none; }
}
@media (max-width: 800px) {
  .docs-topbar { padding: 0 16px; gap: 12px; }
  .topbar-left { gap: 12px; }
  .brand-divider, .brand-section-label { display: none; }
  .docs-nav-toggle, .docs-nav-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #fff;
    color: #334155;
    padding: 8px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .docs-nav-toggle:hover, .docs-nav-close:hover { background: #edf3fb; }
  .docs-nav-toggle[aria-expanded=true] { color: #1e40af; background: #e9f0fc; }
  .docs-sidebar {
    display: flex;
    position: fixed;
    top: var(--topbar-height);
    bottom: 0;
    left: 0;
    width: min(320px, calc(100vw - 44px));
    min-width: 0;
    height: calc(100dvh - var(--topbar-height));
    z-index: 45;
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 220ms ease, visibility 220ms;
  }
  .docs-nav-open .docs-sidebar { transform: none; visibility: visible; }
  .docs-mobile-nav-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 0; gap: 12px; }
  .docs-mobile-nav-head strong { font-size: 14px; font-weight: 600; }
  .docs-nav-overlay { display: block; position: fixed; inset: var(--topbar-height) 0 0; padding: 0; border: 0; background: rgb(15 32 49 / .3); z-index: 40; cursor: pointer; }
  .doc-content-wrapper { padding: 28px 24px 48px; }
  .doc-content-wrapper::before { width: 210px; height: 210px; right: 12px; opacity: .035; }
  .topbar-right .btn-topbar-ghost { display: none; }
}
@media (max-width: 420px) {
  .docs-topbar { padding: 0 12px; gap: 8px; }
  .topbar-left { gap: 8px; }
  .brand-logo-img { height: 28px; }
  .btn-topbar { font-size: 12px; padding: 8px 10px; }
  .doc-content-wrapper { padding: 24px 20px 40px; }
  .doc-nav-footer { gap: 10px; }
  .doc-nav-card { padding: 12px; }
}
.docs-embedded .docs-container { height: 100dvh; }
.docs-embedded .docs-main-content { background: #fff; }
.docs-embedded .doc-content-wrapper { max-width: 960px; }
.docs-embedded .docs-nav-overlay { display: none; }

@media (prefers-reduced-motion: reduce) {
  .docs-sidebar { transition: none; }
}
@media print {
  body { height: auto; overflow: visible; }
  .docs-topbar, .docs-sidebar, .docs-toc-sidebar, .docs-nav-overlay, .doc-nav-footer, .btn-open-route { display: none !important; }
  .docs-container, .docs-main-content { display: block; height: auto; overflow: visible; background: #fff; }
  .doc-content-wrapper { padding: 0; max-width: none; }
  .doc-content-wrapper::before { display: none; }
  .markdown-body table { display: table; }
}
.btn-open-route[hidden] { display: none; }

.docs-main-content, .doc-content-wrapper, .markdown-body { min-width: 0; max-width: 100%; }
.markdown-body { overflow-wrap: anywhere; }
.markdown-body img, .markdown-body video, .markdown-body iframe { max-width: 100%; }
.markdown-body pre { max-width: 100%; overflow-x: auto; }
.markdown-body table { max-width: 100%; overflow-x: auto; }
.docs-topbar { flex-shrink: 0; }
@media (max-width: 1024px) {
  .docs-sidebar { --sidebar-width: 240px; }
  .doc-content-wrapper { padding: 24px; }
}
@media (max-width: 640px) {
  .doc-content-wrapper { padding: 20px 16px 36px; }
  .doc-nav-footer { display: flex; flex-wrap: wrap; }
  .doc-nav-card { flex: 1 1 180px; min-width: 0; }
  .markdown-body h1 { font-size: 26px; }
  .markdown-body h2 { font-size: 22px; }
  .markdown-body table { display: block; }
  .topbar-right { min-width: 0; gap: 6px; }
}
