/* V4 图灵智测 — 白卡、薄荷渐变、状态标签 */
:root {
  --g1: #82df67;
  --g2: #06b190;
  --teal: #06b190;
  --ink: rgba(0, 0, 0, .85);
  --ink-2: rgba(0, 0, 0, .65);
  --muted: rgba(0, 0, 0, .45);
  --line: rgba(0, 0, 0, .12);
  --line-2: rgba(0, 0, 0, .06);
  --bg: #f4f8f7;
  --panel: #fff;
  --mint: #eaf9f9;
  --alt: #f8fafe;
  --r: 8px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .06);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .08);
  --sans: "PingFang SC", "Helvetica Neue", "Hiragino Sans GB", "Noto Sans SC", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif SC", serif;
  --mono: "SF Mono", "JetBrains Mono", "Menlo", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background-color: #fff;
  background-image:
    radial-gradient(32% 26% at 50% 24%, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, 0) 72%),
    radial-gradient(33% 32% at 35% 32%, rgba(120, 205, 236, .48) 0%, rgba(120, 205, 236, 0) 72%),
    radial-gradient(31% 30% at 66% 30%, rgba(170, 228, 146, .46) 0%, rgba(170, 228, 146, 0) 74%),
    radial-gradient(48% 40% at 50% 28%, rgba(205, 244, 242, .88) 0%, rgba(255, 255, 255, 0) 76%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; text-align: center; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
img { display: block; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 64px;
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 24px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  position: sticky;
  top: 0;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
.brand-mark {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 177, 144, .22);
}
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-size: 20px; font-weight: 500; color: #0b7a68; letter-spacing: .01em; }
.nav { display: flex; align-items: stretch; gap: 8px; height: 100%; margin-left: 48px; }
.nav a {
  display: flex; align-items: center;
  padding: 0 14px;
  font-size: 16px;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.nav a.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
.user { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-name { font-size: 14px; color: #181818; }
.org-tag {
  height: 22px; display: inline-flex; align-items: center;
  padding: 0 8px;
  background: #f6ffed;
  border: 1px solid #b7eb8f;
  border-radius: 4px;
  color: #2f8c00;
  font-size: 12px;
  line-height: 20px;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #d8f8e5, #bfeee7);
  color: #137d69;
  font-size: 14px;
  font-weight: 500;
}
.user-chev { width: 12px; height: 12px; transform: rotate(180deg); opacity: .55; }

/* ---------- 首页 ---------- */
.home { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 40px 0 80px; }
.hero { text-align: center; }
.hero h1 { margin: 0; font-size: 40px; line-height: 1.3; font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.hero p { margin: 10px 0 0; font-size: 18px; line-height: 28px; color: var(--ink-2); }

.search-panel {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 52px 64px;
  border-radius: var(--r);
  background: linear-gradient(90deg, rgba(180, 255, 158, .45), rgba(144, 255, 234, .45));
  position: relative;
}
.notice h2 { margin: 0 0 18px; font-size: 24px; line-height: 32px; font-weight: 500; color: var(--ink); }
.notice p { margin: 0 0 4px; font-size: 14px; line-height: 28px; color: var(--ink); }
.search-card {
  position: relative;
  background: #fff;
  border: 1px dashed #11c4a2;
  border-radius: var(--r);
  padding: 30px 28px;
  min-height: 248px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(6, 177, 144, .06);
}
.search-deco { position: absolute; right: 18px; bottom: 14px; width: 64px; height: auto; opacity: .9; pointer-events: none; }
.search-form {
  display: flex; align-items: center; gap: 8px;
  height: 52px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: #fbfefd;
}
.search-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round; }
.search-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
.search-form input::placeholder { color: rgba(0, 0, 0, .32); }
.btn-gradient {
  height: 40px; padding: 0 24px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: filter .15s, transform .1s;
}
.btn-gradient:hover { filter: brightness(1.04); }
.btn-gradient:active { transform: translateY(1px); }
.btn-gradient.wide { width: 100%; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.examples button {
  padding: 5px 10px;
  border-radius: 4px;
  background: var(--mint);
  border: 1px solid #d7f1ec;
  color: #157a6a;
  font-size: 11.5px;
  line-height: 18px;
  transition: background .15s, border-color .15s;
}
.examples button:hover { background: #ddf6f1; border-color: #b9e8de; }
.search-hint { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.stat {
  display: flex; align-items: center; gap: 16px;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
}
.stat img { width: 44px; height: 44px; object-fit: contain; flex: none; }
.stat b { display: block; font-size: 32px; line-height: 36px; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.stat b em { font-style: normal; font-size: 16px; font-weight: 500; margin-left: 2px; }
.stat span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

.section { margin-top: 44px; }
.section-head { display: flex; align-items: center; gap: 12px; }
.section-title { display: flex; align-items: baseline; gap: 10px; flex: none; }
.section-title h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; color: #000; }
.eyebrow {
  font-size: 14px; line-height: 20px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .02em;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  white-space: nowrap;
}
.section-rule { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(6, 177, 144, .45), rgba(6, 177, 144, 0)); }
.section-meta { font-size: 12px; color: var(--muted); flex: none; }

.paper-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 20px; }
.paper-card {
  display: flex; flex-direction: column; gap: 10px;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
}
.paper-card:hover { box-shadow: 0 10px 28px rgba(0, 0, 0, .09); }
.pc-top { display: flex; align-items: center; gap: 8px; }
.file-badge {
  font-size: 9px; font-weight: 600; line-height: 16px;
  padding: 0 5px; border-radius: 3px;
  background: #fff1f0; border: 1px solid #ffccc7; color: #cf1322;
  letter-spacing: .02em;
}
.pc-source { font-size: 11px; color: var(--muted); }
.pc-title { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 500; color: var(--ink); }
.pc-meta { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0 8px; }
.pc-meta i { font-style: normal; color: rgba(0, 0, 0, .22); }
.pc-desc { margin: 0; font-size: 12px; line-height: 1.75; color: var(--ink-2); }
.pc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-tags span, .ref-tag, .cite-tag {
  font-size: 10px; line-height: 18px; padding: 0 7px; border-radius: 4px;
  background: var(--mint); border: 1px solid #d7f1ec; color: #157a6a;
}
.pc-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.pc-rel { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.pc-open {
  height: 28px; padding: 0 14px; border-radius: 6px;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  color: #fff; font-size: 12px; font-weight: 500;
}

.table-card {
  margin-top: 20px;
  background: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 0 24px;
  overflow-x: auto;
}
.data-table { width: 100%; min-width: 880px; border-collapse: collapse; table-layout: fixed; }
.data-table col.c-paper { width: 35%; }
.data-table col.c-rel { width: 13%; }
.data-table col.c-snippet { width: 34%; }
.data-table col.c-year { width: 9%; }
.data-table col.c-action { width: 9%; }
.data-table th {
  height: 52px; text-align: left;
  font-size: 14px; font-weight: 500; color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 0 12px;
}
.data-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink);
  vertical-align: middle;
}
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: #f5fcf9; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.dt-title { font-size: 15px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.dt-meta { margin-top: 3px; font-size: 11px; color: var(--muted); }
.dt-rel { display: flex; align-items: center; gap: 8px; }
.dt-rel b { font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--teal); }
.rel-track { width: 64px; height: 4px; border-radius: 2px; background: #eaf1ef; overflow: hidden; }
.rel-track i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.dt-snippet { font-size: 12px; line-height: 1.65; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dt-year { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.dt-open { font-size: 12px; color: var(--teal); font-weight: 500; white-space: nowrap; }
.empty {
  margin-top: 20px; padding: 56px 24px; text-align: center;
  background: #fff; border-radius: var(--r); box-shadow: var(--shadow-sm);
  color: var(--muted); font-size: 13px;
}

/* ---------- 首页：检索工作台 ---------- */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.home-head-copy h1 { margin: 0; font-size: 40px; line-height: 1.25; font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.home-head-copy p { margin: 8px 0 0; font-size: 16px; line-height: 24px; color: var(--ink-2); }
.home-head-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.btn-outline.small { height: 32px; padding: 0 12px; font-size: 12px; }

.search-panel { grid-template-columns: minmax(0, 1.25fr) minmax(320px, .85fr); gap: 32px; padding: 36px 40px; align-items: stretch; }
.search-main { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.search-title { display: flex; align-items: baseline; gap: 10px; }
.search-title h2 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 500; color: var(--ink); }
.search-title .eyebrow { font-size: 14px; }
.search-main .search-form { margin-top: 18px; height: 52px; }
.search-main .search-hint { margin-top: 12px; }

.filter-card {
  background: #fff;
  border: 1px solid #dcf1eb;
  border-radius: var(--r);
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(6, 177, 144, .06);
  display: flex; flex-direction: column; gap: 12px;
}
.filter-row { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; }
.filter-label { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button {
  height: 26px; padding: 0 10px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 24px;
  transition: background .15s, border-color .15s, color .15s;
}
.chips button:hover { border-color: #bfe9df; color: var(--teal); }
.chips button.on { background: var(--mint); border-color: #bfe9df; color: var(--teal); font-weight: 500; }
.filter-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 2px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--muted);
}
.filter-foot img { width: 24px; height: 24px; object-fit: contain; flex: none; }
.filter-foot b { color: var(--ink); font-weight: 600; }

.stat { position: relative; text-align: left; transition: border-color .15s, box-shadow .15s, transform .15s; }
button.stat { cursor: pointer; }
button.stat:hover { border-color: #d4ece5; box-shadow: 0 8px 24px rgba(6, 177, 144, .08); }
.stat-copy { flex: 1; min-width: 0; }
.stat-link { flex: none; align-self: flex-end; padding-bottom: 2px; font-size: 11px; color: var(--teal); }
.stat-link.muted { color: var(--muted); }

.home-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; margin-top: 24px; align-items: start; }
.library-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; min-width: 0; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.library-tabs { display: flex; gap: 4px; }
.library-tabs button { height: 30px; padding: 0 12px; border-radius: 6px; font-size: 13px; color: var(--muted); }
.library-tabs button:hover { color: var(--ink); }
.library-tabs button.on { background: var(--mint); color: var(--teal); font-weight: 500; }
.library-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.library-card .table-wrap { overflow-x: auto; }
.library-table { min-width: 720px; }
.library-table col.c-title { width: 40%; }
.library-table col.c-author { width: 18%; }
.library-table col.c-pages { width: 8%; }
.library-table col.c-time { width: 18%; }
.library-table col.c-op { width: 16%; }
.library-table th { padding: 0 16px; }
.library-table td { padding: 13px 16px; }
.library-table th:first-child, .library-table td:first-child { padding-left: 20px; }
.dt-last { font-size: 11.5px; color: var(--muted); }
.dt-progress { display: flex; align-items: center; gap: 8px; }
.dt-progress span { font-family: var(--mono); font-size: 10.5px; color: var(--teal); }
.progress-track { width: 76px; height: 4px; border-radius: 2px; background: #eaf1ef; overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--g1), var(--g2)); }

.reading-card { background: #fff; border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 20px; }
.reading-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.reading-head h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--ink); }
.reading-head .eyebrow { font-size: 10px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; margin: 16px 0 12px; }
.donut {
  width: 112px; height: 112px; flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 62%, #e6f3ef 62% 100%);
  display: grid; place-items: center;
}
.donut-inner {
  width: 84px; height: 84px; border-radius: 50%;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.donut-inner b { font-size: 28px; line-height: 1; font-weight: 600; color: var(--ink); }
.donut-inner span { margin-top: 4px; font-size: 10px; color: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.donut-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.dot-green { background: var(--teal); }
.dot-mint { background: #e6f3ef; border: 1px solid #cfe6e0; }
.reading-foot {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-2);
  font-size: 11.5px; color: var(--muted);
}
.reading-foot b { color: var(--teal); font-family: var(--mono); font-weight: 600; }
.reading-foot .bar { flex: 1; height: 4px; border-radius: 2px; background: #eaf1ef; overflow: hidden; }
.reading-foot .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--g1), var(--g2)); }
.continue-title { margin: 16px 0 8px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--ink); }
.continue-list { display: flex; flex-direction: column; }
.continue-item { padding: 9px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.continue-item:last-child { border-bottom: 0; }
.continue-item:hover .ci-title { color: var(--teal); }
.ci-title { font-size: 12.5px; line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.ci-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 10px; color: var(--muted); }
.ci-track { flex: 1; height: 3px; border-radius: 2px; background: #eaf1ef; overflow: hidden; }
.ci-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--g1), var(--g2)); }

/* ---------- 阅读页 ---------- */
.reader { height: calc(100vh - 64px); display: flex; flex-direction: column; overflow: hidden; }
.reader-top {
  height: 64px; flex: none;
  display: flex; align-items: center; gap: 20px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04);
  z-index: 10;
}
.back { font-size: 14px; color: var(--muted); white-space: nowrap; }
.back:hover { color: var(--teal); }
.view-tabs { display: flex; padding: 3px; background: #f2f7f6; border-radius: var(--r); margin: 0 auto; }
.view-tabs button {
  height: 32px; padding: 0 18px; border-radius: 6px;
  font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s, box-shadow .15s;
}
.view-tabs button.on { background: #fff; color: var(--teal); font-weight: 500; box-shadow: 0 2px 6px rgba(0, 0, 0, .08); }
.reader-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.btn-outline {
  height: 36px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; font-size: 13px; color: var(--ink);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.reader-actions .btn-gradient { height: 36px; padding: 0 18px; font-size: 13px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: var(--r); }
.icon-btn:hover { background: rgba(0, 0, 0, .04); }
.icon-btn img { width: 16px; height: 16px; }

.reader-layout {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 380px;
}
.outline-panel {
  background: linear-gradient(180deg, #f2fbf9, #f9fcfb);
  border-right: 1px solid var(--line-2);
  display: flex; flex-direction: column; min-height: 0;
}
.outline-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px;
  font-size: 13px; color: var(--muted);
  border-bottom: 1px solid rgba(6, 177, 144, .10);
}
.outline-list { flex: 1; overflow: auto; padding: 10px; }
.outline-item {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px; align-items: baseline;
  padding: 9px 10px; border-radius: 6px;
  text-align: left; font-size: 13px; line-height: 1.5;
  color: var(--ink-2);
  border-left: 2px solid transparent;
}
.outline-item:hover { background: rgba(255, 255, 255, .72); }
.outline-item .pg { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.outline-item.l2 { padding-left: 20px; font-size: 12px; color: var(--muted); }
.outline-item.active {
  background: #fff; color: var(--teal); border-left-color: var(--teal);
  box-shadow: 0 2px 8px rgba(6, 177, 144, .08);
  font-weight: 500;
}
.outline-item.active .pg { color: var(--teal); }
.outline-foot {
  border-top: 1px solid var(--line-2);
  padding: 14px 20px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }

.doc-area { min-width: 0; min-height: 0; padding: 20px; background: #f4f8f7; }
.doc-card {
  height: 100%;
  background: #fff;
  border-radius: var(--r);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .05);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.doc-toolbar {
  height: 44px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-2);
  font-size: 12px; color: var(--muted);
}
.page-nav, .zoom { display: flex; align-items: center; gap: 8px; }
.page-nav button, .zoom button {
  width: 26px; height: 26px; border-radius: 4px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 16px;
}
.page-nav button:hover, .zoom button:hover { background: var(--mint); color: var(--teal); }
.page-now { font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.zoom span { font-family: var(--mono); font-size: 11px; color: var(--ink-2); min-width: 40px; text-align: center; }

.doc-scroll { flex: 1; overflow: auto; padding: 34px 44px 60px; scroll-behavior: smooth; }
.paper-head { padding-bottom: 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 24px; }
.paper-venue { font-size: 12px; color: var(--teal); margin-bottom: 8px; }
.paper-head h1 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 30px;
  line-height: 1.32;
  font-weight: 500;
  color: #1c1c1c;
  letter-spacing: -.01em;
}
.paper-authors { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.paper-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.paper-tags span { font-size: 10px; line-height: 18px; padding: 0 7px; border-radius: 4px; background: var(--mint); border: 1px solid #d7f1ec; color: #157a6a; }

.paper { max-width: 700px; margin: 0 auto; font-family: var(--sans); font-size: 14px; color: #1e2221; }
.paper h2 {
  margin: 28px 0 6px;
  font-size: 1em;
  line-height: 1.8;
  font-weight: 600;
  display: flex; align-items: baseline; gap: 10px;
}
.paper h2 .no { font-family: var(--mono); font-size: 10px; color: var(--teal); font-weight: 500; }
.paper h3 { margin: 22px 0 4px; font-size: 1em; line-height: 1.8; font-weight: 600; }
.paper p { margin: 0; font-size: 1em; line-height: 1.8; text-align: left; text-indent: 1.5em; }
.paper .caption { margin: -2px 0 22px; font-family: var(--sans); font-size: 11px; line-height: 1.65; color: var(--muted); text-align: center; }
.paper .figure { margin: 26px 0 4px; }
.paper .figure .frame {
  aspect-ratio: 16 / 8.6;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background:
    repeating-linear-gradient(135deg, transparent 0 9px, rgba(6, 177, 144, .04) 9px 10px),
    #fbfdfc;
  display: grid; place-items: center;
  font-family: var(--sans); font-size: 11px; color: rgba(0, 0, 0, .32);
}
.paper table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 11.5px; margin: 20px 0 4px; }
.paper th, .paper td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); text-align: left; }
.paper th { font-weight: 500; color: var(--muted); }
.paper td { font-family: var(--mono); font-size: 10.5px; }
.paper .ref { font-family: var(--sans); font-size: 11.5px; line-height: 1.8; color: var(--muted); padding-left: 1.5em; text-indent: -1.5em; margin-bottom: 2px; }
.paper .eq { font-family: var(--mono); font-size: 12px; background: var(--mint); border-radius: 6px; padding: 10px 14px; }
.paper p .pchip {
  display: inline-block; margin-left: 5px; padding: 1px 5px;
  font-family: var(--mono); font-size: 8px; line-height: 1.5;
  color: var(--teal); background: var(--mint); border-radius: 3px;
  opacity: 0; transition: opacity .15s; vertical-align: super;
}
.paper p:hover .pchip { opacity: 1; }
.paper .flash { animation: flash 1.4s ease; }
@keyframes flash { 0%, 100% { background: transparent; } 20%, 55% { background: #fff3c9; } }

/* 原页模拟 */
.original { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.pdf-bar { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.pdf-page {
  width: min(100%, var(--pdf-max, 660px));
  aspect-ratio: 1 / 1.414;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
  padding: 7% 6.5%;
  position: relative; overflow: hidden;
}
.pdf-page .cols { column-count: 2; column-gap: 7%; font-family: var(--serif); font-size: 8.8px; line-height: 1.58; text-align: justify; }
.pdf-page .cols p { margin: 0 0 .6em; }
.pdf-page h4 { font-family: var(--sans); font-size: 12.5px; margin: 0 0 5px; }
.pdf-page .pn { position: absolute; bottom: 3.5%; left: 0; right: 0; text-align: center; font-size: 8px; color: #999; font-family: var(--mono); }
.pdf-page .figbox { border: 1px solid #eee; background: #fafafa; height: 60px; display: grid; place-items: center; color: #aaa; font-size: 7.5px; margin: .4em 0 .6em; break-inside: avoid; }
.pdf-page .ph { column-span: all; border-bottom: 1px solid #eee; padding-bottom: 7px; margin-bottom: 10px; }
.pdf-page .ph .j { font-family: var(--sans); font-size: 6.5px; letter-spacing: .12em; color: #888; }
.pdf-page .ph h1 { font-family: var(--serif); font-size: 15px; margin: 4px 0; }
.pdf-page .ph .a { font-family: var(--sans); font-size: 7.5px; color: #555; }
.pdf-page .ph .ab { font-family: var(--serif); font-size: 7.4px; line-height: 1.5; color: #333; margin-top: 4px; text-align: justify; }

/* ---------- 右侧助手 ---------- */
.assistant-panel {
  background: #fafafa;
  border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column; min-height: 0;
}
.assistant-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line-2);
  background: #fff;
}
.ai-mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff; font-size: 15px;
  box-shadow: 0 4px 12px rgba(6, 177, 144, .25);
}
.assistant-title h3 { margin: 0; font-size: 18px; line-height: 22px; font-weight: 500; color: var(--ink); }
.assistant-title .eyebrow { font-size: 10px; line-height: 14px; display: block; margin-top: 1px; }
.online {
  margin-left: auto;
  font-size: 11px; line-height: 20px; padding: 0 8px;
  border-radius: 4px;
  background: #f6ffed; border: 1px solid #b7eb8f; color: #2f8c00;
}
.assistant-tabs { display: flex; padding: 0 16px; border-bottom: 1px solid var(--line-2); background: #fff; }
.assistant-tabs button {
  padding: 12px 12px 10px;
  font-size: 13px; color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.assistant-tabs button.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
.assistant-body { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.pane { display: none; }
.pane.on { display: block; }

.summary-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: #fff; border: 1px solid #e3f4ef; border-radius: 6px;
  font-size: 12px; color: var(--muted);
}
.summary-bar b { color: var(--teal); font-size: 14px; font-family: var(--mono); }
#btn-summary { margin-top: 12px; height: 36px; font-size: 13px; }
.summary-body:empty { display: none; }
.summary-body { display: block; margin-top: 14px; background: #fff; border-radius: var(--r); padding: 16px; font-size: 13px; line-height: 1.85; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.summary-body h4 { margin: 14px 0 4px; font-size: 11px; font-weight: 600; color: var(--teal); }
.summary-body h4:first-child { margin-top: 0; }
.summary-body p { margin: 0 0 8px; }

.qa-log { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.qa-q {
  align-self: flex-end; max-width: 88%;
  padding: 9px 12px;
  background: linear-gradient(90deg, #eaf9f9, #f4fffb);
  border: 1px solid #d9f2ec;
  border-radius: 8px 8px 2px 8px;
  font-size: 13px; line-height: 1.6; color: var(--ink);
}
.qa-a {
  background: #fff; border: 1px solid #eef2f0; border-left: 3px solid var(--teal);
  border-radius: 6px; padding: 12px;
  font-size: 13px; line-height: 1.85; color: var(--ink-2);
}
.qa-a .answer { white-space: pre-wrap; }
.qa-a .cites { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.qa-a .cite {
  font-family: var(--mono); font-size: 9.5px; line-height: 18px;
  padding: 0 6px; border-radius: 4px;
  background: #e6f7ff; border: 1px solid #bde3fb; color: #395bcd;
}
.qa-form {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 4px 4px 12px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: #fff;
}
.qa-form:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(6, 177, 144, .08); }
.qa-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 8px 0; font-size: 13px; }
.qa-form .send {
  width: 32px; height: 32px; border-radius: 6px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff; font-size: 16px;
}
.qa-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.qa-suggest button {
  font-size: 11px; line-height: 22px; padding: 0 8px;
  border-radius: 4px; background: #fff; border: 1px solid var(--line-2);
  color: var(--muted);
}
.qa-suggest button:hover { color: var(--teal); border-color: #bfe9df; }

/* ---------- 划词与浮卡 ---------- */
.sel {
  position: fixed; z-index: 60;
  display: flex; align-items: center; gap: 2px;
  padding: 4px;
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
  transform: translate(-50%, -100%);
}
.sel button { padding: 6px 10px; border-radius: 4px; font-size: 12px; color: var(--ink-2); }
.sel button:hover { background: var(--mint); color: var(--teal); }

.annot-pop {
  position: fixed; z-index: 65; width: 356px; max-width: calc(100vw - 24px);
  padding: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(10, 40, 34, .18);
}
.annot-pop-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--ink); }
.annot-pop-head button { color: var(--muted); font-size: 11px; padding: 2px 4px; }
.annot-pop blockquote { margin: 9px 0; max-height: 76px; overflow: auto; padding: 8px 10px; background: #f6fbf9; border-left: 2px solid #9adcc9; border-radius: 0 6px 6px 0; font-size: 11px; line-height: 1.6; color: var(--ink-2); }
.annot-pop textarea { width: 100%; min-height: 76px; resize: vertical; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-family: inherit; font-size: 12px; line-height: 1.6; color: var(--ink); outline: none; }
.annot-pop textarea:focus { border-color: #bfe7da; box-shadow: 0 0 0 3px rgba(10, 167, 140, .08); }
.annot-pop-foot { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.annot-page { flex: 1; font-size: 10px; color: var(--muted); }
.annot-delete { padding: 4px 7px; border-radius: 4px; font-size: 10.5px; color: #c04a3a; }
.annot-delete:hover { background: #fff4f2; }
.annot-tags-field { display: flex; align-items: center; gap: 8px; margin: 0 0 9px; font-size: 10.5px; color: var(--muted); }
.annot-tags-field span { flex: none; }
.annot-tags-field input { flex: 1; min-width: 0; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-family: inherit; font-size: 11px; color: var(--ink); outline: none; }
.annot-tags-field input:focus { border-color: #bfe7da; box-shadow: 0 0 0 3px rgba(10, 167, 140, .08); }
mark.reader-mark { padding: 0 1px; border-radius: 2px; color: inherit; background: transparent; cursor: pointer; }
mark.reader-mark.highlight { background: #ffe58f; }
mark.reader-mark.note { text-decoration-line: underline; text-decoration-color: #4a90e2; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
mark.reader-mark.tag { text-decoration-line: underline; text-decoration-style: dotted; text-decoration-color: #0aa78c; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
mark.reader-mark.is-flash { animation: readerMarkFlash .9s ease; }
.pdf-annot-mark { position: absolute; z-index: 2; border-radius: 2px; opacity: .42; cursor: pointer; mix-blend-mode: multiply; }
.pdf-annot-mark.highlight { background: #ffe58f; }
.pdf-annot-mark.note { background: transparent; opacity: 1; mix-blend-mode: normal; border-bottom: 2px solid #4a90e2; }
.pdf-annot-mark.tag { background: transparent; opacity: 1; mix-blend-mode: normal; border-bottom: 1.5px dotted #0aa78c; }
.pdf-annot-mark.is-flash { animation: readerMarkFlash .9s ease; }
@keyframes readerMarkFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(10, 167, 140, 0); }
  35% { box-shadow: 0 0 0 4px rgba(10, 167, 140, .22); }
}

.source {
  position: fixed; z-index: 62; width: 320px;
  background: #fff; border: 1px solid var(--line-2); border-left: 3px solid var(--teal);
  border-radius: var(--r); box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
  padding: 12px 14px;
}
.source-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 10px; color: var(--teal); }
.source-head button { color: var(--muted); font-size: 11px; }
.source p { margin: 0; font-size: 12px; line-height: 1.75; color: var(--ink-2); }

.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: rgba(0, 0, 0, .82); color: #fff;
  padding: 9px 16px; border-radius: 6px;
  font-size: 12px; z-index: 80;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

/* ---------- 导入弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(10, 28, 23, .32); backdrop-filter: blur(3px); z-index: 90; }
.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(470px, calc(100vw - 32px));
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
  z-index: 91;
  overflow: hidden;
}
.modal header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.modal header h2 { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 500; color: var(--ink); }
.modal header p { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.modal header button { color: var(--muted); font-size: 13px; padding: 2px 4px; }
.modal header button:hover { color: var(--ink); }
.import-path {
  margin: 14px 22px 0; padding: 11px 13px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #f5fbf9; border: 1px solid #dceee8; border-radius: 8px;
  font-size: 11px;
}
.import-path code { font-family: var(--mono); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.import-path span { flex: none; color: var(--muted); }
.import-files { margin: 10px 22px 0; border-top: 1px solid var(--line-2); }
.import-files div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 11.5px; }
.import-files span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.import-files i { flex: none; font-style: normal; color: var(--muted); }
.import-modal > .btn-gradient.wide { width: calc(100% - 44px); margin: 14px 22px 18px; height: 38px; }
.import-progress { position: relative; margin: 0 22px 20px; padding-top: 2px; }
.import-progress::before { content: ""; display: block; height: 6px; border-radius: 3px; background: #eaf1ef; }
.import-progress i { position: absolute; left: 0; top: 2px; height: 6px; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--g1), var(--g2)); transition: width .2s; }
.import-progress span { display: block; margin-top: 8px; font-size: 10px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 1220px) {
  .reader-layout { grid-template-columns: 200px minmax(0, 1fr) 340px; }
  .doc-scroll { padding-left: 30px; padding-right: 30px; }
  .doc-area { padding: 16px; }
}
@media (max-width: 1060px) {
  .outline-panel { display: none; }
  .reader-layout { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1060px) {
  .home-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .home { padding-top: 30px; }
  .home-head { align-items: flex-start; flex-direction: column; }
  .home-main { grid-template-columns: minmax(0, 1fr); }
  .search-panel { padding: 30px 26px; }
  .filter-card { padding: 16px; }
  .search-panel { grid-template-columns: 1fr; gap: 22px; padding: 34px; }
  .notice h2 { margin-bottom: 10px; }
  .stats { grid-template-columns: 1fr; gap: 12px; }
  .paper-cards { grid-template-columns: 1fr; }
  .reader-layout { grid-template-columns: minmax(0, 1fr); }
  .assistant-panel {
    position: fixed; left: 0; right: 0; bottom: 0; height: 55vh;
    border-left: 0; border-top: 1px solid var(--line-2);
    transform: translateY(calc(100% - 46px));
    transition: transform .22s ease;
    z-index: 25;
    box-shadow: 0 -12px 36px rgba(0, 0, 0, .10);
  }
  .assistant-panel.open { transform: none; }
  .assistant-head { cursor: pointer; }
  .doc-area { padding-bottom: 62px; }
}
@media (max-width: 760px) {
  .topbar { padding: 0 16px; }
  .nav { display: none; }
  .brand-name { font-size: 18px; }
  .org-tag { display: none; }
  .hero h1 { font-size: 32px; }
  .hero p { font-size: 15px; }
  .search-panel { padding: 26px 20px; }
  .search-form { height: 48px; }
  .search-form input { font-size: 14px; }
  .search-form .btn-gradient { height: 38px; padding: 0 16px; }
  .home-head-copy h1 { font-size: 30px; }
  .home-head-copy p { font-size: 14px; }
  .examples { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .examples::-webkit-scrollbar { display: none; }
  .examples button { flex: none; white-space: nowrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:last-child { grid-column: 1 / -1; }
  .section-title h2 { font-size: 21px; }
  .reader-top { padding: 0 12px; gap: 10px; height: auto; min-height: 56px; flex-wrap: wrap; }
  .back { display: none; }
  .view-tabs { margin: 0; transform: scale(.94); transform-origin: left center; }
  .reader-actions { gap: 6px; }
  .reader-actions .btn-outline { display: none; }
  .doc-area { padding: 10px; }
  .doc-scroll { padding: 20px 16px 50px; }
  .paper-head h1 { font-size: 24px; }
  .paper { font-size: 14px; }
  .paper p { font-size: 14px; }
  .assistant-panel { height: 58vh; }
}
@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .stat:last-child { grid-column: auto; }
  .search-card { padding: 20px 16px; }
  .search-deco { display: none; }
  .view-tabs button { padding: 0 10px; font-size: 12px; }
  .reader-actions .btn-gradient { padding: 0 12px; font-size: 12px; }
}
@media (hover: none) {
  .paper p .pchip { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}


.sk {
  height: 11px;
  margin-bottom: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, #eef3f1 25%, #e3ece9 50%, #eef3f1 75%);
  background-size: 200% 100%;
  animation: sk 1.2s infinite;
}
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.typing { color: var(--muted); font-family: var(--mono); letter-spacing: .1em; }

/* ================= V4 工作台（管理后台布局，不参考上传页） ================= */
.home-shell {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(36deg, #eff7f2 4%, #f3f9fc 48%, #e8f6f6 92%);
}
.sidebar {
  width: 200px;
  flex: none;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  background: linear-gradient(255deg, #e2ecf5 2%, #cbf4ef 41%, #f4fffd 99%);
  box-shadow: 1px 0 0 rgba(0, 0, 0, .05);
  position: sticky;
  top: 0;
  height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 8px; padding: 0 16px 22px; }
.side-brand img { height: 30px; width: auto; }
.side-brand span { font-size: 18px; font-weight: 500; color: var(--ink); }
.side-nav { display: flex; flex-direction: column; gap: 4px; padding: 0 8px; }
.side-nav button {
  height: 40px; padding: 0 12px;
  border-radius: 8px;
  text-align: left;
  font-size: 14px; color: var(--ink);
  transition: background .15s, color .15s, box-shadow .15s;
}
.side-nav button:hover { background: rgba(255, 255, 255, .55); }
.side-nav button.on:not(.side-task) { background: #fff; color: var(--teal); font-weight: 500; box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.side-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 9px;
  padding: 16px;
  border-top: 1px solid rgba(0, 0, 0, .06);
}
.side-foot b { display: block; font-size: 13px; font-weight: 500; }
.side-foot span { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.side-foot .avatar { flex: none; }

.main { flex: 1; min-width: 0; padding: 22px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.crumb { margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.page-title h1 { margin: 0; font-size: 28px; line-height: 36px; font-weight: 500; color: var(--ink); }
.page-actions { display: flex; gap: 10px; flex: none; }
.page-actions .btn-outline, .page-actions .btn-gradient { height: 34px; padding: 0 16px; font-size: 13px; }

.summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 20px; }
.summary-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  min-height: 132px;
  display: flex; flex-direction: column;
}
.summary-card.clickable { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.summary-card.clickable:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .08); }
.summary-label { font-size: 13px; color: var(--muted); }
.mini-donut {
  width: 84px; height: 84px; flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--teal) 0 67%, #e6f3ef 67% 100%);
  display: grid; place-items: center;
}
.mini-donut div {
  width: 62px; height: 62px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: baseline; justify-content: center; gap: 2px;
  padding-top: 22px;
}
.mini-donut b { font-size: 22px; line-height: 1; font-weight: 600; }
.mini-donut span { font-size: 10px; color: var(--muted); }
.summary-meta b { display: block; font-size: 22px; line-height: 1.2; font-weight: 600; }
.summary-meta span { display: block; margin-top: 3px; font-size: 11px; color: var(--muted); }
.summary-big { display: flex; align-items: baseline; gap: 3px; margin-top: 6px; }
.summary-big b { font-size: 36px; line-height: 1; font-weight: 600; }
.summary-big span { font-size: 14px; color: var(--muted); }
.summary-sub { margin-top: auto; font-size: 11px; color: var(--muted); }

.search-card { background: #fff; border: 1px solid var(--line-2); border-radius: 8px; box-shadow: var(--shadow-sm); padding: 18px 22px; }
.search-card .search-form { height: 48px; padding: 4px 4px 4px 14px; }
.search-card .search-form input { font-size: 14px; }
.search-card .search-form .btn-gradient { height: 40px; padding: 0 22px; }
.search-filters { display: flex; flex-wrap: wrap; gap: 14px 22px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.search-filters .filter-row { display: flex; align-items: center; gap: 8px; }
.search-filters .filter-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.search-card .examples { margin-top: 12px; }

.home-main { margin-top: 20px; }
.library-table col.c-title { width: 36%; }
.library-table col.c-author { width: 15%; }
.library-table col.c-pages { width: 8%; }
.library-table col.c-time { width: 16%; }
.library-table col.c-status { width: 10%; }
.library-table col.c-op { width: 15%; }
.status-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 11px; line-height: 20px; white-space: nowrap; }
.status-read { background: #e0f4d7; color: #3f8f2a; }
.status-reading { background: #ffefd0; color: #b77900; }
.status-unread { background: #e9e9eb; color: #6e6e73; }

.reader { height: 100vh; }

@media (max-width: 1100px) {
  .sidebar { width: 180px; }
  .main { padding: 20px 24px 50px; }
  .summary-row { gap: 16px; }
}
@media (max-width: 900px) {
  .home-shell { display: block; }
  .sidebar {
    position: static; width: 100%; height: auto;
    flex-direction: row; align-items: center; gap: 12px;
    padding: 10px 16px;
  }
  .side-brand { padding: 0; flex: none; }
  .side-brand span { font-size: 16px; }
  .side-nav { flex-direction: row; padding: 0; gap: 2px; margin-left: 8px; }
  .side-nav button { height: 34px; padding: 0 10px; font-size: 13px; }
  .side-foot { display: none; }
  .main { padding: 18px 16px 50px; }
  .summary-row { grid-template-columns: 1fr 1fr; }
  .summary-card:last-child { grid-column: 1 / -1; }
  .search-filters { gap: 10px 16px; }
}
@media (max-width: 640px) {
  .summary-row { grid-template-columns: 1fr; }
  .summary-card:last-child { grid-column: auto; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-actions { width: 100%; }
  .side-brand span { display: none; }
  .side-nav button { padding: 0 8px; }
}

.library-table col.c-last { width: 16%; }
.library-table col.c-progress { width: 22%; }

@media (max-width: 900px) {
  .main { display: flex; flex-direction: column; }
  .page-head { order: 0; }
  .search-card { order: 1; }
  .summary-row { order: 2; margin-top: 16px; }
  .home-main { order: 3; }
  #results-section { order: 4; }
}

/* ================= V4 搜索页：只借风格，不套后台框架 ================= */
.home { padding: 36px 0 80px; }
.search-hero { max-width: 900px; margin: 0 auto; }
.search-title { display: flex; align-items: baseline; gap: 10px; }
.search-title h1 { margin: 0; font-size: 32px; line-height: 40px; font-weight: 500; color: var(--ink); letter-spacing: .01em; }
.search-title .eyebrow { font-size: 14px; }
.library-line { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.search-hero .search-form {
  margin-top: 16px;
  height: 56px;
  padding: 5px 5px 5px 16px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}
.search-hero .search-form input { font-size: 16px; }
.search-hero .search-form .btn-gradient { height: 44px; padding: 0 26px; }
.search-hero .search-filters { margin-top: 12px; padding-top: 0; border-top: 0; gap: 10px 20px; }
.search-hero .examples { margin-top: 12px; }

.result-list {
  margin-top: 16px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line-2);
  cursor: pointer;
  transition: background .12s;
}
.result-row:last-child { border-bottom: 0; }
.result-row:hover { background: #f7fcfb; }
.result-row.with-rank { grid-template-columns: 36px minmax(0, 1fr) auto; }
.row-rank { padding-top: 3px; font-family: var(--mono); font-size: 20px; color: rgba(0, 0, 0, .28); }
.row-main { min-width: 0; }
.row-head { display: flex; align-items: center; gap: 8px; }
.row-venue { font-size: 11px; color: var(--muted); }
.row-title { margin: 6px 0 4px; font-size: 18px; line-height: 1.45; font-weight: 500; color: var(--ink); }
.result-row:hover .row-title { color: var(--teal); }
.row-meta { display: flex; flex-wrap: wrap; gap: 0 8px; font-size: 11.5px; color: var(--muted); }
.row-meta i { font-style: normal; color: rgba(0, 0, 0, .2); }
.row-tldr { margin: 9px 0 0; font-size: 12.5px; line-height: 1.75; color: var(--ink-2); max-width: 72ch; }
.row-snippet {
  margin-top: 10px;
  padding-left: 10px;
  border-left: 2px solid #d7f1ec;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.row-snippet b { font-weight: 500; color: var(--ink-2); }
.row-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.row-tags span { font-size: 10px; line-height: 18px; padding: 0 7px; border-radius: 4px; background: var(--mint); border: 1px solid #d7f1ec; color: #157a6a; }
.row-tail { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.row-rel { font-family: var(--mono); font-size: 12px; color: var(--teal); }
.row-open { font-size: 12px; font-weight: 500; color: var(--teal); white-space: nowrap; }
.result-list .empty { padding: 44px 24px; text-align: center; color: var(--muted); font-size: 12.5px; }

@media (max-width: 760px) {
  .home { padding: 24px 0 50px; }
  .search-title h1 { font-size: 26px; line-height: 34px; }
  .search-hero .search-form { height: 50px; padding-left: 14px; }
  .search-hero .search-form input { font-size: 14px; }
  .search-hero .search-form .btn-gradient { height: 40px; padding: 0 18px; }
  .result-row, .result-row.with-rank { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 16px; }
  .row-rank { display: none; }
  .row-tail { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
  .row-title { font-size: 16px; }
}

/* =====================================================================
   V4 × Ponder：问题式入口、检索工作台、综述与来源、分析与写作
   ===================================================================== */
button, input, textarea, select { font: inherit; color: inherit; }
textarea { font-family: var(--sans); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid rgba(6, 177, 144, .55);
  outline-offset: 2px;
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------- 顶栏（入口） ---------- */
.topbar { height: 60px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-import {
  height: 32px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid #d9eee7; border-radius: 999px;
  background: #fff;
  font-size: 12px; color: var(--ink-2);
  box-shadow: 0 2px 6px rgba(6, 177, 144, .05);
}
.top-import:hover { border-color: #9fdfd1; color: var(--teal); background: #f7fdfb; }
.top-import svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 入口 ---------- */
.launcher {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 48px 0;
  display: grid;
  place-items: center;
}
.launch-hero { width: 100%; max-width: 760px; margin: 0 auto; text-align: center; }
.launch-logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 22px; box-shadow: 0 10px 28px rgba(6, 177, 144, .24); }
.launch-logo svg { width: 32px; height: 32px; }
.launch-hero h1 { margin: 0; font-size: 42px; line-height: 1.25; font-weight: 500; letter-spacing: -.015em; color: #171b1a; }
.launch-hero > p { margin: 12px 0 0; font-size: 14.5px; line-height: 24px; color: var(--muted); }
.launch-form {
  margin-top: 28px;
  background: #fff;
  border: 1px solid rgba(6, 177, 144, .18);
  border-radius: 12px;
  box-shadow: 0 14px 44px rgba(6, 177, 144, .16), 0 2px 6px rgba(6, 177, 144, .07);
  padding: 16px 16px 11px;
  text-align: left;
  transition: border-color .18s, box-shadow .18s;
}
.launch-form:focus-within { border-color: rgba(6, 177, 144, .38); box-shadow: 0 18px 50px rgba(6, 177, 144, .2), 0 0 0 3px rgba(6, 177, 144, .08); }
.launch-form textarea {
  width: 100%; min-height: 54px; max-height: 140px;
  border: 0; outline: 0; resize: none; background: transparent;
  font-size: 15px; line-height: 1.6; color: var(--ink);
}
.launch-form textarea::placeholder { color: rgba(0, 0, 0, .3); }
.launch-import-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 16px; }
.launch-import {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border: 1px solid #d9eee7;
  border-radius: 999px;
  background: #fff;
  font-size: 12px; color: var(--ink-2);
  box-shadow: 0 2px 6px rgba(6, 177, 144, .05);
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}
.launch-import:hover { border-color: #9fdfd1; color: var(--teal); background: #f7fdfb; box-shadow: 0 0 0 3px rgba(6, 177, 144, .06); }
.launch-import-row span { font-size: 10.5px; color: var(--muted); }
.launch-bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.launch-hint { margin-left: auto; font-size: 10.5px; color: rgba(0, 0, 0, .3); }
.launch-scope { position: relative; flex: none; min-width: 0; }
.launch-scope-btn {
  display: inline-flex; align-items: center; gap: 6px; max-width: 230px; height: 28px;
  padding: 0 8px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; font-size: 11.5px; color: var(--ink-2);
}
.launch-scope-btn:hover { border-color: #bfe7da; color: #0b7a68; }
.launch-scope-btn.open { background: #eef9f5; border-color: #9adcc9; color: #0b7a68; }
.launch-scope-ico { flex: none; display: grid; place-items: center; width: 14px; height: 14px; color: var(--muted); }
.launch-scope-btn.open .launch-scope-ico,
.launch-scope-btn.has-project .launch-scope-ico { color: #0b7a68; }
.launch-scope-ico svg, .lsi-icon svg, .launch-scope-chev, .lsi-check {
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.launch-scope-ico svg { width: 14px; height: 14px; }
.launch-scope-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launch-scope-chev { width: 13px; height: 13px; flex: none; color: var(--muted); transition: transform .15s; }
.launch-scope-btn.open .launch-scope-chev { transform: rotate(180deg); }
.launch-scope-pop {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  width: min(340px, calc(100vw - 48px)); padding: 8px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(10, 40, 34, .17);
  text-align: left;
}
.launch-scope-pop.up { top: auto; bottom: calc(100% + 8px); }
.launch-scope-search {
  display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 8px; background: #f4f8f7;
}
.launch-scope-search:focus-within { background: #fff; border-color: #bfe7da; }
.launch-scope-search svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.launch-scope-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-family: inherit; font-size: 12px; color: var(--ink); }
.launch-scope-search input::placeholder { color: var(--muted); }
.launch-scope-list { max-height: 280px; overflow: auto; padding-top: 4px; }
.launch-scope-item {
  width: 100%; display: flex; align-items: center; gap: 9px;
  padding: 8px 9px; border-radius: 8px; text-align: left;
  font-size: 12.5px; color: var(--ink-2);
}
.launch-scope-item:hover { background: #f4fbf8; color: #0b7a68; }
.launch-scope-item.on { background: var(--mint); color: #0b7a68; font-weight: 500; }
.lsi-icon { flex: none; display: grid; place-items: center; width: 16px; height: 16px; color: var(--muted); }
.lsi-icon svg { width: 15px; height: 15px; }
.launch-scope-item:hover .lsi-icon,
.launch-scope-item.on .lsi-icon { color: #0b7a68; }
.lsi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lsi-check { flex: none; width: 14px; height: 14px; color: var(--teal); stroke-width: 1.8; }
.launch-scope-section {
  margin-top: 4px; padding: 8px 9px 3px; border-top: 1px solid var(--line-2);
  font-size: 10px; color: var(--muted); letter-spacing: .02em;
}
.launch-scope-list > .launch-scope-section:first-child { margin-top: 0; padding-top: 3px; border-top: 0; }
.launch-scope-empty { padding: 14px 10px 16px; text-align: center; font-size: 11.5px; color: var(--muted); }
.launch-scope-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line-2); }
.launch-scope-new {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 8px 9px; border-radius: 8px; font-size: 12px; color: #0b7a68; text-align: left;
}
.launch-scope-new:hover { background: #f1fbf7; }
.launch-scope-new svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.launch-send, .composer-send {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  box-shadow: 0 5px 14px rgba(6, 177, 144, .24);
  transition: filter .15s, transform .1s;
}
.launch-send:hover, .composer-send:hover { filter: brightness(1.05); }
.launch-send:active, .composer-send:active { transform: translateY(1px); }
.launch-send svg, .composer-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.start-section { margin-top: 58px; }
.start-head { text-align: center; }
.start-head h2 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 500; color: var(--ink); }
.start-head p { margin: 5px 0 0; font-size: 12px; color: var(--muted); }
.start-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; }
.start-card {
  display: flex; flex-direction: column;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding-bottom: 18px;
  overflow: visible;
  transition: box-shadow .16s ease, border-color .16s;
}
.start-card:hover { box-shadow: 0 18px 40px rgba(6, 177, 144, .10); border-color: #d8eee7; }
.start-preview {
  position: relative;
  height: 158px;
  margin: 14px 14px 0;
  border-radius: 9px;
  border: 1px solid rgba(0, 0, 0, .045);
  background: linear-gradient(158deg, #f1fbf7 0%, #eef8fb 100%);
  overflow: hidden;
}
.start-copy { padding: 15px 20px 0; display: flex; flex-direction: column; flex: 1; }
.start-kicker {
  font-family: var(--mono);
  font-size: 9px; line-height: 1; letter-spacing: .14em; text-transform: uppercase;
  background: linear-gradient(90deg, var(--g1), var(--g2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.start-copy h3 { margin: 7px 0 6px; font-size: 19px; line-height: 26px; font-weight: 500; color: var(--ink); }
.start-copy p { margin: 0; font-size: 12px; line-height: 1.75; color: var(--muted); }
.start-cta {
  margin: 14px 20px 0; align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border-radius: 6px;
  background: var(--mint); border: 1px solid #d7f1ec;
  font-size: 12px; font-weight: 500; color: #127a69;
  transition: background .18s, color .18s, border-color .18s, box-shadow .18s, filter .18s;
}
.start-card:hover .start-cta { background: linear-gradient(90deg, var(--g1), var(--g2)); background-origin: border-box; border-color: transparent; color: #fff; }
.start-cta:hover {
  box-shadow: 0 6px 16px rgba(6, 177, 144, .26);
  filter: brightness(1.04);
}
.start-cta b { font-weight: 400; }

/* 三张卡的缩略界面 */
.preview-search { padding: 20px 18px; display: flex; flex-direction: column; justify-content: center; gap: 7px; }
.sp-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid rgba(0, 0, 0, .055); border-radius: 6px;
  padding: 8px 9px;
  box-shadow: 0 2px 6px rgba(6, 177, 144, .04);
}
.sp-num { width: 16px; height: 16px; border-radius: 4px; background: var(--mint); color: #15806f; font: 600 8px/16px var(--mono); text-align: center; flex: none; }
.sp-lines { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-lines i { display: block; height: 4px; border-radius: 2px; background: #dce9e4; }
.sp-lines i:last-child { background: #ecf2ef; }
.sp-pill { width: 24px; height: 14px; border-radius: 7px; border: 1px solid #cdece5; background: #f5fffc; flex: none; position: relative; }
.sp-pill::after { content: "PDF"; position: absolute; inset: 0; font: 600 5.5px/13px var(--mono); text-align: center; color: #15806f; letter-spacing: .02em; }
.sp-pill.ghost { border-color: #e6eeeb; background: #fbfdfc; }
.sp-pill.ghost::after { content: ""; }

.preview-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.preview-map svg path { fill: none; stroke: #b7ddd3; stroke-width: 1.2; stroke-linecap: round; }
.mp-node {
  position: absolute;
  height: 24px; border-radius: 6px;
  background: #fff; border: 1px solid #dceee8;
  box-shadow: 0 2px 7px rgba(6, 177, 144, .05);
  font: 500 7.5px/22px var(--sans); color: var(--ink-2); text-align: center;
  overflow: hidden; white-space: nowrap;
}
.mp-node.root { left: 12px; top: 50%; transform: translateY(-50%); width: 62px; background: linear-gradient(135deg, #eafaf3, #e4f7f8); color: #117c6a; border-color: #bfe9df; }
.mp-node.b1, .mp-node.b2, .mp-node.b3 { left: 104px; width: 70px; }
.mp-node.b1 { top: 21px; } .mp-node.b2 { top: 53px; } .mp-node.b3 { top: 85px; }
.mp-node.c1, .mp-node.c1b, .mp-node.c3 { right: 12px; width: 42px; height: 18px; border-radius: 5px; }
.mp-node.c1 { top: 12px; } .mp-node.c1b { top: 36px; } .mp-node.c3 { top: 88px; }

.preview-write { padding: 18px 22px; }
.preview-write .pw-head { width: 42%; height: 7px; border-radius: 3px; background: #cfe4dd; margin-bottom: 12px; }
.pw-line { height: 4px; border-radius: 2px; background: #dfeae6; margin-bottom: 6px; }
.pw-cite { display: inline-block; margin: 1px 0 7px; padding: 2px 5px; border-radius: 3px; background: var(--mint); color: #15806f; font: 600 6px/1 var(--mono); }
.pw-refs { margin-top: 12px; padding-top: 8px; border-top: 1px solid #e7efec; display: flex; flex-direction: column; gap: 4px; }
.pw-refs i { display: block; height: 3px; width: 64%; background: #e6eeeb; border-radius: 2px; }
.pw-refs i:nth-child(2) { width: 52%; } .pw-refs i:nth-child(3) { width: 58%; }

.recent-section { max-width: 760px; margin: 46px auto 0; }
.library-section { margin-top: 34px; }
.library-section .recent-list { border-top-color: var(--line-2); }
.recent-head { display: flex; align-items: baseline; gap: 12px; }
.recent-section .recent-head { padding-left: 8px; }
.recent-head h2 { margin: 0; font-size: 15px; font-weight: 500; color: var(--ink); }
.recent-meta { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.recent-list { margin-top: 6px; border-top: 1px solid var(--line-2); }
.recent-item {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 14px;
  padding: 10px 8px; text-align: left;
  border-bottom: 1px solid var(--line-2);
  box-shadow: inset 2px 0 0 transparent;
  transition: box-shadow .14s, background .14s;
}
.recent-item:hover {
  background: linear-gradient(90deg, rgba(234, 249, 249, .72), rgba(234, 249, 249, 0));
  box-shadow: inset 2px 0 0 #9fcfc3;
}
.recent-item:hover .rt-title { color: #0f7b6a; }
.rt-title { font-size: 12.5px; color: rgba(0, 0, 0, .62); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-meta { font-size: 10px; color: rgba(0, 0, 0, .38); white-space: nowrap; font-family: var(--mono); }

/* ---------- 检索工作台 ---------- */
.ws {
  position: relative;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7px var(--main-w, 380px);
  grid-template-areas: "main msplit results";
  background: transparent;
  overflow: hidden;
}
.ws.right-off { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.ws.right-off > .main-split,
.ws.right-off > .results { display: none; }
.ws.chat-mode {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "main";
}
.ws > .rail,
.ws > .rail-split { display: none; }
.ws-top #rail-toggle,
.ws-top #project-toggle { display: none; }
body[data-view="workspace"] .app-main { overflow: hidden; }
.ws.chat-mode .results,
.ws.chat-mode .main-split { display: none; }
.ws.chat-mode .ws-papers { display: none; }
.rail-split {
  display: block;
  grid-area: split;
  position: relative;
  min-height: 0;
  cursor: col-resize;
  background: linear-gradient(#edf9f5 0 52px, #f4f8f7 52px);
  touch-action: none;
}
.rail-split::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; transform: translateX(-50%);
  background: rgba(0, 0, 0, .06);
  transition: background .12s, width .12s;
}
.rail-split::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 4px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: #bfe7da;
  transition: background .12s;
}
.rail-split:hover::before,
.rail-split:focus-visible::before,
body.resizing .rail-split::before { background: #7fd7c5; }
.rail-split:hover::after,
.rail-split:focus-visible::after,
body.resizing .rail-split::after { background: #0aa78c; }
.rail-split:focus-visible { outline: none; }
.main-split {
  grid-area: msplit;
  position: relative;
  min-height: 0;
  cursor: col-resize;
  background: transparent;
  touch-action: none;
}
.main-split::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; transform: translateX(-50%);
  background: transparent;
  transition: background .12s, width .12s;
}
.main-split::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 4px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: #bfe7da;
  opacity: 0;
  transition: background .12s, opacity .12s;
}
.main-split:hover::before,
.main-split:focus-visible::before,
body.resizing .main-split::before { background: #7fd7c5; }
.main-split:hover::after,
.main-split:focus-visible::after,
body.resizing .main-split::after { background: #0aa78c; opacity: 1; }
.main-split:focus-visible { outline: none; }
.rail {
  grid-area: rail;
  min-height: 0;
  display: flex; flex-direction: column;
  padding: 13px 10px 10px;
  background: linear-gradient(180deg, #edf9f5 0%, #f5fbf9 48%, #f9fcfb 100%);
}
.rail-head {
  flex: none; display: flex; flex-direction: column;
  gap: 2px; padding: 4px 6px 12px;
}
.rail-head-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rail-back {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 6px 0 2px; border-radius: 6px;
  color: var(--ink-2); font-size: 11.5px;
}
.rail-back:hover { background: var(--mint); color: var(--teal); }
.rail-back svg {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.rail-kicker { margin: 0 0 2px; font-family: var(--mono); font-size: 9px; letter-spacing: .14em; color: var(--muted); }
.rail-head b { font-size: 16px; font-weight: 600; color: #173d35; }
.rail-count {
  font-family: var(--mono); font-size: 10.5px; color: var(--muted);
  background: #fff; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px;
}
.project-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 2px 0 8px; }
.project-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 8px; border: 1px solid transparent; border-radius: 10px;
  text-align: left; color: var(--ink-2);
  transition: background .14s, border-color .14s, box-shadow .14s;
}
.project-item:hover { background: rgba(255, 255, 255, .72); }
.project-item.on { background: #fff; border-color: #cfece3; box-shadow: var(--shadow-sm); }
.project-avatar {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 9px; font-size: 12px; font-weight: 600;
}
.project-avatar.green { background: #e6f6ee; color: #0b7a52; }
.project-avatar.blue { background: #e8f1fb; color: #1d5f9e; }
.project-avatar.amber { background: #fdf2e0; color: #9a6a17; }
.project-avatar.violet { background: #f0ecfb; color: #5b45a3; }
.project-avatar.rose { background: #fbeaee; color: #a33b56; }
.project-avatar.teal { background: #e5f7f5; color: #0b7a6e; }
.project-avatar.ink { background: #eef2f5; color: #3d4a52; }
.pj-main { min-width: 0; }
.pj-main b { display: block; font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-main i { display: block; margin-top: 1px; font-style: normal; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-item.on .pj-main b { color: #0f7b6a; }
.new-project {
  flex: none; height: 32px; margin: 2px 4px 10px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px dashed rgba(6, 177, 144, .38); border-radius: 8px;
  background: rgba(255, 255, 255, .36); color: #13816f; font-size: 11.5px;
  transition: background .15s, border-color .15s;
}
.new-project:hover { background: #fff; border-color: var(--teal); }
.new-project svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.rail-files { flex: none; border-top: 1px solid rgba(0, 0, 0, .06); padding-top: 8px; }
.rail-files-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 4px; font-size: 10px; color: var(--muted); }
.rail-upload.mini { height: auto; border: 0; background: none; padding: 0; font-size: 10.5px; color: #13816f; }
.project-file-list { max-height: 108px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.pf-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; font-size: 10.5px; color: var(--ink-2); }
.pf-item:hover { background: rgba(255, 255, 255, .6); }
.pf-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-meta { margin-left: auto; flex: none; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }

/* ---------- 文件类型图标 ---------- */
.file-icon {
  width: 18px; height: 18px; flex: none;
  display: grid; place-items: center;
  border-radius: 5px;
  color: #fff; font-family: var(--mono); font-size: 6.5px; font-weight: 700;
  letter-spacing: .02em; line-height: 1;
}
.file-icon.pdf { background: #e05a52; }
.file-icon.md { background: #29a69b; }
.file-icon.img { background: #4b9be8; }
.file-icon.zip { background: #d9a12c; }
.file-icon.sheet { background: #34a26b; }
.file-icon.code { background: #7b6bd6; }
.file-icon.epub { background: #a8783c; font-size: 5.5px; }
.file-icon.doc { background: #6f8a99; }
.file-icon svg { width: 10px; height: 10px; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pf-item .file-icon { width: 16px; height: 16px; border-radius: 4px; font-size: 6px; }
.pf-item .file-icon svg { width: 9px; height: 9px; }
.rail-file .file-icon { width: 18px; height: 18px; border-radius: 5px; font-size: 6.5px; }
.rail-file .file-icon svg { width: 10px; height: 10px; }
.lu-row .file-icon { width: 17px; height: 17px; border-radius: 5px; font-size: 6px; }
.lu-row .file-icon svg { width: 10px; height: 10px; }
.rail-item.rail-file { flex-direction: row; align-items: flex-start; gap: 9px; }
.file-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }

.rail-brand { display: flex; align-items: center; gap: 7px; padding: 5px 8px 14px; flex: none; }
.rail-mark {
  width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff;
  box-shadow: 0 3px 9px rgba(6, 177, 144, .2);
}
.rail-mark svg { width: 14px; height: 14px; }
.rail-brand span:last-child { font-size: 16px; font-weight: 500; color: #0b7a68; }
.new-task {
  flex: none;
  height: 36px; margin: 0 2px 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px dashed rgba(6, 177, 144, .38);
  border-radius: 8px;
  background: rgba(255, 255, 255, .36);
  color: #13816f; font-size: 12.5px;
  transition: background .15s, border-color .15s;
}
.new-task:hover { background: #fff; border-color: var(--teal); }
.new-task svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.rail-tabs {
  flex: none; display: flex; gap: 2px;
  margin: 0 2px; padding: 3px;
  background: rgba(255, 255, 255, .62); border-radius: 7px;
}
.rail-tabs button { flex: 1; height: 28px; border-radius: 5px; font-size: 11.5px; color: var(--muted); }
.rail-tabs button:hover { color: var(--ink); }
.rail-tabs button.on { background: #fff; color: var(--teal); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.rail-files-bar { flex: none; margin: 8px 2px 2px; }
.rail-files-bar input { display: none; }
.rail-upload {
  height: 32px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px dashed rgba(6, 177, 144, .38); border-radius: 7px;
  background: rgba(255, 255, 255, .45);
  font-size: 11.5px; color: #13816f; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.rail-upload:hover { background: #fff; border-color: var(--teal); }
.rail-file { cursor: default; position: relative; }
.rail-file:hover { background: rgba(255, 255, 255, .75); }
.rail-list { flex: 1; min-height: 0; overflow: auto; padding: 4px 0 8px; }
.rail-label { padding: 10px 9px 5px; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(0, 0, 0, .34); }
.rail-item {
  width: 100%;
  display: flex; flex-direction: column; gap: 3px;
  padding: 9px 9px;
  border-radius: 8px;
  text-align: left;
  border: 1px solid transparent;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.rail-item:hover { background: rgba(255, 255, 255, .72); }
.rail-item.on { background: #fff; border-color: #cfece3; box-shadow: 0 6px 18px rgba(6, 177, 144, .07); }
.ri-title { font-size: 12px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rail-item.on .ri-title { color: #0f7b6a; font-weight: 500; }
.ri-meta { font-size: 9.5px; color: var(--muted); }
.rail-file-actions {
  position: absolute; right: 8px; bottom: 7px;
  display: flex; align-items: center; gap: 1px;
  padding-left: 12px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .96) 34%);
  opacity: 0; pointer-events: none;
  transition: opacity .12s ease;
}
.rail-file:hover .rail-file-actions,
.rail-file:focus-within .rail-file-actions { opacity: 1; pointer-events: auto; }
.rail-file-actions button {
  position: relative; width: 21px; height: 19px;
  display: grid; place-items: center;
  border-radius: 4px; color: #6f7c78;
}
.rail-file-actions button:hover { background: #eef7f4; color: #0b7a68; }
.rail-file-actions button[data-rail-file-act="delete"] { color: #d05a4a; }
.rail-file-actions button[data-rail-file-act="delete"]:hover { background: #fff1ee; color: #c04a3a; }
.rail-file-actions button:focus-visible { outline: 2px solid #7fd7c5; outline-offset: 1px; }
.rail-file-actions svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.rail-file-actions button::after {
  content: attr(data-tip);
  position: absolute; right: -1px; bottom: calc(100% + 7px);
  padding: 4px 7px; border-radius: 4px;
  background: #2f2f2f; color: #fff;
  font-size: 10px; line-height: 1.2; white-space: nowrap;
  opacity: 0; transform: translateY(2px); pointer-events: none;
  transition: opacity .12s ease, transform .12s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
  z-index: 2;
}
.rail-file-actions button::before {
  content: ""; position: absolute; right: 6px; bottom: calc(100% + 3px);
  border: 4px solid transparent; border-top-color: #2f2f2f;
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
  z-index: 2;
}
.rail-file-actions button:hover::after,
.rail-file-actions button:focus::after { opacity: 1; transform: translateY(0); }
.rail-file-actions button:hover::before,
.rail-file-actions button:focus::before { opacity: 1; }
.rail-empty { padding: 20px 10px; font-size: 11px; color: var(--muted); line-height: 1.7; }
.rail-stat { display: flex; align-items: center; gap: 6px; padding: 0 5px; font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.rail-stat i { width: 5px; height: 5px; border-radius: 50%; background: #27b36f; box-shadow: 0 0 0 3px rgba(39, 179, 111, .12); }
.rail-user { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 0 5px; }
.rail-user .avatar { width: 27px; height: 27px; font-size: 11px; }
.rail-user b { display: block; font-size: 11px; font-weight: 500; }
.rail-user span:not(.avatar) { display: block; margin-top: 1px; font-size: 9px; color: var(--muted); }
.rail-user button { margin-left: auto; color: var(--muted); font-size: 12px; letter-spacing: .08em; }

.ws-main { grid-area: main; min-width: 0; min-height: 0; display: flex; flex-direction: column; position: relative; }
.ws-top {
  flex: none; height: 52px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
  z-index: 4;
}
@media (min-width: 981px) {
  .ws-top { display: none; }
}
.ws-back {
  display: none;
  flex: none; height: 30px; padding: 0 8px 0 4px;
  align-items: center; gap: 5px;
  border-radius: 6px; color: var(--ink-2); font-size: 12px;
  white-space: nowrap;
}
.ws-back:hover { background: var(--mint); color: var(--teal); }
.ws-back svg {
  width: 16px; height: 16px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.rail-toggle { display: none; width: 30px; height: 30px; border-radius: 6px; place-items: center; color: var(--muted); }
.rail-toggle:hover { background: var(--mint); color: var(--teal); }
.rail-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.ws-crumb { min-width: 0; display: flex; align-items: center; gap: 8px; }
.ws-type { flex: none; font-size: 9.5px; line-height: 19px; padding: 0 7px; border-radius: 4px; background: var(--mint); border: 1px solid #d7f1ec; color: #157a6a; }
.ws-project {
  flex: none; max-width: 150px; padding: 2px 8px;
  border-radius: 6px; border: 1px solid #d6efe7; background: #f6fcf9;
  color: #0b7a68; font-size: 10px; line-height: 16px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ws-top-actions .ws-project-toggle { display: none; }
.ws-type.analyze { background: #f4f0fb; border-color: #e6d8ff; color: #7040b8; }
.ws-type.write { background: #fff7e8; border-color: #f8e2b8; color: #a46800; }
.ws-type.chat { background: #eef5ff; border-color: #d7e7fb; color: #2f6fbe; }
.ws-crumb b { min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.ws-icon { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.ws-icon:hover { background: var(--mint); color: var(--teal); }
.ws-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ws-papers { display: none; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid #d7f1ec; background: var(--mint); color: #157a6a; font-size: 10.5px; }
.ws-papers span { font-family: var(--mono); }
.btn-gradient.small { height: 30px; padding: 0 12px; font-size: 11.5px; border-radius: 6px; }

.thread { flex: 1; min-height: 0; overflow: auto; padding: 10px 34px 12px; scroll-behavior: smooth; scrollbar-gutter: stable; }
.thread::-webkit-scrollbar { width: 6px; height: 6px; }
.thread::-webkit-scrollbar-track { background: transparent; }
.thread::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .07); border-radius: 3px; }
.thread::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .14); }
.thread-inner { max-width: 820px; margin: 0 auto; }
.thread-head {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  padding: 18px 34px 8px;
  font-size: 17px; font-weight: 600; color: var(--ink);
  letter-spacing: -.01em; text-align: center;
}
.thread-head[hidden] { display: none; }
@media (max-width: 980px) {
  .thread-head { display: none; }
}
.chat-thread { max-width: 760px; }
.chat-thread .user-msg { margin-bottom: 22px; }
.assistant-msg { margin: 0 0 24px; font-size: 14px; line-height: 1.85; color: var(--ink-2); }
.assistant-msg p { margin: 0 0 10px; }
.assistant-msg p:last-child { margin-bottom: 0; }
.assistant-msg ul { margin: 0 0 12px 18px; padding: 0; }
.assistant-msg li { margin: 3px 0; }
.user-msg { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.user-msg .bubble {
  max-width: 82%;
  padding: 10px 14px;
  background: linear-gradient(90deg, #eaf9f9, #f4fffb);
  border: 1px solid #d9f2ec;
  border-radius: 12px 12px 2px 12px;
  font-size: 13px; line-height: 1.65; color: var(--ink);
}
.review-card {
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(6, 177, 144, .055);
  padding: 26px 32px 20px;
  margin-bottom: 18px;
}
.review-meta { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.review-meta::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: linear-gradient(135deg, var(--g1), var(--g2)); }
.review-title { margin: 9px 0 7px; font-size: 19px; line-height: 1.4; font-weight: 600; letter-spacing: -.012em; color: #191d1c; }
.review-sub { font-size: 11px; color: var(--muted); margin-bottom: 18px; }
.review-body { font-size: 14px; line-height: 1.95; color: #252a28; }
.review-body p { margin: 0 0 12px; }
.review-body h3 {
  margin: 24px 0 9px;
  padding-left: 10px;
  border-left: 3px solid var(--teal);
  font-size: 16px; line-height: 1.55; font-weight: 600; color: #1b1f1e;
}
.review-section:first-child h3 { margin-top: 0; }
.review-body h4 { margin: 16px 0 6px; font-size: 12.5px; line-height: 1.55; font-weight: 600; color: var(--ink); }
.review-body ol { margin: 0 0 14px; padding-left: 20px; }
.review-body ol li { margin: 5px 0; line-height: 1.82; }
.review-body ol li::marker { color: #9fcfc3; font-family: var(--mono); font-size: 12px; }
.review-body ul { margin: 0 0 14px; padding-left: 20px; }
.review-body li { margin: 5px 0; line-height: 1.82; }
.review-body li::marker { color: #9fcfc3; }
.cite {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 15px; padding: 0 4px; margin: 0 2px;
  border-radius: 4px;
  border: 1px solid #cdece5;
  background: var(--mint);
  color: #0f7b6a;
  font: 600 9px/1 var(--mono);
  vertical-align: super;
  cursor: pointer;
  transition: background .14s, color .14s, border-color .14s;
}
.cite:hover, .cite.active { background: linear-gradient(135deg, var(--g1), var(--g2)); background-origin: border-box; border-color: transparent; color: #fff; }
.evidence {
  margin-top: 20px;
  padding: 13px 15px;
  background: linear-gradient(90deg, #f1fbf8, #f9fdfc);
  border: 1px solid #dcf1eb;
  border-left: 3px solid var(--teal);
  border-radius: 7px;
  font-size: 12px; line-height: 1.8; color: var(--ink-2);
}
.evidence b { color: #117c6a; font-weight: 600; }
.review-suggests { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.review-sources-row { display: flex; align-items: center; margin-top: 18px; }
.review-sources-toggle {
  display: inline-flex; align-items: center; gap: 6px; height: 29px; padding: 0 10px;
  border: 1px solid #bfe9df; border-radius: 8px; background: #fff;
  font-size: 11px; color: #0b7a68;
}
.review-sources-toggle:hover { background: #f4fbf8; border-color: #6fbfa9; color: #075f51; }
.review-sources-toggle.on { background: #eef9f5; border-color: #9adcc9; color: #0b7a68; }
.review-sources-toggle.on:hover { background: #e1f6ee; border-color: #6fbfa9; color: #075f51; }
.review-sources-toggle svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.review-sources-toggle .src-chev { transition: transform .15s; }
.review-sources-toggle.on .src-chev { transform: rotate(180deg); }
.review-sources-toggle span { white-space: nowrap; }
.review-suggests > span { flex: none; font-size: 10px; color: var(--muted); }
.review-suggests button { padding: 4px 9px; border: 1px solid #cdeee2; border-radius: 999px; background: #f4fbf8; font-size: 10.5px; color: #0b7a68; }
.review-suggests button:hover { background: #e7f8f2; border-color: #9adcc9; }
.review-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 17px; padding-top: 13px; }
.round-switch { display: flex; align-items: center; gap: 4px; }
.round-chip {
  height: 25px; padding: 0 8px;
  border-radius: 5px; border: 1px solid var(--line-2); background: #fff;
  font-size: 10.5px; color: var(--muted);
}
.round-chip:hover { border-color: #bfe9df; color: var(--teal); }
.round-chip.on { background: var(--mint); border-color: #bfe9df; color: #127a69; font-weight: 500; }
.ghost-btn {
  height: 28px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 6px; background: #fff;
  font-size: 11px; color: var(--ink-2);
}
.ghost-btn:hover { border-color: #bfe9df; color: var(--teal); background: #f9fdfc; }
.review-loading { display: flex; align-items: center; gap: 8px; padding: 6px 0 14px; font-size: 11.5px; color: var(--muted); }
.spinner { width: 14px; height: 14px; border: 2px solid #d9eee7; border-top-color: var(--teal); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sk-line { height: 9px; border-radius: 3px; background: linear-gradient(90deg, #eef3f1 25%, #e3ece9 50%, #eef3f1 75%); background-size: 200% 100%; animation: sk 1.2s infinite; margin-bottom: 9px; }
.review-enter { animation: rise .32s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.answer-block {
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.answer-q { font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 6px; }
.answer-text { font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.answer-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.answer-foot .cite { vertical-align: baseline; }
.switch-search { font-size: 10.5px; color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }

.composer { flex: none; padding: 8px 40px 16px 34px; z-index: 4; background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .72)); }
.composer-box {
  max-width: 820px; margin: 0 auto;
  background: #fff;
  border: 1px solid #dceee8;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(6, 177, 144, .08), 0 1px 3px rgba(0, 0, 0, .03);
  padding: 9px 11px 7px;
  transition: border-color .16s, box-shadow .16s;
}
.composer-box:focus-within { border-color: #a7e0d3; box-shadow: 0 10px 30px rgba(6, 177, 144, .12), 0 0 0 3px rgba(6, 177, 144, .05); }
.composer-box textarea { width: 100%; min-height: 22px; max-height: 108px; border: 0; outline: 0; resize: none; background: transparent; font-size: 13px; line-height: 1.6; padding: 2px 1px 5px; }
.composer-files { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 6px; }
.launch-files { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 8px; }
.launch-add {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--muted);
}
.launch-add:hover { color: #0b7a68; border-color: #bfe7da; background: #f1fbf7; }
.launch-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }
.composer-file { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 6px; border: 1px solid #cdeee2; border-radius: 6px; background: #f1fbf7; color: #0b7a68; font-size: 10.5px; }
.composer-file svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.composer-file > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-file button { flex: none; color: inherit; font-size: 9px; opacity: .6; }
.composer-file button:hover { opacity: 1; }
.composer-box textarea::placeholder { color: rgba(0, 0, 0, .3); }
.composer-bar { display: flex; align-items: center; gap: 7px; }
.composer-add {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff; color: var(--muted);
}
.composer-add:hover { color: #0b7a68; border-color: #bfe7da; background: #f1fbf7; }
.composer-add svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; }
.composer-hint { flex: 1; text-align: right; font-size: 10px; color: rgba(0, 0, 0, .3); padding-right: 3px; }
.composer-send { width: 30px; height: 30px; }

/* ---------- 右侧结果 ---------- */
.results { grid-area: results; min-height: 0; display: flex; flex-direction: column; background: transparent; position: relative; }
@media (min-width: 861px) {
  .results {
    margin: 12px 12px 12px 6px;
    padding: 8px 8px 10px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 30%),
      linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .46));
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 22px;
    box-shadow:
      inset 0 1px 0 #fff,
      0 20px 44px rgba(38, 38, 38, .09),
      0 2px 6px rgba(38, 38, 38, .04);
    backdrop-filter: blur(30px) saturate(170%);
    -webkit-backdrop-filter: blur(30px) saturate(170%);
    overflow: hidden;
  }
}
.results-papers { display: none; flex: 1; min-height: 0; flex-direction: column; }
.results.sources-open .results-papers { display: flex; }
.ws-files-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; background: transparent; }
.results.sources-open .ws-files-panel { flex: 0 0 var(--files-h, 460px); min-height: 110px; max-height: none; border-bottom: 0; }
.res-split {
  display: none; flex: none; height: 10px; margin: 0 6px;
  position: relative; cursor: row-resize; touch-action: none;
}
.results.sources-open .res-split { display: block; }
.res-split::before {
  content: ""; position: absolute; left: 2px; right: 2px; top: 4px; height: 1px;
  border-radius: 1px; background: var(--line-2);
  transition: background .12s, height .12s, top .12s;
}
.res-split:hover::before,
.res-split:focus-visible::before,
body.resizing .res-split::before { background: #9adcc9; height: 2px; top: 3.5px; }
.ws-files-head { flex: none; display: flex; align-items: center; padding: 10px 12px 9px; }
.ws-files-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ws-files-title b { font-size: 12px; font-weight: 600; color: var(--ink); }
.ws-files-title span { font-size: 10px; color: var(--muted); }
.ws-files-collapse {
  flex: none; display: grid; place-items: center;
  width: 24px; height: 24px; margin-left: -3px; margin-right: 1px;
  border-radius: 6px; color: var(--muted);
}
.ws-files-collapse:hover { background: #f1f7f5; color: var(--ink-2); }
.ws-files-collapse svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; shape-rendering: geometricPrecision; }
.ws-right-expand { position: absolute; top: 11px; right: 15px; z-index: 6; display: none; width: 36px; height: 36px; border-radius: 8px; }
.ws-right-expand svg { width: 20px; height: 20px; stroke-width: 1; }
@media (min-width: 981px) {
  .ws.right-off .ws-right-expand { display: grid; }
}
@media (max-width: 980px) {
  .ws-files-collapse { display: none; }
}
.ws-files-list { flex: 1; min-height: 0; overflow: auto; padding: 6px 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.ws-files-list::-webkit-scrollbar { width: 6px; height: 6px; }
.ws-files-list::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .07); border-radius: 3px; }
.ws-files-upload-bar { flex: none; padding: 8px 10px 0; }
.ws-files-upload {
  width: 100%; height: 36px; display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px dashed #9adcc9; border-radius: 8px; background: #f7fdfb;
  font-size: 12px; color: #0b7a68;
}
.ws-files-upload:hover { background: #eef9f5; border-color: #6fbfa9; }
.ws-files-upload svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.ws-file-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px 10px 9px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px; }
.ws-file-row .file-icon { flex: none; width: 24px; height: 24px; border-radius: 6px; font-size: 8px; }
.ws-file-row .file-icon svg { width: 13px; height: 13px; }
.ws-file-main { flex: 1; min-width: 0; }
.ws-file-main b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; line-height: 1.45; font-weight: 500; color: var(--ink); }
.ws-file-main span { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.ws-file-row .rail-file-actions { top: 50%; bottom: auto; transform: translateY(-50%); }
.ws-file-row .rail-file-actions button { width: 22px; height: 22px; border-radius: 5px; }
.ws-files-empty { padding: 30px 16px; text-align: center; font-size: 11px; line-height: 1.7; color: var(--muted); }
.ws-files-empty b { display: block; margin-bottom: 3px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); }
.results-head { flex: none; display: flex; flex-direction: column; gap: 7px; padding: 10px 12px 9px; background: transparent; z-index: 3; }
.results-head:has(.filters-toggle.open) { box-shadow: 0 8px 18px -12px rgba(10, 40, 34, .28); }
.results-task { min-width: 0; padding: 0 2px; font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results-close { display: none; margin-left: auto; width: 30px; height: 30px; border-radius: 6px; place-items: center; color: var(--muted); font-size: 12px; }
.results-close:hover { background: var(--mint); color: var(--teal); }
.results-head-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.results-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.filters-toggle { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; font-size: 11.5px; color: var(--ink-2); }
.filters-toggle:hover { border-color: #bfe9df; color: #0b7a68; }
.filters-toggle.open { background: #eef9f5; border-color: #9adcc9; color: #0b7a68; }
.filters-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.filters-toggle .chev { margin-left: 2px; transition: transform .15s; }
.filters-toggle.open .chev { transform: rotate(180deg); }
.filters-panel { display: flex; flex-direction: column; gap: 10px; padding: 10px 0 2px; border-top: 1px solid var(--line-2); max-height: min(62vh, 430px); overflow: auto; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-label { font-size: 10px; color: var(--muted); }
.filter-opts { display: flex; flex-wrap: wrap; gap: 4px; }
.filter-opts button { padding: 3px 8px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; font-size: 10.5px; color: var(--ink-2); }
.filter-opts button:hover { border-color: #bfe7da; color: #0b7a68; }
.filter-opts button.on { background: #eef9f5; border-color: #9adcc9; color: #0b7a68; }
.filter-opts .filter-more { border-style: dashed; color: #0b7a68; }
.filter-opts .filter-more:hover { background: #f4fbf8; border-color: #9adcc9; }
.filters-foot { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.filters-foot button { height: 27px; padding: 0 11px; border-radius: 6px; font-size: 10.5px; }
#clear-filters, #lib-filter-reset { border: 1px solid var(--line-2); background: #fff; color: var(--muted); }
#clear-filters:hover, #lib-filter-reset:hover { border-color: #bfe7da; color: #0b7a68; }
.filters-done { margin-left: auto; border: 0; background: linear-gradient(90deg, var(--g1), var(--g2)); color: #fff; }
.filters-done:hover { filter: brightness(1.04); }
.lib-filter-panel .filters-done { margin-left: 0; }
.lib-filter-panel { margin: -2px 0 6px; padding: 10px 12px 8px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; max-height: min(72vh, 560px); }
.lib-filter-panel.lib-filter-mine .lib-facet-group { display: none; }
.lib-year-range { display: flex; align-items: center; gap: 6px; }
.lib-year-range select {
  min-width: 64px; height: 26px; padding: 0 6px;
  border: 1px solid var(--line-2); border-radius: 6px; background: #fff;
  font-family: inherit; font-size: 10.5px; color: var(--ink-2); outline: none; cursor: pointer;
}
.lib-year-range select:focus { border-color: #bfe7da; color: #0b7a68; }
.lib-year-range select:disabled { opacity: .55; cursor: default; }
.lib-year-range span { font-size: 10px; color: var(--muted); }
.filter-opts button i { margin-left: 4px; font-style: normal; font-size: 9.5px; color: var(--muted); }
.filter-opts button.on i { color: #0b7a68; opacity: .7; }
.results-tools select { display: none; }
.select-wrap { position: relative; }
.select-btn {
  height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 27px;
  border: 1px solid rgba(6, 177, 144, .16); border-radius: 8px;
  background: #fbfdfc;
  text-align: center;
  font-size: 12px; color: var(--ink-2); white-space: nowrap;
  cursor: pointer; position: relative;
  transition: border-color .15s, background-color .15s, box-shadow .15s, color .15s;
}
.select-btn::after {
  content: "";
  position: absolute; right: 9px; top: 50%;
  width: 10px; height: 10px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='m2.5 4.5 3.5 3.5 3.5-3.5' fill='none' stroke='%23708680' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 10px 10px no-repeat;
  transition: transform .15s;
}
.select-btn:hover { border-color: #bfe9df; background: #f4fcfa; color: #157a6a; }
.select-wrap.open .select-btn { border-color: #9fdfd1; background: #fff; color: #157a6a; box-shadow: 0 0 0 3px rgba(6, 177, 144, .08); }
.select-wrap.open .select-btn::after { transform: translateY(-50%) rotate(180deg); }
.select-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  display: none;
  min-width: 100%; width: max-content;
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(13, 82, 74, .16);
  padding: 5px; z-index: 25;
}
.select-wrap.open .select-menu { display: block; }
.select-menu.right { left: auto; right: 0; }
.select-opt {
  width: 100%; height: 30px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 9px; border-radius: 6px;
  font-size: 12px; color: var(--ink-2); text-align: left; white-space: nowrap;
}
.select-opt:hover { background: var(--mint); color: #157a6a; }
.select-opt.on { background: var(--mint); color: var(--teal); font-weight: 500; }
.select-opt .tick { width: 12px; color: var(--teal); opacity: 0; }
.select-opt.on .tick { opacity: 1; }
.clear-filters {
  height: 32px; padding: 0 10px;
  border-radius: 8px;
  font-size: 12px; color: var(--muted);
  white-space: nowrap;
}
.clear-filters:hover { background: var(--mint); color: var(--teal); }
.results-list { flex: 1; min-height: 0; overflow: auto; padding: 8px 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.results-list::-webkit-scrollbar { width: 6px; height: 6px; }
.results-list::-webkit-scrollbar-track { background: transparent; }
.results-list::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .07); border-radius: 3px; }
.results-list::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .14); }
.paper-row {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.paper-row:hover { border-color: #cdeee2; box-shadow: 0 4px 14px rgba(6, 177, 144, .06); }
.paper-row.cite-hover { background: #f1fbf7; border-color: #9adcc9; }
.paper-row.flash { animation: rowFlash 1.25s ease; }
@keyframes rowFlash { 0%, 100% { background: #fff; } 22%, 58% { background: #eefbf6; } }
.pr-rank {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.65;
  color: rgba(0, 0, 0, .32);
  font-variant-numeric: tabular-nums;
}
.pr-body { min-width: 0; }
.pr-title {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.paper-row:hover .pr-title { color: #0f7b6a; }
.pr-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; margin-top: 4px; font-size: 10px; color: var(--muted); }
.pr-rel { color: #0b7a68; }
.results-empty { padding: 42px 20px; text-align: center; font-size: 11.5px; color: var(--muted); line-height: 1.8; }

/* ---------- 论文详情（右侧面板） ---------- */
/* ---------- 论文详情（弹窗） ---------- */
.pd-mask {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(18, 32, 28, .32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.paper-detail {
  position: fixed; z-index: 80;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(720px, 92vw); max-height: 84vh;
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(15, 50, 45, .22);
  overflow: hidden;
}
.pd-top {
  flex: none;
  height: 42px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--line-2);
}
.pd-back { font-size: 11.5px; color: var(--muted); }
.pd-back:hover { color: var(--teal); }
.pd-close { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.pd-close:hover { background: var(--mint); color: var(--teal); }
.pd-actions {
  flex: none;
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-2);
}
.pd-action {
  height: 27px; padding: 0 9px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: #fff;
  font-size: 10.5px; color: var(--ink-2);
  white-space: nowrap;
}
.pd-action:hover { border-color: #9fdfd1; background: #f6fdfa; color: var(--teal); }
.pd-action.primary { background: linear-gradient(90deg, var(--g1), var(--g2)); background-origin: border-box; border-color: transparent; color: #fff; }
.pd-action.primary:hover { background: linear-gradient(90deg, var(--g1), var(--g2)); border-color: transparent; color: #fff; filter: brightness(1.05); }
.pd-action:disabled { opacity: .4; cursor: default; }
.pd-scroll { flex: 1; min-height: 0; overflow: auto; padding: 16px 14px 34px; }
.pd-title { margin: 0 0 7px; font-size: 18px; line-height: 1.45; font-weight: 600; color: var(--ink); letter-spacing: -.01em; cursor: pointer; transition: color .15s; }
.pd-title:hover, .pd-title:focus-visible { color: var(--teal); }
.pd-authors { margin: 0 0 9px; font-size: 10.5px; line-height: 1.6; color: var(--muted); }
.pd-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 10.5px; color: var(--muted); }
.pd-meta b { font-weight: 500; color: var(--ink-2); }
.pd-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 11px; }
.pd-tags span { font-size: 9.5px; line-height: 18px; padding: 0 7px; border-radius: 999px; background: var(--mint); border: 1px solid #d7f1ec; color: #157a6a; }
.pd-block { margin-top: 19px; }
.pd-block h3 { margin: 0 0 7px; font-size: 10px; font-weight: 600; letter-spacing: .06em; color: #117c6a; }
.pd-take {
  margin: 0; padding: 10px 11px;
  background: linear-gradient(90deg, #f2fbf8, #fbfefd);
  border: 1px solid #dcf1eb; border-radius: 7px;
  font-size: 11.5px; line-height: 1.8; color: var(--ink-2);
}
.pd-abstract { font-size: 11.5px; line-height: 1.9; color: var(--ink-2); }
.pd-abstract p { margin: 0 0 9px; }
.pd-abstract p:last-child { margin-bottom: 0; }
.pd-abstract b { font-weight: 600; color: var(--ink); }
.pd-abstract-empty {
  padding: 14px 12px;
  border: 1px dashed #cfe9e2;
  border-radius: 7px;
  background: #fbfefd;
  text-align: center;
}
.pd-abstract-empty p { margin: 0 0 10px; font-size: 11px; color: var(--muted); }
.pd-abstract-empty .pd-action { height: 26px; }
.pd-abstract-note { margin-top: 8px; font-size: 9.5px; line-height: 1.5; color: var(--muted); }

/* ---------- 引用浮卡 / 卡片菜单 ---------- */
.cite-pop {
  position: fixed; z-index: 66; width: 318px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .15);
  padding: 12px 13px;
}
.cp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.cp-title { font-size: 12.5px; line-height: 1.5; font-weight: 500; color: var(--ink); }
.cp-x { color: var(--muted); font-size: 11px; flex: none; padding: 1px 3px; }
.cp-meta { margin-top: 4px; font-size: 9.5px; color: var(--muted); }
.cp-text { margin: 8px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cp-actions { display: flex; gap: 6px; margin-top: 10px; }
.cp-actions button { height: 26px; padding: 0 9px; border-radius: 5px; font-size: 10.5px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); }
.cp-actions button:hover { border-color: #bfe9df; color: var(--teal); }
.cp-actions .cp-primary { background: linear-gradient(90deg, var(--g1), var(--g2)); background-origin: border-box; border-color: transparent; color: #fff; }
.row-menu {
  position: fixed; z-index: 67; width: 148px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .14);
}
.row-menu button { width: 100%; height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 8px; border-radius: 5px; font-size: 11.5px; color: var(--ink-2); text-align: left; }
.row-menu button:hover { background: var(--mint); color: var(--teal); }
.row-menu svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 分析：导图 ---------- */
.analysis, .notes-view, .write-view { height: 100vh; display: flex; flex-direction: column; background: #f4f8f7; overflow: hidden; }
.analysis-top {
  flex: none; height: 54px;
  display: flex; align-items: center; gap: 13px;
  padding: 0 18px;
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  z-index: 6;
}
.an-back { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.an-back:hover { color: var(--teal); }
.an-title { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.an-title span { font-size: 9.5px; line-height: 19px; padding: 0 7px; border-radius: 4px; background: var(--mint); border: 1px solid #d7f1ec; color: #157a6a; }
.an-title b { min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.an-tabs { display: flex; gap: 2px; margin-left: auto; padding: 3px; background: #f1f7f5; border-radius: 6px; }
.an-tabs button { height: 27px; padding: 0 11px; border-radius: 4px; font-size: 11px; color: var(--muted); }
.an-tabs button.on { background: #fff; color: var(--teal); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .07); }
.style-select { display: flex; gap: 2px; padding: 2px; background: #f1f7f5; border-radius: 6px; }
.style-select button { height: 25px; padding: 0 7px; border-radius: 4px; font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.style-select button.on { background: #fff; color: var(--teal); font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.analysis-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 208px minmax(0, 1fr) 318px; }
.an-sources { min-height: 0; display: flex; flex-direction: column; padding: 13px 9px; background: #fbfdfc; border-right: 1px solid var(--line-2); }
.an-sources-head { display: flex; justify-content: space-between; padding: 2px 6px 9px; font-size: 10.5px; color: var(--muted); }
.an-sources-head span { font-family: var(--mono); }
.an-sources-list { flex: 1; overflow: auto; }
.an-source { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 8px 7px; border-radius: 6px; text-align: left; border-left: 2px solid transparent; }
.an-source:hover { background: #fff; }
.an-source.on { background: #fff; border-left-color: var(--teal); box-shadow: 0 2px 7px rgba(6, 177, 144, .06); }
.an-source b { font-size: 10.5px; line-height: 1.45; font-weight: 500; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.an-source span { font-size: 8.5px; color: var(--muted); }
.an-add { flex: none; margin-top: 8px; height: 30px; border: 1px dashed rgba(6, 177, 144, .3); border-radius: 6px; font-size: 10px; color: #15806f; background: transparent; }
.an-add:hover { background: var(--mint); }
.an-canvas { min-width: 0; min-height: 0; position: relative; overflow: auto; background-color: #f7fbfa; background-image: linear-gradient(rgba(6, 177, 144, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(6, 177, 144, .055) 1px, transparent 1px); background-size: 24px 24px; }
.canvas-bar { position: sticky; top: 0; left: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px 0; pointer-events: none; }
.canvas-tip { padding: 4px 8px; border-radius: 4px; background: rgba(255, 255, 255, .82); font-size: 9.5px; color: var(--muted); pointer-events: auto; }
.canvas-tools { display: flex; align-items: center; gap: 2px; padding: 2px; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow-sm); pointer-events: auto; }
.canvas-tools button { height: 25px; min-width: 25px; padding: 0 6px; border-radius: 4px; font-size: 11px; color: var(--muted); }
.canvas-tools button:hover { background: var(--mint); color: var(--teal); }
.canvas-tools span { min-width: 34px; text-align: center; font: 9.5px var(--mono); color: var(--ink-2); }
.mindmap { position: relative; width: 900px; height: 620px; min-width: 900px; min-height: 620px; transform-origin: 0 0; }
.map-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.map-lines path { fill: none; stroke: #b7ddd3; stroke-width: 1.25; stroke-linecap: round; }
.map-nodes { position: absolute; inset: 0; }
.map-node {
  position: absolute;
  max-width: 188px;
  padding: 8px 10px;
  border: 1px solid #dceee8;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 4px 13px rgba(6, 177, 144, .055);
  text-align: left;
  font-size: 11px; line-height: 1.45; color: var(--ink-2);
  transition: box-shadow .15s, border-color .15s, transform .15s;
}
.map-node:hover { border-color: #a9e0d2; box-shadow: 0 7px 18px rgba(6, 177, 144, .1); }
.map-node.on { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(6, 177, 144, .12), 0 7px 18px rgba(6, 177, 144, .09); }
.map-node.root { padding: 12px 14px; background: linear-gradient(135deg, #e9faf3, #e2f6f7); border-color: #bfe9df; color: #117c6a; font-size: 13px; font-weight: 600; }
.map-node.branch { font-weight: 500; color: var(--ink); border-left: 3px solid #9fdfd1; }
.map-node.leaf { font-size: 10px; color: var(--muted); background: #fcfefd; }
.map-node.added { animation: rise .3s ease both; }
.an-side { min-height: 0; display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--line-2); }
.an-side-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line-2); font-size: 11.5px; color: var(--ink); }
.an-side-close { display: none; width: 24px; height: 24px; border-radius: 5px; place-items: center; color: var(--muted); font-size: 11px; }
.an-side-close:hover { background: var(--mint); color: var(--teal); }
.online-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 8.5px; color: #2f8c00; }
.online-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #52c41a; }
.an-node-detail { flex: 1; overflow: auto; padding: 15px; }
.and-kicker { font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.and-title { margin: 6px 0 8px; font-size: 16px; line-height: 1.45; font-weight: 500; color: var(--ink); }
.and-desc { font-size: 12px; line-height: 1.8; color: var(--ink-2); }
.and-source { margin-top: 13px; padding: 10px 11px; background: linear-gradient(90deg, #f2fbf8, #f9fdfc); border: 1px solid #dcf1eb; border-radius: 7px; }
.and-source b { display: block; font-size: 9.5px; color: #117c6a; font-weight: 600; margin-bottom: 4px; }
.and-source p { margin: 0 0 8px; font-size: 10.5px; line-height: 1.65; color: var(--ink-2); }
.and-source button { height: 25px; padding: 0 8px; border-radius: 5px; border: 1px solid #cdece5; background: #fff; font-size: 9.5px; color: #117c6a; }
.and-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.and-actions button { height: 28px; padding: 0 9px; border-radius: 5px; border: 1px solid var(--line-2); background: #fff; font-size: 10.5px; color: var(--ink-2); }
.and-actions button:hover { border-color: #bfe9df; color: var(--teal); }
.an-ask { flex: none; border-top: 1px solid var(--line-2); padding: 10px 11px 12px; }
.an-ask-log { max-height: 132px; overflow: auto; display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.an-ask-a { background: #f8fdfb; border: 1px solid #e3f2ed; border-radius: 6px; padding: 8px 9px; font-size: 10.5px; line-height: 1.7; color: var(--ink-2); }
.an-ask-form { display: flex; align-items: center; gap: 5px; padding: 3px 3px 3px 9px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.an-ask-form:focus-within { border-color: var(--teal); }
.an-ask-form input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 5px 0; font-size: 10.5px; }
.an-ask-form button { width: 25px; height: 25px; border-radius: 5px; background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; font-size: 12px; }

/* ---------- 精读笔记 ---------- */
.notes-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 186px minmax(0, 1fr) 292px; }
.notes-outline, .notes-sources { min-height: 0; overflow: auto; padding: 15px 12px; background: #fbfdfc; }
.notes-outline { border-right: 1px solid var(--line-2); }
.notes-sources { border-left: 1px solid var(--line-2); }
.notes-outline > span, .notes-sources > span { display: block; margin-bottom: 9px; font-size: 10px; color: var(--muted); }
.notes-outline button { width: 100%; padding: 7px 7px; border-radius: 5px; text-align: left; font-size: 11px; line-height: 1.5; color: var(--ink-2); }
.notes-outline button:hover { background: #fff; color: var(--teal); }
.notes-doc {
  width: min(100%, 820px); justify-self: center; align-self: start;
  margin: 20px 26px; padding: 34px 46px 40px;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-sm);
  font-size: 13.5px; line-height: 1.95; color: #252a28;
  overflow: auto; max-height: calc(100vh - 96px);
}
.notes-doc h1 { margin: 0 0 6px; font-size: 23px; line-height: 1.4; font-weight: 600; color: #191d1c; }
.notes-doc .note-meta { margin-bottom: 20px; font-size: 10px; color: var(--muted); }
.notes-doc h2 { margin: 23px 0 8px; padding-left: 9px; border-left: 3px solid var(--teal); font-size: 16px; line-height: 1.5; font-weight: 600; }
.notes-doc p { margin: 0 0 11px; }
.notes-doc .note-cite { display: inline-flex; min-width: 15px; height: 15px; align-items: center; justify-content: center; padding: 0 4px; margin: 0 2px; border-radius: 4px; background: var(--mint); border: 1px solid #cdece5; color: #0f7b6a; font: 600 9px/1 var(--mono); vertical-align: super; cursor: pointer; }
.notes-doc .note-refs { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.notes-doc .note-refs h3 { margin: 0 0 9px; font-size: 12px; font-weight: 600; }
.notes-doc .note-ref { padding-left: 1.4em; text-indent: -1.4em; font-size: 10.5px; line-height: 1.7; color: var(--muted); margin-bottom: 5px; }
.notes-sources .ns-item { padding: 9px 7px; border-bottom: 1px solid var(--line-2); }
.notes-sources .ns-item:last-child { border-bottom: 0; }
.notes-sources .ns-item b { display: block; font-size: 10.5px; line-height: 1.5; font-weight: 500; color: var(--ink-2); }
.notes-sources .ns-item span { display: flex; gap: 5px; align-items: center; margin-top: 4px; font-size: 8.5px; color: var(--muted); }
.ns-badge { font-size: 7.5px; line-height: 14px; padding: 0 4px; border-radius: 4px; background: var(--mint); color: #127a69; border: 1px solid #cdece5; }
.ns-badge.abstract { background: #fff7e8; border-color: #f5e2bd; color: #9a6500; }

/* ---------- 写作 ---------- */
.write-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 176px minmax(0, 1fr) 326px; }
.write-outline { padding: 15px 12px; background: #fbfdfc; border-right: 1px solid var(--line-2); overflow: auto; }
.write-outline > span, .write-sources > span { display: block; margin-bottom: 9px; font-size: 10px; color: var(--muted); }
.write-outline button { width: 100%; padding: 7px; border-radius: 5px; text-align: left; font-size: 11px; line-height: 1.5; color: var(--ink-2); }
.write-outline button:hover { background: #fff; color: var(--teal); }
.write-outline button.on { background: #fff; color: var(--teal); font-weight: 500; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); }
.write-doc-wrap { min-width: 0; overflow: auto; padding: 22px 38px 60px; display: flex; flex-direction: column; align-items: center; }
.write-doc-head { width: min(100%, 760px); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.write-doc-head h1 { margin: 0; font-size: 21px; line-height: 1.4; font-weight: 600; color: #191d1c; }
.write-doc-head p { margin: 4px 0 0; font-size: 10.5px; color: var(--muted); }
.version-chip { flex: none; font: 9.5px var(--mono); color: #127a69; background: var(--mint); border: 1px solid #cdece5; border-radius: 4px; padding: 2px 6px; }
.write-doc {
  width: min(100%, 760px);
  margin-top: 13px;
  padding: 32px 42px 36px;
  background: #fff; border-radius: 10px; box-shadow: var(--shadow-sm);
  font-size: 13.5px; line-height: 1.95; color: #252a28;
}
.write-doc h2 { margin: 22px 0 8px; font-size: 17px; line-height: 1.5; font-weight: 600; color: #191d1c; }
.write-doc h2:first-child { margin-top: 0; }
.write-doc p { margin: 0 0 11px; }
.write-doc .w-cite { display: inline-flex; min-width: 15px; height: 15px; align-items: center; justify-content: center; padding: 0 4px; margin: 0 2px; border-radius: 4px; background: var(--mint); border: 1px solid #cdece5; color: #0f7b6a; font: 600 9px/1 var(--mono); vertical-align: super; }
.write-doc .w-changed { background: #eefbf6; box-shadow: 0 0 0 3px #eefbf6; border-radius: 3px; }
.ai-edit { width: min(100%, 760px); margin-top: 13px; padding: 13px 15px; background: #fff; border: 1px solid #d9eee7; border-left: 3px solid var(--teal); border-radius: 8px; box-shadow: var(--shadow-sm); }
.ai-edit-head { display: flex; align-items: center; gap: 7px; }
.ai-edit-head .ai-mark { width: 22px; height: 22px; font-size: 10px; }
.ai-edit-head b { font-size: 11.5px; font-weight: 500; }
.ai-edit-head span:last-child { margin-left: auto; font-size: 9px; color: var(--muted); }
.ai-edit p { margin: 8px 0 0; font-size: 11.5px; line-height: 1.7; color: var(--ink-2); }
.ai-edit del { color: #b44b45; background: #fff1f0; padding: 1px 3px; border-radius: 3px; }
.ai-edit ins { color: #1f7a4d; background: #eefbf3; padding: 1px 3px; border-radius: 3px; text-decoration: none; }
.ai-edit-actions { display: flex; gap: 6px; margin-top: 9px; }
.ai-edit-actions button { height: 26px; padding: 0 10px; border-radius: 5px; font-size: 10.5px; }
.ai-edit-actions .accept { background: linear-gradient(90deg, var(--g1), var(--g2)); color: #fff; }
.ai-edit-actions .reject { background: #fff; border: 1px solid var(--line-2); color: var(--muted); }
.ai-edit.hidden { display: none; }
.write-sources { min-height: 0; overflow: auto; padding: 15px 12px; background: #fbfdfc; border-left: 1px solid var(--line-2); }
.write-source { padding: 8px 7px; border-bottom: 1px solid var(--line-2); }
.write-source b { display: block; font-size: 10.5px; line-height: 1.5; font-weight: 500; color: var(--ink-2); }
.write-source span { display: flex; gap: 5px; align-items: center; margin-top: 4px; font-size: 8.5px; color: var(--muted); }
.write-refs { margin-top: 17px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.write-refs > b { display: block; font-size: 10px; font-weight: 500; color: var(--ink); margin-bottom: 7px; }
.write-refs > b span { color: var(--muted); font-weight: 400; }
.write-refs div { padding-left: 1.2em; text-indent: -1.2em; font-size: 9.5px; line-height: 1.65; color: var(--muted); margin-bottom: 5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1240px) {
  .ws { grid-template-columns: minmax(0, 1fr) 7px var(--main-w, 360px); grid-template-areas: "main msplit results"; }
  .thread { padding-left: 26px; padding-right: 26px; }
  .analysis-body { grid-template-columns: 190px minmax(0, 1fr) 300px; }
}
@media (max-width: 1180px) {
  .ws { grid-template-columns: minmax(0, 1fr) 7px var(--main-w, 344px); grid-template-areas: "main msplit results"; }
}
@media (max-width: 1080px) {
  .review-card { padding: 23px 26px 18px; }
  .review-title { font-size: 18px; }
  .analysis-body { grid-template-columns: minmax(0, 1fr) 292px; }
  .an-sources { display: none; }
  .notes-body { grid-template-columns: 160px minmax(0, 1fr); }
  .notes-sources { display: none; }
  .write-body { grid-template-columns: 156px minmax(0, 1fr); }
  .write-sources { display: none; }
}
@media (max-width: 980px) {
  .ws { grid-template-columns: minmax(0, 1fr) 7px var(--main-w, 340px); grid-template-areas: "main msplit results"; }
  .rail-split { display: none; }
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: 224px; z-index: 55;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
    box-shadow: 12px 0 40px rgba(0, 0, 0, .12);
  }
  .rail.open { opacity: 1; visibility: visible; pointer-events: auto; }
  .rail-toggle { display: grid; }
  .ws-back { display: inline-flex; }
  .ws.chat-mode { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
  .ws.chat-mode .rail-split { display: none; }
  .start-cards { gap: 14px; }
  .start-preview { height: 144px; }
}
@media (max-width: 860px) {
  .launcher { width: calc(100% - 32px); padding-top: 40px; }
  .launch-hero h1 { font-size: 34px; }
  .launch-form textarea { font-size: 15px; }
  .start-cards { grid-template-columns: 1fr; }
  .start-preview { height: 158px; }
  .ws { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
  .main-split { display: none; }
  .results {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(430px, 94vw);
    background: #f8fbfa;
    transform: translateX(102%);
    transition: transform .24s ease;
    z-index: 60;
    box-shadow: -16px 0 48px rgba(0, 0, 0, .16);
    border-left: 0;
    border-right: 0;
  }
  .results.open { transform: none; }
  .results-close { display: grid; }
  .ws-papers { display: inline-flex; }
  .thread { padding: 20px 18px 10px; }
  .composer { padding: 8px 14px 12px; }
  .review-card { padding: 21px 20px 17px; border-radius: 10px; }
  .review-title { font-size: 18px; }
  .review-body { font-size: 13.5px; line-height: 1.9; }
  .review-body h3 { font-size: 15px; }
  .review-content { font-size: 13.5px; line-height: 1.9; }
  .review-content h3 { font-size: 15px; }
  .review-foot { align-items: flex-start; }
  .ws-top { padding: 0 12px; }
  .analysis-top { flex-wrap: wrap; height: auto; min-height: 54px; padding: 8px 12px; gap: 8px; }
  .an-tabs { order: 3; flex: 1 1 100%; margin-left: 0; }
  .an-tabs .vswitch { margin-left: auto; }
  .analysis-top .ws-icon { display: none; }
  .style-select { display: none; }
  #write .vswitch { display: none; }
  .an-title b { max-width: 44vw; }
  .analysis-body { grid-template-columns: minmax(0, 1fr); }
  .an-side {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    height: 44vh; z-index: 40;
    border-left: 0; border-top: 1px solid var(--line-2);
    box-shadow: 0 -14px 40px rgba(0, 0, 0, .14);
    transform: translateY(102%);
    transition: transform .22s ease;
  }
  .an-side.open { transform: none; }
  .an-side-close { display: grid; }
  .online-dot { display: none; }
  .notes-body { grid-template-columns: minmax(0, 1fr); }
  .notes-outline { display: none; }
  .notes-doc { margin: 12px; padding: 24px 22px 30px; max-height: calc(100vh - 80px); }
  .write-body { grid-template-columns: minmax(0, 1fr); }
  .write-outline { display: none; }
  .write-doc-wrap { padding: 16px 14px 50px; }
  .write-doc { padding: 24px 22px 28px; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 14px; }
  .brand-name { font-size: 18px; }
  #ws-share { display: none; }
  .ws-papers {
    position: fixed; right: 12px; bottom: 94px;
    z-index: 7;
    height: 32px; padding: 0 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(6, 177, 144, .18);
    border-color: #bfe9df;
  }
  .ws-top { backdrop-filter: none; }
  .user-name, .org-tag, .user-chev { display: none; }
  .launcher { padding-top: 32px; }
  .launch-hero h1 { font-size: 29px; }
  .launch-hero > p { font-size: 12.5px; }
  .launch-form { padding: 13px 12px 9px; margin-top: 20px; }
  .launch-form textarea { font-size: 14px; min-height: 52px; }
  .start-section { margin-top: 40px; }
  .start-head { text-align: left; }
  .start-preview { height: 140px; }
  .recent-head { flex-wrap: wrap; }
  .recent-meta { width: 100%; margin-left: 0; }
  .recent-item { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 10px 8px; }
  .rt-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .rt-meta { grid-column: 1; white-space: normal; }
  .ws-crumb b { font-size: 12px; }
  .ws-back { width: 30px; padding: 0; justify-content: center; }
  .ws-back span { display: none; }
  .ws-project { display: none; }
  .ws-type { display: none; }
  .ws-top-actions .ws-icon:first-of-type { display: none; }
  .user-msg .bubble { max-width: 92%; }
  .review-card { padding: 18px 16px 15px; }
  .review-title { font-size: 17px; }
  .review-body { font-size: 13px; }
  .evidence { font-size: 11.5px; }
  .composer { padding: 7px 10px 10px; }
  .composer-box { padding: 8px 9px 6px; }
  .composer-hint { display: none; }
  .results-head { padding: 9px 10px 8px; }
  .select-btn { height: 30px; font-size: 11.5px; padding: 0 24px 0 9px; }
  .results-list { padding: 8px 8px 14px; }
  .analysis-top { gap: 7px; }
  .an-back { font-size: 10.5px; }
  .an-title b { max-width: 32vw; }
  .style-select { display: none; }
  .notes-doc { font-size: 13px; line-height: 1.9; }
  .notes-doc h1 { font-size: 20px; }
  .write-doc { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .review-enter, .map-node.added, .paper-row.flash { animation: none !important; }
}


/* ================= V4 阅读工作台：左目录 + 中间问答 + 右侧论文 ================= */
.reader-ws {
  height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 9px var(--chat-w, 380px);
  grid-template-areas: "rail paper split chat";
  background: #f4f8f7;
  overflow: hidden;
}
.reader-rail { grid-area: rail; }
.paper-pane { grid-area: paper; }
.reader-chat { grid-area: chat; }
.reader-split {
  grid-area: split;
  position: relative;
  min-height: 0;
  cursor: col-resize;
  background: linear-gradient(#fbfdfc 0 52px, #f4f8f7 52px);
  touch-action: none;
}
.reader-split::before {
  content: "";
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 1px; transform: translateX(-50%);
  background: var(--line-2);
  transition: background .12s, width .12s;
}
.reader-split::after {
  content: "";
  position: absolute; top: 50%; left: 50%;
  width: 3px; height: 36px;
  transform: translate(-50%, -50%);
  border-radius: 2px;
  background: #cbe5de;
  transition: background .12s, opacity .12s;
}
.reader-split:hover::before,
.reader-split:focus-visible::before,
body.resizing .reader-split::before { background: #7fd7c5; }
.reader-split:hover::after,
.reader-split:focus-visible::after,
body.resizing .reader-split::after { background: #0aa78c; }
.reader-split:focus-visible { outline: none; }
body.resizing { cursor: col-resize; user-select: none; }
.reader-rail {
  min-height: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #edf9f5 0%, #f5fbf9 48%, #f9fcfb 100%);
  border-right: 1px solid var(--line-2);
}
.rr-head { flex: none; height: 52px; display: flex; align-items: center; padding: 0 14px; border-bottom: 1px solid var(--line-2); }
.rr-back { font-size: 11px; color: var(--muted); }
.rr-back:hover { color: var(--teal); }
.rr-head h3 {
  margin: 0;
  font-size: 13px; line-height: 1.4; font-weight: 600; color: var(--ink-2);
}
.rr-meta { margin: 0; font-size: 10px; line-height: 1.6; color: var(--muted); }
.reader-outline { flex: 1; min-height: 0; overflow: auto; padding: 10px 8px 10px; }
.reader-outline .outline-item {
  width: 100%;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px; align-items: baseline;
  padding: 8px 9px;
  border-radius: 7px;
  border: 1px solid transparent;
  text-align: left;
  font-size: 14px; line-height: 1.45; color: var(--ink-2);
}
.reader-outline .outline-item:hover { background: rgba(255, 255, 255, .72); }
.reader-outline .outline-item.active {
  background: #fff; color: #0f7b6a; border-color: #cfece3;
  box-shadow: 0 6px 18px rgba(6, 177, 144, .07); font-weight: 500;
}
.reader-outline .outline-item .pg { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.reader-outline .outline-item.l2 { padding-left: 18px; font-size: 12px; color: var(--muted); }
.rr-foot { flex: none; display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-top: 1px solid var(--line-2); font-size: 10px; color: var(--muted); }

.reader-chat { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: #f4f8f7; }
.reader-chat-top {
  flex: none; height: 52px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid var(--line-2);
}
.rc-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px; }
.rc-title b { min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-actions { margin-left: auto; flex: none; display: flex; align-items: center; gap: 6px; }
.public-preview #close-btn { display: none; }
.rc-paper-btn { display: none; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid #d7f1ec; background: var(--mint); color: #157a6a; font-size: 10.5px; }

.reader-assist-tabs { flex: none; display: flex; gap: 3px; margin: 8px 14px 0; padding: 3px; background: rgba(255, 255, 255, .62); border-radius: 7px; }
.reader-assist-tabs button { flex: 1; height: 28px; border-radius: 5px; font-size: 11px; color: var(--muted); }
.reader-assist-tabs button:hover { color: var(--ink); }
.reader-assist-tabs button.on { background: #fff; color: #0b7a68; font-weight: 500; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.reader-assist-tabs b { margin-left: 3px; font-family: var(--mono); font-size: 10px; font-weight: 700; color: inherit; }
.reader-annot-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px 12px 12px; }
.ra-filters { flex: none; display: flex; gap: 4px; padding: 0 0 9px; }
.ra-filters button { height: 24px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; font-size: 10.5px; color: var(--muted); }
.ra-filters button:hover { background: #fff; color: var(--ink-2); }
.ra-filters button.on { background: #fff; color: #0b7a68; border-color: #cdeee2; }
.ra-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 7px; }
.ra-item { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; background: #fff; border: 1px solid var(--line-2); border-radius: 9px; cursor: pointer; transition: border-color .12s, box-shadow .12s, background .12s; }
.ra-item:hover { border-color: #cdeee2; box-shadow: 0 5px 16px rgba(6, 177, 144, .08); }
.ra-item.is-focus { background: #f1fbf7; border-color: #9adcc9; }
.ra-stripe { width: 3px; align-self: stretch; flex: none; border-radius: 2px; background: #f5c542; }
.ra-stripe.green { background: #73c86e; }
.ra-stripe.blue { background: #62a8ea; }
.ra-stripe.pink { background: #e58bb4; }
.ra-stripe.tag { background: #0aa78c; }
.ra-stripe.neutral { background: #b9c8c4; }
.ra-main { flex: 1; min-width: 0; }
.ra-top { display: flex; align-items: center; gap: 6px; }
.ra-quote { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; line-height: 1.6; color: var(--muted); }
.ra-quote.is-empty { color: var(--muted); }
.ra-actions { flex: none; display: flex; align-items: center; gap: 1px; opacity: 0; pointer-events: none; transition: opacity .12s; }
.ra-item:hover .ra-actions,
.ra-item:focus-within .ra-actions { opacity: 1; pointer-events: auto; }
@media (hover: none) {
  .ra-actions { opacity: 1; pointer-events: auto; }
}
.ra-icon { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 5px; color: var(--muted); }
.ra-icon svg { width: 13px; height: 13px; }
.ra-icon:hover { background: #eef7f4; color: #0b7a68; }
.ra-icon[data-annot-del]:hover { background: #fff4f2; color: #c04a3a; }
.ra-note { margin: 4px 0 0; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; }
.ra-inline-edit { margin-top: 6px; }
.ra-note-input { display: block; width: 100%; min-height: 62px; resize: vertical; padding: 7px 9px; border: 1px solid #bfe7da; border-radius: 8px; background: #fff; font-family: inherit; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); outline: none; }
.ra-tag-input { display: block; width: 100%; height: 32px; padding: 0 9px; border: 1px solid #bfe7da; border-radius: 8px; background: #fff; font-family: inherit; font-size: 11.5px; color: var(--ink-2); outline: none; }
.ra-note-input:focus, .ra-note-input:focus-visible { border-color: #6fbfa9; box-shadow: none; outline: none; }
.ra-tag-input:focus, .ra-tag-input:focus-visible { border-color: #6fbfa9; box-shadow: none; outline: none; }
.ra-edit-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.ra-edit-actions button { height: 24px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 5px; background: #fff; font-size: 10.5px; color: var(--ink-2); }
.ra-edit-actions button:hover { border-color: #bfe7da; color: #0b7a68; }
.ra-edit-actions .ra-save { border-color: transparent; background: linear-gradient(90deg, var(--g1), var(--g2)); color: #fff; }
.ra-edit-actions .ra-save:hover { color: #fff; filter: brightness(1.04); }
.ra-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; margin-top: 6px; }
.ra-meta { flex: none; font-size: 9.5px; color: var(--muted); }
.ra-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ra-tags span { padding: 1px 6px; border: 1px solid #cdeee2; border-radius: 999px; background: #eef9f5; font-size: 9px; line-height: 1.5; color: #0b7a68; }
.ra-tag-add { padding: 1px 6px; border: 1px dashed #bfe7da; border-radius: 999px; background: transparent; font-size: 9px; line-height: 1.5; color: #0b7a68; }
.ra-tag-add:hover { border-style: solid; background: #eef9f5; }
.ra-empty { padding: 28px 12px; text-align: center; font-size: 11px; line-height: 1.7; color: var(--muted); }
.qa-thread { flex: 1; min-height: 0; overflow: auto; padding: 24px 28px 12px; }
.chat-intro {
  max-width: 720px; margin: 0 auto 16px;
  padding: 20px 22px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(6, 177, 144, .05);
}
.ci-kicker { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }
.chat-intro h2 { margin: 7px 0; font-size: 22px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.chat-intro p { margin: 0 0 14px; font-size: 12px; line-height: 1.75; color: var(--muted); }
.ci-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ci-actions .ghost-btn { height: 30px; padding: 0 12px; font-size: 11.5px; }
.ci-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ci-suggest button {
  padding: 5px 9px;
  border: 1px solid var(--line-2); border-radius: 999px;
  background: #fff; font-size: 10.5px; color: var(--muted);
  text-align: left;
}
.ci-suggest button:hover { border-color: #bfe9df; color: var(--teal); }

.chat-msg { max-width: 720px; margin: 0 auto 14px; display: flex; gap: 9px; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user .bubble {
  max-width: 86%;
  padding: 10px 13px;
  background: linear-gradient(90deg, #eaf9f9, #f4fffb);
  border: 1px solid #d9f2ec;
  border-radius: 12px 12px 2px 12px;
  font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; color: var(--ink);
}
.chat-msg.ai { align-items: flex-start; }
.ai-avatar {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #fff; font-size: 11px;
  box-shadow: 0 4px 10px rgba(6, 177, 144, .2);
}
.ai-body { flex: 1; min-width: 0; }
.chat-answer {
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 13px 15px;
  font-size: 12.5px; line-height: 1.85; color: var(--ink-2);
  box-shadow: var(--shadow-sm);
}
.chat-cites { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chat-cites .cite { vertical-align: baseline; height: 20px; min-width: 0; padding: 0 6px; font-size: 9px; }
.chat-summary { background: #fff; border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-sm); overflow: hidden; }
.chat-msg.annotation { align-items: flex-start; }
.annot-avatar { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #e9f8f2; border: 1px solid #cdeee2; color: #0b7a68; font-size: 11px; }
.annot-body { flex: 1; min-width: 0; background: #fff; border: 1px solid var(--line-2); border-left: 2px solid #9adcc9; border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-sm); }
.annot-head { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted); }
.annot-head b { font-size: 11px; font-weight: 500; color: #0b7a68; }
.annot-head span { flex: 1; }
.annot-head button { padding: 2px 4px; border-radius: 4px; font-size: 10px; color: var(--muted); }
.annot-head button:hover { background: #fff4f2; color: #c04a3a; }
.annot-body blockquote { max-height: 58px; overflow: hidden; margin: 8px 0 6px; padding-left: 8px; border-left: 2px solid #d8efe6; font-size: 11px; line-height: 1.65; color: var(--muted); }
.annot-body p { margin: 0; font-size: 12px; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; }
.cs-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line-2);
  background: linear-gradient(90deg, #f2fbf8, #fbfefd);
  font-size: 11px; font-weight: 600; color: #117c6a;
}
.cs-head em { font-style: normal; font-size: 9px; font-weight: 500; color: var(--muted); }
.cs-body { padding: 12px 15px 14px; font-size: 12px; line-height: 1.85; color: var(--ink-2); }
.cs-body h4 { margin: 12px 0 3px; font-size: 10px; font-weight: 600; color: var(--teal); }
.cs-body h4:first-child { margin-top: 0; }
.cs-body p { margin: 0 0 6px; }

.reader-composer {
  flex: none;
  width: calc(100% - 56px); max-width: 720px;
  align-self: center;
  margin: 0 28px 16px;
  background: #fff;
  border: 1px solid #dceee8;
  border-radius: 10px;
  box-shadow: 0 8px 26px rgba(6, 177, 144, .08);
  padding: 9px 11px 7px;
}
.reader-composer:focus-within { border-color: #a7e0d3; box-shadow: 0 10px 30px rgba(6, 177, 144, .12), 0 0 0 3px rgba(6, 177, 144, .05); }
.reader-composer textarea {
  width: 100%; min-height: 56px; max-height: 140px;
  border: 0; outline: 0; resize: none; background: transparent;
  font-size: 12.5px; line-height: 1.6; padding: 2px 1px 5px;
}
.reader-composer textarea::placeholder { color: rgba(0, 0, 0, .3); }
.rc-quote {
  display: flex; align-items: flex-start; gap: 6px;
  margin-bottom: 7px; padding: 6px 8px;
  border-radius: 6px; background: var(--mint); border: 1px solid #d7f1ec;
  font-size: 10px; line-height: 1.5; color: #157a6a;
}
.rc-quote span { flex: 1; min-width: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-quote button { color: var(--muted); font-size: 10px; }
.rc-bar { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.reader-composer .composer-send { width: 30px; height: 30px; }

.paper-pane { min-width: 0; min-height: 0; padding: 0; display: flex; flex-direction: column; background: #f4f8f7; }
.paper-pane-top {
  flex: none; height: 52px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line-2);
  margin: 0;
}
.pp-back { display: none; font-size: 10.5px; color: var(--muted); }
.pp-back:hover { color: var(--teal); }
.paper-pane-top .view-tabs { margin: 0; }
.pp-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pp-nav, .pp-zoom { display: flex; align-items: center; gap: 6px; }
.pp-outline {
  width: 32px; height: 32px; border-radius: 7px;
  display: grid; place-items: center; color: var(--muted);
}
.pp-outline svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pp-outline:hover { background: var(--mint); color: var(--teal); }
.reader-ws.outline-collapsed .pp-outline { background: var(--mint); color: var(--teal); }
.pp-nav button, .pp-zoom button, .pp-focus {
  width: 32px; height: 32px; border-radius: 7px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 18px;
}
.pp-nav button:hover, .pp-zoom button:hover, .pp-focus:hover { background: var(--mint); color: var(--teal); }
.pp-focus { font-size: 20px; }
.pp-nav span, .pp-zoom span { min-width: 46px; text-align: center; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }
.reader-ws .paper-card {
  flex: 1; min-height: 0; display: flex;
  padding: 0; gap: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  cursor: default;
}
.reader-ws .paper-card:hover { box-shadow: none; }
.paper-scroll { flex: 1; overflow: auto; padding: 30px 20px 64px; scroll-behavior: smooth; }
.paper-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.paper-scroll::-webkit-scrollbar-track { background: transparent; }
.paper-scroll::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .07); border-radius: 3px; }
.paper-scroll::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .14); }
.paper-scroll .paper-head { max-width: 700px; margin: 0 auto; }
.reader-ws.paper-focus { grid-template-columns: 1fr; grid-template-areas: "paper"; }
.reader-ws.paper-focus .reader-rail,
.reader-ws.paper-focus .reader-chat,
.reader-ws.paper-focus .reader-split { display: none; }
.reader-ws.paper-focus .paper-pane { padding: 0; }
.reader-ws.paper-focus .pp-back { display: inline-flex; }
.reader-ws.paper-focus .pp-outline { display: none; }
@media (min-width: 1101px) {
  .reader-ws.outline-collapsed { grid-template-columns: 0 minmax(0, 1fr) 9px var(--chat-w, 380px); }
  .reader-ws.outline-collapsed .reader-rail { display: none; }
}

@media (max-width: 1100px) {
  .reader-ws { grid-template-columns: minmax(0, 1fr) 9px var(--chat-w, 380px); grid-template-areas: "paper split chat"; }
  .reader-rail { display: none; }
  .pp-outline { display: none; }
}
@media (max-width: 860px) {
  .reader-ws { grid-template-columns: minmax(0, 1fr); grid-template-areas: "chat"; }
  .reader-split { display: none; }
  .rc-paper-btn { display: inline-flex; }
  .pp-back { display: inline-flex; }
  .qa-thread { padding: 18px 14px 10px; }
  .chat-intro { padding: 16px; }
  .chat-intro h2 { font-size: 19px; }
  .reader-composer { width: calc(100% - 24px); margin: 0 12px 12px; }
  .paper-pane {
    position: fixed; inset: 0; z-index: 60;
    padding: 0; background: #f4f8f7;
    transform: translateX(102%);
    transition: transform .24s ease;
  }
  .paper-pane.open { transform: none; }
  .paper-pane-top { margin: 0; border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
  .paper-card { border-radius: 0; }
  .paper-scroll { padding: 22px 20px 50px; }
  .paper-scroll .paper-head h1 { font-size: 23px; }
  .paper { font-size: 14px; }
  .paper p { font-size: 14px; }
  .reader-ws.paper-focus .paper-pane { padding: 0; }
}
@media (max-width: 620px) {
  .reader-chat-top { padding: 0 12px; gap: 6px; }
  .rc-title b { max-width: 34vw; }
  .reader-actions { gap: 3px; }
  .chat-msg { gap: 7px; }
  .chat-msg.user .bubble { max-width: 92%; }
  .ci-actions .btn-gradient.small { padding: 0 10px; }
  .pp-nav span { min-width: 40px; }
  .pp-zoom { display: none; }
}
.chat-intro.is-hidden { display: none; }
.alt-modes { display: none; }

/* =====================================================================
 * V5 订阅跟踪：今日更新、资源市场、待办、论文库
 * 沿用 V4 的白卡 + 薄荷渐变，只补充订阅与市场侧的表达。
 * ===================================================================== */

.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 17px; height: 17px; padding: 0 5px; margin-left: 6px;
  border-radius: 999px;
  background: #ff7a45; color: #fff;
  font-size: 11px; font-weight: 500; line-height: 1;
}
.nav-soon { position: relative; color: var(--muted) !important; cursor: not-allowed; }
.nav-soon i { font-style: normal; font-size: 10px; color: #b08a2e; background: #fff8e6; border: 1px solid #f2dfa8; border-radius: 3px; padding: 0 4px; margin-left: 4px; }
.nav a { font-size: 15px; }

.v5-page { min-height: 100vh; padding: 34px 0 90px; }
.v5-wrap { width: min(1120px, calc(100% - 48px)); margin: 0 auto; }
.v5-wrap.wide { width: min(1320px, calc(100% - 48px)); }
.v5-kicker { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .16em; color: var(--teal); text-transform: uppercase; }
.v5-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.v5-head h1 { margin: 0; font-size: 32px; line-height: 1.25; font-weight: 500; color: #171b1a; letter-spacing: -.01em; }
.v5-sub { margin: 8px 0 0; font-size: 13.5px; line-height: 22px; color: var(--muted); }
.v5-block { margin-top: 44px; }
.v5-block-head { display: flex; align-items: baseline; gap: 10px; padding-left: 4px; margin-bottom: 12px; }
.v5-block-head h2 { margin: 0; font-size: 18px; font-weight: 500; }
.v5-block-head span { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; color: var(--muted); }
.v5-empty { padding: 40px 24px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--r); font-size: 13px; }

/* ---------- 今日更新 ---------- */
.digest-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.digest-head h1 { margin: 0; font-size: 34px; line-height: 1.28; font-weight: 500; letter-spacing: -.012em; }
.digest-head h1 em { font-style: normal; font-size: 1.12em; background: linear-gradient(120deg, #3fbf7f, #06b190); -webkit-background-clip: text; background-clip: text; color: transparent; }
.digest-actions { display: flex; align-items: center; gap: 10px; flex: none; margin-bottom: 8px; }
.digest-actions .btn-gradient { display: inline-flex; align-items: center; gap: 6px; }
.digest-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.digest-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 26px 0 16px; }
.dstat { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.dstat b { display: block; font-size: 26px; font-weight: 500; line-height: 1.1; color: #171b1a; font-family: var(--mono); }
.dstat span { display: block; margin-top: 5px; font-size: 13px; color: var(--ink-2); }
.dstat i { display: block; margin-top: 2px; font-style: normal; font-size: 11px; color: var(--muted); }
.dstat.warn b { color: #e2682f; }

.todo-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px; margin-bottom: 22px;
  background: linear-gradient(90deg, rgba(255, 245, 235, .95), rgba(255, 251, 240, .9));
  border: 1px solid #f3d9bd; border-radius: var(--r);
  color: #7a4a1f; text-decoration: none;
}
.kw-warning {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding: 10px 14px;
  background: #fff8e6; border: 1px solid #f2dfa8; border-radius: 10px;
  font-size: 12px; color: #7a6a3c;
}
.kw-warning a { margin-left: auto; flex: none; color: #8a6a12; font-weight: 500; }
.todo-banner:hover { border-color: #e9c49b; }
.tb-icon { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #f0863a; color: #fff; font-size: 12px; font-weight: 600; }
.tb-text { font-size: 13px; line-height: 20px; }
.tb-text b { display: block; font-size: 13.5px; color: #6b3c12; }
.tb-go { margin-left: auto; flex: none; font-size: 12.5px; color: #c4681f; font-weight: 500; }

.digest-projects { display: flex; align-items: center; gap: 4px; padding: 0; overflow-x: auto; scrollbar-width: none; }
.digest-projects::-webkit-scrollbar { display: none; }
.digest-projects button {
  flex: none; padding: 6px 12px; border-radius: 999px;
  border: 0; background: transparent;
  font-size: 13.5px; color: var(--ink-2); white-space: nowrap;
}
.digest-projects button b { font-family: var(--mono); font-size: 11px; margin-left: 4px; color: var(--muted); font-weight: 700; }
.digest-projects button.on { background: var(--mint); color: #0b7a68; font-weight: 500; box-shadow: inset 0 0 0 1px #bfe7da; }
.digest-projects button.on b { color: #0b7a68; }
.digest-tab-sep { width: 1px; height: 16px; flex: none; margin: 0 4px; background: var(--line-2); }
.digest-projects .digest-ignored-tab { display: inline-flex; align-items: center; }
.digest-toolbar { display: flex; align-items: center; gap: 12px; padding: 10px 0; margin-bottom: 10px; }
.digest-toolbar .digest-projects { flex: 1; min-width: 0; }
.digest-toolbar .digest-search {
  margin-left: auto; flex: none;
  width: 210px; height: 32px;
  display: flex; align-items: center; gap: 8px; padding: 0 11px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
}
.digest-search svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.4; }
.digest-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 12px; color: var(--ink); }
.digest-search input::placeholder { color: var(--muted); }
.digest-search:focus-within { border-color: #bfe7da; box-shadow: 0 0 0 3px rgba(10, 167, 140, .08); }
@media (max-width: 620px) {
  .digest-toolbar { flex-wrap: wrap; gap: 8px; }
  .plib-project-select { width: 100%; }
  .plib-project-toggle { width: 100%; justify-content: space-between; }
  .plib-project-menu { width: 100%; }
  .digest-toolbar .digest-search { width: 100%; margin: 0; }
}
.digest-note { margin-left: auto; font-size: 11.5px; color: var(--muted); }

.digest-list { display: flex; flex-direction: column; gap: 12px; }
.digest-empty { display: grid; place-items: center; min-height: 46vh; font-size: 13px; color: var(--muted); }
.digest-card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 18px 20px 14px; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.digest-card:hover { border-color: rgba(6, 177, 144, .35); box-shadow: 0 12px 32px rgba(6, 177, 144, .18), 0 3px 8px rgba(0, 0, 0, .05); }
.dc-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.src-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: #f5f8f7;
  font-size: 11.5px; color: var(--ink-2);
}
.src-badge.tone-green { background: #e6f6ee; border-color: #d4ede2; color: #0b7a52; }
.src-badge.tone-blue { background: #e8f1fb; border-color: #d8e6f8; color: #1d5f9e; }
.src-badge.tone-amber { background: #fdf3e3; border-color: #f3e3c5; color: #9a6212; }
.src-badge.tone-violet { background: #f0ecfb; border-color: #e4ddf7; color: #5b45a3; }
.src-badge.tone-rose { background: #fdecef; border-color: #f6dce2; color: #a13a54; }
.src-badge.tone-teal { background: #e5f7f5; border-color: #d3eeea; color: #0b7a6e; }
.src-badge.tone-ink { background: #eceff1; border-color: #dde3e6; color: #38424a; }
.dc-kind { padding: 1px 6px; border: 1px solid var(--line); border-radius: 3px; font-size: 10.5px; }
.dc-date { color: var(--muted); }
.dc-todo-tag { padding: 2px 7px; border: 0; border-radius: 4px; font-size: 10.5px; font-weight: 500; letter-spacing: .02em; color: #6b4a00; background: #ffd666; }
.dc-score-wrap { position: relative; width: 84px; margin-left: auto; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dc-score { position: relative; flex: none; width: 30px; height: 30px; display: grid; place-items: center; color: #0b7a68; }
.dc-score svg { position: absolute; inset: 0; width: 30px; height: 30px; transform: rotate(-90deg); }
.dc-score circle { fill: none; stroke-width: 2.8; }
.dc-score-track { stroke: #e7f4f1; }
.dc-score-arc { stroke: #0aa78c; stroke-linecap: round; }
.dc-score b { position: relative; font-family: var(--mono); font-size: 10px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.dc-sim { position: absolute; top: 31px; left: 50%; transform: translateX(-50%); font-size: 10.5px; line-height: 1.2; color: #0b7a68; white-space: nowrap; }
.digest-card.has-sim .dc-title-en { padding-right: 96px; }

.dc-title-en { margin: 10px 0 3px; font-size: 17px; line-height: 1.45; font-weight: 600; color: #171b1a; letter-spacing: -.005em; transition: color .15s; }
.digest-card:hover .dc-title-en,
.digest-card:active .dc-title-en { color: #0f7b6a; }
.dc-authors { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.dc-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin: 9px 0 0; }
.dc-reasons span { font-size: 10px; line-height: 1.6; color: #8a6400; background: #fff8e6; border: 1px solid #f1e0b8; border-radius: 4px; padding: 1px 7px; }
.dc-tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 9px 0 0; }
.dc-tag { font-family: inherit; padding: 1px 8px; border: 1px solid #cdeee2; border-radius: 999px; background: #eef9f5; color: #0b7a68; font-size: 10px; line-height: 1.6; }
.dc-tag:hover { background: #dff5ee; border-color: #9adcc9; }
.dc-tag.on { background: #d6f3ea; border-color: #7ccbb5; }
.dc-tag-add { font-family: inherit; padding: 1px 8px; border: 1px dashed #cdeee2; border-radius: 999px; background: #fff; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.dc-tag-add:hover { border-color: #9adcc9; color: #0b7a68; }
.digest-tag-filter { display: inline-flex; align-items: center; gap: 4px; height: 28px; margin-left: 6px; padding: 0 9px; border: 1px solid #cdeee2; border-radius: 999px; background: #eef9f5; color: #0b7a68; font-size: 10.5px; }
.digest-tag-filter b { font-weight: 400; opacity: .7; }
.digest-tag-filter:hover { background: #fff; }
.dc-abstract { position: relative; margin: 12px 0 0; padding: 11px 14px; background: var(--alt); border-radius: 6px; }
.dc-abs-text { margin: 0; font-size: 12.5px; line-height: 21px; color: #3a4442; max-height: 72px; overflow: hidden; }
.dc-abs-text.en { font-family: var(--sans); font-size: 13px; line-height: 21px; }
.dc-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.dc-access { font-size: 11.5px; color: var(--muted); }
.dc-access.open::before, .dc-access.locked::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; }
.dc-access.open::before { background: #35b57e; }
.dc-access.locked::before { background: #e6b800; }
.dc-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.dc-src-link { font-size: 12px; color: var(--ink-2); padding: 5px 8px; border-radius: 6px; }
.dc-src-link:hover { background: rgba(0, 0, 0, .04); }
.dc-actions > button { font-size: 12px; color: var(--ink-2); padding: 5px 10px; border-radius: 6px; }
.dc-actions > button:hover { background: rgba(0, 0, 0, .04); }
.dc-actions > button.on { color: #0b7a68; background: var(--mint); }
.dc-actions .btn-gradient { color: #fff; padding: 5px 14px; }
.dc-actions .btn-gradient:hover { background: linear-gradient(135deg, var(--g1), var(--g2)); }
.dc-foot-left { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.dc-sub-btn { font-size: 12px; color: var(--ink-2); padding: 5px 10px; border-radius: 6px; }
.dc-sub-btn:hover { background: rgba(0, 0, 0, .04); }
.dc-actions > button.dc-ignore-btn {
  padding: 5px 14px; border-radius: 6px;
  background: #fdf1f0; color: #c04a3a;
  box-shadow: inset 0 0 0 1px #f2cdc8;
}
.dc-actions > button.dc-ignore-btn:hover { background: #fbe7e4; color: #b23c2e; }
.dc-actions > button.dc-ignore-btn.is-restore {
  background: #fffad6; color: #a28400;
  box-shadow: inset 0 0 0 1px #f3e494;
}
.dc-actions > button.dc-ignore-btn.is-restore:hover { background: #fff2d4; color: #8f7500; }
.dc-actions > button.dc-lib-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 14px; border-radius: 6px;
  background: var(--mint); color: #0b7a68;
  box-shadow: inset 0 0 0 1px #bfe7da;
  font-size: 11.5px;
}
.dc-actions > button.dc-lib-btn:hover { background: var(--mint); color: #0b5f52; box-shadow: inset 0 0 0 1px #9adcc9; filter: none; }

.home-sources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.home-source { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); text-align: left; box-shadow: var(--shadow-sm); }
.home-source:hover { border-color: rgba(6, 177, 144, .3); }
.src-letter { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 7px; background: #eef2f5; color: #3d4a52; font-size: 13px; font-weight: 600; }
.src-letter.sm { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; }
.hs-main { min-width: 0; }
.hs-main b { display: block; font-size: 13px; font-weight: 500; }
.hs-main i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.hs-count { margin-left: auto; font-family: var(--mono); font-size: 12px; color: #0b7a68; }
.hs-sync { font-size: 10.5px; color: var(--muted); }

/* ---------- 资源市场 ---------- */
.market-bar { display: flex; align-items: center; gap: 16px; padding: 0 0 8px; }
.market-tabs { display: flex; align-items: center; gap: 4px; }
.market-tabs button { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); }
.market-tabs button b { font-family: var(--mono); font-size: 11px; margin-left: 4px; color: var(--muted); }
.market-tabs button.on { background: var(--mint); color: #0b7a68; font-weight: 500; box-shadow: inset 0 0 0 1px #bfe7da; }
.market-tabs button.on b { color: #0b7a68; }
.market-search { margin-left: auto; width: 250px; height: 34px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.market-search svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 1.4; }
.market-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 12.5px; }

.market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; margin-top: 12px; }
.market-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.market-grid.flows { grid-template-columns: 1fr; }
.src-card, .flow-card { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px 16px 12px; box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.src-card:hover, .flow-card:hover { border-color: rgba(6, 177, 144, .32); box-shadow: 0 8px 26px rgba(6, 177, 144, .08); transform: translateY(-1px); }
.src-card header, .flow-card header { display: flex; align-items: center; gap: 10px; }
.src-id { min-width: 0; }
.src-id b { display: block; font-size: 14.5px; font-weight: 600; }
.src-id span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.sub-state { margin-left: auto; flex: none; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.sub-state.on { color: #0b7a68; border-color: #bfe7da; background: #f1fbf7; }
.src-desc { margin: 12px 0 0; font-size: 12.5px; line-height: 20px; color: var(--ink-2); }
.src-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.src-meta span { font-size: 10.5px; color: var(--muted); background: #f6f8f8; border-radius: 4px; padding: 2px 6px; }
.src-card footer { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.flow-chip { font-size: 10.5px; color: #59636a; background: #f3f6f7; border: 1px solid #e4eaec; border-radius: 4px; padding: 2px 6px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-btn { margin-left: auto; font-size: 11.5px; color: #0b7a68; background: #fff; border: 1px solid #bfe7da; border-radius: 6px; padding: 4px 12px; }
.sub-btn:hover { background: #f1fbf7; }
.sub-btn.on { color: var(--muted); border-color: var(--line); }

.flow-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 7px; background: linear-gradient(135deg, #e8fbf2, #d9f4f1); color: #0b7a68; font-family: var(--mono); font-size: 9px; font-weight: 600; }
.pub-badge { margin-left: auto; flex: none; font-style: normal; font-size: 10.5px; border-radius: 999px; padding: 2px 8px; }
.pub-badge.published { color: #0b7a68; background: #f1fbf7; border: 1px solid #bfe7da; }
.pub-badge.draft { color: #8a6a12; background: #fdf8e8; border: 1px solid #f0e0b0; }
.flow-steps { margin: 12px 0 0; padding-left: 18px; font-size: 12px; line-height: 20px; color: var(--ink-2); }
.flow-steps li { margin-bottom: 3px; }
.flow-steps li.more { list-style: none; color: var(--muted); font-size: 11px; }
.flow-foot { display: flex; gap: 14px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-2); font-size: 10.5px; color: var(--muted); }

.market-side { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 14px; }
.side-block { background: #fff; border: 1px solid var(--line-2); border-radius: var(--r); padding: 14px 14px 12px; box-shadow: var(--shadow-sm); }
.side-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.side-head h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.side-head span { font-size: 10.5px; color: var(--muted); }
.my-subs { display: flex; flex-direction: column; gap: 2px; }
.my-sub { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: 6px; text-align: left; }
.my-sub:hover { background: var(--alt); }
.my-sub b { display: block; font-size: 12.5px; font-weight: 500; }
.my-sub i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.ms-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: #35b57e; }
.kw-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.kw-cloud span { font-size: 11px; color: var(--ink-2); background: #f5f7f7; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px; }
.kw-cloud span.hot { color: #0b7a68; background: #f1fbf7; border-color: #cdeee2; }
.side-note { margin: 10px 0 0; font-size: 11px; line-height: 18px; color: var(--muted); }

/* ---------- 详情抽屉 ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(16, 26, 24, .28); z-index: 60; animation: fadeIn .18s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 92vw); background: #fff; z-index: 61; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(0, 0, 0, .12); animation: drawerIn .22s ease; }
@keyframes drawerIn { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.drawer-kicker { font-family: var(--mono); font-size: 10px; letter-spacing: .14em; color: var(--teal); text-transform: uppercase; }
.drawer-head h2 { margin: 6px 0 0; font-size: 20px; font-weight: 500; }
.drawer-x { width: 26px; height: 26px; border-radius: 50%; color: var(--muted); }
.drawer-x:hover { background: rgba(0, 0, 0, .05); }
.drawer-body { flex: 1; overflow: auto; padding: 6px 22px 22px; }
.drawer-foot { display: flex; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
.drawer-foot > * { flex: 1; justify-content: center; }
.dr-section { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.dr-section:last-child { border-bottom: 0; }
.dr-section h4 { margin: 0 0 10px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.dr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; padding: 4px 0; }
.dr-row > span { color: var(--muted); }
.dr-row b { font-weight: 500; }
.dr-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.dr-steps li { display: flex; gap: 9px; padding: 6px 0; font-size: 12.5px; line-height: 20px; color: var(--ink-2); }
.dr-steps li i { flex: none; width: 18px; height: 18px; margin-top: 1px; display: grid; place-items: center; border-radius: 50%; background: var(--mint); color: #0b7a68; font-style: normal; font-family: var(--mono); font-size: 10px; }
.dr-flow { display: block; width: 100%; text-align: left; padding: 10px 12px; margin-bottom: 12px; background: var(--alt); border: 1px solid var(--line-2); border-radius: 6px; }
.dr-flow b { display: block; font-size: 12.5px; }
.dr-flow span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.dr-io { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dr-io > div > span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.dr-io em { display: inline-block; font-style: normal; font-size: 11px; background: #f5f7f7; border-radius: 4px; padding: 2px 6px; margin: 0 4px 4px 0; }
.dr-users { display: flex; flex-wrap: wrap; gap: 6px; }
.dr-users button { font-size: 11.5px; color: #0b7a68; border: 1px solid #cdeee2; background: #f1fbf7; border-radius: 999px; padding: 2px 9px; }
.dr-note { font-size: 12px; line-height: 20px; color: var(--ink-2); background: var(--alt); border-radius: 6px; padding: 10px 12px; }
.dr-muted { font-size: 12px; color: var(--muted); }

/* ---------- 论文库 ---------- */
.lib-bar { display: flex; align-items: center; gap: 16px; padding: 0 0 8px; }
.lib-tabs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.lib-tabs button { padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: var(--ink-2); }
.lib-tabs button b { font-family: var(--mono); font-size: 11px; margin-left: 4px; font-weight: 700; color: var(--muted); }
.lib-tabs button.on b { color: #0b7a68; }
.lib-tabs button.on { background: var(--mint); color: #0b7a68; font-weight: 500; box-shadow: inset 0 0 0 1px #bfe7da; }
.lib-tab-sep { width: 1px; height: 16px; flex: none; margin: 0 4px; background: var(--line-2); }
.lib-bar .filters-toggle {
  height: 34px; padding: 0 14px;
  border-radius: 999px; border-color: var(--line);
  font-size: 12.5px;
}
.lib-list { display: flex; flex-direction: column; margin-top: 0; }
.lib-row { display: flex; align-items: center; gap: 14px; padding: 14px 10px; border-bottom: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; }
.lib-row:hover .lib-title b { color: #0f7b6a; }
.lib-main { min-width: 0; flex: 1; }
.lib-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lib-title b { min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-annot-link { flex: none; padding: 1px 7px; border: 1px solid #c9e0fb; border-radius: 999px; background: #eef5ff; color: #2f6fbe; font-size: 10px; }
.lib-annot-link:hover { background: #fff; }
.lib-dialog-tag { flex: none; padding: 1px 7px; border: 1px solid #c9e0fb; border-radius: 999px; background: #eef5ff; color: #2f6fbe; font-size: 10px; white-space: nowrap; }
.lib-meta { margin-top: 3px; font-size: 11px; color: var(--muted); }
.lib-project { margin-top: 4px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.lib-project b { font-weight: 600; color: var(--ink-2); }
.lib-status { flex: none; font-size: 10.5px; border-radius: 999px; padding: 2px 8px; color: #0b7a68; background: #e9f8f2; }
.lib-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.lib-actions button { font-size: 11.5px; padding: 4px 10px; border-radius: 6px; color: var(--ink-2); }
.lib-actions button:hover { background: rgba(0, 0, 0, .04); }
.lib-row .lib-actions { opacity: 0; pointer-events: none; transition: opacity .12s; }
.lib-row:hover .lib-actions,
.lib-row:focus-within .lib-actions { opacity: 1; pointer-events: auto; }
.lib-tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: 100%; margin-left: 6px; vertical-align: middle; }
.lib-tags span { font-size: 10px; color: #0b7a68; background: #eef9f5; border: 1px solid #cdeee2; border-radius: 999px; padding: 1px 7px; }
.lib-actions .lib-tag-action { border: 1px dashed #cdeee2; color: #0b7a68; }
.lib-actions .lib-tag-action:hover { border-style: solid; background: #eef9f5; }
.lib-row.is-tag-open .lib-actions { opacity: 1; pointer-events: auto; }
.lib-row.is-tag-open .lib-tag-action { border-style: solid; background: #eef9f5; }
.doc-tag-pop {
  position: fixed; z-index: 66; width: 280px; max-width: calc(100vw - 24px);
  padding: 10px 10px 9px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 18px 48px rgba(10, 40, 34, .18);
}
.dtp-selected { display: flex; flex-wrap: wrap; gap: 5px; min-height: 22px; }
.dtp-selected > span { display: inline-flex; align-items: center; gap: 2px; padding: 2px 4px 2px 8px; border: 1px solid #cdeee2; border-radius: 999px; background: #eef9f5; font-size: 10.5px; color: #0b7a68; }
.dtp-selected > span button { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 50%; font-size: 11px; line-height: 1; color: #0b7a68; opacity: .65; }
.dtp-selected > span button:hover { opacity: 1; background: #fff; color: #c04a3a; }
.dtp-empty { font-size: 10.5px; color: var(--muted); }
.dtp-input-wrap { margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--line-2); }
.dtp-input-wrap input { width: 100%; height: 30px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-family: inherit; font-size: 11.5px; color: var(--ink); outline: none; }
.dtp-input-wrap input:focus, .dtp-input-wrap input:focus-visible { border-color: #6fbfa9; box-shadow: none; outline: none; }
.dtp-recent { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.dtp-recent button { padding: 2px 8px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; font-size: 10px; color: var(--ink-2); }
.dtp-recent button:hover { border-color: #bfe7da; background: #f4fbf8; color: #0b7a68; }
.lib-note { margin-top: 5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--ink-2); }
.lib-note b { margin-right: 5px; font-weight: 500; color: var(--muted); }
.plib-panel.lib-pool-panel { background: transparent; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.plib-own-row { cursor: default; }
.plib-own-row:hover .lib-title b { color: inherit; }

/* ---------- 项目资料库 ---------- */
.plib-toolbar { padding-top: 0; margin-bottom: 12px; }
.plib-project-select { position: relative; flex: none; }
.plib-project-toggle {
  height: 32px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: 12.5px; color: var(--ink-2);
}
.plib-project-toggle:hover { border-color: #bfe7da; color: #0b7a68; }
.plib-project-toggle svg {
  width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .15s;
}
.plib-project-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.plib-project-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20;
  min-width: 220px; padding: 5px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 14px 34px rgba(13, 82, 74, .16);
}
.plib-project-menu button {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 7px 10px; border-radius: 7px;
  font-size: 12.5px; color: var(--ink-2); text-align: left;
}
.plib-project-menu button:hover { background: #f4fbf8; color: #0b7a68; }
.plib-project-menu button.on { background: var(--mint); color: #0b7a68; font-weight: 500; }
.plib-project-menu b { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--muted); }
.plib-project-menu button.on b { color: #0b7a68; }
.plib-panel { overflow: hidden; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-sm); }
.plib-panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.plib-panel-title { display: flex; align-items: baseline; gap: 7px; }
.plib-panel-title b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.plib-panel-title span { font-size: 10.5px; color: var(--muted); }
.plib-panel-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.plib-mini { height: 28px; padding: 0 10px; border-radius: 6px; font-size: 10.5px; }
.plib-filters { margin-left: auto; display: flex; align-items: center; gap: 3px; }
.plib-filters button { height: 26px; padding: 0 9px; border-radius: 999px; font-size: 10.5px; color: var(--muted); }
.plib-filters button b { margin-left: 3px; font-family: var(--mono); font-size: 10px; font-weight: 700; color: inherit; }
.plib-filters button:hover { background: #f4f8f7; color: var(--ink-2); }
.plib-filters button.on { background: var(--mint); color: #0b7a68; font-weight: 500; box-shadow: inset 0 0 0 1px #bfe7da; }
.plib-paper-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); transition: background .12s; }
.plib-paper-row:last-child, .plib-file-row:last-child { border-bottom: 0; }
.plib-paper-row[data-lib-open] { cursor: pointer; }
.plib-paper-row[data-lib-open]:hover { background: #f8fcfb; }
.plib-paper-card { padding: 16px 18px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; transition: background .12s; }
.plib-paper-card:last-child { border-bottom: 0; }
.plib-paper-card:hover { background: #fbfdfc; }
.plib-paper-card:hover .dc-title-en { color: #0f7b6a; }
.plib-paper-card.is-read .dc-title-en { color: #0f7b6a; }
.plib-paper-card .dc-top { flex-wrap: wrap; }
.plib-paper-card .plib-status { margin-left: 2px; }
.plib-paper-card .dc-title-en { margin-top: 9px; font-size: 16.5px; }
.plib-paper-card .dc-foot { margin-top: 11px; }
.plib-paper-main { flex: 1; min-width: 0; }
.plib-paper-title { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 12.5px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.plib-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plib-paper-zh { margin-top: 2px; font-size: 11px; line-height: 1.55; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plib-paper-meta { margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.plib-status { flex: none; padding: 1px 6px; border-radius: 999px; font-size: 9.5px; font-weight: 500; }
.plib-status.unread { color: #9a6a17; background: #fff7e6; }
.plib-status.read { color: #0b7a68; background: #e9f8f2; }
.plib-status.own { color: #5c6866; background: #f2f4f4; }
.plib-row-actions { flex: none; display: flex; align-items: center; gap: 3px; opacity: 0; transition: opacity .12s; }
.plib-paper-row:hover .plib-row-actions,
.plib-file-row:hover .plib-row-actions,
.plib-row-actions:focus-within { opacity: 1; }
.plib-row-actions button { padding: 4px 7px; border-radius: 5px; font-size: 10.5px; color: var(--muted); }
.plib-row-actions button:hover { background: #eef7f4; color: #0b7a68; }
.plib-file-row { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line-2); }
.plib-file-row:hover { background: #f8fcfb; }
.plib-file-main { flex: 1; min-width: 0; }
.plib-file-title { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: inherit; font-size: 12px; font-weight: 500; color: var(--ink); }
.plib-file-title:hover { color: #0b7a68; }
.plib-file-meta { margin-top: 3px; font-size: 10.5px; color: var(--muted); }
.plib-file-updated { flex: none; width: 116px; text-align: right; }
.plib-file-updated span { display: block; font-size: 9px; color: rgba(0, 0, 0, .35); }
.plib-file-updated b { display: block; margin-top: 2px; font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.plib-file-actions { flex: none; display: flex; align-items: center; gap: 2px; }
.plib-file-actions button { position: relative; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--muted); }
.plib-file-actions button:hover { background: #eef7f4; color: #0b7a68; }
.plib-file-actions button[data-lib-file-del]:hover { background: #fff1ee; color: #c04a3a; }
.plib-file-actions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.plib-file-actions button::after { content: attr(data-tip); position: absolute; right: 0; bottom: calc(100% + 7px); padding: 4px 7px; border-radius: 4px; background: #2f2f2f; color: #fff; font-size: 10px; line-height: 1.2; white-space: nowrap; opacity: 0; transform: translateY(2px); pointer-events: none; transition: opacity .12s ease, transform .12s ease; box-shadow: 0 3px 10px rgba(0, 0, 0, .18); z-index: 3; }
.plib-file-actions button::before { content: ""; position: absolute; right: 8px; bottom: calc(100% + 3px); border: 4px solid transparent; border-top-color: #2f2f2f; opacity: 0; pointer-events: none; transition: opacity .12s ease; z-index: 3; }
.plib-file-actions button:hover::after,
.plib-file-actions button:focus::after { opacity: 1; transform: translateY(0); }
.plib-file-actions button:hover::before,
.plib-file-actions button:focus::before { opacity: 1; }
.plib-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 38px 16px; text-align: center; font-size: 11px; color: var(--muted); }
.plib-empty b { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.plib-empty-link { margin-top: 4px; font-size: 11px; color: #0b7a68; }
.plib-empty-link:hover { text-decoration: underline; }
.plib-empty-btn { margin-top: 4px; height: 30px; padding: 0 12px; border: 1px solid #bfe7da; border-radius: 6px; background: var(--mint); color: #0b7a68; font-size: 11px; }

/* 加入资料库：卡片入口与选择器 */
.dc-actions .dc-lib-btn { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; }
.dc-lib-btn svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.libpick-modal { display: flex; flex-direction: column; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 60px); }
.libpick-list { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 4px; padding: 8px 12px 12px; }
.libpick-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; text-align: left; transition: background .12s, border-color .12s; }
.libpick-row:hover:not(:disabled) { background: #f7fcfb; border-color: #d9f0e8; }
.libpick-row.on { background: var(--mint); border-color: #bfe7da; }
.libpick-row:disabled { opacity: .55; cursor: default; }
.libpick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.libpick-main b { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.libpick-main i { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-style: normal; font-size: 10.5px; color: var(--muted); }
.libpick-mark { flex: none; font-size: 10px; font-weight: 600; color: #0b7a68; }
.libpick-mark svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.libpick-row.on .libpick-mark { display: grid; place-items: center; width: 18px; height: 18px; background: transparent; color: #0aa78c; }
.libpick-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.libpick-foot .btn-gradient.small:disabled { opacity: .45; cursor: default; }
.mine-modal { display: flex; flex-direction: column; width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 60px); }
.mine-list { flex: 1; min-height: 0; overflow: auto; padding: 4px 16px 12px; }
.mine-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.mine-row:last-child { border-bottom: 0; }
.mine-main { flex: 1; min-width: 0; }
.mine-main b { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.mine-main i { display: block; margin-top: 2px; font-style: normal; font-size: 10.5px; color: var(--muted); }
.mine-row .ghost-btn:disabled { opacity: .5; cursor: default; }
.mine-foot { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line-2); }
.mine-hint { margin-right: auto; font-size: 10.5px; color: var(--muted); }
.pm-field { display: flex; flex-direction: column; gap: 6px; }
.pm-field > span { font-size: 11.5px; color: var(--muted); }
.pm-field input,
.pm-field select,
.pm-field textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font-family: inherit; font-size: 12px; outline: none; }
.pm-field textarea { min-height: 96px; resize: vertical; line-height: 1.7; }
.pm-field input:focus,
.pm-field select:focus,
.pm-field textarea:focus { border-color: #bfe7da; box-shadow: 0 0 0 3px rgba(10, 167, 140, .08); }
.paper-meta-foot { display: flex; align-items: center; gap: 8px; padding: 12px 22px 16px; border-top: 1px solid var(--line-2); }
.project-create-modal .paper-meta-foot { justify-content: flex-end; border-top: 0; }
.project-create-modal header { border-bottom: 0; }
.project-create-modal { width: min(460px, calc(100vw - 32px)); }
.project-create-body { display: flex; flex-direction: column; gap: 12px; padding: 16px 22px 18px; }
.project-create-extra { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; }
#project-create-paper.is-placeholder,
#project-create-library.is-placeholder { color: var(--muted); }
.pc-folders { display: flex; flex-direction: column; gap: 6px; }
.pc-folders-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-folders-title { font-size: 11.5px; color: var(--muted); }
.pc-folder-pick {
  width: 100%; display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 10px;
  border: 1px dashed #cfe3dc; border-radius: 9px; background: #fbfdfc;
  font-family: inherit; font-size: 12.5px; color: var(--muted); text-align: left; cursor: pointer;
}
.pc-folder-pick:hover, .pc-folder-pick:focus-within { border-color: #9adcc9; background: #f7fdfb; }
.pc-folder-pick.has-folder { border-style: solid; border-color: #cdeee2; background: #f7fdfb; color: var(--ink); }
.pc-folder-icon { flex: none; display: grid; place-items: center; width: 16px; height: 16px; color: #0b7a68; }
.pc-folder-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pc-folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-folder-chev {
  flex: none; width: 14px; height: 14px; pointer-events: none;
  fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.pm-hint { margin-right: auto; font-size: 10.5px; color: var(--muted); }
.file-rename-modal { width: min(460px, calc(100vw - 32px)); }
.file-rename-body { padding: 16px 22px 20px; }


/* ---------- 阅读页：语言切换与紧凑排版 ---------- */
.pp-lang { display: flex; padding: 2px; background: #f3f6f6; border-radius: 999px; }
.pp-lang button { padding: 3px 10px; border-radius: 999px; font-size: 11.5px; color: var(--muted); }
.pp-lang button.on { background: #fff; color: #0b7a68; box-shadow: var(--shadow-sm); font-weight: 500; }
.ci-abs { margin: 12px 0 4px; padding: 10px 12px; background: var(--alt); border-radius: 6px; }
.ci-abs b { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.ci-abs p { margin: 0; font-size: 12.5px; line-height: 20px; color: #3a4442; }

/* 阅读区：更像论文本身——段落不留空行、行距统一、标题不放大 */
.v5 .paper { max-width: 720px; font-size: 13.5px; }
.v5 .paper p { margin: 0; line-height: 1.72; text-align: justify; hyphens: auto; text-indent: 1.5em; }
.v5 .paper.lang-en p { text-indent: 0; }
.v5 .paper h2 { margin: 24px 0 4px; font-size: 1em; line-height: 1.72; font-weight: 600; letter-spacing: 0; }
.v5 .paper h2 .no { font-size: 9.5px; margin-right: 7px; }
.v5 .paper h3 { margin: 18px 0 3px; font-size: 1em; line-height: 1.72; font-weight: 600; }
.v5 .paper .caption { margin: 2px 0 10px; font-size: 10.5px; line-height: 1.5; }
.v5 .paper .figure { margin: 12px 0 4px; }
.v5 .paper .ref { margin-bottom: 1px; font-size: 10.5px; line-height: 1.72; }
.v5 .paper p .pchip { opacity: .35; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .market-layout { grid-template-columns: 1fr; }
  .market-side { position: static; flex-direction: row; }
  .market-side > * { flex: 1; }
  .home-sources { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .v5-wrap, .v5-wrap.wide { width: calc(100% - 28px); }
  .v5-page { padding-top: 20px; }
  .digest-head { flex-direction: column; align-items: flex-start; }
  .digest-head h1 { font-size: 26px; }
  .digest-stats { grid-template-columns: repeat(2, 1fr); }
  .market-grid { grid-template-columns: 1fr; }
  .market-side { flex-direction: column; }
  .lib-title { flex-direction: column; align-items: flex-start; gap: 1px; }
  .lib-title b { width: 100%; }
  .nav a { padding: 0 8px; font-size: 13.5px; }
  .nav-soon i { display: none; }
  .user-name, .org-tag, .user-chev { display: none; }
  .home-sources { grid-template-columns: 1fr; }
}

/* =====================================================================
 * V5 资源拆分：Skill / SOP、运行记录、编辑器
 * ===================================================================== */

.head-actions { display: flex; align-items: center; gap: 8px; }
.head-title { display: flex; flex-direction: column; align-items: flex-start; }
.head-title-row { display: flex; align-items: center; gap: 12px; }
.page-back {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center;
  border-radius: 9px; color: var(--ink-2);
  transition: background .14s, color .14s;
}
.page-back:hover { background: rgba(6, 177, 144, .08); color: #0b7a68; }
.page-back svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; }
.head-actions .btn-gradient { display: inline-flex; align-items: center; gap: 6px; }
.head-actions .btn-gradient svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.sub-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "head head" "kw src";
  column-gap: 26px; row-gap: 14px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.sub-card:hover { border-color: rgba(6, 177, 144, .35); box-shadow: 0 12px 32px rgba(6, 177, 144, .18), 0 3px 8px rgba(0, 0, 0, .05); }
.sub-card.is-off { background: #fafbfb; }
.sub-card.is-off > .sub-section { opacity: .45; filter: grayscale(.35); }
.sub-card.is-off .pcard-head h2 { color: var(--muted); }
.sub-card > .pcard-head { grid-area: head; }
.sub-card .pcard-head h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; }
.card-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.card-icon {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; color: var(--muted);
  opacity: 0; pointer-events: none;
  transition: opacity .15s, background .15s, color .15s;
}
.sub-card:hover .card-icon,
.sub-card:focus-within .card-icon { opacity: 1; pointer-events: auto; }
.card-icon:hover { color: #0b7a68; background: rgba(6, 177, 144, .08); }
.card-icon[data-card-act="delete"]:hover { color: #c04a3a; background: #fff4f2; }
.card-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pcard-pause {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 12px;
  border: 1px solid #f3e494; border-radius: 999px;
  background: #fffad6; color: #a28400;
  font-size: 11.5px; font-weight: 500;
  transition: background .15s, border-color .15s, color .15s;
}
.pcard-pause svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pcard-pause:hover { background: #fff5b8; border-color: #ecd97e; }
.pcard-pause.is-off { background: #e9f8f2; border-color: #9adcc9; color: #0b6f60; }
.pcard-pause.is-off:hover { background: #dcf4ea; border-color: #6fbfa9; }
.sub-card.is-off .pcard-pause { opacity: 1; }
.sub-card > .sub-section { grid-area: kw; margin-top: 0; align-self: start; }
.sub-card > .sub-section + .sub-section {
  grid-area: src;
  margin-top: 0; padding: 0 6px 0 26px;
  border-top: 0; border-left: 1px solid var(--line-2);
  min-height: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .26) transparent;
}
.sub-card > .sub-section + .sub-section::-webkit-scrollbar { width: 8px; }
.sub-card > .sub-section + .sub-section::-webkit-scrollbar-track { background: transparent; }
.sub-card > .sub-section + .sub-section::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .26); border-radius: 999px; }
.sub-card > .sub-section + .sub-section::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .38); }
.sub-card > .sub-section + .sub-section .sub-section-head {
  position: sticky; top: 0; z-index: 1;
  background: #fff; padding-top: 2px;
}
.sub-section { margin-top: 16px; }
.sub-section + .sub-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.sub-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sub-section-head h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--ink); }
@media (max-width: 900px) {
  .sub-card { display: block; }
  .sub-card > .sub-section { margin-top: 16px; }
  .sub-card > .sub-section + .sub-section {
    margin-top: 22px; padding: 18px 0 0;
    border-top: 1px solid var(--line-2); border-left: 0;
    overflow: visible;
  }
}

.pipeline-bar {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0 0; padding: 10px 14px;
  background: linear-gradient(90deg, #f2fbf7, #f6fbfa);
  border: 1px solid #d8efe6; border-radius: var(--r);
  cursor: pointer; user-select: none;
}
.pipeline-bar:hover { border-color: #b9e4d6; }
.pb-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #35b57e; box-shadow: 0 0 0 3px rgba(53, 181, 126, .14); }
.pipeline-bar b { font-size: 12.5px; font-weight: 600; }
.pb-meta { font-size: 11.5px; color: var(--muted); }
.pb-stat { font-size: 10.5px; color: var(--ink-2); background: rgba(255, 255, 255, .8); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 6px; }
.pb-stat.warn { color: #a3572a; background: #fff6ec; border-color: #f3ddc6; }
.pb-go { margin-left: auto; font-size: 11.5px; color: #0b7a68; }

.market-grid.skills, .market-grid.sops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1400px) { .market-grid.skills { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.skill-card, .sop-card {
  background: #fff; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 16px 16px 12px; box-shadow: var(--shadow-sm); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s;
  display: flex; flex-direction: column;
}
.skill-card:hover, .sop-card:hover { border-color: rgba(6, 177, 144, .32); box-shadow: 0 8px 26px rgba(6, 177, 144, .08); transform: translateY(-1px); }
.skill-card header, .sop-card header { display: flex; align-items: center; gap: 10px; }
.res-icon {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center;
  border-radius: 7px; background: linear-gradient(135deg, #e8fbf2, #d9f4f1);
  color: #0b7a68; font-family: var(--mono); font-size: 9.5px; font-weight: 600;
}
.res-icon.sop { background: linear-gradient(135deg, #eef0fd, #e3f3fb); color: #3c5aa8; }
.res-icon.sm { width: 22px; height: 22px; border-radius: 6px; font-size: 8px; }
.owner-chip { font-size: 10.5px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px; }
.owner-chip.me { color: #0b7a68; border-color: #cdeee2; background: #f1fbf7; }
.mini-btn { margin-left: auto; font-size: 11px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 5px; padding: 2px 8px; }
.mini-btn:hover { background: rgba(0, 0, 0, .04); }
.sop-card .flow-foot { flex-wrap: wrap; }

.dr-res {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; margin-bottom: 8px; text-align: left;
  background: var(--alt); border: 1px solid var(--line-2); border-radius: 7px;
}
.dr-res:hover { border-color: #cdeee2; background: #f6fcf9; }
.dr-res-main { min-width: 0; flex: 1; }
.dr-res-main b { display: block; font-size: 12.5px; font-weight: 500; }
.dr-res-main i { display: block; margin-top: 1px; font-style: normal; font-size: 10.5px; color: var(--muted); }
.dr-res-go { color: var(--muted); font-size: 12px; }

.md-preview {
  margin: 0; padding: 12px 14px; max-height: 260px; overflow: auto;
  background: #f7faf9; border: 1px solid var(--line-2); border-radius: 7px;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.7; color: #33403d;
  white-space: pre-wrap;
}
.file-tree { margin: 0; padding: 0; list-style: none; }
.file-tree li { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 11.5px; }
.file-tree li:last-child { border-bottom: 0; }
.ft-icon { width: 20px; height: 18px; display: grid; place-items: center; border-radius: 3px; background: #eef2f3; color: #59636a; font-family: var(--mono); font-size: 8.5px; }
.file-tree b { font-weight: 400; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tree i { margin-left: auto; font-style: normal; color: var(--muted); font-size: 10px; }
.sel-table { width: 100%; border-collapse: collapse; }
.sel-table th { width: 82px; padding: 5px 0; text-align: left; font-size: 11px; font-weight: 400; color: var(--muted); vertical-align: top; }
.sel-table td { padding: 5px 0; font-size: 11px; }
.sel-table code { font-family: var(--mono); font-size: 10px; background: #f4f7f7; border-radius: 3px; padding: 1px 5px; color: #33544d; word-break: break-all; }
.sample-out { margin-top: 10px; border-top: 1px solid var(--line-2); }
.sample-item { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.sample-item b { display: block; font-size: 11.5px; font-weight: 500; line-height: 18px; }
.sample-item span { display: block; margin-top: 2px; font-size: 10.5px; color: var(--muted); }

.sop-nodes { margin: 0; padding: 0; list-style: none; }
.sop-nodes li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.sop-nodes li:last-child { border-bottom: 0; }
.sop-nodes li > i {
  flex: none; width: 20px; height: 20px; margin-top: 1px; display: grid; place-items: center;
  border-radius: 50%; background: var(--mint); color: #0b7a68; font-style: normal; font-family: var(--mono); font-size: 9.5px;
}
.sn-main { min-width: 0; }
.sn-main b { font-size: 12.5px; font-weight: 500; }
.sn-tool { margin-left: 8px; font-size: 10px; color: var(--muted); }
.sn-io { margin-top: 3px; font-size: 10.5px; color: var(--ink-2); }
.sn-io em { font-style: normal; color: var(--muted); margin: 0 4px 0 0; background: #f2f5f5; border-radius: 3px; padding: 0 4px; }
.sn-fail { display: block; margin-top: 3px; font-size: 10.5px; color: #a3572a; }

.run-record { border: 1px solid var(--line-2); border-radius: 7px; padding: 8px 10px; margin-bottom: 8px; background: #fcfdfd; }
.run-record summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-size: 11.5px; }
.run-record summary::-webkit-details-marker { display: none; }
.run-record summary b { font-weight: 500; }
.run-record summary span { color: var(--muted); }
.run-record summary em { margin-left: auto; font-style: normal; font-size: 10.5px; color: var(--ink-2); }
.rr-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #cfd8d6; }
.rr-dot.succeeded { background: #35b57e; }
.rr-dot.partial { background: #e8a33d; }
.rr-dot.failed { background: #d9534f; }
.rr-steps { margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line-2); list-style: none; }
.rr-steps li { display: flex; gap: 7px; padding: 4px 0; font-size: 10.5px; color: var(--ink-2); }
.rr-steps li i { flex: none; font-style: normal; color: #35b57e; }
.rr-steps li.warn i { color: #d78a2e; }
.rr-steps li b { font-weight: 500; margin-right: 5px; }

.run-panel { background: #f8fcfb; border: 1px solid #d8efe6; border-radius: 8px; padding: 12px 14px; }
.run-head { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.run-head b { font-weight: 600; }
.run-head em { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.run-dot { width: 7px; height: 7px; border-radius: 50%; background: #cfd8d6; }
.run-dot.running { background: #2f9ed8; animation: pulse 1s ease infinite; }
.run-dot.ok { background: #35b57e; }
@keyframes pulse { 50% { opacity: .35; } }
.run-steps { margin: 10px 0 0; padding: 0; list-style: none; }
.run-node { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 11.5px; color: var(--muted); }
.run-node > i { width: 16px; text-align: center; font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--muted); }
.run-node .rn-name { color: var(--ink-2); }
.run-node .rn-state { margin-left: auto; font-size: 10.5px; }
.run-node.running .rn-name { color: #1d6f9e; font-weight: 500; }
.run-node.running .rn-state { color: #1d6f9e; }
.run-node.ok .rn-state { color: #2c9a6e; }
.run-node.warn .rn-name { color: #a3572a; }
.run-node.warn .rn-state { color: #c4681f; }
.run-tail { margin-top: 8px; }
.run-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.run-stats span { font-size: 10.5px; background: #fff; border: 1px solid var(--line-2); border-radius: 4px; padding: 2px 7px; }
.run-stats span.warn { color: #a3572a; border-color: #f3ddc6; background: #fff6ec; }

.editor-modal { width: min(640px, calc(100vw - 32px)); display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.editor-body { padding: 16px 22px 6px; overflow: auto; }
.editor-body label { display: block; margin-bottom: 12px; font-size: 11.5px; color: var(--ink-2); }
.editor-body input, .editor-body select, .editor-body textarea {
  display: block; width: 100%; margin-top: 5px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  font-size: 12.5px; line-height: 19px; outline: 0;
}
.editor-body input:focus, .editor-body select:focus, .editor-body textarea:focus { border-color: #7fd4bb; box-shadow: 0 0 0 3px rgba(6, 177, 144, .1); }
.editor-body textarea { resize: vertical; }
.editor-body .ed-md { font-family: var(--mono); font-size: 11px; line-height: 1.7; }
.ed-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ed-nodes-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 8px; font-size: 11.5px; color: var(--ink-2); }
.ed-node { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ed-node-no { width: 18px; flex: none; text-align: center; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.ed-node input { margin-top: 0; flex: 1; }
.ed-node-btns { display: flex; gap: 2px; flex: none; }
.ed-node-btns button { width: 22px; height: 26px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 11px; }
.ed-node-btns button:hover { background: rgba(0, 0, 0, .04); }
.editor-foot { display: flex; align-items: center; gap: 10px; padding: 12px 22px 16px; border-top: 1px solid var(--line-2); }
.editor-hint { margin-right: auto; font-size: 10.5px; color: var(--muted); }

@media (max-width: 860px) {
  .market-grid.skills, .market-grid.sops { grid-template-columns: 1fr; }
  .pipeline-bar { flex-wrap: wrap; }
  .pb-go { width: 100%; text-align: right; }
  .ed-row2 { grid-template-columns: 1fr; }
}

/* =====================================================================
 * Nomos 式左右架构：左侧玻璃导航 + 右侧内容区
 * ===================================================================== */

body.v5 { overflow: hidden; }

.app-shell { display: flex; height: 100vh; }

.side {
  flex: none; width: 272px; height: 100vh;
  padding: 12px 0 12px 12px;
  transition: width .24s ease, transform .24s ease;
}
.side-surface {
  height: 100%; display: flex; flex-direction: column;
  padding: 18px 14px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, 0) 30%),
    linear-gradient(180deg, rgba(255, 255, 255, .72), rgba(255, 255, 255, .46));
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 #fff,
    0 20px 44px rgba(38, 38, 38, .09),
    0 2px 6px rgba(38, 38, 38, .04);
  backdrop-filter: blur(30px) saturate(170%);
  -webkit-backdrop-filter: blur(30px) saturate(170%);
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 2px 6px 20px;
  color: #0b7a68; font-size: 18px; font-weight: 600; letter-spacing: -.01em;
}
/* V4 绿色 logo：渐变方块 + 白色书本 */
.side-brand .brand-mark { width: 28px; height: 28px; color: #fff; }
#side .side-brand .brand-mark { color: #fff; display: grid; place-items: center; }
.side-brand .brand-mark svg { width: 17px; height: 17px; }

.side-nav { flex: 1; min-height: 0; overflow: hidden; }
/* V1 遗留的 .side-nav / .side-brand 规则仍在小屏媒体查询里改写方向与显隐，
   这里用 #side 作用域把它们钉回 V5 侧栏的纵向结构。 */
#side .side-nav { display: flex; flex-direction: column; gap: 0; }
#side .side-nav > * { flex: none; }
#side .side-nav > .side-lists { flex: 1 1 auto; min-height: 0; }
.side-lists {
  overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.side:hover .side-lists { scrollbar-color: rgba(11, 122, 104, .16) transparent; }
.side-lists::-webkit-scrollbar { width: 4px; }
.side-lists::-webkit-scrollbar-track { background: transparent; }
.side-lists::-webkit-scrollbar-thumb { background: transparent; border-radius: 999px; }
.side:hover .side-lists::-webkit-scrollbar-thumb { background: rgba(11, 122, 104, .16); }
#side .side-brand span { display: inline; font-size: 18px; color: #0b7a68; }
.side-group { margin-bottom: 18px; }
.side-label { margin: 0 10px 8px; font-size: 11px; font-weight: 600; color: #a0a0aa; letter-spacing: .02em; }
.side-items { display: grid; gap: 4px; }
.side-group-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 10px 8px; text-align: left;
}
.side-group-head .side-label { margin: 0; }
.side-tasks-toggle { display: flex; align-items: center; gap: 4px; padding: 0; color: inherit; }
#side .side-group-head { padding: 0 10px 8px; }
.side-group-head .side-tasks-toggle { padding: 0; }
.side-temp .side-group-head { justify-content: flex-start; gap: 4px; }
.side-temp .side-task-row { padding-left: 2px; }
.task-project-head .tp-toggle { width: 14px; }
.side-add-project { width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 6px; color: var(--muted); opacity: 0; pointer-events: none; transition: opacity .15s, background .15s; }
.side-tasks .side-group-head:hover .side-add-project { opacity: 1; pointer-events: auto; }
.side-add-project:hover { background: rgba(6, 177, 144, .08); color: #0b7a68; }
.side-add-project svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.sgt-chevron {
  width: 14px; height: 14px; flex: none;
  fill: none; stroke: var(--muted); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .18s ease;
}
.side-tasks.collapsed .sgt-chevron { transform: rotate(-90deg); }
.side-tasks.collapsed .side-task-list,
.side-tasks.collapsed .side-task-new { display: none; }
.side-temp.collapsed .sgt-chevron { transform: rotate(-90deg); }
.side-temp.collapsed .side-task-list { display: none; }
.side-temp { margin-bottom: 8px; }
.task-project { min-width: 0; }
.task-project + .task-project { margin-top: 2px; }
.task-project-head {
  width: 100%; height: 32px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 8px 0 4px; border-radius: 6px;
  color: #333; font-size: 14px; font-weight: 400;
}
.task-project-head:hover { background: rgba(6, 177, 144, .06); color: #0b7a68; }
.side-nav .task-project-head button {
  height: 28px; padding: 0; border-radius: 5px;
  background: none; color: inherit; font-size: inherit; font-weight: inherit;
}
.tp-toggle { width: 24px; flex: none; display: grid; place-items: center; }
.tp-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; text-align: left; }
.task-project.has-current .tp-name { color: #333; }
.tp-chevron {
  width: 14px; height: 14px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s ease;
}
.task-project.open .tp-chevron { transform: rotate(90deg); }
.tp-name { min-width: 0; flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-count { flex: none; font-family: var(--sans); font-size: 11px; color: #515151; }
.task-project-children { margin: 1px 0 3px 8px; padding-left: 4px; }
.task-project-children .st-title { font-size: 12px; }
.side-task-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1px; margin: 0 4px; }
.side-task-row {
  display: flex; align-items: center; min-width: 0;
  height: 30px; padding: 0 12px; border-radius: 6px;
  color: #515151;
}
.side-task-row:hover { background: rgba(6, 177, 144, .06); color: #0b7a68; }
.side-temp .side-task-row { color: #333; }
.task-project-children .side-task-row { color: #515151; }
.side-task-row.on:hover,
.side-temp .side-task-row:hover,
.task-project-children .side-task-row:hover { color: #0b7a68; }
/* 选中会话：视觉等同 hover，但不显示编辑 / 删除按钮 */
.side-task-row.on,
.side-temp .side-task-row.on,
.task-project-children .side-task-row.on {
  background: rgba(6, 177, 144, .06);
  color: #0b7a68;
}
.side-task-main {
  flex: 1; min-width: 0; height: 100%;
  display: flex; align-items: center; gap: 8px;
  text-align: left; color: inherit;
}
.side-nav .side-task-main { color: inherit; }
.st-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 400; }
.st-tail {
  position: relative; flex: none; width: 40px; height: 20px; margin-left: 6px;
  display: flex; align-items: center; justify-content: flex-end;
}
.st-meta { font-size: 10.5px; color: #515151; white-space: nowrap; opacity: .6; transition: opacity .15s; }
.side-task-row:hover .st-meta,
.side-task-row:focus-within .st-meta { opacity: 0; }
.st-actions {
  position: absolute; inset: 0 0 0 auto;
  display: flex; align-items: center;
  opacity: 0; transition: opacity .15s;
}
.side-task-row:hover .st-actions,
.side-task-row:focus-within .st-actions { opacity: 1; }
.side-task-row.on .st-actions,
.side-task-row.on:hover .st-actions,
.side-task-row.on:focus-within .st-actions { opacity: 0; }
.side-task-row.on:hover .st-meta,
.side-task-row.on:focus-within .st-meta { opacity: .6; }
.st-actions button {
  width: 20px; height: 20px; display: grid; place-items: center;
  border-radius: 5px; color: var(--muted);
}
.st-actions button:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.st-actions button:last-child:hover { color: #c0392b; }
.st-actions svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.st-edit {
  flex: 1; min-width: 0; height: 24px; padding: 0 6px;
  border: 1px solid #bfe7da; border-radius: 6px; background: #fff;
  font-size: 11.5px; outline: 0;
}
.side-task-row.editing .st-tail { display: none; }
.side-task-new {
  width: 100%; height: 36px; margin: 0 0 14px;
  flex: none;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px dashed rgba(6, 177, 144, .38); border-radius: 10px;
  background: rgba(255, 255, 255, .36);
  color: #13816f; font-size: 12.5px;
  transition: background .15s, border-color .15s;
}
.side-task-new:hover { background: #fff; border-color: var(--teal); }
.side-task-new svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.side-nav .side-task-new {
  height: 40px; border: 1px dashed rgba(6, 177, 144, .38); border-radius: 10px;
  background: rgba(255, 255, 255, .36);
  color: #0b7a68; font-size: 13px; font-weight: 500;
  box-shadow: none;
}
.side-nav .side-task-new:hover {
  background: #fff; border-color: var(--teal);
}
.side-nav .side-task-new svg { stroke: currentColor; }
.side-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  min-height: 42px; padding: 9px 12px;
  border: 1px solid transparent; border-radius: 12px;
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  transition: background .14s ease, color .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.side-item svg {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.side-item:hover { background: rgba(6, 177, 144, .06); color: #0b7a68; }
.side-item.on {
  color: #0b7a68;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .66), rgba(255, 255, 255, 0) 60%),
    linear-gradient(135deg, #eafaf5, #effcf9);
  border-color: #cdeee2;
  box-shadow: inset 0 1px 0 #fff, 0 6px 16px rgba(6, 177, 144, .08);
}
.side-item .nav-badge { margin-left: auto; }
button.side-item { width: 100%; background: transparent; color: var(--ink-2); text-align: left; font-family: inherit; cursor: pointer; }
.si-label { white-space: nowrap; }
.soon-chip {
  flex: none; white-space: nowrap;
  margin-left: auto; font-style: normal; font-size: 9.5px;
  color: #a8842f; background: #fff8e6; border: 1px solid #f2dfa8;
  border-radius: 4px; padding: 1px 5px;
}
.side-soon { color: var(--muted); }
.side-soon:hover { color: #8a7a4a; background: rgba(0, 0, 0, .03); }

.side-foot {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 14px 4px 0;
  border-top: 1px solid var(--line-2);
}
.side-user { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
.side-user .avatar { width: 30px; height: 30px; flex: none; font-size: 13px; display: grid; place-items: center; margin: 0; color: #137d69; }
.su-main { min-width: 0; }
.su-main b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-main i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-ghost {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center; border-radius: 9px;
  color: var(--muted);
}
.side-ghost:hover { background: rgba(0, 0, 0, .05); color: var(--ink-2); }
.side-ghost svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; shape-rendering: geometricPrecision; }
#side-toggle svg { transform: scaleX(-1); }

.app-main { flex: 1; min-width: 0; height: 100vh; overflow: auto; }
.app-main::-webkit-scrollbar { width: 10px; }
.app-main::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .06); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }

.v5-page { min-height: 100%; }

/* 阅读页保持三栏沉浸式，不再并排显示全局导航 */
body.reading .side { display: none; }
body.reading .app-main { overflow: hidden; }
body.reading .v5-page { min-height: 0; }

/* 收起态 */
body.side-compact .side { width: 84px; }
body.side-compact .side-surface { padding: 18px 8px 16px; align-items: center; }
body.side-compact .side-brand { padding: 2px 0 20px; }
body.side-compact .side-brand .brand-name,
body.side-compact .side-label,
body.side-compact .si-label,
body.side-compact .soon-chip,
body.side-compact .su-main,
body.side-compact .side-item .nav-badge { display: none; }
body.side-compact .side-tasks { display: none; }
body.side-compact .side-temp { display: none; }
body.side-compact .side-task-new { display: none; }
body.side-compact .side-items { gap: 6px; }
body.side-compact .side-item { justify-content: center; padding: 11px 0; min-height: 44px; }
body.side-compact .side-group { margin-bottom: 12px; }
body.side-compact .side-foot { width: 100%; flex-direction: column; gap: 6px; justify-content: center; padding-left: 0; padding-right: 0; }
body.side-compact .side-user { flex: none; }
body.side-compact .side-ghost { display: grid; }

.side-open {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 75;
  width: 38px; height: 38px; place-items: center;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-sm); color: var(--ink-2);
}
.side-open svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

@media (max-width: 960px) {
  .side {
    position: fixed; left: 0; top: 0; z-index: 80;
    width: 272px; padding: 10px;
    transform: translateX(-104%);
    background: rgba(244, 248, 247, .86);
    backdrop-filter: blur(10px);
  }
  body.side-open .side { transform: none; }
  .rail { left: 0; }
  body.side-compact .side { width: 272px; }
  body.side-compact .side-brand .brand-name,
  body.side-compact .side-label,
  body.side-compact .si-label,
  body.side-compact .soon-chip,
  body.side-compact .su-main { display: block; }
  body.side-compact .side-item .nav-badge { display: inline-flex; }
  body.side-compact .side-tasks { display: block; }
  body.side-compact .side-temp { display: block; }
  body.side-compact .side-task-new { display: flex; }
  body.side-compact .side-item { justify-content: flex-start; padding: 9px 12px; }
  .side-open { display: grid; }
  .ws-top { padding-left: 62px; }
  .v5-page { padding-top: 64px; }
  .app-main { width: 100%; }
  body.reading .side-open { display: none; }
body.rail-open #side-open { display: none; }
}

@media (max-width: 620px) {
  .digest-note { display: none; }
  .digest-tabs { overflow-x: auto; }
  .digest-tabs button { flex: none; }
  .v5-head, .digest-head { flex-wrap: wrap; }
}

/* =====================================================================
 * V5.1：检索入口、订阅设置、账号切换与统一上传
 * ===================================================================== */

/* 专注模式：检索工作台、分析、精读与写作隐藏全局导航 */
body.focus .side,
body.focus .side-open { display: none; }
body.focus .app-main { overflow: hidden; }

.head-actions { flex-wrap: wrap; justify-content: flex-end; }
.head-actions > * { white-space: nowrap; }
body.side-compact .account-pop { display: none; }

.side-surface { position: relative; }
.side-user { padding: 4px 6px; border-radius: 10px; text-align: left; }
.side-user:hover { background: rgba(6, 177, 144, .06); }
.account-pop {
  position: absolute; left: 14px; right: 14px; bottom: 70px; z-index: 30;
  padding: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 44px rgba(16, 44, 36, .16), 0 2px 6px rgba(16, 44, 36, .06);
}
.ap-head { display: flex; align-items: center; gap: 9px; padding: 4px 4px 10px; border-bottom: 1px solid var(--line-2); }
.ap-head .avatar { width: 32px; height: 32px; font-size: 13px; }
.ap-head b { display: block; font-size: 13px; font-weight: 600; }
.ap-head i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-note { margin: 0 4px 10px; font-size: 10.5px; line-height: 16px; color: var(--muted); }
.ap-menu { display: flex; flex-direction: column; gap: 2px; }
.ap-menu button { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 8px; font-size: 12.5px; color: var(--ink-2); text-align: left; }
.ap-menu button:hover { background: var(--alt); color: var(--ink); }
.ap-menu svg { width: 16px; height: 16px; flex: none; fill: none; stroke: #0b7a68; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ap-menu span { flex: 1; }
.ap-menu em { font-style: normal; font-size: 13px; color: var(--muted); }
.ap-out { width: 100%; justify-content: center; margin-top: 8px; }

.account-modal { width: min(440px, calc(100vw - 32px)); }
.account-form { display: flex; flex-direction: column; gap: 13px; padding: 18px 22px 6px; }
.af-field { display: flex; flex-direction: column; gap: 6px; }
.af-field span { font-size: 11.5px; color: var(--muted); }
.af-field input { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13px; color: var(--ink); }
.af-field input:focus { outline: none; border-color: #7fd7c5; box-shadow: 0 0 0 3px rgba(10, 167, 140, .1); }
.af-hint { margin: 0; font-size: 11px; color: var(--muted); }
.af-error { margin: 0; font-size: 11.5px; color: #c04a3a; }
.account-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; }

.side-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 11.5px; color: #0b7a68; }
.side-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- 订阅设置 ---------- */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-main, .profile-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pcard { min-width: 0; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 18px 16px; box-shadow: var(--shadow-sm); }
.pcard-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard-head h2 { margin: 0; font-size: 15.5px; font-weight: 600; }
.pcard-count { font-family: var(--mono); font-size: 10.5px; color: var(--muted); background: #f5f7f7; border-radius: 999px; padding: 2px 8px; }
.pcard-sub { margin: 8px 0 14px; font-size: 12px; line-height: 19px; color: var(--muted); }
.pcard-note { margin: 10px 0 0; font-size: 10.5px; color: var(--muted); }
.pcard-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.space-lock { font-size: 11.5px; color: #7a6a3c; background: #fff8e6; border: 1px solid #f2dfa8; border-radius: 999px; padding: 5px 11px; }

.kw-edit { display: flex; flex-wrap: wrap; gap: 7px; min-height: 36px; }
.kw-edit.flash-idle .kw-chip.is-idle { border-color: #f3c48f; background: #fff8ee; }
.kw-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: #0b7a68; background: #f1fbf7;
  border: 1px solid #cdeee2; border-radius: 999px; padding: 3px 5px 3px 10px;
}
.kw-chip button { width: 18px; height: 18px; border-radius: 50%; font-size: 9px; color: #5e8f81; }
.kw-chip button:hover { background: #d9f4ec; color: #0b5f52; }
.kw-chip.is-static { padding: 3px 10px; }
.kw-groups { position: relative; display: flex; flex-wrap: wrap; gap: 7px; width: 100%; }
.kw-group { padding-right: 5px; gap: 3px; }
.kw-group .kw-group-main {
  display: inline-flex; align-items: center; gap: 5px;
  width: auto; height: auto; border-radius: 999px;
  font-size: 12px; color: #0b7a68; padding: 0;
}
.kw-group .kw-group-main:hover { color: #0b5f52; }
.kw-group.is-open { background: #e2f6ee; border-color: #7fd4bb; box-shadow: 0 0 0 3px rgba(6, 177, 144, .12); }
.kw-group-count {
  min-width: 16px; height: 16px; padding: 0 4px; display: inline-grid; place-items: center;
  border-radius: 999px; background: #d9f4ec; color: #0b7a68;
  font-family: var(--mono); font-size: 9.5px; font-weight: 600; line-height: 1;
}
.kw-group-x {
  width: 18px; height: 18px; border-radius: 50%; font-size: 9px; color: #5e8f81;
}
.kw-group-x:hover { background: #d9f4ec; color: #0b5f52; }
.kw-group-edit {
  position: absolute; z-index: 40;
  width: min(400px, 100%); padding: 14px;
  border: 1px solid #cdeee2; border-radius: 14px; background: #fff;
  box-shadow: 0 22px 55px rgba(10, 40, 34, .18), 0 4px 14px rgba(10, 40, 34, .06);
  opacity: 0; pointer-events: none;
  transform: scale(.35) translateY(-10px);
  transform-origin: center top;
  transition: opacity .16s ease, transform .36s cubic-bezier(.34, 1.52, .58, 1);
}
.kw-group-edit.show { opacity: 1; pointer-events: auto; transform: none; }
.kw-group-edit.above { transform-origin: center bottom; }
.kw-group-edit.above:not(.show) { transform: scale(.35) translateY(10px); }
.kw-group-edit.no-anim, .kw-group-edit.no-anim .kw-var { animation: none; transition: none; }
@keyframes kwBubbleShake {
  0%, 100% { transform: scale(1) translateX(0); }
  20% { transform: scale(1) translateX(-6px); }
  40% { transform: scale(1) translateX(6px); }
  60% { transform: scale(1) translateX(-4px); }
  80% { transform: scale(1) translateX(4px); }
}
.kw-group-edit.shake { animation: kwBubbleShake .55s ease; }
@keyframes kwVarIn {
  from { opacity: 0; transform: translateY(6px) scale(.92); }
  to { opacity: 1; transform: none; }
}
.kw-group-edit.show .kw-var { animation: kwVarIn .28s ease both; }
.kw-group-edit::before {
  content: ""; position: absolute; top: -6px; left: var(--kw-arrow-x, 24px);
  width: 10px; height: 10px; background: #fff;
  border-left: 1px solid #cdeee2; border-top: 1px solid #cdeee2;
  border-top-left-radius: 2px;
  transform: rotate(45deg);
}
.kw-group-edit.above::before {
  top: auto; bottom: -6px;
  border-left: 0; border-top: 0;
  border-right: 1px solid #cdeee2; border-bottom: 1px solid #cdeee2;
  border-top-left-radius: 0; border-bottom-right-radius: 2px;
}
.kw-sec:first-of-type { margin-top: 0; }
.kw-var {
  position: relative; display: inline-flex; align-items: center;
  font-size: 11.5px; color: #0b7a68;
  background: #f1fbf7; border: 1px solid #cdeee2; border-radius: 999px; padding: 3px 10px;
  cursor: text; user-select: none;
}
.kw-var:hover { background: #e5f7f0; }
.kw-var-del {
  position: absolute; top: -7px; right: -7px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #e05a4e; color: #fff; border: 2px solid #fff;
  font-size: 10px; line-height: 12px; text-align: center;
  opacity: 0; transform: scale(.5);
  transition: opacity .15s ease, transform .15s ease;
}
.kw-var:hover .kw-var-del { opacity: 1; transform: scale(1); }
.kw-var.is-editing { padding: 0; background: transparent; border: 0; }
.kw-var-input {
  width: 132px; height: 26px; padding: 0 10px; outline: 0;
  border: 1px solid #7fd4bb; border-radius: 999px; background: #fff;
  font-size: 11.5px; color: var(--ink);
}
.kw-var-input:focus, .kw-var-input:focus-visible { outline: none; box-shadow: none; }
.kw-var-add {
  font-size: 11.5px; color: var(--muted);
  border: 1px dashed #b9ded3; border-radius: 999px; padding: 3px 10px; background: #fff;
}
.kw-var-add:hover { color: #0b7a68; border-color: #7fd4bb; background: #f4fbf8; }
.kw-bubble-foot { display: none; }
@keyframes kwFootIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.kw-group-edit.dirty .kw-bubble-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--line-2);
  animation: kwFootIn .24s ease both;
}
.kw-bubble-foot button { font-size: 12px; padding: 5px 14px; border-radius: 8px; }
.kw-bubble-cancel { color: var(--muted); border: 1px solid var(--line-2); background: #fff; }
.kw-bubble-cancel:hover { background: #f6f9f8; }
.kw-bubble-save { background: linear-gradient(135deg, var(--g1), var(--g2)); color: #fff; }
.kw-bubble-save:hover { filter: brightness(1.05); }
.kw-sec { margin-top: 12px; }
.kw-sec-label {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; font-size: 11px; color: var(--muted); letter-spacing: .02em;
}
.kw-sec-label i { font-style: normal; }
.kw-sec-line { flex: 1; height: 1px; background: var(--line-2); }
.kw-sec-items { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kw-opts { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.kw-opt-row { display: flex; align-items: center; gap: 8px; }
.kw-opt-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink); cursor: pointer; }
.kw-opt-label input { width: 14px; height: 14px; margin: 0; accent-color: #0aa78c; cursor: pointer; }
.kw-opt-tip {
  width: 15px; height: 15px; padding: 0; border-radius: 50%;
  border: 1px solid #cbd9d4; color: var(--muted); background: #fff;
  font-size: 10px; line-height: 13px; text-align: center;
  cursor: pointer; user-select: none;
}
.kw-opt-tip:hover, .kw-opt-tip.on { color: #0b7a68; border-color: #7fd4bb; background: #f1fbf7; }
.kw-opt-desc { margin-top: 4px; padding-left: 22px; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.kw-sec .kw-opt-desc { padding-left: 0; }
.kw-empty { padding: 10px 0; font-size: 12px; color: var(--muted); }
.kw-add { display: flex; gap: 8px; margin: 10px 0 14px; }
.kw-add input {
  flex: 1; min-width: 0; height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px; outline: 0; font-size: 12.5px;
}
.kw-add input:focus { border-color: #7fd4bb; box-shadow: 0 0 0 3px rgba(6, 177, 144, .1); }
.kw-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.kw-suggest button { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); background: #f6f8f8; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px 10px; }
.kw-suggest-count {
  min-width: 15px; height: 15px; padding: 0 4px; display: inline-grid; place-items: center;
  border-radius: 999px; background: #e2f6ee; color: #0b7a68;
  font-family: var(--mono); font-size: 9px; font-weight: 600; line-height: 1;
}
.kw-suggest button:hover { background: #f1fbf7; border-color: #bfe7da; color: #0b7a68; }
.kw-selected-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 14px 0 8px; padding-top: 12px;
  border-top: 1px solid var(--line-2);
  font-size: 11px; color: var(--muted);
}
.kw-clear { font-size: 11px; color: var(--muted); padding: 3px 8px; border-radius: 6px; }
.kw-clear:hover { color: #c04a3a; background: #fff4f2; }

.p-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; }
.p-switch input { position: absolute; width: 0; height: 0; opacity: 0; }
.p-switch i { position: relative; width: 34px; height: 20px; flex: none; border-radius: 999px; background: #dfe7e5; transition: background .16s; }
.p-switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18); transition: transform .16s; }
.p-switch input:checked + i { background: linear-gradient(135deg, var(--g1), var(--g2)); }
.p-switch input:checked + i::after { transform: translateX(14px); }
.p-switch b { font-size: 11px; font-weight: 500; color: var(--muted); }
.p-switch.small i { width: 30px; height: 18px; }
.p-switch.small i::after { width: 14px; height: 14px; }
.p-switch.small input:checked + i::after { transform: translateX(12px); }

.vector-list { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.vector-row { display: flex; align-items: center; gap: 9px; padding: 8px 6px; border-bottom: 1px solid var(--line-2); }
.vector-row:last-child { border-bottom: 0; }
.vr-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #cfd8d6; }
.vr-dot.ok { background: #35b57e; }
.vr-main { min-width: 0; }
.vr-main b { display: block; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vr-main i { display: block; font-style: normal; font-size: 10.5px; color: var(--muted); }
.vr-state { margin-left: auto; flex: none; font-size: 10px; color: #0b7a68; background: #f1fbf7; border-radius: 999px; padding: 2px 7px; }

.p-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid var(--line-2);
  font-size: 12px; color: var(--ink-2);
}
.p-row:last-of-type { border-bottom: 0; }
.p-row.col { flex-direction: column; align-items: flex-start; gap: 8px; }
.p-row select { height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 12px; outline: 0; }
.push-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.push-chips button { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; }
.push-chips button.on { color: #0b7a68; background: #f1fbf7; border-color: #bfe7da; }

/* ---------- 关键词命中 ---------- */
.kw-empty-seed { display: grid; gap: 8px; justify-items: start; }
.kw-empty-seed p { margin: 0; }

/* ---------- 订阅源规则 ---------- */
.source-rules {
  display: flex; flex-direction: column; gap: 2px; margin-top: 4px;
}
.source-rule {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 10px;
  padding: 6px 4px; border-bottom: 1px solid var(--line-2);
}
.source-rule:last-child { border-bottom: 0; }
.srr-main { min-width: 0; }
.srr-main b { display: block; font-size: 12.5px; font-weight: 500; }
.srr-main i {
  display: flex; align-items: baseline; gap: 2px; min-width: 0;
  font-style: normal; font-size: 10.5px; color: var(--muted);
}
.srr-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srr-cad { flex: none; white-space: nowrap; }
.srr-switch { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; color: var(--muted); }
.srr-switch .p-switch { gap: 0; }
.src-letter.kind { font-size: 10.5px; font-weight: 600; }
.source-rule.is-off .srr-main b { color: var(--muted); }
.source-rule.is-off .src-letter { opacity: .55; }
.src-switch { flex: none; }

/* ---------- 编辑订阅弹窗 ---------- */
.sub-edit-modal {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
}
.sub-edit-modal header { flex: none; border-bottom: 0; }
.sub-edit-modal .paper-meta-foot { justify-content: flex-end; border-top: 0; }
.sub-edit-body {
  display: flex; flex-direction: column; gap: 14px;
  padding: 16px 22px 18px; overflow: auto;
}
.sub-edit-sources {
  display: flex; flex-direction: column; gap: 0;
  max-height: 348px; overflow-y: auto; padding-right: 2px;
  scrollbar-width: thin; scrollbar-color: rgba(0, 0, 0, .14) transparent;
}
.sub-edit-sources::-webkit-scrollbar { width: 6px; }
.sub-edit-sources::-webkit-scrollbar-track { background: transparent; }
.sub-edit-sources::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .14); border-radius: 3px; }
.sub-edit-sources::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .22); }
.se-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.se-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 7px;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
}
.se-search:focus-within { border-color: #bfe7da; box-shadow: 0 0 0 3px rgba(10, 167, 140, .06); }
.se-search svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; }
.se-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none;
  font-family: inherit; font-size: 12px; color: var(--ink);
}
.se-search input::placeholder { color: var(--muted); }
.se-filter { position: relative; }
.se-filter-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 8px; background: #fff;
  font-size: 11.5px; color: var(--ink-2);
}
.se-filter-btn:hover { border-color: #bfe7da; color: #0b7a68; }
.se-filter-btn.on { background: #eef9f5; border-color: #9adcc9; color: #0b7a68; }
.se-filter-count {
  min-width: 16px; height: 16px; padding: 0 4px; display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--teal); color: #fff;
  font-size: 9.5px; font-weight: 600; line-height: 1;
}
.se-filter-chev {
  width: 12px; height: 12px; fill: none; stroke: var(--muted); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round; transition: transform .15s;
}
.se-filter.open .se-filter-chev { transform: rotate(180deg); }
.se-filter-btn.on .se-filter-chev { stroke: #0b7a68; }
.se-filter-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  width: 208px; max-height: 248px; overflow: auto; padding: 6px;
  background: #fff; border: 1px solid var(--line-2); border-radius: 10px;
  box-shadow: 0 14px 40px rgba(10, 40, 34, .16);
}
.se-opt {
  position: relative; display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 7px; font-size: 12px; color: var(--ink-2); cursor: pointer;
}
.se-opt:hover { background: #f4fbf8; color: #0b7a68; }
.se-opt input { position: absolute; opacity: 0; pointer-events: none; }
.se-opt .se-box {
  width: 14px; height: 14px; flex: none; display: grid; place-items: center;
  border: 1.5px solid #cfdcd8; border-radius: 4px; background: #fff;
}
.se-opt input:checked + .se-box { background: linear-gradient(135deg, var(--g1), var(--g2)); border-color: transparent; }
.se-opt input:checked + .se-box::after {
  content: ""; width: 7px; height: 4px;
  border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg) translate(0.5px, -1px);
}
.se-opt span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.se-opt b { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--muted); }
.se-opt input:checked ~ b { color: #0b7a68; }
.se-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 2px; border-bottom: 1px solid var(--line-2);
}
.sub-edit-sources .se-row:last-child { border-bottom: 0; }
.se-group-head {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 2px; font-size: 11px; color: var(--muted); letter-spacing: .02em;
}
.se-group-head:first-child { margin-top: 0; }
.se-group-head i { font-style: normal; }
.se-group-head b { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--muted); }
.se-group-head em { display: none; }
.source-rules .se-group-head { margin: 8px 0 2px; }
.source-rules .se-group-head:first-child { margin-top: 0; }
.se-pick {
  flex: none; height: 26px; padding: 0 10px;
  border: 1px solid #cfe7df; border-radius: 999px; background: #fff;
  font-size: 11px; color: #0b7a68; white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.se-pick:hover { background: #f4fbf8; border-color: #9adcc9; }
.se-pick.on { background: #eef9f5; border-color: #9adcc9; }
.se-pick.on:hover { background: #dff5ec; border-color: #7fd4bb; color: #0b5f52; }
.se-main { min-width: 0; flex: 1; }
.se-main b { display: block; font-size: 12.5px; font-weight: 500; }
.se-main i {
  display: block; font-style: normal; font-size: 10.5px; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- 推送与匹配 ---------- */
.pcard-wide { width: 100%; justify-content: center; margin-top: 12px; }
.push-channel-note { display: block; margin-top: 6px; font-size: 10.5px; color: var(--muted); }
.match-bar {
  display: flex; height: 8px; margin: 14px 0 10px;
  border-radius: 999px; overflow: hidden; background: #edf2f1;
}
.match-bar i { display: block; height: 100%; }
.match-bar .kw { background: linear-gradient(135deg, var(--g1), var(--g2)); }
.match-bar .vec { background: #b9d9f2; }
.match-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 10.5px; color: var(--muted); }
.match-legend span { display: inline-flex; align-items: center; gap: 5px; }
.match-legend b { color: var(--ink-2); font-weight: 500; }
.dot { width: 7px; height: 7px; flex: none; border-radius: 50%; }
.dot.kw { background: var(--g2); }
.dot.vec { background: #7fb8e6; }

/* ---------- 推送预览 ---------- */
.preview-modal { width: min(640px, calc(100vw - 32px)); display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.preview-kicker { margin: 0 0 4px; font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; color: var(--teal); }
.preview-body { padding: 16px 22px; overflow: auto; background: #f7fbfa; }
.pv-mail {
  padding: 16px 18px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow-sm);
}
.pv-mail-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line-2);
}
.pv-mail-head div { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pv-mail-head span { font-size: 12px; font-weight: 600; color: #0b7a68; }
.pv-mail-head i { font-style: normal; font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pv-mail-head em { flex: none; font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.pv-mail h3 { margin: 14px 0 4px; font-size: 16px; line-height: 1.4; font-weight: 500; }
.pv-mail-sub { margin: 0 0 12px; font-size: 10.5px; color: var(--muted); }
.pv-list { display: flex; flex-direction: column; }
.pv-item { padding: 11px 0; border-top: 1px solid var(--line-2); }
.pv-item:first-child { padding-top: 4px; border-top: 0; }
.pv-item-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.pv-score { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.pv-item > b { display: block; font-size: 12.5px; line-height: 1.5; font-weight: 600; }
.pv-item > i { display: block; margin-top: 2px; font-style: normal; font-size: 10.5px; color: var(--muted); }
.pv-reasons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.pv-reasons span {
  font-size: 9.5px; color: #0b7a68; background: #f1fbf7;
  border: 1px solid #d6efe7; border-radius: 999px; padding: 1px 7px;
}
.pv-more { margin: 12px 0 0; font-size: 10.5px; color: var(--muted); text-align: center; }
.pv-empty { padding: 26px 18px; text-align: center; font-size: 12px; color: var(--muted); }
.preview-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 22px; border-top: 1px solid var(--line-2);
}
.preview-foot span { font-size: 10.5px; color: var(--muted); }

/* ---------- 删除任务 ---------- */
.task-delete-modal { width: min(420px, calc(100vw - 32px)); }
.task-delete-body { padding: 18px 22px; font-size: 13px; color: var(--ink-2); }
.task-delete-body b { display: block; font-weight: 500; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-delete-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 0 22px 18px; }
.btn-gradient.danger { background: linear-gradient(90deg, #ef7a68, #d9483b); }

/* ---------- 统一上传 ---------- */
.upload-modal { width: min(620px, calc(100vw - 32px)); display: flex; flex-direction: column; max-height: calc(100vh - 60px); }
.upload-body { padding: 18px 22px 8px; overflow: auto; }
.upload-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 132px; padding: 18px; text-align: center; cursor: pointer;
  border: 1.5px dashed #bfe7da; border-radius: 12px;
  background: linear-gradient(180deg, #fbfffd, #f4fbf8);
  transition: border-color .15s, background .15s;
}
.upload-drop:hover, .upload-drop.drag { border-color: #3fc4a0; background: #f1fbf7; }
.upload-drop svg { width: 26px; height: 26px; fill: none; stroke: #0b7a68; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.upload-drop b { font-size: 13.5px; font-weight: 600; color: #171b1a; }
.upload-drop span { font-size: 11.5px; color: var(--muted); }
.upload-purpose { display: flex; gap: 4px; margin: 14px 0 10px; padding: 3px; background: #f4f7f7; border-radius: 999px; overflow-x: auto; }
.upload-purpose button { flex: 1; white-space: nowrap; padding: 6px 10px; border-radius: 999px; font-size: 11.5px; color: var(--ink-2); }
.upload-purpose button.on { background: #fff; color: #0b7a68; font-weight: 500; box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.upload-files { display: flex; flex-direction: column; gap: 6px; min-height: 36px; }
.upload-empty { padding: 10px 2px; font-size: 11.5px; color: var(--muted); }
.upload-file { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: #fcfdfd; }
.upload-file b { min-width: 0; font-size: 12px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-file i { margin-left: auto; flex: none; font-style: normal; font-size: 10.5px; color: var(--muted); }
.upload-file button { flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 10px; color: var(--muted); }
.upload-file button:hover { background: rgba(0, 0, 0, .05); color: var(--ink); }
.upload-check { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 11px; color: var(--muted); }
.upload-check input { accent-color: #06b190; }
.upload-progress { position: relative; height: 26px; margin-top: 12px; border-radius: 6px; background: #eef4f2; overflow: hidden; }
.upload-progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--g1), var(--g2)); opacity: .28; transition: width .18s; }
.upload-progress span { position: relative; display: flex; align-items: center; height: 100%; padding: 0 10px; font-size: 10.5px; color: #0b5f52; }
.upload-foot { display: flex; align-items: center; gap: 10px; padding: 12px 22px 16px; border-top: 1px solid var(--line-2); }
.upload-hint { margin-right: auto; font-size: 10.5px; color: var(--muted); }

/* ---------- 论文库：最近上传 ---------- */
.lib-uploads { margin: 0 0 16px; padding: 13px 16px; background: #f8fcfb; border: 1px solid #d8efe6; border-radius: 12px; }
.lu-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.lu-head b { font-size: 12.5px; font-weight: 600; }
.lu-head span { margin-left: auto; font-size: 10.5px; color: var(--muted); }
.lu-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid rgba(6, 177, 144, .1); font-size: 11px; }
.lu-row b { flex: 1; min-width: 0; font-weight: 500; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-row i { font-style: normal; color: var(--muted); }
.lu-row em { margin-left: auto; flex: none; font-style: normal; font-size: 10.5px; color: #0b7a68; }

@media (max-width: 620px) {
  .pcard { padding: 16px 14px; }
  .space-lock { font-size: 10.5px; }
  .market-bar { flex-direction: column; align-items: stretch; gap: 10px; }
  .lib-bar { flex-wrap: wrap; gap: 8px; }
  .market-tabs { overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .market-tabs::-webkit-scrollbar { display: none; }
  .market-tabs button { flex: none; white-space: nowrap; }
  .market-search { margin-left: 0; width: 100%; }
  .source-rule { grid-template-columns: auto minmax(0, 1fr) auto; }
  .srr-switch { grid-column: 2 / -1; justify-self: start; }
  .preview-modal { width: calc(100vw - 20px); max-height: calc(100vh - 24px); }
  .preview-body { padding: 12px 14px; }
  .preview-foot { flex-wrap: wrap; padding: 10px 14px 14px; }
  .preview-foot span { width: 100%; }
  .upload-modal { width: calc(100vw - 20px); max-height: calc(100vh - 24px); }
  .upload-body { padding: 14px 14px 6px; }
  .upload-foot { flex-wrap: wrap; padding: 10px 14px 14px; }
  .upload-hint { width: 100%; margin-right: 0; }
  .upload-purpose button { flex: none; }
}

/* ================= 灵感 ================= */
.side-ideas .side-group-head:hover .side-add-project { opacity: 1; pointer-events: auto; }
.side-ideas.collapsed .sgt-chevron { transform: rotate(-90deg); }
.side-ideas.collapsed .side-task-list { display: none; }
.idea-row .st-meta { opacity: .6 !important; }
.idea-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: #9aa8a4; }
.idea-dot.thinking { background: #0aa78c; box-shadow: 0 0 0 3px rgba(10, 167, 140, .12); }
.idea-dot.waiting { background: #e3a008; }
.idea-dot.paused { background: #b8c2bf; }

.ideas-wrap { max-width: 1080px; }
.ideas-head { align-items: flex-end; }
.idea-compose { margin-top: 22px; padding: 16px 18px 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 8px 30px rgba(6, 177, 144, .05); }
.idea-compose textarea { width: 100%; min-height: 58px; max-height: 160px; resize: vertical; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 15px; line-height: 1.7; color: var(--ink); }
.idea-compose textarea::placeholder { color: rgba(0, 0, 0, .3); }
.idea-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line-2); }
.idea-options { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.idea-option {
  display: inline-flex; align-items: center; justify-content: center;
  height: 26px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 999px;
  background: #fff; font-size: 10.5px; color: var(--muted);
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.idea-option:hover { background: #f6fcf9; border-color: #bfe7da; color: #0b7a68; }
.idea-option:active { transform: translateY(1px); }
.idea-option.on {
  background: #e2f6ee; border-color: #7fd4bb; color: #0b6f60; font-weight: 500;
  box-shadow: 0 0 0 2px rgba(6, 177, 144, .08);
}
.idea-option.on::before {
  content: ""; display: inline-block; width: 7px; height: 4px; margin-right: 5px;
  border-left: 1.2px solid currentColor; border-bottom: 1.2px solid currentColor;
  transform: rotate(-45deg);
}
.idea-option.on:hover { background: #d9f4ec; border-color: #6fbfa9; }
.idea-list-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 10px; font-size: 12px; color: var(--muted); }
.idea-list-head b { font-size: 13px; font-weight: 600; color: var(--ink); }
.idea-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.idea-card { display: flex; flex-direction: column; align-items: stretch; gap: 7px; padding: 14px 15px; background: #fff; border: 1px solid var(--line-2); border-radius: 11px; text-align: left; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.idea-card:hover { border-color: #cdeee2; box-shadow: 0 8px 24px rgba(6, 177, 144, .07); }
.idea-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.idea-card-time { font-size: 10px; color: var(--muted); }
.idea-card-title { font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--ink); }
.idea-card-thought { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }
.idea-card-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; padding-top: 7px; border-top: 1px solid var(--line-2); font-size: 10px; color: var(--muted); }
.idea-status { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 10px; background: #f2f6f5; color: var(--muted); }
.idea-status i { width: 5px; height: 5px; border-radius: 50%; background: #9aa8a4; }
.idea-status.thinking { background: #eef9f5; color: #0b7a68; }
.idea-status.thinking i { background: #0aa78c; }
.idea-status.waiting { background: #fff8e6; color: #8a6400; }
.idea-status.waiting i { background: #e3a008; }
.idea-status.paused { background: #f2f6f5; color: var(--muted); }
.idea-status.paused i { background: #b8c2bf; }
.idea-empty { grid-column: 1 / -1; padding: 36px 20px; text-align: center; font-size: 12px; color: var(--muted); background: #fff; border: 1px dashed var(--line-2); border-radius: 11px; }

.idea-thread { max-width: 840px; margin: 0 auto; padding: 2px 0 30px; }
.idea-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.idea-back { font-size: 11.5px; color: var(--muted); }
.idea-back:hover { color: #0b7a68; }
.idea-thread-title { margin: 14px 0 9px; font-size: 24px; line-height: 1.35; font-weight: 600; color: var(--ink); }
.idea-thread-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.idea-chip { height: 20px; padding: 0 7px; display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; font-size: 10px; color: var(--muted); }
.idea-thread-note { margin: 14px 0 20px; padding: 10px 12px; border: 1px dashed #cdeee2; border-radius: 8px; background: #f8fdfb; font-size: 11.5px; line-height: 1.7; color: var(--ink-2); }
.idea-messages { display: flex; flex-direction: column; gap: 12px; }
.idea-msg.user { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.idea-bubble { max-width: 78%; padding: 9px 13px; border-radius: 12px 12px 2px 12px; background: linear-gradient(90deg, #eaf9f9, #f4fffb); border: 1px solid #d9f2ec; font-size: 13px; line-height: 1.7; color: var(--ink); }
.idea-msg-time { font-size: 9.5px; color: var(--muted); }
.idea-thought { padding: 13px 15px; background: #fff; border: 1px solid var(--line-2); border-left: 2px solid #9adcc9; border-radius: 8px; }
.idea-thought-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; font-size: 9.5px; color: #0b7a68; }
.idea-thought-head span { font-family: var(--mono); letter-spacing: .04em; }
.idea-thought-head time { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.idea-thought p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.idea-thinking { display: flex; align-items: center; gap: 7px; padding: 10px 13px; border: 1px dashed #cdeee2; border-radius: 8px; background: #f8fdfb; font-size: 11px; color: #0b7a68; }
.idea-thinking-dot { width: 6px; height: 6px; border-radius: 50%; background: #0aa78c; animation: ideaPulse 1.4s ease infinite; }
@keyframes ideaPulse { 0%, 100% { opacity: .4; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.1); } }
.idea-waiting { padding: 10px 13px; border-radius: 8px; background: #f2f6f5; font-size: 11px; color: var(--muted); }
.idea-composer { display: flex; align-items: flex-end; gap: 8px; margin-top: 18px; padding: 9px 11px 8px; background: #fff; border: 1px solid #dceee8; border-radius: 10px; box-shadow: 0 8px 26px rgba(6, 177, 144, .08); }
.idea-composer textarea { flex: 1; min-height: 44px; max-height: 130px; resize: vertical; border: 0; outline: 0; background: transparent; font-family: inherit; font-size: 12.5px; line-height: 1.65; color: var(--ink); }
.idea-composer .composer-send { width: 30px; height: 30px; flex: none; }
@media (max-width: 860px) {
  .idea-grid { grid-template-columns: 1fr; }
  .idea-thread-title { font-size: 20px; }
  .idea-compose-foot { align-items: flex-start; flex-direction: column; }
  .idea-compose-foot > .btn-gradient { align-self: flex-end; }
}


/* ---------- 我的灵感：连续对话 ---------- */
.ideas-page { padding-bottom: 0; }
.ideas-page .ideas-wrap { display: flex; flex-direction: column; height: calc(100vh - 34px); }
.ideas-repo-btn { display: inline-flex; align-items: center; gap: 6px; }
.ideas-repo-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.idea-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: 18px; }
.idea-chat-thread { flex: 1; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 4px 0 16px; }
.idea-chat-thread::-webkit-scrollbar { width: 6px; }
.idea-chat-thread::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .07); border-radius: 3px; }
.idea-summary-card { padding: 14px 16px; border: 1px solid #d9eee7; border-radius: 12px; background: linear-gradient(90deg, #f1fbf7, #fbfdfc); }
.idea-summary-card p { white-space: pre-line; }
.idea-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.idea-summary-head span { font-size: 12px; font-weight: 600; color: #0b7a68; }
.idea-summary-head time { font-size: 10px; color: var(--muted); }
.idea-summary-card p { margin: 7px 0 0; font-size: 12.5px; line-height: 1.85; color: var(--ink-2); }
.idea-summary-body { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.idea-summary-body .is-lead { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.is-block { display: flex; flex-direction: column; gap: 4px; }
.is-label { font-size: 10.5px; font-weight: 600; color: #0b7a68; letter-spacing: .02em; }
.idea-summary-body .is-review { margin: 0; font-size: 12px; line-height: 1.75; color: var(--muted); }
.is-tasks { margin: 0; padding-left: 0; list-style: none; counter-reset: ist; display: flex; flex-direction: column; gap: 5px; }
.is-tasks li {
  counter-increment: ist; position: relative; padding-left: 21px;
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
}
.is-tasks li::before {
  content: counter(ist); position: absolute; left: 0; top: 3px;
  width: 14px; height: 14px; display: grid; place-items: center;
  border-radius: 50%; background: #e2f6ee; color: #0b6f60;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
}
.idea-chat-msg { max-width: 760px; }
.idea-chat-msg.user { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.idea-chat-bubble { padding: 10px 14px; border-radius: 12px 12px 4px 12px; background: var(--mint); border: 1px solid #d7f1ec; font-size: 13px; line-height: 1.7; color: #145a4e; }
.idea-chat-msg.assistant { align-self: flex-start; padding: 12px 15px; background: #fff; border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 6px 24px rgba(6, 177, 144, .05); }
.idea-chat-stage { font-size: 10px; font-weight: 600; color: #0b7a68; }
.idea-chat-msg.assistant p { margin: 6px 0 0; font-size: 13px; line-height: 1.85; color: var(--ink-2); }
.idea-chat-msg time { display: block; margin-top: 5px; font-size: 9.5px; color: var(--muted); }
.idea-chat-empty { padding: 40px; text-align: center; font-size: 12px; color: var(--muted); }
.idea-chat-form {
  flex: none;
  padding: 8px 0 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .72));
}
.idea-chat-opts { max-width: none; margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.idea-chat-input {
  max-width: none; margin: 0; min-height: 150px;
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px 12px;
  background: #fff; border: 1px solid #dceee8; border-radius: 12px;
  box-shadow: 0 8px 26px rgba(6, 177, 144, .08), 0 1px 3px rgba(0, 0, 0, .03);
}
.idea-chat-input:focus-within { border-color: #a7e0d3; box-shadow: 0 10px 30px rgba(6, 177, 144, .12), 0 0 0 3px rgba(6, 177, 144, .05); }
.idea-chat-input textarea { width: 100%; flex: 1; min-height: 84px; max-height: 168px; border: 0; outline: 0; resize: none; background: transparent; font-family: inherit; font-size: 14px; line-height: 1.65; padding: 2px 2px 0; color: var(--ink); }
.idea-chat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid #eef5f1; }
.idea-chat-foot .composer-send { width: 34px; height: 34px; }
.idea-hint { font-size: 10.5px; color: var(--muted); margin-left: 2px; }

/* ---------- 灵感仓库 ---------- */
.repo-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.repo-side { padding: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; }
.repo-side-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 8px; font-size: 12px; color: var(--muted); }
.repo-side-head b { font-size: 13px; color: var(--ink); }
.repo-list { display: flex; flex-direction: column; gap: 4px; }
.repo-item { display: flex; flex-direction: column; gap: 4px; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; text-align: left; }
.repo-item:hover { background: #f7fcfb; border-color: #e3f3ed; }
.repo-item.on { background: var(--mint); border-color: #bfe7da; }
.repo-item b { font-size: 12.5px; font-weight: 600; color: var(--ink); line-height: 1.45; }
.repo-item span { font-size: 10px; color: var(--muted); }
.repo-item-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.repo-item-top time { font-size: 10px; color: var(--muted); }
.repo-item .idea-status { flex: none; }
.repo-empty { padding: 24px 10px; text-align: center; font-size: 11.5px; color: var(--muted); }
.repo-main { padding: 16px 18px 18px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; min-height: 420px; }
.repo-doc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.repo-doc-head .repo-save { flex: none; border-radius: 8px; padding: 6px 16px; }
.repo-doc-head h2 { margin: 0; font-size: 18px; line-height: 1.45; font-weight: 600; color: var(--ink); }
.repo-doc-head p { margin: 4px 0 0; font-size: 10.5px; color: var(--muted); }
.repo-toolbar { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding: 6px; border: 1px solid var(--line-2); border-radius: 9px; background: #fbfdfc; }
.repo-toolbar button { min-width: 28px; height: 26px; padding: 0 7px; border-radius: 6px; color: var(--ink-2); font-size: 11.5px; }
.repo-toolbar button:hover { background: #eef9f5; color: #0b7a68; }
.repo-toolbar .tb-sep { width: 1px; height: 16px; margin: 0 3px; background: var(--line-2); }
.repo-toolbar .tb-code { font-family: var(--mono); font-size: 10.5px; letter-spacing: -.5px; }
.repo-editor { margin-top: 10px; min-height: 260px; padding: 14px 16px; border: 1px solid #e3efeb; border-radius: 10px; background: #fff; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); outline: none; }
.repo-editor:focus { border-color: #a7e0d3; box-shadow: 0 0 0 3px rgba(6, 177, 144, .06); }
.repo-editor h1 { margin: 16px 0 7px; font-size: 17.5px; font-weight: 600; color: var(--ink); }
.repo-editor h2 { margin: 14px 0 6px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.repo-editor h3 { margin: 12px 0 5px; font-size: 14px; font-weight: 600; color: var(--ink); }
.repo-editor p { margin: 0 0 9px; }
.repo-editor ul { margin: 0 0 10px; padding-left: 20px; }
.repo-editor ol { margin: 0 0 10px; padding-left: 22px; }
.repo-editor hr { margin: 14px 0; border: 0; border-top: 1px solid var(--line-2); }
.repo-editor a { color: #0b7a68; text-decoration: underline; text-underline-offset: 2px; }
.repo-editor s { color: var(--muted); }
.repo-editor blockquote { margin: 10px 0; padding: 6px 12px; border-left: 3px solid #9adcc9; background: #f4fbf8; color: #3a5a52; }
.repo-editor code { padding: 1px 4px; border-radius: 4px; background: #f2f6f5; font-family: var(--mono); font-size: 12px; }
.repo-progress { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.repo-progress h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink); }
.repo-progress ol { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.repo-progress li { position: relative; padding-left: 14px; }
.repo-progress li::before { content: ""; position: absolute; left: 0; top: 6px; width: 6px; height: 6px; border-radius: 50%; background: #9adcc9; }
.repo-progress time { font-size: 10px; color: var(--muted); }
.repo-progress p { margin: 3px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
@media (max-width: 860px) {
  .repo-layout { grid-template-columns: 1fr; }
  .ideas-page .ideas-wrap { height: auto; min-height: calc(100vh - 64px); }
}
