/* affcasebook 审阅台样式 */
:root {
  --bg: #f4f6f9; --panel: #fff; --ink: #1d2433; --ink-2: #3b4456; --muted: #6b7486; --faint: #98a1b2;
  --line: #e4e8ee; --line-2: #eef1f5; --hover: #f7f9fc;
  --accent: #2459e0; --accent-ink: #1b45b3; --accent-soft: #eaf0ff;
  --ok: #14804a; --ok-soft: #e5f5ec; --warn: #a3620a; --warn-soft: #fff3df; --bad: #c33127; --bad-soft: #fdecea;
  --violet: #6a42c2; --violet-soft: #f1ecfc; --sky: #1f6fa8; --sky-soft: #e6f2fb;
  --radius: 10px; --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --sidebar: 216px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.6 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.plain { color: inherit; }
h1, h2, h3, h4 { line-height: 1.35; color: var(--ink); }
h1 { font-size: 22px; margin: 0; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
pre { margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
[hidden] { display: none !important; }

/* ---------- 布局：侧边栏 + 内容 ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: block; padding: 16px 18px 12px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand strong { display: block; font-size: 16px; letter-spacing: .2px; }
.brand span { display: block; color: var(--muted); font-size: 12px; }
.nav { padding: 4px 10px 12px; flex: 1; }
.nav-title { margin: 14px 8px 4px; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.nav a:hover { background: var(--hover); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.nav .count { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 600; }
.nav .count.warn { background: var(--warn); }
.sidebar-foot { border-top: 1px solid var(--line); padding: 10px 10px 14px; }
.sidebar-foot a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--ink-2); }
.sidebar-foot a:hover { background: var(--hover); text-decoration: none; }
.account { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; color: var(--muted); font-size: 13px; }
.account form { margin-left: auto; }
.account button { border: 0; background: none; color: var(--muted); cursor: pointer; font: inherit; padding: 2px 4px; }
.account button:hover { color: var(--bad); }
.main { min-width: 0; padding: 22px 28px 40px; }
.content { max-width: 1280px; margin: 0 auto; }
.topbar { display: none; }
.footer { max-width: 1280px; margin: 28px auto 0; color: var(--faint); font-size: 12px; text-align: center; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
  body.nav-open .sidebar { transform: none; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
  .topbar button { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px 10px; font: inherit; cursor: pointer; }
  .main { padding: 16px 14px 32px; }
}

/* ---------- 页面头 ---------- */
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .grow { flex: 1; min-width: 260px; }
.page-head .lead { margin: 6px 0 0; color: var(--muted); max-width: 900px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.title-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.title-meta b { color: var(--ink-2); font-weight: 600; }

/* ---------- 卡片 / 分区 ---------- */
.card, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; margin: 0 0 16px; }
.card > h2:first-child, .panel > h2:first-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card-head .grow { flex: 1; }
.card-head .hint { color: var(--muted); font-size: 13px; }
.card.flush { padding: 0; }
.card.flush > .card-head { padding: 14px 18px 0; }
.card.flush > .table-wrap { border-top: 0; }
.section-note { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.grid-1-2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1100px) { .grid-2, .grid-2-1, .grid-1-2, .two-col { grid-template-columns: 1fr; } }

/* ---------- 统计与待办 ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 0 0 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); color: inherit; display: block; }
a.stat:hover { border-color: #c9d5f5; text-decoration: none; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 24px; font-weight: 650; line-height: 1.3; margin-top: 2px; }
.stat small { display: block; color: var(--faint); font-size: 12px; }
.todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 18px; }
.todo a { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); box-shadow: var(--shadow); }
.todo a:hover { text-decoration: none; border-color: #c9d5f5; background: #fbfcff; }
.todo .big { font-size: 30px; font-weight: 700; line-height: 1.1; }
.todo .t { font-weight: 600; }
.todo .d { color: var(--muted); font-size: 13px; }
.todo a.zero .big { color: var(--faint); }
.todo a.alert .big { color: var(--bad); }
.todo .chips { margin-top: 4px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.card .table-wrap { margin: 0; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { background: #f8fafc; color: var(--muted); font-weight: 600; font-size: 12.5px; white-space: nowrap; position: sticky; top: 0; }
tbody tr:hover td { background: var(--hover); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.nowrap, th.nowrap, .nowrap { white-space: nowrap; }
td .sub, .sub { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
table.plain th { position: static; }
table.compact th, table.compact td { padding: 6px 10px; }
tr.child td:first-child, td.child { padding-left: 34px; }
.tree td.child { padding-left: 34px; }
.row-link { color: var(--ink); font-weight: 600; }
.row-link:hover { color: var(--accent); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink-2); font-size: 15px; margin-bottom: 4px; }

/* ---------- 徽标 ---------- */
.badge { display: inline-block; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px; background: #eef1f5; color: var(--ink-2); white-space: nowrap; vertical-align: 1px; font-weight: 500; }
.badge.confirmed, .badge.ok, .badge.green { background: var(--ok-soft); color: var(--ok); }
.badge.corroborated, .badge.blue, .badge.status { background: var(--sky-soft); color: var(--sky); }
.badge.candidate, .badge.auto_candidate, .badge.unverified, .badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.rejected, .badge.conflict, .badge.red { background: var(--bad-soft); color: var(--bad); }
.badge.expired, .badge.gray { background: #eef1f5; color: var(--muted); }
.badge.origin, .badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.kind { background: #eef1f5; color: var(--ink-2); }
.badge.status-pending { background: var(--warn-soft); color: var(--warn); }
.badge.status-investigating { background: var(--sky-soft); color: var(--sky); }
.badge.status-remediation { background: var(--bad-soft); color: var(--bad); }
.badge.status-awaiting_feedback { background: var(--violet-soft); color: var(--violet); }
.badge.status-closed, .badge.status-closed_insufficient { background: #eef1f5; color: var(--muted); }
.badge.priority-1, .badge.priority-2 { background: var(--bad-soft); color: var(--bad); }
.badge.priority-3, .badge.priority-4 { background: var(--warn-soft); color: var(--warn); }
.badge.outline { background: transparent; border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-2); font-size: 12.5px; line-height: 20px; }
a.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
a.chip.on, .chip.on { background: var(--accent-soft); border-color: #c5d4fb; color: var(--accent-ink); font-weight: 600; }
.chip .n { color: var(--muted); font-weight: 400; }
.actor { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; }
.actor b { font-weight: 500; font-size: 11.5px; padding: 0 6px; border-radius: 4px; line-height: 18px; background: #eef1f5; color: var(--muted); }
.actor-human b { background: var(--ok-soft); color: var(--ok); }
.actor-model b { background: var(--violet-soft); color: var(--violet); }
.actor-program b { background: #eef1f5; color: var(--ink-2); }
.actor-token b { background: var(--sky-soft); color: var(--sky); }

/* ---------- 按钮与表单 ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 14px; border: 1px solid #d5dbe4; border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-weight: 500; line-height: 1.3; cursor: pointer; text-decoration: none; white-space: nowrap; }
.button:hover { background: var(--hover); border-color: #c3cad6; text-decoration: none; }
.button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.button.primary:hover { background: var(--accent-ink); }
.button.ok { border-color: #a9d8bf; color: var(--ok); background: #f6fcf8; }
.button.ok:hover { background: var(--ok-soft); }
.button.ok.solid { background: var(--ok); border-color: var(--ok); color: #fff; }
.button.bad { border-color: #f0b9b3; color: var(--bad); background: #fffafa; }
.button.bad:hover { background: var(--bad-soft); }
.button.ghost { border-color: transparent; background: transparent; color: var(--accent); padding-left: 8px; padding-right: 8px; }
.button.ghost:hover { background: var(--accent-soft); }
.button.small { padding: 4px 10px; font-size: 13px; border-radius: 7px; }
.button:disabled { opacity: .5; cursor: default; }
.htmx-request .button, .htmx-request.button { opacity: .6; }
input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], input[type=url], select, textarea {
  font: inherit; padding: 6px 10px; border: 1px solid #d5dbe4; border-radius: 8px; background: #fff; color: var(--ink); max-width: 100%; line-height: 1.4;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 89, 224, .15); }
textarea { width: 100%; min-height: 64px; resize: vertical; }
select { padding-right: 28px; }
label { color: var(--ink-2); }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.field > label { font-weight: 600; font-size: 13px; }
.field .help { color: var(--muted); font-size: 12.5px; }
.field input[type=text], .field input[type=search], .field select, .field textarea { width: 100%; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 14px; }
.toolbar form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0; }
.toolbar .grow { flex: 1; }
.toolbar input[type=search] { min-width: 280px; flex: 1; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
details > summary { cursor: pointer; color: var(--muted); }
details > summary::-webkit-details-marker { color: var(--faint); }
details.inline-form > summary { list-style: none; }
details.inline-form > summary::-webkit-details-marker { display: none; }
details.inline-form[open] { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
details.drawer { border: 1px dashed var(--line); border-radius: 8px; padding: 8px 12px; margin-top: 8px; }
details.drawer[open] { background: #fbfcfd; }
details.drawer > summary { font-size: 13px; }
details.drawer > *:not(summary) { margin-top: 8px; }

/* ---------- 提示 ---------- */
.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid #d6e1fc; }
.notice.error { background: var(--bad-soft); color: var(--bad); border-color: #f5c9c4; }
.notice.success { background: var(--ok-soft); color: var(--ok); border-color: #bfe3cf; }
.notice.warning { background: var(--warn-soft); color: var(--warn); border-color: #f2d7a8; }
.callout { padding: 10px 14px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); color: var(--ink-2); font-size: 13px; margin-bottom: 12px; }
.callout.warn { background: var(--warn-soft); border-color: #f2d7a8; color: #7a4b07; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.warn-text { color: var(--warn); }
.wrap { overflow-wrap: anywhere; word-break: break-word; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kbd { display: inline-block; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; font-size: 12px; font-family: var(--mono); background: #fff; }
.copy { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0 2px; font-size: 12px; }
.copy:hover { color: var(--accent); }
mark { background: #fff2a8; padding: 0 1px; border-radius: 2px; }

/* ---------- 键值列表 ---------- */
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 18px; margin: 0; }
.kv dt { color: var(--muted); white-space: nowrap; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.kv dd .empty-val { color: var(--faint); }
.kv.tight { gap: 4px 14px; font-size: 13px; }
pre.json, .codeblock { font-family: var(--mono); font-size: 12px; background: #f6f8fb; border: 1px solid var(--line-2); padding: 10px 12px; border-radius: 8px; overflow: auto; max-height: 360px; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- 页内导航 ---------- */
.subnav { position: sticky; top: 0; z-index: 10; display: flex; gap: 2px; flex-wrap: wrap; padding: 6px; margin: 0 0 16px; background: rgba(244, 246, 249, .92); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 10px; }
.subnav a { padding: 5px 12px; border-radius: 7px; color: var(--ink-2); font-size: 13.5px; }
.subnav a:hover { background: var(--panel); text-decoration: none; }
.subnav a .n { color: var(--muted); margin-left: 4px; font-size: 12px; }
.subnav a.hot .n { color: var(--bad); font-weight: 600; }
@media (max-width: 960px) { .subnav { top: 49px; } }
section[id], div[id^="claim-"], article[id] { scroll-margin-top: 70px; }

/* ---------- 总结 ---------- */
.summary-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; color: var(--ink); }
.summary-body .cite, a.cite { display: inline-block; font-size: 11.5px; line-height: 16px; padding: 0 4px; margin: 0 1px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-ink); vertical-align: 1px; }
a.cite:hover { background: var(--accent); color: #fff; text-decoration: none; }
.changes { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; }
.changes h3 { margin: 10px 0 4px; font-size: 13px; color: var(--ink-2); }
.changes ul { margin: 2px 0 8px 18px; padding: 0; }
.changes li { margin: 2px 0; }
.summary-state { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 10px; }

/* ---------- 断言（信息要点） ---------- */
.claim-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.claim-filters input[type=search] { min-width: 220px; }
.claim-section { margin: 0 0 14px; }
.claim-section > h3 { display: flex; align-items: center; gap: 8px; padding: 6px 0; margin: 0 0 6px; border-bottom: 1px solid var(--line); font-size: 14px; }
.claim-section > h3 .n { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.claim-group { margin: 0 0 10px; }
.claim-group > h4 { margin: 8px 0 4px; font-size: 13px; color: var(--ink-2); font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.claim-group > h4 code { color: var(--faint); font-weight: 400; font-size: 11.5px; }
.claim { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; margin-bottom: 5px; background: #fff; }
.claim:target { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 89, 224, .15); }
.claim .value { overflow-wrap: anywhere; white-space: pre-wrap; }
.claim .tags { display: flex; gap: 4px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.claim .meta { grid-column: 1 / -1; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.claim > details { grid-column: 1 / -1; }
.claim-group > details { margin: 2px 0 6px; }
.claim.superseded { opacity: .7; background: #fafbfc; }
.claim.rejected .value { text-decoration: line-through; color: var(--muted); }

/* ---------- 待确认项 ---------- */
.review-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; background: var(--panel); box-shadow: var(--shadow); }
.review-item.focused { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(36, 89, 224, .15); }
.review-item.done { background: #f7faf8; opacity: .85; }
.review-item .ri-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.review-item .ri-head h3 { margin: 0; font-size: 15px; }
.review-item .ri-meta { display: flex; gap: 4px 12px; flex-wrap: wrap; color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.review-item .reason { margin: 0 0 8px; }
.review-item .target { padding: 10px 12px; border-left: 3px solid #c9d6ef; background: #f8fafd; margin: 8px 0; border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }
.review-item .target .label { color: var(--muted); font-size: 12.5px; }
.review-item .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.review-item .decided { margin-top: 8px; color: var(--muted); font-size: 13px; }
.review-item input[type=checkbox] { width: 16px; height: 16px; }
.candidates { margin: 6px 0; padding-left: 18px; }
.model-suggestions { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #d8cbf3; background: #faf8fe; border-radius: 0 8px 8px 0; }
.model-suggestions ul { margin: 6px 0 0; padding-left: 18px; }
table.disagreement { margin: 8px 0; font-size: 13px; }
table.disagreement th { position: static; }
.pagination { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; }

/* ---------- 原件 ---------- */
.file-name { font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
a.file-name:hover { color: var(--accent); }
.thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #f3f5f8; display: block; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs a { display: block; }
.preview-img { max-width: 100%; max-height: 80vh; border: 1px solid var(--line); border-radius: 8px; background: repeating-conic-gradient(#f3f5f8 0 25%, #fff 0 50%) 50% / 16px 16px; }
.mail-head { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0 0 12px; }
.mail-head dt { color: var(--muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.7; background: #fcfcfd; border: 1px solid var(--line-2); border-radius: 8px; padding: 14px 16px; max-height: 70vh; overflow: auto; }
.text-dump { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; background: #fcfcfd; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; max-height: 60vh; overflow: auto; }
.fwd { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; margin: 8px 0; color: var(--ink-2); font-size: 13px; }
table.sheet td { white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 时间线 ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: grid; grid-template-columns: 130px 180px minmax(0, 1fr); gap: 12px; font-size: 13.5px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 800px) { .timeline li { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- 登录 ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(160deg, #eef3ff 0%, #f4f6f9 55%); }
.auth-card { width: min(380px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(16, 24, 40, .08); padding: 28px 28px 22px; }
.auth-card h1 { font-size: 20px; margin-bottom: 4px; }
.auth-card .lead { color: var(--muted); margin-bottom: 18px; }
.auth-card input { width: 100%; padding: 9px 12px; }
.auth-card .button { width: 100%; padding: 10px; margin-top: 6px; }
.auth-card .errorlist { list-style: none; padding: 0; margin: 0 0 12px; color: var(--bad); }

/* ---------- 其他 ---------- */
.score { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.snippet { color: var(--ink-2); font-size: 13px; overflow-wrap: anywhere; }
.hits { margin: 0; padding: 0; list-style: none; }
.hits li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hits li:last-child { border-bottom: 0; }
.facets { display: flex; flex-direction: column; gap: 8px; }
.facet { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.facet > span:first-child { color: var(--muted); min-width: 84px; font-size: 13px; }
.dist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.dist .card { margin: 0; }
.bar { height: 6px; border-radius: 3px; background: var(--accent-soft); overflow: hidden; margin-top: 3px; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.cell-human { background: #fff8e6 !important; }
.legend { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12.5px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; background: #fff8e6; border: 1px solid #f2d7a8; }
.research-item { border: 1px solid var(--line-2); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.research-item > summary { color: var(--ink); }
.dropzone { border: 2px dashed #c9d3e3; border-radius: 12px; padding: 26px; text-align: center; background: #fbfcfe; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); }
.dropzone input[type=file] { margin-top: 8px; }
