/* =============================================================
 * NeuroAI 自研文档系统样式 · 深色科技风格
 * 与主站深色主题统一
 * ============================================================= */

:root {
    --doc-primary: #6366f1;
    --doc-primary-dark: #4f46e5;
    --doc-secondary: #8b5cf6;
    --doc-cyan: #06b6d4;
    --doc-gradient: linear-gradient(135deg, #06b6d4 0%, #3b82f6 35%, #6366f1 70%, #8b5cf6 100%);
    --doc-bg: #05070d;
    --doc-surface: rgba(16, 22, 42, 0.8);
    --doc-surface-solid: #10162a;
    --doc-surface-alt: rgba(99, 102, 241, 0.08);
    --doc-border: rgba(148, 163, 184, 0.12);
    --doc-border-strong: rgba(148, 163, 184, 0.2);
    --doc-text: #f1f5f9;
    --doc-text-secondary: #94a3b8;
    --doc-text-muted: #64748b;
    --doc-code-bg: rgba(99, 102, 241, 0.12);
    --doc-code-color: #c084fc;
    --doc-radius-sm: 10px;
    --doc-radius: 14px;
    --doc-radius-lg: 18px;
    --doc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.4);
    --doc-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    --doc-shadow-hover: 0 20px 40px -20px rgba(99, 102, 241, 0.4);
    --doc-glow: 0 0 30px -5px rgba(99, 102, 241, 0.5);
    --doc-sidebar-w: 272px;
    --doc-toc-w: 248px;
    --doc-container: 1440px;
}

/* ============================================================
 * 0. 通用
 * ============================================================ */
.neuroai-doc {
    color: var(--doc-text);
    font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--doc-bg);
    word-break: break-word;
}
.neuroai-doc .container { max-width: var(--doc-container); width: 100%; margin: 0 auto; padding: 0 48px; }
.neuroai-doc a { color: var(--doc-primary); text-decoration: none; transition: color .15s ease, opacity .15s ease; }
.neuroai-doc a:hover { color: var(--doc-primary-dark); text-decoration: underline; text-underline-offset: 3px; }
.neuroai-doc .text-gradient {
    background: var(--doc-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

/* ============================================================
 * 1. 面包屑
 * ============================================================ */
.neuroai-doc-breadcrumb {
    font-size: 13px;
    line-height: 1;
    padding: 14px 0;
}
.neuroai-doc-breadcrumb ol {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.neuroai-doc-breadcrumb li {
    color: var(--doc-text-muted);
    display: inline-flex;
    align-items: center;
}
.neuroai-doc-breadcrumb li a { color: var(--doc-text-secondary); }
.neuroai-doc-breadcrumb li a:hover { color: var(--doc-primary); }
.neuroai-doc-breadcrumb li[aria-current="page"] { color: var(--doc-primary); font-weight: 500; }
.neuroai-doc-breadcrumb li.sep { color: var(--doc-text-muted); opacity: .6; padding: 0 2px; }

/* ============================================================
 * 2. 文档首页 archive-doc
 * ============================================================ */
.neuroai-doc-archive .doc-hero {
    padding: 48px 0 56px;
    background:
        radial-gradient(1000px 420px at 80% -10%, rgba(139, 92, 246, 0.2), transparent 60%),
        radial-gradient(800px 380px at -10% 0%, rgba(6, 182, 212, 0.15), transparent 60%),
        linear-gradient(180deg, rgba(5, 7, 13, 0.9) 0%, rgba(10, 14, 26, 0.8) 100%);
    border-bottom: 1px solid var(--doc-border);
}
.neuroai-doc-archive .doc-hero-title {
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 10px 0 16px;
}
.neuroai-doc-archive .doc-hero-subtitle {
    color: var(--doc-text-secondary);
    font-size: 16px;
    line-height: 1.7;
    max-width: 720px;
    margin: 0 0 28px;
}
.doc-hero-search {
    position: relative;
    max-width: 720px;
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: 16px;
    padding: 6px 6px 6px 18px;
    box-shadow: 0 12px 30px -20px rgba(99,102,241,.35), var(--doc-shadow-sm);
    transition: border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.doc-hero-search:focus-within {
    border-color: rgba(99,102,241,.6);
    box-shadow: 0 0 0 4px rgba(99,102,241,.12), 0 18px 40px -24px rgba(99,102,241,.45);
}
.doc-hero-search input[type="search"] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 6px;
    font-size: 15px;
    border: 0;
    background: transparent;
    color: var(--doc-text);
    outline: none;
    box-shadow: none;
    line-height: 1.5;
}
.doc-hero-search input[type="search"]::placeholder { color: var(--doc-text-muted); }
.doc-hero-search button[type="submit"] {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    border: 0;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--doc-gradient);
    box-shadow: 0 6px 16px -8px rgba(99,102,241,.65);
    transition: transform .05s ease, filter .15s ease, box-shadow .15s ease;
    flex-shrink: 0;
}
.doc-hero-search button[type="submit"]:hover { filter: brightness(1.05); box-shadow: 0 10px 22px -10px rgba(99,102,241,.8); }
.doc-hero-search button[type="submit"]:active { transform: translateY(1px); }

.doc-products { padding: 48px 0 80px; }
.doc-products .section-head { margin-bottom: 32px; text-align: center; }
.doc-products .section-head h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 6px;
}
.doc-products .muted { color: var(--doc-text-secondary); margin: 0; font-size: 14.5px; }

.neuroai-doc-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    justify-items: center;
}
.neuroai-doc-cards .dbhoo-bento-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99,102,241,.35);
    box-shadow: 0 18px 40px -22px rgba(99,102,241,.35);
}
.neuroai-doc-cards .dbhoo-bento-card a:hover { text-decoration: none; }
.neuroai-doc-cards .doc-card-foot { color: var(--doc-primary); font-weight: 600; }
.neuroai-doc-empty {
    padding: 28px;
    background: var(--doc-surface);
    border: 1px dashed var(--doc-border-strong);
    border-radius: var(--doc-radius);
    color: var(--doc-text-secondary);
}

/* ============================================================
 * 3. 产品线归档 taxonomy-doc_product · 两栏
 * ============================================================ */
.neuroai-doc-taxonomy .doc-tax-wrap {
    display: grid;
    grid-template-columns: var(--doc-sidebar-w) minmax(0, 1fr);
    gap: 32px;
    padding-top: 16px;
    padding-bottom: 64px;
    align-items: flex-start;
}
.neuroai-doc-taxonomy .doc-sidebar { position: sticky; top: 84px; }
.neuroai-doc-taxonomy .tax-header { padding: 18px 0 6px; }
.neuroai-doc-taxonomy .tax-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
}
.neuroai-doc-taxonomy .tax-desc {
    color: var(--doc-text-secondary);
    font-size: 15px;
    line-height: 1.7;
    max-width: 720px;
}
.neuroai-doc-taxonomy .tax-section-head { margin: 28px 0 14px; }
.neuroai-doc-taxonomy .tax-section-head h2 {
    font-size: 18px; font-weight: 700; color: var(--doc-text); margin: 0;
}

.doc-entry-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.doc-entry-card {
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    padding: 22px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
    box-shadow: var(--doc-shadow-sm);
}
.doc-entry-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99,102,241,.3);
    box-shadow: 0 14px 32px -18px rgba(99,102,241,.3), var(--doc-shadow-sm);
}
.doc-entry-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.005em;
}
.doc-entry-card h3 a { color: var(--doc-text); }
.doc-entry-card h3 a:hover { color: var(--doc-primary); text-decoration: none; }
.doc-entry-card .muted {
    color: var(--doc-text-secondary);
    font-size: 13.5px;
    line-height: 1.65;
    margin: 0 0 14px;
}
.doc-entry-card .doc-entry-sub {
    list-style: none; padding: 0; margin: 0 0 16px;
    border-top: 1px dashed var(--doc-border);
    padding-top: 12px;
}
.doc-entry-card .doc-entry-sub li { padding: 5px 0; }
.doc-entry-card .doc-entry-sub li a {
    color: var(--doc-text-secondary);
    font-size: 13.5px;
    padding-left: 16px;
    position: relative;
}
.doc-entry-card .doc-entry-sub li a::before {
    content: '•';
    position: absolute;
    left: 2px;
    top: 0;
    color: var(--doc-primary);
    opacity: .7;
}
.doc-entry-card .doc-entry-foot .go {
    color: var(--doc-primary);
    font-size: 13px;
    font-weight: 600;
}

/* ============================================================
 * 4. 单篇文档 single-doc · 三栏
 * ============================================================ */
.neuroai-doc-single .doc-single-wrap {
    display: grid;
    grid-template-columns: var(--doc-sidebar-w) minmax(0, 1fr) var(--doc-toc-w);
    gap: 32px;
    padding-top: 16px;
    padding-bottom: 72px;
    align-items: flex-start;
}
.neuroai-doc-single .doc-sidebar { position: sticky; top: 84px; }
.neuroai-doc-single .doc-toc-col { position: sticky; top: 84px; }

/* 文档左右侧栏通用外观 */
.doc-sidebar {
    max-height: calc(100vh - 100px);
    overflow: hidden;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    box-shadow: var(--doc-shadow-sm);
}
.doc-sidebar-head {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--doc-border);
}
.doc-sidebar-head .back-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--doc-text-muted);
    margin-bottom: 10px;
}
.doc-sidebar-head .back-all:hover { color: var(--doc-primary); text-decoration: none; }
.doc-sidebar-head .product-name {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--doc-text);
    letter-spacing: -0.005em;
}
.doc-sidebar-head .product-name-link { color: var(--doc-text); display: block; }
.doc-sidebar-head .product-name-link:hover { color: var(--doc-primary); text-decoration: none; }
.doc-sidebar-scroll {
    max-height: calc(100vh - 100px - 60px);
    overflow: auto;
    padding: 10px 10px 16px;
}
.doc-sidebar-scroll::-webkit-scrollbar { width: 8px; }
.doc-sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(148,163,184,.35); border-radius: 4px; }
.doc-sidebar-scroll::-webkit-scrollbar-track { background: transparent; }

/* 左侧文档目录树 */
.neuroai-doc-sidebar { list-style: none; margin: 0; padding: 4px 2px; }
.neuroai-doc-sidebar.tree li { position: relative; }
.neuroai-doc-sidebar.tree > li { border-bottom: 1px dashed transparent; }
.neuroai-doc-sidebar .hd {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    padding: 4px 4px;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease;
}
.neuroai-doc-sidebar .hd:hover { background: rgba(99,102,241,.06); }
.neuroai-doc-sidebar .hd a {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--doc-text-secondary);
    padding: 1px 2px;
    text-decoration: none;
    word-break: break-word;
}
.neuroai-doc-sidebar .hd a:hover { color: var(--doc-primary); text-decoration: none; }
.neuroai-doc-sidebar li.active > .hd > a {
    color: var(--doc-primary);
    font-weight: 600;
    background: rgba(99,102,241,.08);
    border-radius: 6px;
}
.neuroai-doc-sidebar li.in-path > .hd > a { color: var(--doc-text); font-weight: 500; }
.neuroai-doc-sidebar .arrow {
    flex-shrink: 0;
    width: 18px;
    height: 22px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: .7;
}
.neuroai-doc-sidebar .arrow::after {
    content: '';
    width: 0; height: 0;
    border-left: 4px solid currentColor;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transform: rotate(0deg);
    transition: transform .15s ease;
    margin-left: 3px;
    color: var(--doc-text-muted);
}
.neuroai-doc-sidebar .arrow.placeholder { opacity: 0; pointer-events: none; }
.neuroai-doc-sidebar li.open > .hd > .arrow::after { transform: rotate(90deg); }
.neuroai-doc-sidebar ul.children {
    list-style: none;
    padding: 0 0 0 14px;
    margin: 0;
    display: none;
}
.neuroai-doc-sidebar li.open > ul.children,
.neuroai-doc-sidebar li.in-path > ul.children,
.neuroai-doc-sidebar li.active > ul.children { display: block; }
.neuroai-doc-sidebar ul.children .hd a { font-size: 13px; }

/* 首页展示所有产品线卡片 */
.neuroai-doc-sidebar.root-only-products {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 4px;
}
.neuroai-doc-sidebar.root-only-products li.product-card a {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--doc-border);
    background: var(--doc-surface-alt);
    transition: all .15s ease;
}
.neuroai-doc-sidebar.root-only-products li.product-card a:hover {
    border-color: rgba(99,102,241,.3);
    background: var(--doc-surface);
    box-shadow: 0 6px 16px -10px rgba(99,102,241,.3);
    text-decoration: none;
}
.neuroai-doc-sidebar.root-only-products li.product-card .p-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--doc-text);
    margin-bottom: 3px;
}
.neuroai-doc-sidebar.root-only-products li.product-card .p-count {
    font-size: 12px;
    color: var(--doc-text-muted);
}
.doc-empty {
    padding: 18px;
    background: var(--doc-surface-alt);
    border-radius: 10px;
    color: var(--doc-text-muted);
    font-size: 13px;
    line-height: 1.6;
}

/* 正文 */
.neuroai-doc-single .doc-main {
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius-lg);
    padding: 32px 40px 36px;
    box-shadow: var(--doc-shadow-sm);
}
.neuroai-doc-single .doc-main-header {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--doc-border);
}
.doc-main-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.doc-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.01em;
}
.doc-tag.tag-public   { background: rgba(16,185,129,.15); color: #6ee7b7; border: 1px solid rgba(16,185,129,.3); }
.doc-tag.tag-login    { background: rgba(59,130,246,.15); color: #93c5fd; border: 1px solid rgba(59,130,246,.3); }
.doc-tag.tag-paid     { background: rgba(249,115,22,.15); color: #fdba74; border: 1px solid rgba(249,115,22,.3); }
.doc-tag.tag-version  { background: var(--doc-surface-alt); color: var(--doc-primary-dark); border: 1px solid rgba(99,102,241,.25); }
a.doc-tag.tag-version:hover { text-decoration: none; filter: brightness(0.98); }
.doc-updated {
    color: var(--doc-text-muted);
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-left: 4px;
}

.neuroai-doc-single .doc-main-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--doc-text);
}
.neuroai-doc-single .doc-main-excerpt {
    margin: 10px 0 0;
    color: var(--doc-text-secondary);
    font-size: 15.5px;
    line-height: 1.7;
}

/* 正文排版 */
.doc-main-content h1,
.doc-main-content h2,
.doc-main-content h3,
.doc-main-content h4,
.doc-main-content h5,
.doc-main-content h6 {
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--doc-text);
    scroll-margin-top: 92px;
}
.doc-main-content h1 { font-size: 28px; }
.doc-main-content h2 { font-size: 23px; line-height: 1.3; padding-bottom: 10px; border-bottom: 1px solid var(--doc-border); }
.doc-main-content h3 { font-size: 19px; }
.doc-main-content h4 { font-size: 16px; }
.doc-main-content h5 { font-size: 15px; }
.doc-main-content h6 { font-size: 14px; color: var(--doc-text-secondary); }
.doc-main-content > *:first-child { margin-top: 0 !important; }
.doc-main-content p,
.doc-main-content li {
    color: var(--doc-text);
    font-size: 15px;
    line-height: 1.8;
}
.doc-main-content p { margin: 0 0 16px; }
.doc-main-content ul,
.doc-main-content ol {
    padding-left: 1.4em;
    margin: 0 0 18px;
}
.doc-main-content li { margin: 5px 0; }
.doc-main-content ul li::marker { color: var(--doc-primary); }
.doc-main-content blockquote {
    margin: 20px 0;
    padding: 16px 20px 16px 20px;
    background: var(--doc-surface-alt);
    border: 1px solid var(--doc-border);
    border-left: 4px solid var(--doc-primary);
    border-radius: 0 12px 12px 0;
    color: var(--doc-text-secondary);
}
.doc-main-content blockquote > *:last-child { margin-bottom: 0; }
.doc-main-content hr {
    border: 0;
    border-top: 1px dashed var(--doc-border-strong);
    margin: 32px 0;
}
.doc-main-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--doc-border);
}
.doc-main-content table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 20px 0;
    font-size: 14px;
    border: 1px solid var(--doc-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--doc-surface);
}
.doc-main-content table th,
.doc-main-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--doc-border);
    text-align: left;
    vertical-align: top;
}
.doc-main-content table th {
    background: var(--doc-surface-alt);
    font-weight: 600;
    color: var(--doc-text);
    border-bottom: 2px solid var(--doc-primary);
}
.doc-main-content table tr:last-child td { border-bottom: 0; }
.doc-main-content table tr:nth-child(even) td { background: rgba(99,102,241,.04); }

/* 提示框（Note/Warning/Danger，用blockquote class语法） */
.doc-main-content blockquote.note,
.doc-main-content blockquote.warning,
.doc-main-content blockquote.danger,
.doc-main-content blockquote.tip {
    position: relative;
    padding-left: 52px;
}
.doc-main-content blockquote.note::before,
.doc-main-content blockquote.warning::before,
.doc-main-content blockquote.danger::before,
.doc-main-content blockquote.tip::before {
    position: absolute;
    left: 16px; top: 16px;
    font-size: 18px;
    font-weight: 800;
    width: 24px; height: 24px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: #fff;
    line-height: 1;
}
.doc-main-content blockquote.note { border-left-color: var(--doc-primary); background: rgba(99,102,241,.06); }
.doc-main-content blockquote.note::before { content: 'ℹ'; background: var(--doc-gradient); }
.doc-main-content blockquote.tip  { border-left-color: #10b981; background: rgba(16,185,129,.07); }
.doc-main-content blockquote.tip::before  { content: '✦'; background: linear-gradient(135deg,#10b981,#34d399); }
.doc-main-content blockquote.warning { border-left-color: #f59e0b; background: rgba(245,158,11,.08); }
.doc-main-content blockquote.warning::before { content: '!'; background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.doc-main-content blockquote.danger { border-left-color: #ef4444; background: rgba(239,68,68,.07); }
.doc-main-content blockquote.danger::before { content: '✕'; background: linear-gradient(135deg,#ef4444,#f87171); }

/* 分页 */
.doc-paginate {
    margin: 28px 0;
    padding: 16px 20px;
    background: var(--doc-surface-alt);
    border-radius: 12px;
    border: 1px solid var(--doc-border);
    font-weight: 600;
    color: var(--doc-text-secondary);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.doc-paginate a,
.doc-paginate span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 8px;
}
.doc-paginate > span:not(:first-child) {
    background: var(--doc-gradient);
    color: #fff;
}
.doc-paginate a {
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    color: var(--doc-text-secondary);
}
.doc-paginate a:hover { color: var(--doc-primary); border-color: rgba(99,102,241,.35); text-decoration: none; }

/* 页脚标签 + 上一页/下一页 */
.neuroai-doc-single .doc-main-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px dashed var(--doc-border);
}
.doc-tags .label { color: var(--doc-text-muted); font-size: 13px; margin-right: 4px; }
.doc-tags a {
    display: inline-block;
    padding: 4px 12px;
    margin: 3px 6px 3px 0;
    border-radius: 999px;
    background: var(--doc-surface-alt);
    color: var(--doc-primary-dark);
    font-size: 12.5px;
    font-weight: 500;
    border: 1px solid rgba(99,102,241,.2);
}
.doc-tags a:hover {
    background: var(--doc-surface);
    color: var(--doc-primary);
    text-decoration: none;
    border-color: rgba(99,102,241,.45);
}

.neuroai-doc-pn { margin-top: 32px; }
.neuroai-doc-pn .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.neuroai-doc-pn .pn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 20px;
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    background: var(--doc-surface-alt);
    color: var(--doc-text);
    transition: all .15s ease;
    min-height: 68px;
}
.neuroai-doc-pn a.pn:hover {
    border-color: rgba(99,102,241,.35);
    background: var(--doc-surface);
    color: var(--doc-text);
    text-decoration: none;
    box-shadow: 0 10px 22px -16px rgba(99,102,241,.4);
    transform: translateY(-1px);
}
.neuroai-doc-pn .pn.next { text-align: right; }
.neuroai-doc-pn .pn-label { color: var(--doc-primary); font-weight: 600; font-size: 12.5px; }
.neuroai-doc-pn .pn-title {
    color: var(--doc-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    word-break: break-word;
}
.neuroai-doc-pn .pn.placeholder { visibility: hidden; }

.doc-comments-area {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px dashed var(--doc-border);
}

/* TOC 右侧目录 */
.neuroai-doc-toc {
    padding: 16px;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: var(--doc-radius);
    box-shadow: var(--doc-shadow-sm);
}
.neuroai-doc-toc .toc-title {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--doc-border);
    color: var(--doc-text);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.neuroai-doc-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
}
.neuroai-doc-toc ol ol {
    padding-left: 14px;
    margin-top: 4px;
    border-left: 1px solid var(--doc-border);
    margin-left: 5px;
}
.neuroai-doc-toc li { padding: 2px 0; }
.neuroai-doc-toc a {
    display: block;
    padding: 4px 8px 4px 10px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--doc-text-secondary);
    position: relative;
    transition: background .12s ease, color .12s ease;
}
.neuroai-doc-toc a:hover {
    color: var(--doc-primary);
    background: rgba(99,102,241,.06);
    text-decoration: none;
}
.neuroai-doc-toc li.active > a {
    color: var(--doc-primary);
    background: rgba(99,102,241,.09);
    font-weight: 600;
}
.neuroai-doc-toc a[data-level="2"] { font-weight: 500; }
.neuroai-doc-toc ol ol a { font-size: 12.5px; }

/* ============================================================
 * 5. 响应式
 * ============================================================ */
@media (max-width: 1280px) {
    :root { --doc-sidebar-w: 248px; --doc-toc-w: 224px; }
    .neuroai-doc-single .doc-single-wrap,
    .neuroai-doc-taxonomy .doc-tax-wrap { gap: 22px; }
}
@media (max-width: 1160px) {
    .neuroai-doc-single .doc-single-wrap {
        grid-template-columns: var(--doc-sidebar-w) minmax(0, 1fr);
    }
    .neuroai-doc-single .doc-toc-col {
        display: none;
    }
    .doc-entry-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
    :root { --doc-sidebar-w: 100%; }
    .neuroai-doc .container { padding: 0 18px; }
    .neuroai-doc-single .doc-single-wrap,
    .neuroai-doc-taxonomy .doc-tax-wrap {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .neuroai-doc-single .doc-sidebar,
    .neuroai-doc-taxonomy .doc-sidebar {
        position: static;
        max-height: none;
    }
    .doc-sidebar-scroll {
        max-height: none;
    }
    .neuroai-doc-cards { grid-template-columns: 1fr; gap: 16px; }
    .neuroai-doc-single .doc-main { padding: 22px 18px 26px; border-radius: var(--doc-radius); }
    .neuroai-doc-archive .doc-hero { padding: 32px 0 40px; }
    .doc-hero-search {
        flex-wrap: wrap;
        padding: 10px 10px;
        gap: 8px;
    }
    .doc-hero-search input[type="search"] { min-width: 100%; padding: 8px 4px; }
    .doc-hero-search button[type="submit"] { width: 100%; justify-content: center; }
    .neuroai-doc-pn .row { grid-template-columns: 1fr; }
    .neuroai-doc-pn .pn.next { text-align: left; }
}
@media (max-width: 480px) {
    .neuroai-doc-archive .doc-hero-title { font-size: 30px; }
    .neuroai-doc-archive .doc-hero-subtitle { font-size: 14.5px; }
    .doc-products .section-head h2 { font-size: 22px; }
    .neuroai-doc-single .doc-main-title { font-size: 24px; }
    .doc-main-content h2 { font-size: 20px; }
    .doc-main-content h3 { font-size: 17px; }
    .doc-main-content p,
    .doc-main-content li { font-size: 14.5px; }
}

/* ============================================================
 * 6. 文档提示框 admonition（[note][tip][warning][danger][example]）
 * ============================================================ */
.doc-admonition {
    margin: 1em 0 1.4em;
    border-radius: 14px;
    padding: 14px 18px 14px 14px;
    border-left: 4px solid var(--doc-primary);
    background: rgba(99,102,241,.05);
    position: relative;
    overflow: hidden;
}
.doc-admonition::before {
    content: "";
    position: absolute; inset: 0 auto 0 0;
    width: 4px;
    background: var(--doc-primary);
    opacity: 0;
}
.doc-adm-hd {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 8px;
}
.doc-adm-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 15px;
    background: var(--doc-surface);
    box-shadow: 0 1px 2px rgba(0,0,0,.3);
    flex-shrink: 0;
}
.doc-adm-title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: .01em;
    color: var(--doc-text);
}
.doc-adm-body {
    padding-left: 40px;
    color: var(--doc-text-secondary);
    font-size: 14.5px;
    line-height: 1.75;
}
.doc-adm-body > *:first-child { margin-top: 0; }
.doc-adm-body > *:last-child  { margin-bottom: 0; }
.doc-adm-body p, .doc-adm-body li, .doc-adm-body code, .doc-adm-body pre { font-size: inherit; }

.doc-admonition-note {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, rgba(59,130,246,.06), rgba(99,102,241,.05));
}
.doc-admonition-note .doc-adm-icon { color: #3b82f6; }
.doc-admonition-note .doc-adm-title { color: #1d4ed8; }

.doc-admonition-tip {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16,185,129,.07), rgba(34,197,94,.05));
}
.doc-admonition-tip .doc-adm-icon { color: #10b981; }
.doc-admonition-tip .doc-adm-title { color: #047857; }

.doc-admonition-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, rgba(245,158,11,.10), rgba(251,191,36,.06));
}
.doc-admonition-warning .doc-adm-icon { color: #d97706; }
.doc-admonition-warning .doc-adm-title { color: #b45309; }

.doc-admonition-danger {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239,68,68,.09), rgba(244,63,94,.06));
}
.doc-admonition-danger .doc-adm-icon { color: #dc2626; }
.doc-admonition-danger .doc-adm-title { color: #b91c1c; }

.doc-admonition-example {
    border-left-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(99,102,241,.05));
}
.doc-admonition-example .doc-adm-icon { color: #7c3aed; }
.doc-admonition-example .doc-adm-title { color: #6d28d9; }

/* 提示框中嵌套 admonition 稍微缩进 */
.doc-adm-body .doc-admonition { margin: 14px 0 4px; }

/* ============================================================
 * 7. 文档富文本增强（表格 / blockquote / 行内代码 / 图片）
 * ============================================================ */
.doc-main-content table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    border: 1px solid var(--doc-border);
    overflow: hidden;
    margin: 1.2em 0 1.6em;
    width: 100%;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    font-size: 14px;
}
.doc-main-content thead {
    background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.06));
}
.doc-main-content th, .doc-main-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--doc-border);
    border-right: 1px solid var(--doc-border);
    vertical-align: top;
}
.doc-main-content th:last-child, .doc-main-content td:last-child { border-right: 0; }
.doc-main-content tr:last-child td { border-bottom: 0; }
.doc-main-content th {
    font-weight: 700;
    color: var(--doc-text);
    font-size: 13.5px;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.doc-main-content blockquote {
    margin: 1em 0 1.4em;
    padding: 16px 22px;
    border-left: 4px solid var(--doc-primary);
    background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(139,92,246,.08));
    border-radius: 0 12px 12px 0;
    color: var(--doc-text-secondary);
    position: relative;
}
.doc-main-content blockquote::before {
    content: "\201C";
    position: absolute; top: -8px; left: 10px;
    font-size: 48px; color: rgba(99,102,241,.3);
    font-family: Georgia, serif;
    line-height: 1;
}
.doc-main-content blockquote > *:first-child { margin-top: 0; }
.doc-main-content blockquote > *:last-child { margin-bottom: 0; }

.doc-main-content :not(pre) > code {
    background: rgba(99,102,241,.15);
    border: 1px solid rgba(148,163,184,.15);
    color: #c084fc;
    padding: 1.5px 6px;
    border-radius: 6px;
    font-size: 13px;
    font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: nowrap;
    font-weight: 500;
}

.doc-main-content img, .doc-main-content figure img {
    border-radius: 12px;
    border: 1px solid var(--doc-border);
    box-shadow: 0 8px 24px -14px rgba(15,23,42,.25);
    max-width: 100%;
    height: auto;
    margin: 1em 0 1.4em;
}
.doc-main-content figcaption {
    text-align: center;
    color: var(--doc-text-muted);
    font-size: 13px;
    margin: -6px 0 1.4em;
}

/* hr 分隔线 */
.doc-main-content hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,.25), transparent);
    margin: 2em 0;
}

/* ul/ol 列表项间距 */
.doc-main-content ul, .doc-main-content ol { padding-left: 24px; }
.doc-main-content li { padding: 2px 0; line-height: 1.8; }
.doc-main-content li::marker { color: var(--doc-primary); }

/* 图片懒加载 fade in */
.doc-main-content img[loading="lazy"] {
    opacity: 0;
    transition: opacity .35s ease;
}
.doc-main-content img[loading="lazy"].loaded { opacity: 1; }

/* ============================================================
 * 8. 搜索结果视图（/docs/?s=xxx）
 * ============================================================ */
.neuroai-doc .doc-search-result {
    padding: 22px 24px;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
    border-radius: 14px;
    margin-bottom: 16px;
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.neuroai-doc .doc-search-result:hover {
    border-color: rgba(99,102,241,.35);
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -24px rgba(99,102,241,.35);
}
.neuroai-doc .doc-search-result h2 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.neuroai-doc .doc-search-result .excerpt {
    color: var(--doc-text-secondary);
    font-size: 14px;
    line-height: 1.75;
    margin: 0 0 10px;
}
.neuroai-doc .doc-search-result .meta {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}
.neuroai-doc .doc-search-result .meta .tag {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(99,102,241,.08);
    color: var(--doc-primary);
}
.neuroai-doc .doc-search-result .meta .tag.level-public  { background: rgba(16,185,129,.12); color: #6ee7b7; }
.neuroai-doc .doc-search-result .meta .tag.level-logged  { background: rgba(59,130,246,.12); color: #93c5fd; }
.neuroai-doc .doc-search-result .meta .tag.level-paid    { background: rgba(139,92,246,.14); color: #c4b5fd; }

.neuroai-doc .search-none {
    padding: 64px 24px;
    text-align: center;
    color: var(--doc-text-secondary);
}
.neuroai-doc .search-none .big-icon {
    font-size: 56px; margin-bottom: 14px; opacity: .4;
}

/* 修复文档卡片居中问题 */
.dbhoo-bento-card {
    width: 100%;
    max-width: 520px;
    justify-self: center;
}
