:root {
  --ink: #1f2a2a;
  --muted: #77817f;
  --line: #dfe3df;
  --paper: #fbfbf8;
  --canvas: #f1f2ee;
  --panel: #ffffff;
  --sidebar: #1f2a2a;
  --sidebar-muted: #9aa9a5;
  --teal: #1c7c76;
  --teal-soft: #e3f2ee;
  --orange: #c87934;
  --orange-soft: #fff1df;
  --red: #b4534e;
  --red-soft: #fbe8e5;
  --shadow: 0 8px 24px rgba(31, 42, 42, 0.06);
}

* { box-sizing: border-box; }
html { overflow-y: scroll; scrollbar-gutter: stable; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.login-page { min-height: 100vh; background: #eef1ed; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, .8fr) minmax(440px, 1.2fr); }
.login-brand { position: relative; isolation: isolate; display: flex; align-items: flex-start; gap: 14px; overflow: hidden; padding: 46px; color: #f7faf7; background-color: #1f2a2a; background-image: url("/assets/policy-login-meeting-room.webp"); background-position: center; background-size: cover; }
.login-brand::before { position: absolute; z-index: -1; inset: 0; background: rgba(20, 29, 28, .62); content: ""; }
.login-brand-mark { width: 46px; height: 46px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.38); background: #f7faf7; color: #1f2a2a; font-size: 23px; font-weight: 700; }
.login-brand-name { margin-top: 2px; font-size: 19px; font-weight: 700; }
.login-brand-meta { margin-top: 7px; color: #aebbb7; font-size: 12px; }
.login-panel { width: min(420px, calc(100% - 40px)); align-self: center; justify-self: center; padding: 36px 0; }
.login-head { margin-bottom: 27px; }
.login-kicker { color: var(--teal); font-size: 12px; font-weight: 700; }
.login-head h1 { margin: 9px 0 0; color: var(--ink); font-size: 25px; line-height: 1.4; letter-spacing: 0; }
.login-error { margin-bottom: 18px; padding: 11px 12px; border: 1px solid #ecc7c3; border-left: 3px solid var(--red); border-radius: 5px; background: var(--red-soft); color: #8d3f3a; font-size: 12px; line-height: 1.6; }
.login-form { display: grid; gap: 8px; }
.login-form label { margin-top: 8px; color: #596863; font-size: 12px; font-weight: 600; }
.login-form input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #d5dcd7; border-radius: 5px; outline: none; background: #fff; color: var(--ink); }
.login-form input:focus { border-color: #72aaa1; box-shadow: 0 0 0 3px rgba(28,124,118,.1); }
.login-submit { height: 44px; margin-top: 17px; border: 0; border-radius: 5px; background: var(--teal); color: #fff; font-weight: 700; }
.login-submit:hover { background: #176b66; }
.login-foot { margin-top: 20px; padding-top: 17px; border-top: 1px solid #dce2dd; color: var(--muted); font-size: 11px; line-height: 1.6; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { background: var(--sidebar); color: #f6f8f4; padding: 26px 16px 18px; display: flex; flex-direction: column; min-height: 100vh; }
.brand-block { display: flex; gap: 12px; align-items: center; padding: 0 10px 24px; }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; background: #e8b96b; color: #263331; display: grid; place-items: center; font-family: serif; font-size: 20px; font-weight: 700; }
.brand-name { font-weight: 700; letter-spacing: .02em; }
.brand-meta { font-size: 11px; color: var(--sidebar-muted); margin-top: 4px; }
.workspace-switcher { border: 1px solid rgba(255,255,255,.13); color: #dce6e1; border-radius: 6px; padding: 10px 11px; display: flex; align-items: center; gap: 8px; margin: 0 4px 24px; font-size: 12px; }
.workspace-dot { width: 7px; height: 7px; background: #6cc4a9; border-radius: 99px; box-shadow: 0 0 0 3px rgba(108,196,169,.13); }
.workspace-switcher .chevron { margin-left: auto; color: #9eafaa; font-size: 15px; }
.primary-nav { display: grid; gap: 4px; }
.nav-item, .sidebar-link { border: 0; background: transparent; color: #b8c6c1; display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border-radius: 6px; padding: 11px 12px; transition: .16s ease; }
.nav-item:hover, .sidebar-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.active { background: #324442; color: #fff; box-shadow: inset 3px 0 0 #e8b96b; }
.nav-icon { width: 18px; color: #9fbbb4; font-size: 17px; text-align: center; }
.nav-item.active .nav-icon { color: #e8b96b; }
.nav-count { margin-left: auto; font-size: 11px; color: #8fa19c; }
.nav-count.accent { color: #efc284; }
.sidebar-section-label { margin: 28px 12px 8px; color: #71817d; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.sidebar-links { display: grid; gap: 3px; }
.sidebar-link { font-size: 12px; padding: 9px 12px; }
.sidebar-link span { color: #e8b96b; font-size: 17px; width: 17px; text-align: center; }
.sidebar-footer { margin-top: auto; }
.sync-status { color: #96aba5; font-size: 11px; display: flex; align-items: center; gap: 8px; padding: 0 10px 14px; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #6cc4a9; }
.user-chip { border-top: 1px solid rgba(255,255,255,.1); padding: 16px 8px 0; display: flex; gap: 9px; align-items: center; color: #e1e9e5; }
.user-chip > span:nth-child(2) { min-width: 0; flex: 1; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #d9ebe4; color: #28675e; display: inline-grid; place-items: center; font-weight: 700; border: 0; }
.user-chip small { display: block; color: #8da09a; font-size: 10px; margin-top: 3px; }
.user-chip .more { margin-left: auto; color: #879993; letter-spacing: 2px; }
.logout-link { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; color: var(--sidebar-muted); font-size: 15px; text-decoration: none; }
.logout-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.main-shell { min-width: 0; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: rgba(251,251,248,.86); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.breadcrumb strong { color: var(--ink); font-weight: 600; }
.breadcrumb-separator { color: #b8c0bd; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.global-search { height: 36px; width: min(360px, 34vw); display: flex; align-items: center; gap: 8px; padding: 0 10px; background: #f0f2ee; border: 1px solid #e3e7e1; border-radius: 6px; color: #7f8986; }
.global-search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; color: var(--ink); font-size: 12px; }
.global-search kbd { font-size: 10px; color: #9ba5a1; border: 1px solid #d9dfd9; padding: 2px 5px; border-radius: 3px; background: #fafbf8; }
.icon-button { position: relative; border: 0; background: transparent; font-size: 19px; color: #6e7a77; width: 28px; height: 28px; }
.notification-dot { position: absolute; width: 5px; height: 5px; background: var(--orange); border-radius: 50%; top: 4px; right: 3px; }
.top-avatar { width: 30px; height: 30px; }
.view-root { padding: 34px; max-width: 1600px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.eyebrow { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 9px; }
.page-title { margin: 0; font-size: 27px; letter-spacing: -.02em; font-weight: 700; }
.page-subtitle { color: var(--muted); margin: 9px 0 0; font-size: 13px; }
.action-button { border: 0; border-radius: 6px; padding: 10px 15px; display: inline-flex; align-items: center; gap: 8px; background: var(--teal); color: #fff; font-weight: 700; box-shadow: 0 4px 10px rgba(28,124,118,.14); }
.action-button:hover { background: #176b66; }
.action-button.secondary { background: var(--paper); border: 1px solid var(--line); color: var(--ink); box-shadow: none; }
.action-button.secondary:hover { border-color: #b9c8c2; background: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 22px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 17px 18px; min-height: 100px; }
.stat-label { color: var(--muted); font-size: 12px; }
.stat-value { font-size: 27px; font-weight: 700; margin-top: 10px; letter-spacing: -.03em; }
.stat-note { color: #6c8d82; font-size: 11px; margin-top: 7px; }
.stat-note.warn { color: var(--orange); }
.library-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, .85fr); gap: 18px; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.panel-head { padding: 17px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.panel-title { font-weight: 700; }
.panel-meta { color: var(--muted); font-size: 11px; }
.filter-bar { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.filter-chip { border: 1px solid transparent; color: var(--muted); background: transparent; padding: 6px 10px; border-radius: 4px; font-size: 12px; }
.filter-chip.active, .filter-chip:hover { color: var(--teal); background: var(--teal-soft); border-color: #c4e3da; }
.policy-table { width: 100%; border-collapse: collapse; }
.policy-table th { text-align: left; color: #8b9490; font-size: 11px; font-weight: 600; padding: 12px 16px; background: #fafbf8; border-bottom: 1px solid var(--line); white-space: nowrap; }
.policy-table td { padding: 15px 16px; border-bottom: 1px solid #edf0ec; vertical-align: middle; }
.policy-row { cursor: pointer; transition: background .15s ease; }
.policy-row:hover, .policy-row.selected { background: #f6faf7; }
.policy-row:last-child td { border-bottom: 0; }
.policy-name { font-weight: 700; color: var(--ink); }
.policy-code { color: var(--muted); font-size: 11px; margin-top: 5px; }
.category-tag, .status-tag, .small-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; font-size: 11px; white-space: nowrap; }
.category-tag { background: #eff3f0; color: #5e706a; }
.status-tag { background: var(--teal-soft); color: #25756b; }
.status-tag.draft { background: var(--orange-soft); color: #a65e2a; }
.small-tag { background: #f5f6f3; color: #74807c; }
.owner-cell { color: #51615d; font-size: 12px; }
.version-cell { font-weight: 700; font-size: 12px; }
.date-cell { color: var(--muted); font-size: 12px; white-space: nowrap; }
.row-arrow { color: #a6b2ad; font-size: 17px; }
.detail-panel { position: sticky; top: 112px; }
.detail-head { padding: 21px 20px 17px; border-bottom: 1px solid var(--line); }
.detail-kicker { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.detail-title { font-size: 20px; line-height: 1.35; margin: 0; }
.detail-desc { color: var(--muted); font-size: 12px; line-height: 1.7; margin: 9px 0 0; }
.detail-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.meta-label { color: #8b9691; font-size: 11px; }
.meta-value { margin-top: 5px; font-size: 12px; font-weight: 600; }
.detail-tabs { display: flex; padding: 0 20px; border-bottom: 1px solid var(--line); }
.detail-tab { border: 0; background: transparent; padding: 12px 3px 10px; margin-right: 20px; color: var(--muted); font-size: 12px; border-bottom: 2px solid transparent; }
.detail-tab.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 700; }
.detail-content { padding: 17px 20px 20px; }
.detail-actions { display: flex; gap: 8px; padding-top: 3px; }
.detail-list { display: grid; gap: 10px; }
.detail-list-item { display: flex; gap: 10px; align-items: flex-start; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); margin-top: 5px; flex: 0 0 auto; }
.detail-list strong { font-size: 12px; }
.detail-list small { display: block; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.version-row { border-left: 2px solid #dbe9e4; padding: 0 0 14px 13px; margin-left: 3px; }
.version-row:last-child { padding-bottom: 0; }
.version-row strong { display: flex; align-items: center; gap: 8px; }
.version-row-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.version-row-title strong { min-width: 0; }
.version-row small { color: var(--muted); display: block; margin-top: 4px; }
.discussion-version-bar { display: flex; align-items: center; gap: 8px; padding: 9px 10px; margin-bottom: 6px; background: #f4f7f4; border: 1px solid #e2e7e3; border-radius: 5px; font-size: 11px; color: var(--muted); }
.discussion-version-bar strong { color: var(--ink); }
.empty-state { color: var(--muted); font-size: 12px; padding: 26px 0; text-align: center; }
.empty-workspace { padding: 90px 20px; }
.workspace-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(340px, .7fr); gap: 18px; align-items: start; }
.workspace-toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.workspace-toolbar .small-tag { margin-left: auto; }
.workspace-version-bar { display: grid; grid-template-columns: auto minmax(230px, 360px) auto minmax(280px, 1fr); align-items: center; gap: 14px; margin: -12px 0 18px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 6px; box-shadow: 0 4px 14px rgba(31,42,42,.04); }
.workspace-version-bar.history { border-left-color: var(--orange); background: #fffdfa; }
.workspace-version-copy { display: grid; gap: 3px; min-width: 116px; }
.workspace-version-copy strong { font-size: 12px; }
.workspace-version-copy small { color: var(--muted); font-size: 10px; }
.workspace-version-bar .form-select { width: 100%; height: 38px; background: #fff; font-weight: 700; }
.workspace-version-message { min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); display: grid; gap: 3px; }
.workspace-version-message strong { color: var(--ink); font-size: 11px; }
.workspace-version-message span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.workspace-version-bar.history .workspace-version-message strong { color: #8a5728; }
.document-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 680px; }
.document-panel.read-only { background: #fcfcfa; }
.document-panel.read-only .doc-paragraph { cursor: text; }
.reader-meta-bar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: -12px 0 18px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 6px; }
.reader-meta-bar > div { min-width: 0; padding: 12px 14px; background: #fff; }
.reader-meta-bar span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.reader-meta-bar strong { display: block; overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.reader-document { width: min(980px, 100%); margin: 0 auto; }
.reader-paragraph { cursor: text; padding-right: 14px; }
.reader-paragraph:hover { background: transparent; }
.document-head { padding: 20px 25px 14px; border-bottom: 1px solid var(--line); }
.document-title { font-size: 20px; font-weight: 700; }
.document-subtitle { color: var(--muted); font-size: 12px; margin-top: 8px; }
.document-body { padding: 10px 25px 30px; }
.doc-paragraph { position: relative; border-left: 3px solid transparent; padding: 11px 10px 11px 13px; margin: 4px 0; border-radius: 3px; line-height: 1.8; transition: background .15s ease, border .15s ease; }
.doc-paragraph:hover { background: #f8faf7; }
.doc-paragraph.selected { border-left-color: var(--teal); background: #f1f8f4; }
.doc-paragraph.annotated { border-left-color: var(--orange); }
.paragraph-number { color: var(--teal); font-weight: 700; margin-right: 8px; font-size: 12px; }
.paragraph-copy { user-select: text; }
.paragraph-tools { position: absolute; right: 10px; top: 7px; opacity: 0; transition: opacity .15s ease; }
.doc-paragraph:hover .paragraph-tools, .doc-paragraph.selected .paragraph-tools { opacity: 1; }
.mini-button { border: 1px solid #d5e1dc; background: #fff; color: var(--teal); border-radius: 4px; padding: 4px 7px; font-size: 11px; }
.annotation-panel { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: sticky; top: 112px; }
.annotation-head { padding: 18px 19px; border-bottom: 1px solid var(--line); }
.annotation-title { font-weight: 700; }
.annotation-subtitle { color: var(--muted); font-size: 11px; margin-top: 6px; }
.selection-tools { margin: 15px 19px 0; padding: 10px 11px; background: var(--orange-soft); border: 1px solid #f2d1ad; border-radius: 5px; display: none; }
.selection-tools.visible { display: block; }
.selection-tools small { color: #9a632f; display: block; line-height: 1.5; max-height: 48px; overflow: hidden; }
.selection-tools button { margin-top: 8px; }
.annotation-form { padding: 16px 19px 18px; border-bottom: 1px solid var(--line); }
.form-label { display: block; color: #74807c; font-size: 11px; margin: 12px 0 6px; }
.form-label:first-child { margin-top: 0; }
.form-input, .form-select, .form-textarea { width: 100%; border: 1px solid #dce2de; border-radius: 5px; outline: none; background: #fbfcfa; color: var(--ink); padding: 9px 10px; font-size: 12px; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #86bab0; box-shadow: 0 0 0 3px rgba(28,124,118,.08); }
.form-textarea { resize: vertical; min-height: 72px; line-height: 1.6; }
.annotation-list { padding: 16px 19px 20px; }
.read-only-note { margin: 14px 19px 0; padding: 11px 12px; background: var(--orange-soft); border: 1px solid #efd1ad; border-left: 3px solid var(--orange); border-radius: 5px; display: grid; gap: 4px; line-height: 1.5; }
.read-only-note > span { color: #a65e2a; font-size: 10px; font-weight: 700; }
.read-only-note strong { color: #75471e; font-size: 12px; }
.read-only-note small { color: #946c46; font-size: 10px; }
.annotation-item { padding: 11px 0; border-bottom: 1px solid #edf0ec; }
.annotation-item:last-child { border-bottom: 0; }
.annotation-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.annotation-author { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.annotation-author .avatar { width: 21px; height: 21px; font-size: 10px; }
.annotation-time { color: #9aa39f; font-size: 10px; }
.annotation-quote { color: #697671; border-left: 2px solid #d3e4df; padding-left: 9px; margin: 8px 0; font-size: 11px; line-height: 1.5; }
.annotation-note { font-size: 12px; line-height: 1.6; }
.annotation-source { color: #8a6b42; background: #fff5e7; display: inline-block; padding: 3px 6px; border-radius: 3px; margin-top: 7px; font-size: 10px; }
.selection-toolbar { position: fixed; display: none; z-index: 50; background: #22302f; padding: 5px; border-radius: 5px; box-shadow: var(--shadow); }
.selection-toolbar button { color: #fff; border: 0; background: transparent; padding: 6px 8px; font-size: 11px; }
.selection-toolbar button:hover { background: rgba(255,255,255,.12); }
.wiki-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
.rule-list { display: grid; gap: 0; }
.rule-item { padding: 17px 18px; border-bottom: 1px solid #edf0ec; }
.rule-item:last-child { border-bottom: 0; }
.rule-id { color: var(--teal); font-size: 11px; font-weight: 700; letter-spacing: .05em; }
.rule-title { font-size: 14px; font-weight: 700; margin: 7px 0; }
.rule-text { color: #566561; line-height: 1.7; font-size: 12px; }
.assistant-card { background: #243332; color: #ecf3ef; border-radius: 8px; padding: 19px; }
.assistant-card .eyebrow { color: #e8b96b; }
.assistant-card h3 { margin: 0; font-size: 17px; }
.assistant-card p { color: #a9b9b3; font-size: 12px; line-height: 1.7; margin: 10px 0 16px; }
.assistant-card .action-button { background: #e8b96b; color: #243332; box-shadow: none; }
.assistant-card .action-button:hover { background: #f0ca8b; }
.check-result { padding: 14px 17px; border-top: 1px solid rgba(255,255,255,.12); margin: 16px -19px -19px; display: none; }
.check-result.visible { display: block; }
.finding { display: flex; gap: 8px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.1); color: #d9e4df; font-size: 11px; line-height: 1.5; }
.finding:last-child { border-bottom: 0; }
.finding-dot { width: 6px; height: 6px; border-radius: 50%; background: #e8b96b; margin-top: 5px; flex: 0 0 auto; }
.no-findings { color: #9ed0bd; font-size: 12px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(24,34,33,.44); display: grid; place-items: center; z-index: 40; padding: 20px; }
.modal { width: min(560px, 100%); background: #fff; border-radius: 8px; box-shadow: 0 18px 60px rgba(0,0,0,.18); overflow: hidden; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 16px; font-weight: 700; }
.close-button { border: 0; background: transparent; color: var(--muted); font-size: 21px; }
.modal-body { padding: 19px 20px; }
.modal-hint { margin: 0 0 15px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 15px 20px; border-top: 1px solid var(--line); }
.import-drop { border: 1px dashed #aac5bd; background: #f4faf7; border-radius: 6px; min-height: 76px; display: flex; align-items: center; gap: 12px; padding: 13px; cursor: pointer; position: relative; }
.import-drop:hover { border-color: var(--teal); background: #eef8f4; }
.import-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.import-drop strong { display: block; font-size: 13px; }
.import-drop small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.import-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; background: var(--teal); color: #fff; font-family: Georgia, serif; font-size: 17px; font-weight: 700; }
.divider-label { height: 30px; display: flex; align-items: center; color: #9aa39f; font-size: 10px; margin: 8px 0 2px; }
.divider-label::before, .divider-label::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.divider-label span { padding: 0 9px; }
.compare-button { width: 100%; justify-content: center; margin-top: 16px; }
.diff-modal { width: min(920px, 100%); }
.diff-result { margin-top: 17px; max-height: 56vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfa; }
.diff-summary { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; background: #edf5f1; border-bottom: 1px solid #d4e2dc; font-size: 11px; color: #61716c; }
.diff-summary strong { color: var(--ink); }
.diff-row { padding: 12px 13px; border-bottom: 1px solid #e7ebe7; }
.diff-row:last-child { border-bottom: 0; }
.diff-row.changed { border-left: 3px solid var(--orange); }
.diff-row.added { border-left: 3px solid var(--teal); }
.diff-row.deleted { border-left: 3px solid var(--red); }
.diff-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.diff-row-head strong { font-size: 12px; }
.diff-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.diff-columns > div { background: #fff; border: 1px solid #e2e6e2; border-radius: 4px; padding: 9px 10px; min-width: 0; }
.diff-columns small { color: #8b9691; font-size: 10px; }
.diff-columns p { margin: 6px 0 0; font-size: 12px; line-height: 1.65; word-break: break-word; }
.diff-delete { background: #fbdedb; color: #9f3f3b; text-decoration: line-through; }
.diff-insert { background: #dff3e8; color: #176a5f; border-bottom: 1px solid #5ba391; }
.diff-equal { color: inherit; }
.toast { position: fixed; bottom: 24px; right: 24px; background: #21302e; color: #f4f7f2; padding: 11px 15px; border-radius: 5px; font-size: 12px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .22s ease; z-index: 60; }
.toast.show { opacity: 1; transform: translateY(0); }
.muted-note { color: var(--muted); font-size: 12px; line-height: 1.7; }
.icon-text { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 1180px) {
  .library-grid, .workspace-layout, .wiki-grid { grid-template-columns: 1fr; }
  .detail-panel, .annotation-panel { position: static; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .reader-meta-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1400px) {
  .workspace-page-head { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 16px; }
  .workspace-toolbar { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .login-shell { display: block; padding-top: 1px; }
  .login-brand { padding: 22px 20px; background-position: center 38%; }
  .login-panel { width: calc(100% - 40px); margin: 46px auto 0; padding: 0 0 32px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; padding: 15px 14px; }
  .brand-block { padding-bottom: 13px; }
  .workspace-switcher, .sidebar-section-label, .sidebar-links, .sidebar-footer { display: none; }
  .primary-nav { grid-template-columns: repeat(2, 1fr); }
  .nav-item { justify-content: center; padding: 9px 5px; gap: 5px; font-size: 11px; }
  .nav-count { display: none; }
  .topbar { padding: 0 15px; height: 68px; }
  .global-search { width: 42px; padding: 0 9px; }
  .global-search input, .global-search kbd { display: none; }
  .view-root { padding: 22px 15px; }
  .page-head { display: block; }
  .page-head .action-button { margin-top: 18px; }
  .workspace-toolbar .action-button { margin-top: 0; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 13px; min-height: 90px; }
  .stat-value { font-size: 22px; }
  .policy-table th:nth-child(3), .policy-table td:nth-child(3), .policy-table th:nth-child(4), .policy-table td:nth-child(4) { display: none; }
  .modal-grid { grid-template-columns: 1fr; }
  .diff-columns { grid-template-columns: 1fr; }
  .workspace-version-bar { grid-template-columns: 1fr; align-items: stretch; }
  .workspace-version-bar .form-select { width: 100%; }
  .workspace-version-bar .status-tag { justify-self: start; }
  .workspace-version-message { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .reader-meta-bar { grid-template-columns: 1fr 1fr; }
}
