@charset "UTF-8";
/* ============================================================
   前台栅格与标题（从内联样式抽出来，媒体查询才能覆盖它们）
   ============================================================ */
.grid-featured { display: grid; grid-template-columns: 1.45fr 1fr; gap: 22px; }
.layout-blog   { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.page-h1       { font-size: 32px; letter-spacing: -.03em; }
.page-h1.sm    { font-size: 28px; }
/* 汉堡按钮与折叠菜单：桌面端完全不出现。
   注意它们同时也是 .icon-btn，.icon-btn 设置了 display:grid，
   所以必须写 .icon-btn.nav-toggle 才能压住默认样式。 */
.icon-btn.nav-toggle,
.icon-btn.nav-search-icon { display: none; }
.nav-drawer { display: none; }
/* ============================================================
   Nexus · 团队博客与知识库
   ============================================================ */

/* ---------- 主题变量 ---------- */
:root {
    --bg:        #f5f6fa;
    --bg-soft:   #eceffa;
    --surface:   #ffffff;
    --surface-2: #f8f9fc;
    --surface-3: #f1f3f9;
    --border:    #e5e8f0;
    --border-2:  #d8dded;

    --text:      #0d1424;
    --text-2:    #47536b;
    --muted:     #8791a8;

    --brand:     #4f46e5;
    --brand-2:   #7c3aed;
    --brand-3:   #2563eb;
    --brand-soft:#eef0ff;
    --brand-ring: rgba(79, 70, 229, .28);

    --ok:     #059669;
    --ok-soft:#e7f8f1;
    --warn:   #d97706;
    --warn-soft:#fef3e2;
    --danger: #dc2626;
    --danger-soft:#fdecec;
    --info:   #0284c7;
    --info-soft:#e6f4fd;

    --r-sm: 8px;
    --r:    12px;
    --r-lg: 18px;
    --r-xl: 26px;

    --sh-1: 0 1px 2px rgba(13, 20, 36, .05);
    --sh-2: 0 4px 14px -4px rgba(13, 20, 36, .12), 0 1px 3px rgba(13, 20, 36, .04);
    --sh-3: 0 22px 48px -22px rgba(13, 20, 36, .28);
    --sh-brand: 0 14px 34px -14px rgba(79, 70, 229, .55);

    --nav-h: 66px;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
            "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

[data-theme="dark"] {
    --bg:        #0b0f1a;
    --bg-soft:   #101623;
    --surface:   #131a29;
    --surface-2: #182031;
    --surface-3: #1e2739;
    --border:    #26314a;
    --border-2:  #33405c;

    --text:      #eaf0ff;
    --text-2:    #a9b6d0;
    --muted:     #74839f;

    --brand:     #7c7cf7;
    --brand-2:   #a271f5;
    --brand-3:   #5b9cf8;
    --brand-soft:#1b2140;
    --brand-ring: rgba(124, 124, 247, .32);

    --ok:     #34d399;
    --ok-soft:#10281f;
    --warn:   #fbbf24;
    --warn-soft:#2b2211;
    --danger: #f87171;
    --danger-soft:#2c1418;
    --info:   #38bdf8;
    --info-soft:#0f2433;

    --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
    --sh-2: 0 4px 16px -4px rgba(0, 0, 0, .5);
    --sh-3: 0 24px 52px -24px rgba(0, 0, 0, .7);
    --sh-brand: 0 14px 34px -14px rgba(124, 124, 247, .5);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto 0;
    height: 420px;
    background:
        radial-gradient(900px 340px at 12% -60px, rgba(99, 102, 241, .20), transparent 65%),
        radial-gradient(760px 300px at 88% -80px, rgba(168, 85, 247, .16), transparent 62%);
    pointer-events: none;
    z-index: 0;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.32;
    letter-spacing: -.015em;
    color: var(--text);
}
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; transition: color .16s, opacity .16s; }
a:hover { color: var(--brand-2); }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.4em; }

::selection { background: var(--brand); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局 ---------- */
.wrap { width: min(1240px, 100% - 44px); margin: 0 auto; position: relative; z-index: 1; }
.wrap-narrow { width: min(880px, 100% - 40px); margin: 0 auto; }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-end { display: flex; align-items: center; justify-content: flex-end; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-14 { gap: 14px; } .gap-20 { gap: 20px; }
.grow { flex: 1; }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.section { padding: 46px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.section-title { font-size: 22px; letter-spacing: -.02em; }
.section-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }

/* ---------- 顶栏 ---------- */
.nav {
    position: sticky; top: 0; z-index: 60;
    height: var(--nav-h);
    display: flex; align-items: center;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; }

.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; color: var(--text); letter-spacing: -.03em; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark {
    width: 34px; height: 34px; border-radius: 11px;
    flex: 0 0 34px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: grid; place-items: center; color: #fff; font-size: 16px; font-weight: 800;
    box-shadow: var(--sh-brand); overflow: hidden;
}
.brand-mark svg { display: block; width: 34px; height: 34px; }
/* Logo 区域固定 34×34：无论上传的图多大、什么比例，都不会把顶栏挤变形 */
.brand-logo {
    width: 34px; height: 34px; border-radius: 11px; flex: 0 0 34px;
    display: grid; place-items: center; overflow: hidden;
    background: var(--surface-2); border: 1px solid var(--border);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-sub { font-size: 15px; color: var(--muted); font-weight: 600; letter-spacing: 0; padding-left: 10px; margin-left: 0; border-left: 1px solid var(--border); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-links { display: flex; align-items: center; gap: 2px; }
.nav-link {
    padding: 7px 13px; border-radius: 9px; font-size: 14.5px; font-weight: 600;
    color: var(--text-2); white-space: nowrap;
}
.nav-link:hover { background: var(--surface-3); color: var(--text); }
.nav-link.on { color: var(--brand); background: var(--brand-soft); }

.nav-search { position: relative; flex: 1; max-width: 320px; }
.nav-search input {
    width: 100%; height: 38px; padding: 0 14px 0 38px;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 10px; color: var(--text); font-size: 13.5px; font-family: var(--font);
}
.nav-search input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px var(--brand-ring); }
.nav-search svg { position: absolute; left: 13px; top: 11px; color: var(--muted); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.icon-btn {
    width: 38px; height: 38px; display: grid; place-items: center;
    border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text-2); cursor: pointer; transition: .16s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); transform: translateY(-1px); }

/* 用户菜单 */
.usermenu { position: relative; }
.usermenu-btn {
    display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px;
    border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
    cursor: pointer; color: var(--text); font-family: var(--font); font-size: 14px; font-weight: 600;
}
.usermenu-btn:hover { background: var(--surface-3); }
.usermenu-pop {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 216px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--sh-3); padding: 7px; display: none; z-index: 80;
}
.usermenu.open .usermenu-pop { display: block; animation: pop .16s ease; }
.usermenu-pop a, .usermenu-pop button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 12px; border-radius: 9px; font-size: 14px; color: var(--text-2);
    background: none; border: 0; cursor: pointer; text-align: left; font-family: var(--font); font-weight: 500;
}
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--surface-3); color: var(--text); }
.usermenu-pop .sep { height: 1px; background: var(--border); margin: 6px 4px; }

@keyframes pop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 头像 */
.avatar {
    width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
    background: var(--c, var(--brand)); letter-spacing: 0;
    box-shadow: 0 2px 8px -2px var(--c, var(--brand));
}
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.md { width: 40px; height: 40px; font-size: 15px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; border-radius: 20px; }

.c-indigo  { --c: #4f46e5; }
.c-violet  { --c: #7c3aed; }
.c-blue    { --c: #2563eb; }
.c-cyan    { --c: #0891b2; }
.c-teal    { --c: #0d9488; }
.c-emerald { --c: #059669; }
.c-amber   { --c: #d97706; }
.c-rose    { --c: #e11d48; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    height: 40px; padding: 0 18px; border-radius: 11px; border: 1px solid transparent;
    font-family: var(--font); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: .16s; white-space: nowrap; background: var(--surface-3); color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }
.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; box-shadow: var(--sh-brand);
}
.btn-primary:hover { filter: brightness(1.07); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.06); color: #fff; }
.btn-sm { height: 32px; padding: 0 13px; font-size: 13px; border-radius: 9px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15.5px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 7px; }
.label .req { color: var(--danger); }

.input, .select, .textarea {
    width: 100%; padding: 10px 13px; min-height: 42px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 11px;
    color: var(--text); font-family: var(--font); font-size: 14.5px; transition: .16s;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.7; }
.select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238791a8' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px;
}
.input:focus, .select:focus, .textarea:focus {
    outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring);
}
.input[readonly] {
    background: var(--surface-2); color: var(--text-2); cursor: default;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--danger); margin-top: 6px; }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: var(--text-2); }
.check input { width: 17px; height: 17px; accent-color: var(--brand); cursor: pointer; }

.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); box-shadow: var(--sh-1);
}
.card-pad { padding: 22px; }
.card-hover { transition: .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--border-2); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.panel-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-title { font-size: 15px; font-weight: 700; }
.panel-body { padding: 20px; }
.panel-body.tight { padding: 12px 16px; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2.5px 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
    background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-ok    { background: var(--ok-soft); color: var(--ok); }
.badge-warn  { background: var(--warn-soft); color: var(--warn); }
.badge-danger{ background: var(--danger-soft); color: var(--danger); }
.badge-info  { background: var(--info-soft); color: var(--info); }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
    transition: .16s;
}
a.chip:hover { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 34%, transparent); color: var(--brand); }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--brand)); flex-shrink: 0; }

/* ---------- 首页 Hero ---------- */
.hero { padding: 64px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 44px; align-items: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 54px); letter-spacing: -.035em; line-height: 1.14; }
.hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, var(--brand), var(--brand-2) 55%, var(--brand-3));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 17px; color: var(--text-2); margin: 20px 0 30px; max-width: 520px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 30px; margin-top: 38px; }
.hero-stat b { display: block; font-size: 26px; letter-spacing: -.03em; }
.hero-stat span { font-size: 12.5px; color: var(--muted); }

.hero-art { position: relative; }
.hero-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
    padding: 22px; box-shadow: var(--sh-3);
}
.hero-card .kv { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--border); }
.hero-card .kv:last-child { border: 0; }
.hero-card .kv .k { flex: 1; font-size: 13.5px; color: var(--text-2); }
.hero-card .kv .v { font-size: 13px; color: var(--muted); }
.hero-badge {
    position: absolute; top: -14px; right: -10px; background: var(--surface);
    border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
    font-size: 12.5px; font-weight: 600; box-shadow: var(--sh-2);
}

/* ---------- 文章卡片 ---------- */
.post-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-lg); transition: .22s cubic-bezier(.2,.7,.3,1);
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--border-2); }
.post-cover {
    height: 172px; background: linear-gradient(135deg, var(--brand-soft), var(--surface-3));
    background-size: cover; background-position: center; position: relative;
}
.post-cover.no-cover {
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.cover-glyph { width: 46px; height: 46px; color: rgba(255, 255, 255, .92); opacity: .9; }
.post-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.post-title { font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -.015em; }
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--brand); }
.post-excerpt { font-size: 13.8px; color: var(--text-2); line-height: 1.75; flex: 1; }
.post-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
.post-author { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); font-weight: 500; }

.post-card.wide { flex-direction: row; }
.post-card.wide .post-cover { width: 300px; height: auto; min-height: 210px; flex-shrink: 0; }
.post-card.wide .post-body { padding: 26px 28px; }
.post-card.wide .post-title { font-size: 24px; }

/* ---------- 正文排版 ---------- */
.prose { font-size: 16px; line-height: 1.85; color: var(--text-2); }
.prose > *:first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 {
    color: var(--text); margin: 1.9em 0 .7em; scroll-margin-top: 90px; letter-spacing: -.02em;
}
.prose h1 { font-size: 1.85em; }
.prose h2 {
    font-size: 1.45em; padding-bottom: .35em; border-bottom: 1px solid var(--border);
}
.prose h3 { font-size: 1.2em; }
.prose h4 { font-size: 1.05em; }
.prose h2::before { content: ""; display: inline-block; width: 4px; height: .95em; background: linear-gradient(var(--brand), var(--brand-2)); border-radius: 3px; margin-right: 10px; vertical-align: -.12em; }
.prose p { margin: 0 0 1.15em; }
.prose a { text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brand) 42%, transparent); }
.prose a:hover { background: var(--brand-soft); }
.prose strong { color: var(--text); font-weight: 700; }
.prose mark { background: color-mix(in srgb, var(--warn) 26%, transparent); color: inherit; padding: 1px 4px; border-radius: 4px; }
.prose del { color: var(--muted); }
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.5em; }
.prose li { margin: .35em 0; }
.prose li.task { list-style: none; margin-left: -1.35em; display: flex; align-items: flex-start; gap: 9px; }
.prose .task-box {
    width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border-2);
    display: grid; place-items: center; font-size: 11px; color: #fff; margin-top: .32em; flex-shrink: 0;
}
.prose .task-done .task-box { background: var(--ok); border-color: var(--ok); }
.prose .task-done .task-text { color: var(--muted); text-decoration: line-through; }
.prose blockquote {
    margin: 1.4em 0; padding: 14px 20px; border-left: 3px solid var(--brand);
    background: var(--brand-soft); border-radius: 0 12px 12px 0; color: var(--text-2);
}
.prose blockquote > *:last-child { margin-bottom: 0; }
.prose code {
    font-family: var(--mono); font-size: .87em; padding: .15em .45em;
    background: var(--surface-3); border-radius: 5px; color: var(--brand-2);
}
.prose pre {
    margin: 1.5em 0; padding: 18px 20px; background: #0f1524; border-radius: 14px;
    overflow: auto; border: 1px solid #1e293b; position: relative;
}
[data-theme="dark"] .prose pre { background: #0a0e18; border-color: var(--border); }
.prose pre code { background: none; padding: 0; color: #e2e8f0; font-size: 13.6px; line-height: 1.75; }

/* 代码块容器 + 一键复制 */
.code-wrap {
    margin: 1.5em 0; border-radius: 14px; overflow: hidden;
    background: #0f1524; border: 1px solid #1e293b;
}
[data-theme="dark"] .code-wrap { background: #0a0e18; border-color: var(--border); }
.code-wrap pre {
    margin: 0; padding: 16px 20px 18px; border: 0; border-radius: 0;
    background: none; max-height: 620px;
}
.code-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 7px 12px 7px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .03);
}
.code-lang {
    font-family: var(--mono); font-size: 11px; color: #94a3b8;
    text-transform: uppercase; letter-spacing: .1em;
}
.code-copy {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px;
    background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
    color: #cbd5e1; font-size: 12px; font-weight: 600; cursor: pointer; transition: .15s;
}
.code-copy:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.code-copy svg { width: 13px; height: 13px; }
.code-copy.done {
    background: rgba(16, 185, 129, .18); border-color: rgba(16, 185, 129, .45); color: #34d399;
}
/* 正文图片：不设 max-width 时大图会溢出并被裁切，这里统一按容器宽度等比缩放 */
.prose img, .prose .md-img {
    max-width: 100%; height: auto; display: block;
    margin: 1.6em auto; border-radius: 12px; box-shadow: var(--sh-2);
    cursor: zoom-in;
}
.prose hr { margin: 2.2em 0; }
.prose .table-wrap { overflow: auto; margin: 1.5em 0; border: 1px solid var(--border); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: left; }
.prose th { background: var(--surface-2); font-weight: 700; color: var(--text); white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: var(--surface-2); }

/* ---------- 目录 / 侧栏 ---------- */
/* 侧栏：整体 sticky 跟随滚动；内容超高时内部滚动，不再随页面一起滑走 */
.layout-article > aside,
.layout-wide > aside {
    position: sticky;
    top: calc(var(--nav-h) + 22px);
    align-self: start;
    max-height: calc(100vh - var(--nav-h) - 44px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}
.layout-article > aside::-webkit-scrollbar,
.layout-wide > aside::-webkit-scrollbar { width: 6px; }
.layout-article > aside::-webkit-scrollbar-thumb,
.layout-wide > aside::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 6px; }
.layout-article > aside::-webkit-scrollbar-track,
.layout-wide > aside::-webkit-scrollbar-track { background: transparent; }

/* 目录跳转时留出顶栏高度 */
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6,
.prose [id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

.toc {
    position: static;
    padding-bottom: 4px;
}
.toc-title { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.toc a {
    display: block; padding: 5px 12px; font-size: 13.2px; color: var(--text-2);
    border-left: 2px solid var(--border); line-height: 1.5;
}
.toc a:hover { color: var(--text); border-left-color: var(--border-2); }
.toc a.on { color: var(--brand); border-left-color: var(--brand); font-weight: 600; background: var(--brand-soft); border-radius: 0 8px 8px 0; }
.toc .lv3 { padding-left: 24px; font-size: 12.8px; }
.toc .lv4 { padding-left: 36px; font-size: 12.4px; }

.side-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.side-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* 侧栏标题左侧可长可短（知识库名），必须允许收缩，否则会把右侧按钮挤变形 */
.side-title-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 侧栏「新建文档」：原来只有一个「＋」字符，太不显眼 */
.btn-new-doc {
    display: inline-flex; align-items: center; gap: 5px; flex: none;
    height: 28px; padding: 0 11px; border-radius: 9px;
    font-size: 12.5px; font-weight: 700; line-height: 1; white-space: nowrap;
    color: #fff; background: var(--brand);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 34%, transparent);
    transition: filter .15s ease, transform .15s ease;
}
.btn-new-doc svg { flex: none; }
.btn-new-doc:hover { filter: brightness(1.08); color: #fff; text-decoration: none; }
.btn-new-doc:active { transform: translateY(1px); }

.list-links { display: flex; flex-direction: column; gap: 2px; }
.list-links a {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
    font-size: 13.8px; color: var(--text-2);
}
.list-links a:hover { background: var(--surface-3); color: var(--text); }
.list-links .count { margin-left: auto; font-size: 12px; color: var(--muted); }

/* ---------- 文档树 ---------- */
.tree { font-size: 14px; }
.tree-node { position: relative; }
.tree-row {
    display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 9px;
    color: var(--text-2); cursor: pointer; transition: .14s; line-height: 1.5;
}
.tree-row:hover { background: var(--surface-3); color: var(--text); }
.tree-row.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.tree-row .label-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-toggle {
    width: 18px; height: 18px; display: grid; place-items: center; flex-shrink: 0;
    color: var(--muted); font-size: 10px; transition: transform .18s;
}
.tree-node.open > .tree-row .tree-toggle { transform: rotate(90deg); }
.tree-children { display: none; padding-left: 15px; border-left: 1px solid var(--border); margin-left: 16px; }
.tree-node.open > .tree-children { display: block; }
.tree-empty { color: var(--muted); font-size: 13px; padding: 10px; }

/* ---------- 知识库卡片 ---------- */
.kb-card {
    display: flex; flex-direction: column; gap: 14px; padding: 24px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    transition: .22s; position: relative; overflow: hidden;
}
.kb-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, var(--c, var(--brand)), transparent 75%);
}
.kb-card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: var(--border-2); }
.kb-icon {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
    font-size: 21px; background: color-mix(in srgb, var(--c, var(--brand)) 13%, transparent);
    color: var(--c, var(--brand)); overflow: hidden; flex-shrink: 0;
}
.kb-icon.lg { width: 58px; height: 58px; border-radius: 16px; font-size: 26px; }
.kb-icon.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
.kb-icon-auto svg { width: 60%; height: 60%; }
.kb-icon-img img { width: 100%; height: 100%; object-fit: cover; }
.kb-name { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.kb-desc { font-size: 13.5px; color: var(--text-2); line-height: 1.7; min-height: 46px; }
.kb-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- 文章详情头 ---------- */
.article-head { padding: 44px 0 26px; }
.crumb { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--brand); }
.article-title { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.035em; line-height: 1.22; }
.article-sub { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13.5px; color: var(--muted); }
.article-sub .who { display: flex; align-items: center; gap: 9px; color: var(--text-2); font-weight: 600; }

/* 封面：完整显示，不裁切（原来固定 340px 高度 + cover 会把图切掉一块） */
.article-cover {
    border-radius: var(--r-xl); overflow: hidden; margin: 26px 0 8px;
    box-shadow: var(--sh-3); background: var(--surface-2);
}
.article-cover img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; cursor: zoom-in; }

.layout-article { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 44px; align-items: start; }
.layout-wide { display: grid; grid-template-columns: 280px minmax(0, 1fr) 240px; gap: 34px; align-items: start; }

/* ---------- 评论 ---------- */
.comment { display: flex; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border: 0; }
.comment-body { flex: 1; }
.comment-head { display: flex; align-items: center; gap: 9px; margin-bottom: 5px; }
.comment-name { font-weight: 600; font-size: 14px; color: var(--text); }
.comment-time { font-size: 12px; color: var(--muted); }
.comment-text { font-size: 14px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.comment-actions { margin-top: 6px; }

/* 回复：两级展示，层级靠缩进 + @某人 表达，不再无限套娃 */
.comment-replies {
    margin-top: 10px; padding-left: 16px; border-left: 2px solid var(--border);
    display: flex; flex-direction: column;
}
.comment-reply { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.comment-replies > .comment-reply:last-child { border-bottom: 0; padding-bottom: 2px; }
.comment-reply .comment-text { font-size: 13.6px; }
.comment-reply .comment-name { font-size: 13.4px; }
.reply-to { color: var(--brand); font-weight: 600; margin-right: 5px; text-decoration: none; }
.reply-to:hover { text-decoration: underline; }
.comment.flash { animation: commentFlash 1.8s ease; border-radius: 10px; }
@keyframes commentFlash {
    0%, 100% { background: transparent; }
    12%, 62% { background: var(--brand-soft); }
}

.like-ico { font-size: 15px; line-height: 1; }
.btn.like-pop { animation: likePop .32s cubic-bezier(.2, .8, .3, 1); }
@keyframes likePop {
    0% { transform: scale(1); }
    40% { transform: scale(1.13); }
    100% { transform: scale(1); }
}

/* ---------- 分页 ---------- */
.pager-wrap { margin: 34px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pager-info { font-size: 12.5px; color: var(--muted); }
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.pager .pg {
    min-width: 38px; height: 38px; padding: 0 11px; display: grid; place-items: center;
    border-radius: 11px; border: 1px solid var(--border); background: var(--surface);
    font-size: 13.5px; font-weight: 600; color: var(--text-2);
    transition: background .15s, color .15s, border-color .15s, transform .12s;
}
.pager a.pg:hover {
    background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent);
    color: var(--brand); transform: translateY(-1px);
}
.pager .pg.on {
    background: var(--brand); border-color: var(--brand); color: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 32%, transparent);
}
.pager .pg.off { opacity: .4; pointer-events: none; }
.pager .pg-icon { padding: 0; min-width: 38px; }
/* 双箭头（首页/末页）画在同一个 SVG 里，图标略宽一点保持视觉重量一致 */
.pager .pg-icon svg { width: 15px; height: 15px; display: block; }
.pager .pg-icon svg[viewBox] { flex: none; }

/* ---------- 空状态 ---------- */
.empty { text-align: center; padding: 70px 24px; color: var(--muted); }
.empty-icon { font-size: 46px; margin-bottom: 14px; opacity: .55; }
.empty h3 { font-size: 17px; color: var(--text-2); margin-bottom: 8px; }
.empty p { font-size: 14px; margin-bottom: 20px; }

/* ---------- 闪存提示（挂到当前打开的 dialog 内，避免被蒙层挡住） ---------- */
.toasts {
    position: fixed; inset: 18px 18px auto auto; margin: 0; border: 0; padding: 0;
    background: transparent; overflow: visible; max-width: min(420px, calc(100vw - 24px));
    width: max-content; height: auto;
    z-index: 400; display: flex; flex-direction: column; gap: 10px;
    pointer-events: none;
}
dialog[open] > .toasts {
    position: absolute; inset: 14px 14px auto auto; z-index: 5;
}
.toast {
    display: flex; align-items: center; gap: 11px; min-width: 260px; max-width: 400px;
    padding: 14px 16px 14px 14px; border-radius: 13px; background: var(--surface);
    border: 1px solid var(--border); border-left: 4px solid var(--info);
    box-shadow: 0 12px 40px rgba(8, 12, 22, .28); font-size: 14.5px; font-weight: 600; color: var(--text);
    animation: slideIn .22s cubic-bezier(.2,.8,.3,1);
    pointer-events: auto;
}
.toast.success { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--surface)); }
.toast.error   { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); }
.toast.warning { border-left-color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, var(--surface)); }
.toast.info    { border-left-color: var(--info); }
.toast .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; color: #fff; flex-shrink: 0; }
.toast.success .ic { background: var(--ok); }
.toast.error .ic   { background: var(--danger); }
.toast.warning .ic{ background: var(--warn); }
.toast.info .ic   { background: var(--info); }
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }

.alert { padding: 13px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; display: flex; gap: 10px; }
.alert-error { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 26%, transparent); }
.alert-warn  { background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 26%, transparent); }

/* ---------- 后台布局 ---------- */
.admin { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - var(--nav-h)); }
.admin-side {
    background: var(--surface); border-right: 1px solid var(--border); padding: 22px 14px;
    position: sticky; top: var(--nav-h); height: calc(100vh - var(--nav-h)); overflow: auto;
}
.admin-group { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; padding: 14px 12px 8px; }
.admin-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px;
    font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 2px;
}
.admin-link:hover { background: var(--surface-3); color: var(--text); }
.admin-link.on { background: var(--brand-soft); color: var(--brand); }
.admin-link .ico { width: 20px; text-align: center; }
.admin-main { padding: 30px 34px 60px; min-width: 0; }
.admin-head { margin-bottom: 26px; }
.admin-head h1 { font-size: 26px; letter-spacing: -.03em; }
.admin-head p { color: var(--muted); font-size: 14px; margin-top: 5px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stat {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
    padding: 20px; position: relative; overflow: hidden;
}
.stat::after {
    content: ""; position: absolute; right: -18px; top: -18px; width: 78px; height: 78px;
    border-radius: 50%; background: color-mix(in srgb, var(--c, var(--brand)) 11%, transparent);
}
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.04em; color: var(--text); }
.stat .t { font-size: 13px; color: var(--muted); margin-top: 2px; }
.stat .s { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- 数据表格 ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th {
    text-align: left; padding: 12px 14px; font-size: 12px; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--border);
    background: var(--surface-2); white-space: nowrap;
}
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .strong { color: var(--text); font-weight: 600; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-wrap-x { overflow-x: auto; }

/* ---------- 编辑器 ---------- */
.editor-bar {
    position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 14px;
    padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.editor-title-input {
    flex: 1; border: 0; background: none; font-size: 20px; font-weight: 700; color: var(--text);
    font-family: var(--font); letter-spacing: -.02em; padding: 4px 0; min-width: 0;
}
.editor-title-input:focus { outline: none; }

.ed { display: grid; grid-template-columns: minmax(0, 1fr); }
.ed.split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ed-pane { position: relative; min-width: 0; }
.ed-pane + .ed-pane { border-left: 1px solid var(--border); }
.ed-toolbar {
    display: flex; align-items: center; gap: 2px; padding: 8px 14px;
    border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap;
}
.ed-tool {
    height: 30px; min-width: 30px; padding: 0 8px; display: grid; place-items: center;
    border: 0; background: none; border-radius: 7px; cursor: pointer;
    color: var(--text-2); font-size: 13px; font-family: var(--font); font-weight: 600;
}
.ed-tool:hover { background: var(--surface-3); color: var(--text); }
.ed-tool.sep { width: 1px; min-width: 1px; padding: 0; background: var(--border); margin: 0 5px; height: 18px; }
.ed-source {
    width: 100%; min-height: calc(100vh - 200px); border: 0; resize: none; padding: 24px 28px;
    background: var(--surface); color: var(--text); font-family: var(--mono); font-size: 14.5px;
    line-height: 1.85; tab-size: 4;
}
.ed-source:focus { outline: none; }
.ed-preview { padding: 26px 30px; overflow: auto; max-height: calc(100vh - 200px); background: var(--surface); }
.ed-meta { padding: 18px 24px; background: var(--surface-2); border-top: 1px solid var(--border); }
.ed-count { font-size: 12px; color: var(--muted); }

.ed-tabs { display: flex; gap: 4px; background: var(--surface-3); padding: 3px; border-radius: 10px; }
.ed-tab {
    padding: 5px 14px; border: 0; background: none; border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: 600; color: var(--text-2); font-family: var(--font);
}
.ed-tab.on { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); }

/* ---------- 登录页 ---------- */
.auth-page {
    min-height: 100vh; display: grid; place-items: center; padding: 40px 20px;
    background:
        radial-gradient(1000px 520px at 15% 0%, rgba(79, 70, 229, .16), transparent 60%),
        radial-gradient(900px 480px at 100% 100%, rgba(124, 58, 237, .14), transparent 60%),
        var(--bg);
}
.auth-card {
    width: min(920px, 100%); display: grid; grid-template-columns: 1.05fr .95fr;
    background: var(--surface); border: 1px solid var(--border); border-radius: 26px;
    box-shadow: var(--sh-3); overflow: hidden;
}
.auth-side {
    padding: 44px 40px; color: #fff; position: relative;
    background: linear-gradient(150deg, #4f46e5, #7c3aed 55%, #9333ea);
    display: flex; flex-direction: column; justify-content: space-between;
}
.auth-side h2 { color: #fff; font-size: 28px; letter-spacing: -.03em; line-height: 1.3; }
.auth-side p { color: rgba(255, 255, 255, .82); font-size: 14.5px; }
.auth-side .mark { font-size: 15px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.auth-side .mark span { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px; background: rgba(255,255,255,.2); display: grid; place-items: center; }
.auth-side .mark .brand-mark {
    width: 32px; height: 32px; flex: 0 0 32px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.auth-side .mark .brand-mark svg { width: 32px; height: 32px; }
.auth-side .mark .mark-logo { overflow: hidden; background: rgba(255,255,255,.9); }
.auth-side .mark .mark-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.auth-main { padding: 44px 40px; }
.auth-main h1 { font-size: 24px; margin-bottom: 6px; letter-spacing: -.02em; }
.auth-main .sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.auth-tip { margin-top: 22px; padding: 13px 15px; border-radius: 12px; background: var(--surface-2); border: 1px dashed var(--border-2); font-size: 12.8px; color: var(--muted); line-height: 1.7; }

/* ---------- 页脚 ---------- */
.footer { margin-top: 60px; padding: 34px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 13.5px; }
.footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--brand); }

/* ---------- 工具类 ---------- */
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-10 { margin-top: 10px; } .mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; } .mt-28 { margin-top: 28px; } .mt-40 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-10 { margin-bottom: 10px; } .mb-14 { margin-bottom: 14px; } .mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; } .mb-28 { margin-bottom: 28px; }
.text-muted { color: var(--muted); } .text-sm { font-size: 13.5px; } .text-xs { font-size: 12.5px; }
.text-center { text-align: center; } .text-right { text-align: right; }
.b { font-weight: 700; }
.nowrap { white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hide { display: none !important; }
.divider-dash { border: 0; border-top: 1px dashed var(--border); margin: 16px 0; }

/* ---------- 搜索联想 ---------- */
.suggest-field { position: relative; flex: 1; min-width: 0; }
.suggest-box {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70;
    background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: var(--sh-3); padding: 6px; max-height: 360px; overflow: auto;
}
.nav-search .suggest-box {
    right: auto;
    width: min(520px, calc(100vw - 24px));
}
.suggest-box a {
    display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; border-radius: 9px;
    font-size: 13.6px; color: var(--text-2);
}
.suggest-box a:hover { background: var(--surface-3); color: var(--text); }
.suggest-box a .badge { flex-shrink: 0; margin-top: 1px; }
.suggest-box a .t {
    flex: 1; min-width: 0; line-height: 1.45; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed; inset: 0; z-index: 150; display: none;
    align-items: center; justify-content: center; padding: 20px;
    background: rgba(8, 12, 22, .5); backdrop-filter: blur(4px);
}
.modal.open { display: flex; }
dialog.nx-overlay {
    border: 0; padding: 20px; background: transparent;
    max-width: none; max-height: none; width: 100%; height: 100%;
    inset: 0; margin: 0; position: relative; overflow: visible;
}
dialog.nx-overlay[open] {
    display: flex; align-items: center; justify-content: center;
}
dialog.nx-overlay::backdrop {
    background: rgba(8, 12, 22, .55); backdrop-filter: blur(4px);
}
dialog.nx-overlay:not(.is-danger) .confirm-icon { background: var(--brand-soft); color: var(--brand); }
.modal-card {
    width: min(560px, 100%); max-height: 86vh; overflow: auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-xl); box-shadow: var(--sh-3); padding: 26px;
    animation: pop .18s ease;
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-size: 18px; }

/* 确认框 */
.confirm-card { width: min(430px, 100%); padding: 22px 24px 18px; }
.confirm-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.confirm-icon {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
    background: var(--danger-soft); color: var(--danger);
}
.modal:not(.is-danger) .confirm-icon { background: var(--brand-soft); color: var(--brand); }
.confirm-icon svg { width: 20px; height: 20px; }
.confirm-title { font-size: 16.5px; letter-spacing: -.01em; }
.confirm-text { font-size: 14px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; }
.confirm-input { width: 100%; margin-top: 12px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ---------- 紧凑下拉（工具栏内） ---------- */
.select.compact, .input.compact {
    min-height: 34px; padding: 4px 11px; font-size: 13.5px; line-height: 1.4;
}
.select.compact { padding: 4px 30px 4px 11px; background-position: right 9px center; }
.editor-bar .select, .ed-meta .select { flex: 0 0 auto; }

/* ---------- 评论回复 ---------- */
.comment { padding: 16px 0; }
.comment-actions { margin-top: 7px; }
.comment-actions .btn { padding: 3px 10px; font-size: 12.5px; }
.comment-replies { margin-top: 6px; padding-left: 14px; border-left: 2px solid var(--border); }
.comment-reply { padding: 12px 0; border-bottom: 0; }
.reply-to { display: inline-block; margin-right: 6px; color: var(--brand); font-weight: 600; }
.reply-form { margin-top: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.reply-form .textarea { background: var(--surface); }

/* ---------- 封面选择器 ---------- */
.cover-picker { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 14px; align-items: start; }
.cover-preview {
    height: 96px; border-radius: 12px; border: 1px solid var(--border); background-size: cover;
    background-position: center; display: grid; place-items: center; overflow: hidden;
}
.cover-preview.is-empty { border-style: dashed; }
.cover-preview .cover-glyph { width: 34px; height: 34px; }
.cover-candidates {
    display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
    padding: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.cover-cand {
    width: 74px; height: 52px; object-fit: cover; border-radius: 8px; cursor: pointer;
    border: 2px solid transparent; transition: .15s;
}
.cover-cand:hover { border-color: var(--brand); transform: translateY(-2px); }

/* ---------- 图片灯箱（可缩放 / 可滚动 / 可拖拽） ---------- */
.lightbox {
    position: fixed; inset: 0; z-index: 300; display: none;
    background: rgba(6, 8, 14, .92); backdrop-filter: blur(4px);
}
.lightbox.open { display: block; animation: lbIn .18s ease; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

/* 舞台：只负责滚动；居中交给内层 .lb-inner。
   直接在滚动容器上用 align-items:center，图片一旦高于视口就会向上溢出且滚不到顶部。 */
.lightbox .lb-stage {
    position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain;
    cursor: zoom-out;
}
.lightbox .lb-stage.dragging,
.lightbox .lb-stage.dragging img { cursor: grabbing; }
.lightbox .lb-inner {
    min-width: 100%; min-height: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 56px 20px 74px;
}
.lightbox .lb-stage::-webkit-scrollbar { width: 10px; height: 10px; }
.lightbox .lb-stage::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.22); border-radius: 6px;
}
.lightbox .lb-stage::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.36); }

/* 全局 img{max-width:100%} 会把放大后的宽度锁死在舞台宽度上 —— 必须解除，否则百分比涨而图不动。
   flex:none 同样关键：.lb-inner 是 flex 容器，图片默认会被 flex-shrink 压回容器宽度。 */
.lightbox img {
    display: block; max-width: none; max-height: none; flex: none;
    border-radius: 10px; background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
    cursor: zoom-in; user-select: none; -webkit-user-drag: none;
}
.lightbox img.grabbing { cursor: grabbing; }
.lightbox .lb-close {
    position: absolute; top: 18px; right: 20px; width: 38px; height: 38px; border-radius: 50%;
    display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 18px; line-height: 1;
    z-index: 2;
}
.lightbox .lb-close:hover { background: rgba(255,255,255,.22); }

/* 底部工具条 */
.lightbox .lb-bar {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px; padding: 6px;
    border-radius: 14px; border: 1px solid rgba(255,255,255,.16);
    background: rgba(20, 24, 34, .82); backdrop-filter: blur(8px); z-index: 2;
}
.lightbox .lb-bar button {
    min-width: 34px; height: 32px; padding: 0 10px; border: 0; border-radius: 10px;
    background: rgba(255,255,255,.1); color: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer; line-height: 1;
    /* 不收缩、不换行：否则窄屏下「适应」会被压成两行 */
    flex: none; white-space: nowrap;
}
.lightbox .lb-bar button:hover { background: rgba(255,255,255,.22); }
.lightbox .lb-bar .lb-zoom {
    min-width: 58px; text-align: center; font-size: 12.5px; font-weight: 600;
    color: rgba(255,255,255,.88); font-variant-numeric: tabular-nums;
}
.lightbox .lb-bar .lb-sep { width: 1px; height: 20px; background: rgba(255,255,255,.18); margin: 0 2px; }
.lightbox .lb-tip {
    position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
    font-size: 12.5px; color: rgba(255,255,255,.6); z-index: 2; pointer-events: none;
}
@media (max-width: 640px) {
    .lightbox .lb-tip { display: none; }
    .lightbox .lb-bar button { min-width: 30px; padding: 0 8px; }
}

/* ---------- 站点 Logo ---------- */
.logo-picker { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.logo-box {
    width: 68px; height: 68px; border-radius: 16px; flex: 0 0 68px;
    border: 1px dashed var(--border); background: var(--surface-2);
    display: grid; place-items: center; overflow: hidden; padding: 8px;
}
.logo-box .logo-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.logo-box .logo-fallback {
    width: auto; height: auto; border-radius: 0; display: grid; place-items: center;
    background: none; padding: 0;
}
.logo-box .logo-fallback .brand-mark,
.logo-box .logo-fallback .brand-mark svg { width: 48px; height: 48px; }

/* ---------- 图标选择器 ---------- */
.icon-picker { display: flex; flex-direction: column; gap: 18px; }
.icon-picker-top { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.icon-preview-box {
    width: 96px; min-height: 96px; border: 1px dashed var(--border); border-radius: 16px;
    display: grid; place-items: center; padding: 8px; background: var(--surface-2); flex-shrink: 0;
}
.icon-picker-side { flex: 1; min-width: 240px; }
.icon-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.icon-preset {
    width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border);
    background: var(--surface-2); cursor: pointer; font-size: 17px; display: grid; place-items: center;
}
.icon-preset:hover { border-color: var(--brand); background: var(--brand-soft); }

.icon-lib { border: 1px solid var(--border); border-radius: 14px; padding: 14px; background: var(--surface-2); }
.icon-lib-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.icon-lib-title { font-size: 13px; font-weight: 700; color: var(--text); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.icon-opt {
    height: 52px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
    display: grid; place-items: center; cursor: pointer; color: var(--text-2); transition: .15s;
}
.icon-opt svg { width: 24px; height: 24px; }
.icon-opt:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.icon-opt.on {
    border-color: var(--brand); background: var(--brand-soft); color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.icon-custom { border-top: 1px dashed var(--border); padding-top: 16px; }

/* 字母牌图标 */
.kb-icon-mono {
    background: linear-gradient(var(--deg, 135deg),
        var(--c, var(--brand)),
        color-mix(in srgb, var(--c, var(--brand)) 58%, #312e81));
    color: #fff; font-weight: 800; letter-spacing: -.03em; font-size: 21px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}
.kb-icon.lg.kb-icon-mono { font-size: 25px; }
.kb-icon.sm.kb-icon-mono { font-size: 14px; }

/* ---------- 成员选择（创建知识库） ---------- */
.pick-list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.pick-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-bottom: 1px solid var(--border);
}
.pick-row:last-child { border-bottom: 0; }
.pick-row .grow { flex: 1; min-width: 0; }
.pick-row .seg { display: flex; gap: 0; background: var(--surface-3); border-radius: 9px; padding: 2px; }
.pick-row .seg label { padding: 4px 10px; font-size: 12.5px; border-radius: 7px; cursor: pointer; color: var(--text-2); }
.pick-row .seg input { display: none; }
.pick-row .seg input:checked + span { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--sh-1); }
.pick-row .seg span { display: block; padding: 4px 10px; border-radius: 7px; font-size: 12.5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .layout-wide { grid-template-columns: 250px minmax(0, 1fr); }
    .layout-wide .toc { display: none; }
    .hero-inner { grid-template-columns: 1fr; gap: 32px; }
    .hero-art { display: none; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-article { grid-template-columns: minmax(0, 1fr); }
    .layout-article .toc { display: none; }
    .auth-card { grid-template-columns: 1fr; }
    .auth-side { display: none; }
    .admin { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; display: flex; gap: 6px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--border); }
    .admin-group { display: none; }
    .admin-main { padding: 22px 20px 50px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .ed.split { grid-template-columns: minmax(0, 1fr); }
    .ed-pane + .ed-pane { border-left: 0; border-top: 1px solid var(--border); }
    .post-card.wide { flex-direction: column; }
    .post-card.wide .post-cover { width: 100%; height: 180px; min-height: 0; }
}
@media (max-width: 640px) {
    .wrap { width: calc(100% - 28px); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .nav-links { display: none; }
    .nav-search { max-width: none; }
    .hero { padding: 40px 0 26px; }
    .hero-stats { gap: 20px; }
    .stat-grid { grid-template-columns: minmax(0, 1fr); }
    .layout-wide { grid-template-columns: minmax(0, 1fr); }
    .layout-wide .kb-tree-col { display: none; }
    .article-cover { height: 200px; }
}

/* ============================================================
   前台移动端适配
   —— 所有规则都以 .front 开头（body.front 只加在 main/blank 两个前台布局上），
      后台 admin.php 与编辑器 editor.php 不匹配，电脑端样式完全不受影响。
   ============================================================ */

/* 栅格塌成一列 + 顶栏折叠菜单 */
@media (max-width: 980px) {
    .front .grid-featured { grid-template-columns: minmax(0, 1fr); }
    .front .layout-blog   { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
    /* 侧栏不再 sticky：手机上它会变成一个带内部滚动条的小方框 */
    .front .layout-article > aside,
    .front .layout-wide > aside {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .front .nav-links { display: none; }
    .front .nav-write { display: none; }
    .front .icon-btn.nav-toggle { display: grid; }

    /* 副标题在这一档收窄，避免把折叠后的导航挤出去（手机上才真正隐藏） */
    .front .brand-sub { font-size: 14px; max-width: 150px; padding-left: 8px; }

    .front .nav-drawer {
        position: absolute; top: var(--nav-h); left: 0; right: 0;
        background: var(--surface); border-bottom: 1px solid var(--border);
        box-shadow: var(--sh-2); padding: 10px 0 14px;
        max-height: calc(100vh - var(--nav-h)); overflow: auto;
    }
    .front .nav-drawer.open { display: block; animation: pop .16s ease; }
    /* .nav .wrap 是 flex，抽屉里的 .wrap 会被一起命中 —— 必须改回块级，
       否则登录后的 6 个入口会横排挤在一行里换行 */
    .front .nav-drawer .wrap { display: block; width: 100%; }
    .front .nav-drawer a {
        display: flex; align-items: center; gap: 11px;
        padding: 11px 12px; border-radius: 10px;
        font-size: 15px; font-weight: 600; color: var(--text-2);
        white-space: nowrap;
    }
    .front .nav-drawer a:hover { background: var(--surface-3); color: var(--text); }
    .front .nav-drawer a.on { background: var(--brand-soft); color: var(--brand); }
    .front .nav-drawer .sep { height: 1px; background: var(--border); margin: 8px 4px; }
}

/* 手机 */
@media (max-width: 640px) {
    .front .wrap,
    .front .wrap-narrow { width: calc(100% - 24px); }

    .front .section { padding: 28px 0; }
    .front .section-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .front .page-h1,
    .front .page-h1.sm { font-size: 24px; }

    /* 顶栏：品牌名 + 搜索图标 + 主题 + 头像 + 汉堡（搜索框顶栏放不下，收进搜索页） */
    /* 副标题只在电脑 / 平板显示，手机上顶栏放不下 */
    .front .brand-sub { display: none; }
    .front .nav .wrap { gap: 6px; }
    .front .nav-search { display: none; }
    .front .icon-btn.nav-search-icon { display: grid; }
    .front .icon-btn { width: 34px; height: 34px; }
    .front .usermenu-btn { padding: 3px; }
    .front .usermenu-btn span,
    .front .usermenu-btn svg { display: none; }
    .front .usermenu-btn .avatar { width: 26px; height: 26px; }
    .front .nav-right { gap: 6px; }

    /* Hero */
    .front .hero { padding: 34px 0 22px; }
    .front .hero h1 { font-size: 30px; }
    .front .hero p.lead { font-size: 15.5px; margin: 16px 0 22px; }
    .front .hero-actions { flex-direction: column; gap: 10px; }
    .front .hero-actions .btn { width: 100%; }
    .front .hero-stats { flex-wrap: wrap; gap: 12px 22px; margin-top: 24px; }

    /* 文章详情 */
    .front .article-title { font-size: 26px; }
    .front .article-head { padding: 26px 0 16px; }
    .front .article-sub { gap: 10px; font-size: 13px; }
    .front .article-sub .sub-actions { margin-left: 0 !important; width: 100%; }
    /* 原来固定 200px 会把高图裁掉，改成自适应 */
    .front .article-cover { height: auto; margin: 18px 0 4px; border-radius: var(--r-lg); }

    /* 正文 */
    .front .prose { font-size: 15.5px; overflow-wrap: break-word; }
    .front .prose h1 { font-size: 1.5em; }
    .front .prose h2 { font-size: 1.28em; }
    .front .prose h3 { font-size: 1.12em; }
    .front .prose img, .front .prose .md-img { margin: 1.2em auto; border-radius: 10px; }
    .front .code-wrap pre { padding: 13px 14px 15px; max-height: 60vh; }
    .front .code-bar { padding: 6px 10px 6px 14px; }

    /* 卡片 */
    .front .card-pad { padding: 16px; }
    .front .kb-card { padding: 18px; gap: 12px; }
    .front .post-body { padding: 16px 16px 18px; }
    .front .post-cover { height: 150px; }
    .front .side-card { padding: 16px; }

    /* 知识库文档树：手机上移到正文上方、高度封顶内部滚动，而不是整块隐藏 */
    .front .layout-wide .kb-tree-col { display: block; order: -1; }
    .front .layout-wide .kb-tree-col .tree { max-height: 40vh; overflow: auto; }

    /* 评论 / 分页 */
    .front .comment { gap: 10px; padding: 14px 0; }
    .front .comment-replies { padding-left: 10px; }
    .front .pager .pg { min-width: 34px; height: 34px; padding: 0 8px; }
    .front .empty { padding: 44px 16px; }

    /* 页脚 / 浮层 */
    .front .footer { margin-top: 40px; padding: 26px 0; }
    .front .footer .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
    .front .toasts { inset: 12px 12px auto 12px; width: auto; }
    .front dialog[open] > .toasts { inset: 10px 10px auto auto; width: max-content; }
    .front .toast { min-width: 0; max-width: none; }
    .front .modal-card { padding: 20px 18px; border-radius: 18px; }

    /* 登录页 */
    .front .auth-page { padding: 22px 12px; }
    .front .auth-main { padding: 28px 20px; }
}

@media (max-width: 380px) {
    .front .hero-stat b { font-size: 22px; }
    .front .btn { padding: 0 14px; }
}

/* ============================================================
   附件
   - 编辑器里的选择器（可多选）与详情页的只读列表共用 .attach-item
   - 附件存 web 根目录之外，只走 /attachment/{id} 下载，这里不区分权限
   ============================================================ */
/* 整块是个可拖放的投放区，给它一个看得见的边界，
   否则用户既不知道文件该拖到哪，也容易找不到按钮 */
.attach {
    border: 1px dashed var(--border-2);
    border-radius: var(--r);
    padding: 14px 16px;
    background: color-mix(in srgb, var(--surface-3) 45%, transparent);
}

/* 按钮紧跟标题：之前用 space-between，在编辑器全宽区里会把它顶到最右边 */
.attach-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.attach-title {
    font-size: 14px;
    font-weight: 700;
}

.attach-tip {
    font-size: 12.5px;
    color: var(--muted);
}

.attach-hint {
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--muted);
}
.attach-hint b { color: var(--danger); font-weight: 600; }

.attach-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attach-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
}

.attach-kind {
    flex: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 6px;
    padding: 2px 7px;
}

/* 不用 flex:1：那样会把文件大小和删除按钮顶到整行的最右边，
   文件名短的时候两者隔得很远，既难找也不好看。
   改成可收缩的自动宽度，大小和按钮就紧跟在文件名后面。 */
.attach-name {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13.5px;
}

.attach-size {
    flex: none;
    font-size: 12px;
    color: var(--muted);
}

.attach-del {
    flex: none;
    border: 0;
    background: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    padding: 3px 8px;
    border-radius: 6px;
}
.attach-del:hover {
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 12%, transparent);
}

.attach-empty {
    margin-top: 10px;
    font-size: 12.5px;
    color: var(--muted);
}

/* 拖拽文件进来时的高亮：直接改自身边框，别再叠 outline */
.attach.is-over {
    border-color: var(--brand);
    border-style: solid;
    background: var(--brand-soft);
}

/* ---------- 自动保存状态提示 ---------- */
.autosave-hint {
    flex: none;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.autosave-hint.is-saving { color: var(--muted); }
.autosave-hint.is-saved  { color: var(--brand); }
.autosave-hint.is-error  { color: var(--danger); }

/* ---------- 续写自动保存草稿的提示条 ---------- */
/* 放在编辑器表单外面：表单里再套 form 是非法 HTML，浏览器会直接把内层吃掉 */
.resume-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 9px 12px;
    border: 1px solid color-mix(in srgb, var(--brand) 38%, transparent);
    border-radius: var(--r);
    background: var(--brand-soft);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
}
.resume-bar svg { flex: none; color: var(--brand); }
.resume-bar span { flex: 1 1 auto; min-width: 0; }
.resume-bar b { color: var(--brand); font-weight: 600; }
.resume-act { flex: none; display: flex; align-items: center; gap: 6px; margin: 0; }

/* ---------- 我的草稿 ---------- */
/* 页面骨架复用前台通用的 section + wrap + section-head，这里只补列表内的细节 */
.draft-title { font-weight: 600; color: var(--text); }
.draft-title:hover { color: var(--brand); }
.draft-tag { margin-left: 6px; }
.draft-excerpt { margin-top: 3px; }
.empty-hint { padding: 26px 20px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---------- 详情页只读列表 ---------- */
.attach-view {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.attach-view-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
}

.attach-view-count {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.attach-view .attach-name {
    color: var(--brand);
    text-decoration: none;
}
.attach-view .attach-name:hover { text-decoration: underline; }
