:root {
  color-scheme: light;
  --bg: #071019;
  --panel: rgba(15, 27, 40, .86);
  --panel-strong: #101e2b;
  --line: rgba(149, 184, 208, .14);
  --text: #edf7fb;
  --muted: #8fa8b8;
  --teal: #5eead4;
  --cyan: #67e8f9;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --red: #fb7185;
  --green: #34d399;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  min-width: 880px; min-height: 100vh; margin: 0; color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  background:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    radial-gradient(circle at 10% -15%, #143351 0, transparent 34%),
    radial-gradient(circle at 90% 8%, #0f3a42 0, transparent 30%),
    var(--bg);
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
}

button, input { font: inherit; }
button { color: inherit; }

.ambient {
  position: fixed; border-radius: 50%; filter: blur(80px); pointer-events: none; opacity: .22;
}
.ambient-a { width: 300px; height: 300px; top: 15%; left: -180px; background: #22d3ee; }
.ambient-b { width: 380px; height: 380px; right: -240px; bottom: 8%; background: #34d399; }

.topbar {
  height: 72px; padding: 0 34px; display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line); background: rgba(6, 15, 23, .82); backdrop-filter: blur(18px);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px;
  background: linear-gradient(145deg, rgba(94,234,212,.22), rgba(96,165,250,.14));
  border: 1px solid rgba(103,232,249,.34); box-shadow: inset 0 0 22px rgba(103,232,249,.08);
}
.brand-mark::before { content: ""; width: 22px; height: 13px; border: 2px solid var(--cyan); border-radius: 50%; }
.brand-mark span { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.brand strong { display: block; font-size: 15px; letter-spacing: .5px; }
.brand small { display: block; margin-top: 3px; color: #638194; font-size: 9px; letter-spacing: 1.6px; }

.top-source {
  max-width: 360px; display: flex; align-items: center; gap: 8px; padding: 7px 13px;
  border-radius: 999px; border: 1px solid var(--line); color: #a7bdca; font-size: 11px;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.top-source span:last-child { overflow: hidden; text-overflow: ellipsis; }
.live-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }

.top-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ghost-btn, .danger-ghost {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.025); color: #a9bdc9; font-size: 11px;
}
.ghost-btn:hover { color: var(--text); border-color: rgba(103,232,249,.4); background: rgba(103,232,249,.07); }

.shell { width: min(1380px, calc(100% - 56px)); margin: 0 auto; padding: 34px 0 70px; }

.mission-hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); gap: 34px;
  align-items: start; padding: 18px 4px 28px;
}
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--teal); font-size: 10px; font-weight: 750; letter-spacing: 1.7px; text-transform: uppercase; }
.type-badge { padding: 4px 9px; color: #a5f3fc; border: 1px solid rgba(103,232,249,.23); border-radius: 999px; background: rgba(34,211,238,.07); letter-spacing: .3px; }
.hero-copy h1 { margin: 13px 0 9px; max-width: 760px; font-size: clamp(30px, 4vw, 56px); line-height: 1.08; letter-spacing: -1.8px; }
.source-title { margin: 0; max-width: 680px; color: var(--muted); font-size: 13px; line-height: 1.75; }

.goal-box {
  padding: 18px; border: 1px solid rgba(103,232,249,.17); border-radius: 16px;
  align-self: start;
  background: linear-gradient(145deg, rgba(21,42,59,.9), rgba(13,31,43,.72));
  box-shadow: 0 14px 45px rgba(0,0,0,.18);
}
.goal-box label { display: block; margin-bottom: 9px; color: #a6bdc9; font-size: 11px; }
.goal-row { display: flex; gap: 8px; }
.goal-row input {
  flex: 1; min-width: 0; padding: 12px 13px; outline: none; color: var(--text);
  border: 1px solid rgba(153,186,205,.18); border-radius: 10px; background: rgba(4,12,19,.45); font-size: 12px;
}
.goal-row input:focus { border-color: rgba(94,234,212,.55); box-shadow: 0 0 0 3px rgba(94,234,212,.06); }
.primary-btn {
  min-width: 92px; border: 0; border-radius: 10px; cursor: pointer; color: #062c31; font-size: 12px; font-weight: 800;
  background: linear-gradient(135deg, var(--teal), var(--cyan)); box-shadow: 0 6px 18px rgba(45,212,191,.18);
}
.primary-btn:hover { filter: brightness(1.05); }
.primary-btn:disabled { opacity: .55; cursor: wait; }
.goal-meta { display: flex; gap: 14px; margin-top: 10px; color: #688497; font-size: 9px; letter-spacing: .4px; }
.goal-meta span::before { content: "•"; margin-right: 5px; color: var(--teal); }

.process-panel {
  margin-bottom: 16px; padding: 17px 20px 14px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: rgba(10,22,32,.74);
}
.process-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.process-kicker { color: #668396; font-size: 9px; letter-spacing: 1.3px; }
.process-head h2 { display: inline; margin: 0 0 0 10px; font-size: 13px; }
.process-state { padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; letter-spacing: .6px; }
.process-state.running { color: #8ef2e2; background: rgba(52,211,153,.1); border: 1px solid rgba(52,211,153,.2); }
.process-state.done { color: #a7f3d0; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.25); }
.process-state.warning { color: #fcd34d; background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.24); }
.process-state.failed { color: #fda4af; background: rgba(251,113,133,.1); border: 1px solid rgba(251,113,133,.25); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { display: flex; align-items: center; gap: 9px; min-width: 0; color: #5f7787; }
.step-dot {
  width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(143,168,184,.18); background: rgba(255,255,255,.025); font-size: 10px; font-weight: 800;
}
.step strong { display: block; color: #78909f; font-size: 10px; }
.step small { display: block; margin-top: 2px; overflow: hidden; color: #4c6474; font-size: 8px; white-space: nowrap; text-overflow: ellipsis; }
.step.active .step-dot { color: #062e31; border-color: transparent; background: var(--teal); box-shadow: 0 0 18px rgba(94,234,212,.28); animation: pulse 1.4s infinite; }
.step.active strong { color: #d8fbf6; }
.step.done .step-dot { color: #06352c; border-color: transparent; background: var(--green); }
.step.done .step-dot::after { content: "✓"; }
.step.done .step-dot { font-size: 0; }
.step.done .step-dot::after { font-size: 11px; }
.step.done strong { color: #a7cfca; }
.step.failed .step-dot { color: white; border-color: transparent; background: var(--red); }
.loading-track { height: 2px; margin-top: 14px; overflow: hidden; border-radius: 2px; background: rgba(255,255,255,.04); }
.loading-track span { display: block; width: 8%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal), var(--cyan)); transition: width .45s ease; box-shadow: 0 0 12px var(--cyan); }

.error-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 16px; padding: 14px 16px;
  border: 1px solid rgba(251,113,133,.28); border-radius: 13px; background: rgba(110,25,44,.22); color: #fecdd3;
}
.error-banner p { margin: 4px 0 0; color: #dba8b1; font-size: 11px; }
.error-banner button { padding: 8px 11px; border: 1px solid rgba(254,205,211,.24); border-radius: 8px; background: transparent; cursor: pointer; font-size: 10px; }
/* DS-12：好友分享目标页的只读提示——有文字说明，不只靠颜色。 */
.readonly-banner {
  margin: 10px 0 0; padding: 10px 14px; border: 1px solid rgba(124,58,237,.30); border-radius: 12px;
  background: rgba(76,29,149,.18); color: #ddd6fe; font-size: 12px; line-height: 1.55;
}
.readonly-banner::before { content: '🔒 '; }
.hidden { display: none !important; }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .65fr); gap: 16px; transition: opacity .3s; }
.workspace-grid.is-loading { opacity: .68; }
.main-column, .side-column { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.panel {
  border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(150deg, rgba(17,32,46,.88), rgba(10,23,34,.82));
  box-shadow: 0 16px 48px rgba(0,0,0,.13); overflow: hidden;
}
.panel-heading { min-height: 52px; padding: 15px 17px 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-heading > div { display: flex; align-items: center; gap: 9px; }
.panel-heading h2 { margin: 0; font-size: 13px; letter-spacing: .2px; }
.panel-no { color: #4d6b7c; font: 800 9px/1 monospace; }
.muted-label { color: #698495; font-size: 10px; }
.status-badge { padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 800; }
.status-badge.waiting { color: #8fa8b8; background: rgba(143,168,184,.08); }
.status-badge.passed { color: #6ee7b7; background: rgba(52,211,153,.1); }
.status-badge.corrected { color: #67e8f9; background: rgba(34,211,238,.1); }
.status-badge.needs_review { color: #fcd34d; background: rgba(251,191,36,.1); }

.summary-text { margin: 0; padding: 4px 18px 18px; color: #d7e6ed; font-size: 15px; line-height: 1.8; }
.facts-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.fact { min-height: 74px; padding: 14px 17px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.fact:nth-child(2n) { border-right: 0; }
.fact label { display: block; margin-bottom: 6px; color: #638093; font-size: 9px; letter-spacing: .5px; }
.fact strong { display: block; color: #e7f4f8; font-size: 12px; line-height: 1.55; }

.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.timeline-list, .materials-list, .task-list, .risks-list { padding: 3px 17px 17px; }
.timeline-item { position: relative; padding: 5px 0 14px 20px; border-left: 1px solid rgba(94,234,212,.18); }
.timeline-item:last-child { padding-bottom: 3px; }
.timeline-item::before { content: ""; position: absolute; left: -4px; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 9px rgba(94,234,212,.4); }
.timeline-date { color: var(--teal); font: 700 9px/1.4 monospace; }
.timeline-item strong { display: block; margin-top: 3px; font-size: 11px; }
.timeline-item p { margin: 4px 0 0; color: #7892a2; font-size: 9px; line-height: 1.55; }

.material { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid rgba(149,184,208,.09); }
.material:last-child { border-bottom: 0; }
.material-icon { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: rgba(96,165,250,.1); color: #93c5fd; font-size: 11px; }
.material strong { display: block; font-size: 10px; line-height: 1.45; }
.material p { margin: 3px 0 0; color: #728b9b; font-size: 9px; line-height: 1.5; }

.task-progress { height: 3px; margin: 0 17px 11px; border-radius: 4px; background: rgba(255,255,255,.05); overflow: hidden; }
.task-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--green), var(--cyan)); transition: width .25s; }
.task-item { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid rgba(149,184,208,.09); }
.task-item:last-child { border-bottom: 0; }
.task-check { appearance: none; width: 22px; height: 22px; margin: 0; border: 1px solid rgba(143,168,184,.28); border-radius: 7px; background: rgba(255,255,255,.025); cursor: pointer; }
.task-check:checked { border-color: transparent; background: var(--green); }
.task-check:checked::after { content: "✓"; display: grid; place-items: center; height: 100%; color: #06372c; font-weight: 900; }
.task-copy strong { display: block; font-size: 11px; line-height: 1.55; }
.task-copy p { margin: 4px 0 0; color: #758d9c; font-size: 9px; line-height: 1.55; }
.task-item.completed .task-copy { opacity: .52; }
.task-item.completed .task-copy strong { text-decoration: line-through; }
.priority { padding: 3px 7px; border-radius: 999px; font-size: 8px; font-weight: 800; text-transform: uppercase; }
.priority.high { color: #fda4af; background: rgba(251,113,133,.1); }
.priority.medium { color: #fcd34d; background: rgba(251,191,36,.1); }
.priority.low { color: #93c5fd; background: rgba(96,165,250,.1); }

details.evidence { margin-top: 5px; }
details.evidence summary { width: fit-content; color: #547487; font-size: 8px; cursor: pointer; list-style: none; }
details.evidence summary::before { content: "+ "; color: var(--teal); }
details.evidence[open] summary::before { content: "− "; }
details.evidence p { margin: 5px 0 0; padding: 7px 8px; border-left: 2px solid rgba(94,234,212,.28); background: rgba(94,234,212,.04); color: #8da8b6; font-size: 8px; line-height: 1.55; }

.confidence-panel { min-height: 156px; padding: 18px; display: flex; align-items: center; gap: 17px; }
.confidence-ring {
  --score: 0; width: 108px; height: 108px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--score) * 1%), rgba(255,255,255,.06) 0);
  position: relative; box-shadow: 0 0 28px rgba(94,234,212,.08);
}
.confidence-ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: #0e1c29; border: 1px solid var(--line); }
.confidence-ring > div { position: relative; text-align: center; }
.confidence-ring strong { display: block; font-size: 25px; }
.confidence-ring small { color: #7290a0; font-size: 8px; letter-spacing: .6px; }
.confidence-copy { flex: 1; min-width: 0; color: #7892a2; font-size: 9px; }
.confidence-copy strong { display: block; margin: 5px 0 8px; color: #e0eef3; font-size: 14px; }
.evidence-bar { height: 4px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.05); }
.evidence-bar span { display: block; width: 0; height: 100%; background: var(--blue); transition: width .3s; }

.audit-summary { margin: 0; padding: 2px 17px 12px; color: #93aab7; font-size: 10px; line-height: 1.6; }
.audit-checks { padding: 0 17px 12px; }
.audit-check { display: grid; grid-template-columns: 15px 1fr; gap: 7px; padding: 7px 0; border-bottom: 1px solid rgba(149,184,208,.08); }
.audit-check:last-child { border-bottom: 0; }
.audit-check .check-icon { font-size: 10px; }
.audit-check strong { display: block; font-size: 9px; }
.audit-check p { margin: 3px 0 0; color: #6f8796; font-size: 8px; line-height: 1.5; }
.audit-sub { margin: 0 17px 14px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.025); }
.audit-sub h3 { margin: 0 0 7px; color: #8aa4b3; font-size: 9px; letter-spacing: .5px; }
.correction { padding: 7px 0; border-bottom: 1px dashed rgba(149,184,208,.12); font-size: 8px; line-height: 1.55; }
.correction:last-child { border-bottom: 0; }
.correction del { color: #c98b95; }
.correction ins { color: #75dbc8; text-decoration: none; }
.correction small { display: block; margin-top: 3px; color: #637e8e; }
.missing-item { padding: 4px 0; color: #e7c26b; font-size: 8px; line-height: 1.5; }
.missing-item::before { content: "?"; display: inline-grid; place-items: center; width: 14px; height: 14px; margin-right: 6px; border-radius: 50%; background: rgba(251,191,36,.12); font-weight: 800; }

.risk { margin-bottom: 8px; padding: 9px 10px; border-radius: 10px; border-left: 2px solid #718698; background: rgba(255,255,255,.025); }
.risk.high { border-color: var(--red); background: rgba(251,113,133,.045); }
.risk.medium { border-color: var(--amber); background: rgba(251,191,36,.045); }
.risk.low { border-color: var(--blue); }
.risk strong { display: block; color: #ccdce3; font-size: 9px; line-height: 1.55; }
.empty-copy { min-height: 52px; color: #526b7a; font-size: 9px; line-height: 1.6; }

.history-drawer {
  position: fixed; top: 0; right: 0; z-index: 60; width: min(430px, 92vw); height: 100vh; padding: 24px;
  transform: translateX(105%); transition: transform .28s ease; border-left: 1px solid var(--line);
  background: #0b1722; box-shadow: -24px 0 70px rgba(0,0,0,.36); overflow-y: auto;
}
.history-drawer.open { transform: translateX(0); }
.drawer-mask { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.46); backdrop-filter: blur(2px); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head span { color: var(--teal); font-size: 9px; letter-spacing: 1.3px; }
.drawer-head h2 { margin: 5px 0 0; font-size: 21px; }
.drawer-head button { border: 0; background: transparent; color: #8ca5b4; cursor: pointer; font-size: 28px; }
.history-list { margin: 24px 0; }
.history-item { width: 100%; margin-bottom: 9px; padding: 13px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); cursor: pointer; }
.history-item:hover { border-color: rgba(94,234,212,.3); background: rgba(94,234,212,.04); }
.history-item strong { display: block; color: #d8e8ee; font-size: 11px; }
.history-item span { display: block; margin-top: 5px; color: #617c8d; font-size: 8px; }
.history-empty { color: #668090; font-size: 11px; }
.danger-ghost { width: 100%; color: #d7909c; border-color: rgba(251,113,133,.2); }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translateX(-50%); padding: 10px 15px; border-radius: 10px; background: #d9fbf5; color: #0b3a3c; box-shadow: 0 10px 30px rgba(0,0,0,.3); font-size: 10px; font-weight: 750; }

@keyframes pulse { 50% { box-shadow: 0 0 26px rgba(94,234,212,.45); } }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr auto; }
  .top-source { display: none; }
  .mission-hero { grid-template-columns: 1fr; gap: 18px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .risks-panel { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { min-width: 0; }
  .topbar { height: auto; min-height: 68px; padding: 12px 18px; }
  .top-actions .ghost-btn:not(:first-child) { display: none; }
  .shell { width: calc(100% - 28px); padding-top: 22px; }
  .hero-copy h1 { font-size: 34px; }
  .goal-row { flex-direction: column; }
  .primary-btn { min-height: 42px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(n+3) { margin-top: 7px; }
  .split-row, .side-column { display: flex; flex-direction: column; }
  .facts-grid { grid-template-columns: 1fr; }
  .fact { border-right: 0; }
}

/* v0.15：任务舱信息密度与综合导航。正文最低 12px，主要操作保持 14px 以上。 */
body { font-size: 15px; line-height: 1.55; }
.topbar { min-height: 78px; height: auto; }
.brand strong { font-size: 17px; }
.brand small { font-size: 10px; }
.top-source, .ghost-btn, .danger-ghost { font-size: 13px; }
.ghost-btn { min-height: 38px; padding: 9px 14px; }
.shell { width: min(1480px, calc(100% - 64px)); padding-top: 40px; }
.mission-hero { gap: 44px; padding-bottom: 34px; }
.eyebrow { font-size: 12px; }
.hero-copy h1 { font-size: clamp(38px, 4.2vw, 64px); line-height: 1.08; }
.source-title { font-size: 15px; }
.goal-box { padding: 22px; border-radius: 20px; box-shadow: 0 20px 70px rgba(0,0,0,.22); }
.goal-box label { font-size: 13px; }
.goal-row input { min-height: 48px; padding: 13px 15px; font-size: 15px; }
.primary-btn { min-width: 112px; font-size: 14px; }
.goal-meta { font-size: 11px; flex-wrap: wrap; }
.process-panel { padding: 20px 22px 17px; border-radius: 19px; }
.process-kicker, .process-state { font-size: 11px; }
.process-head h2 { font-size: 16px; }
.steps { grid-template-columns: repeat(5, 1fr); }
.step-dot { width: 30px; height: 30px; font-size: 12px; }
.step strong { font-size: 12px; }
.step small { font-size: 10px; }
.workspace-grid { grid-template-columns: minmax(0, 1.48fr) minmax(330px, .62fr); gap: 20px; }
.main-column, .side-column { gap: 20px; }
.panel { border-radius: 20px; box-shadow: 0 20px 65px rgba(0,0,0,.16); }
.panel-heading { min-height: 62px; padding: 18px 21px 12px; }
.panel-heading h2 { font-size: 16px; }
.panel-no, .muted-label, .status-badge { font-size: 11px; }
.summary-text { padding: 6px 22px 22px; font-size: 17px; line-height: 1.85; }
.fact { min-height: 88px; padding: 17px 21px; }
.fact label { font-size: 11px; }
.fact strong { font-size: 14px; }
.timeline-list, .materials-list, .task-list, .risks-list { padding: 4px 21px 21px; }
.timeline-date { font-size: 11px; }
.timeline-item strong { font-size: 14px; }
.timeline-item p, .material p, .task-copy p { font-size: 12px; line-height: 1.65; }
.material { gap: 12px; padding: 12px 0; }
.material-icon { width: 32px; height: 32px; font-size: 12px; }
.material strong, .task-copy strong { font-size: 14px; }
.task-item { grid-template-columns: 32px 1fr auto; padding: 15px 0; }
.task-check { width: 25px; height: 25px; }
.priority { font-size: 10px; padding: 4px 8px; }
details.evidence summary { font-size: 11px; }
details.evidence p { padding: 9px 10px; font-size: 11px; }
.confidence-copy, .confidence-ring small { font-size: 11px; }
.audit-summary { padding: 3px 21px 14px; font-size: 13px; }
.audit-checks { padding: 0 21px 15px; }
.audit-check { grid-template-columns: 18px 1fr; gap: 9px; padding: 10px 0; }
.audit-check .check-icon, .audit-check strong { font-size: 12px; }
.audit-check p, .correction, .missing-item { font-size: 11px; }
.audit-sub h3 { font-size: 12px; }
.risk strong, .empty-copy { font-size: 12px; }
.error-banner p, .error-banner button { font-size: 12px; }
.history-item strong, .history-empty { font-size: 13px; }
.history-item span { font-size: 11px; }
.toast { font-size: 13px; }

.task-panel-actions { display: flex; align-items: center; gap: 10px; }
.mini-action-btn, .task-remind-btn {
  border: 1px solid rgba(94,234,212,.22); border-radius: 10px; color: #8bf3e4;
  background: rgba(94,234,212,.075); cursor: pointer; font: inherit; font-weight: 750;
}
.mini-action-btn { padding: 7px 10px; font-size: 11px; }
.task-row-actions { display: flex; align-items: center; gap: 8px; }
.task-remind-btn { min-width: 68px; padding: 6px 8px; font-size: 10px; white-space: nowrap; }
.mini-action-btn:hover, .task-remind-btn:hover { background: rgba(94,234,212,.14); }
.mini-action-btn:disabled, .task-remind-btn:disabled { opacity: .46; cursor: default; }
/* DS-14 D-09：已加入提醒后的取消/管理入口（次级按钮，不抢提醒主操作） */
.task-remind-cancel {
  min-width: 0; padding: 6px 8px; font: inherit; font-size: 10px; white-space: nowrap;
  border: 1px solid rgba(148,163,184,.3); border-radius: 10px;
  color: #cbd5e1; background: rgba(148,163,184,.08); cursor: pointer;
}
.task-remind-cancel:hover { background: rgba(148,163,184,.16); }
.task-remind-reason { font-size: 10px; color: #94a3b8; white-space: nowrap; }
/* DS-14 D-10：只读步骤徽标与提示（不引入任何可写控件） */
.task-item.readonly .task-check { cursor: not-allowed; opacity: .6; }
.task-readonly-badge {
  padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 750;
  color: #e2e8f0; background: rgba(148,163,184,.16); border: 1px solid rgba(148,163,184,.24);
}
.task-readonly-hint { margin: 2px 0 0; font-size: 11px; color: #94a3b8; }

.sync-btn { display: inline-flex; align-items: center; gap: 7px; }
.sync-btn > span:first-child { width: 7px; height: 7px; border-radius: 50%; background: #64748b; }
.sync-btn.syncing > span:first-child { background: var(--amber); box-shadow: 0 0 10px var(--amber); animation: pulse 1.1s infinite; }
.sync-btn.synced > span:first-child { background: var(--green); box-shadow: 0 0 10px var(--green); }
.sync-btn.offline > span:first-child { background: #64748b; }
/* V3 三端统一同步状态：待同步=琥珀、冲突=红橙、较旧=蓝 */
.sync-btn.pending > span:first-child { background: var(--amber); box-shadow: 0 0 10px var(--amber); }
.sync-btn.conflict > span:first-child { background: #f87171; box-shadow: 0 0 10px #f87171; animation: pulse 1.4s infinite; }
.sync-btn.stale > span:first-child { background: var(--blue); box-shadow: 0 0 10px var(--blue); }

.panel-intro { margin: 0; padding: 0 21px 17px; color: #89a2b1; font-size: 13px; line-height: 1.7; }
.journey-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; padding: 0; background: var(--line); border-top: 1px solid var(--line); }
.journey-item { min-height: 152px; display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 21px; background: rgba(10,23,34,.96); }
.journey-index { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: #052d33; background: linear-gradient(135deg,var(--teal),var(--cyan)); font: 850 12px/1 monospace; }
.journey-copy small { display: block; margin-bottom: 6px; color: var(--teal); font-size: 11px; }
.journey-copy strong { display: block; font-size: 14px; line-height: 1.45; }
.journey-copy p { margin: 7px 0 0; color: #7f98a7; font-size: 12px; line-height: 1.65; }

.research-badge { padding: 5px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.research-badge.waiting, .research-badge.unavailable { color: #fcd34d; background: rgba(251,191,36,.1); }
.research-badge.verified { color: #6ee7b7; background: rgba(52,211,153,.11); }
.research-badge.partial { color: #67e8f9; background: rgba(34,211,238,.1); }
.navigation-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; padding: 0 21px 22px; }
.nav-card { min-width: 0; padding: 16px; border: 1px solid rgba(103,232,249,.12); border-radius: 15px; background: linear-gradient(145deg,rgba(29,55,71,.55),rgba(9,24,35,.76)); }
.nav-head, .nav-footer, .resource-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.nav-kind, .source-proof, .resource-meta span { padding: 4px 8px; border-radius: 999px; font-size: 10px; }
.nav-kind { color: #b8e8f1; background: rgba(96,165,250,.11); }
.nav-kind.official { color: #a7f3d0; background: rgba(52,211,153,.11); }
.source-proof.verified { color: #72dfca; }
.source-proof.search { color: #e9be5d; }
.nav-title { display: block; margin-top: 13px; font-size: 15px; line-height: 1.45; }
.nav-card > p { margin: 7px 0 16px; color: #8099a8; font-size: 12px; line-height: 1.65; }
.nav-footer { padding-top: 11px; border-top: 1px solid rgba(149,184,208,.09); color: #688494; font-size: 11px; }
.external-link { color: var(--cyan); text-decoration: none; font-size: 12px; font-weight: 750; }
.external-link:hover { text-decoration: underline; }

.resources-list, .advice-list { padding: 2px 21px 21px; }
.resource-item { padding: 14px 0; border-bottom: 1px solid rgba(149,184,208,.09); }
.resource-item:last-child { border-bottom: 0; }
.resource-meta { justify-content: flex-start; }
.resource-meta span { color: #8fd7df; background: rgba(34,211,238,.07); }
.resource-item strong { display: block; margin-top: 9px; font-size: 13px; line-height: 1.55; }
.resource-item p { margin: 6px 0 9px; color: #748d9c; font-size: 12px; line-height: 1.6; }

.source-registry { display: flex; flex-direction: column; gap: 10px; padding: 0 21px 18px; }
.registry-summary { padding: 8px 12px; border-radius: 10px; background: rgba(34,211,238,.06); color: #8fd7df; font-size: 11px; line-height: 1.6; }
.registry-card { min-width: 0; padding: 12px 14px; border: 1px solid rgba(103,232,249,.10); border-radius: 12px; background: linear-gradient(145deg,rgba(22,42,56,.45),rgba(9,24,35,.62)); }
.registry-card.flagged { border-color: rgba(248,113,113,.35); background: linear-gradient(145deg,rgba(64,26,26,.38),rgba(35,12,12,.55)); }
.registry-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.registry-cred { padding: 3px 8px; border-radius: 999px; font-size: 10px; }
.registry-cred.official { color: #a7f3d0; background: rgba(52,211,153,.13); }
.registry-cred.platform { color: #93c5fd; background: rgba(96,165,250,.13); }
.registry-cred.normal { color: #cbd5e1; background: rgba(148,163,184,.13); }
.registry-year { padding: 3px 8px; border-radius: 999px; font-size: 10px; color: #e9be5d; background: rgba(233,190,93,.10); }
.registry-title { display: block; margin-top: 9px; font-size: 13px; line-height: 1.5; }
.registry-meta { margin-top: 5px; color: #688494; font-size: 11px; line-height: 1.55; }
.registry-flag { margin-top: 6px; color: #fca5a5; font-size: 11px; line-height: 1.55; }
.advice-item { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 11px 0; border-bottom: 1px solid rgba(149,184,208,.08); }
.advice-item:last-child { border-bottom: 0; }
.advice-item > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; color: var(--teal); background: rgba(94,234,212,.08); font-size: 11px; font-weight: 800; }
.advice-item p { margin: 1px 0 0; color: #adbec8; font-size: 12px; line-height: 1.65; }

@media (max-width: 1180px) {
  .steps { grid-template-columns: repeat(5, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .side-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .journey-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 24px); padding-top: 24px; }
  .hero-copy h1 { font-size: 38px; }
  .top-actions #syncBtn { display: inline-flex; }
  .top-actions #syncBtn #syncText { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(n+3) { margin-top: 7px; }
  .step:last-child { grid-column: 1 / -1; }
  .navigation-list, .journey-list { grid-template-columns: 1fr; }
  .journey-item { min-height: 0; }
  .summary-text { font-size: 16px; }
  .task-panel-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
  .task-item { grid-template-columns: 30px minmax(0,1fr); }
  .task-row-actions { grid-column: 2; justify-content: flex-start; }
}

/* v0.17：DeepSeek 生成结构、固定组件负责安全渲染的 AI 目标页。 */
.intent-experience {
  --intent-a: #5eead4; --intent-b: #38bdf8; --intent-c: #818cf8;
  position: relative; margin: 0 0 22px; padding: 30px; overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--intent-a) 28%, transparent); border-radius: 28px;
  background:
    radial-gradient(circle at 94% 4%, color-mix(in srgb, var(--intent-b) 22%, transparent), transparent 34%),
    radial-gradient(circle at 4% 96%, color-mix(in srgb, var(--intent-c) 18%, transparent), transparent 32%),
    linear-gradient(145deg, rgba(17,34,48,.98), rgba(8,20,31,.96));
  box-shadow: 0 30px 90px rgba(0,0,0,.28), inset 0 1px rgba(255,255,255,.04);
}
.intent-experience.theme-ocean { --intent-a: #22d3ee; --intent-b: #3b82f6; --intent-c: #0ea5e9; }
.intent-experience.theme-violet { --intent-a: #c084fc; --intent-b: #818cf8; --intent-c: #f472b6; }
.intent-experience.theme-sunset { --intent-a: #fbbf24; --intent-b: #fb7185; --intent-c: #f97316; }
.intent-experience.theme-slate { --intent-a: #cbd5e1; --intent-b: #94a3b8; --intent-c: #67e8f9; }
.intent-orbit { position: absolute; border: 1px solid color-mix(in srgb, var(--intent-a) 18%, transparent); border-radius: 50%; pointer-events: none; }
.intent-orbit-a { width: 260px; height: 260px; right: -112px; top: -148px; }
.intent-orbit-b { width: 120px; height: 120px; right: 80px; top: -72px; }
.intent-head { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 34px; align-items: start; }
.intent-copy { max-width: 900px; }
.intent-eyebrow { display: inline-flex; padding: 6px 10px; border-radius: 999px; color: var(--intent-a); background: color-mix(in srgb, var(--intent-a) 9%, transparent); font-size: 11px; font-weight: 850; letter-spacing: 1.5px; text-transform: uppercase; }
.intent-copy h2 { margin: 16px 0 10px; max-width: 900px; font-size: clamp(28px,3.3vw,48px); line-height: 1.1; letter-spacing: -1.5px; }
.intent-copy p { margin: 0; max-width: 820px; color: #a9bdca; font-size: 15px; line-height: 1.75; }
.intent-coverage { position: relative; padding: 16px; border: 1px solid color-mix(in srgb, var(--intent-b) 20%, transparent); border-radius: 18px; background: rgba(4,13,21,.38); }
.intent-coverage span { color: #b8ccd8; font-size: 13px; }
.intent-coverage strong { display: block; margin: 6px 0; color: var(--intent-a); font-size: 28px; }
.intent-coverage p { margin: 0; color: #a9c0cd; font-size: 13px; line-height: 1.55; }
.intent-sections { position: relative; display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.intent-section { padding-top: 21px; border-top: 1px solid rgba(255,255,255,.075); }
.intent-section-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.intent-section-head h3 { margin: 0; font-size: 17px; }
.intent-section-head p { max-width: 720px; margin: 2px 0 0; color: #718b9b; font-size: 12px; line-height: 1.6; text-align: right; }
.intent-items { display: grid; gap: 12px; }
.intent-items.grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.intent-items.flow { grid-template-columns: repeat(4,minmax(0,1fr)); }
.intent-items.list { grid-template-columns: 1fr; }
.intent-card { min-width: 0; padding: 17px; border: 1px solid rgba(166,197,215,.12); border-radius: 17px; background: linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.018)); transition: transform .18s ease,border-color .18s ease,background .18s ease; }
.intent-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--intent-a) 33%, transparent); background: color-mix(in srgb, var(--intent-a) 7%, rgba(255,255,255,.02)); }
.intent-card.warning { border-color: rgba(251,191,36,.22); background: rgba(251,191,36,.045); }
.intent-card.field { border-color: color-mix(in srgb, var(--intent-b) 26%, transparent); }
.intent-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.intent-card h4 { margin: 0; color: #e8f4f8; font-size: 14px; line-height: 1.45; }
.intent-card-badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: var(--intent-a); background: color-mix(in srgb, var(--intent-a) 9%, transparent); font-size: 9px; font-weight: 800; }
.intent-card > p { margin: 8px 0 0; color: #8099a8; font-size: 12px; line-height: 1.65; }
.intent-control { display: flex; gap: 8px; margin-top: 14px; }
.intent-control input, .intent-control select, .intent-control textarea {
  flex: 1; min-width: 0; min-height: 42px; padding: 10px 11px; outline: 0; color: #edf7fb;
  border: 1px solid rgba(153,186,205,.2); border-radius: 10px; background: rgba(3,11,18,.55); font: inherit; font-size: 12px;
}
.intent-control textarea { min-height: 76px; resize: vertical; }
.intent-control input:focus, .intent-control select:focus, .intent-control textarea:focus { border-color: var(--intent-a); box-shadow: 0 0 0 3px color-mix(in srgb,var(--intent-a) 10%,transparent); }
.intent-action {
  min-height: 42px; padding: 9px 14px; border: 0; border-radius: 10px; cursor: pointer;
  color: #06282d; background: linear-gradient(135deg,var(--intent-a),var(--intent-b)); font-size: 12px; font-weight: 850; white-space: nowrap;
}
.intent-action:hover { filter: brightness(1.08); }
.intent-action:disabled { opacity: .5; cursor: wait; }
.intent-action.secondary { color: var(--intent-a); border: 1px solid color-mix(in srgb,var(--intent-a) 25%,transparent); background: color-mix(in srgb,var(--intent-a) 8%,transparent); }
.intent-more { position: relative; margin-top: 20px; border-top: 1px solid rgba(255,255,255,.075); }
.intent-more summary { display: flex; align-items: center; gap: 9px; padding: 18px 2px 4px; color: #a9bdca; cursor: pointer; list-style: none; font-size: 13px; font-weight: 800; }
.intent-more summary::-webkit-details-marker { display: none; }
.intent-more summary::before { content: "+"; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 8px; color: var(--intent-a); background: color-mix(in srgb,var(--intent-a) 8%,transparent); }
.intent-more[open] summary::before { content: "−"; }
.intent-more summary b { padding: 3px 7px; border-radius: 999px; color: var(--intent-a); background: color-mix(in srgb,var(--intent-a) 8%,transparent); font-size: 10px; }
.intent-more summary small { margin-left: auto; color: #607989; font-size: 10px; font-weight: 500; }
.intent-more .intent-items { margin-top: 14px; }
.intent-safety { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.075); color: #6f8999; font-size: 11px; }
.intent-safety button { padding: 9px 12px; color: var(--intent-a); border: 1px solid color-mix(in srgb,var(--intent-a) 22%,transparent); border-radius: 10px; background: transparent; cursor: pointer; }

@media (max-width: 1100px) {
  .intent-items.grid, .intent-items.flow { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .intent-experience { padding: 22px 17px; border-radius: 22px; }
  .intent-head { grid-template-columns: 1fr; gap: 18px; }
  .intent-copy h2 { font-size: 32px; }
  .intent-coverage { display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .intent-coverage p { grid-column: 1 / -1; }
  .intent-items.grid, .intent-items.flow { grid-template-columns: 1fr; }
  .intent-section-head { display: block; }
  .intent-section-head p { margin-top: 7px; text-align: left; }
  .intent-control { flex-direction: column; }
  .intent-more summary { flex-wrap: wrap; }
  .intent-more summary small { width: 100%; margin-left: 31px; }
  .intent-safety { align-items: flex-start; flex-direction: column; }
}


/* ============ 美化增强 v2 · 2026-09-18（纯新增，不改原规则） ============ */
/* 主题：在暗色科技风基础上增加光效动效与层次 */

@keyframes lmSheen { 0% { transform: translateX(-150%) skewX(-20deg); } 60%, 100% { transform: translateX(260%) skewX(-20deg); } }
@keyframes lmDrift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -18px) scale(1.06); }
  66% { transform: translate(-18px, 14px) scale(0.96); }
}
@keyframes lmPop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes lmPanelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes lmGlowPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(94, 234, 212, 0.25); }
  50% { box-shadow: 0 0 22px rgba(94, 234, 212, 0.5); }
}

/* 氛围光斑缓慢漂移，画面更生动 */
.ambient { filter: blur(70px); opacity: 0.5; animation: lmDrift 14s ease-in-out infinite; }
.ambient-b { animation-delay: -7s; }

/* 主按钮光泽扫过 + 按压 */
.primary-btn { position: relative; overflow: hidden; transition: transform 0.15s ease, filter 0.15s ease; }
.primary-btn:active { transform: scale(0.97); }
.primary-btn::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: translateX(-150%) skewX(-20deg);
  animation: lmSheen 3.4s ease-in-out infinite;
  pointer-events: none;
}

/* 品牌眼睛徽标呼吸 */
.brand-mark { animation: lmGlowPulse 3s ease-in-out infinite; }

/* 实时圆点更有生命力 */
.live-dot { animation: pulse 1.8s ease-in-out infinite; }

/* 主区域入场 */
.mission-hero, .goal-box, .process-panel { animation: lmPanelIn 0.5s ease both; }
.goal-box { animation-delay: 0.1s; }
.process-panel { animation-delay: 0.2s; }

/* 步骤完成时弹性反馈 */
.step.done .step-dot { animation: lmPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }

/* 加载进度条保留原有宽度过渡行为，不叠加位移动画，避免视觉错乱 */

/* 幽灵按钮悬浮提亮 */
.ghost-btn, .danger-ghost { transition: transform 0.15s ease, color 0.15s, border-color 0.15s, background 0.15s; }
.ghost-btn:active, .danger-ghost:active { transform: scale(0.96); }

/* ============ P0-3 独立目标工作台：工具栏 / 主题 / 紧凑 / 长辈模式 ============ */

.view-toolbar {
  width: min(1380px, calc(100% - 56px));
  margin: 10px auto 0;
  padding: 8px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.02);
  animation: lmPanelIn 0.5s ease both;
  animation-delay: 0.15s;
}
.filter-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-chip {
  padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--muted); font-size: 11px;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.15s;
}
.filter-chip:hover { color: var(--text); border-color: rgba(103,232,249,.4); transform: translateY(-1px); }
.filter-chip.active { color: #052d33; background: linear-gradient(135deg, var(--teal), var(--cyan)); border-color: transparent; font-weight: 700; }
.view-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theme-select {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  background: rgba(255,255,255,.03); color: #a9bdc9; font-size: 11px;
}
.theme-select:hover { border-color: rgba(103,232,249,.4); }
.theme-select option { background: var(--panel-strong); color: var(--text); }
.view-toggle[aria-pressed="true"] { color: var(--cyan); border-color: rgba(103,232,249,.5); background: rgba(103,232,249,.08); }

/* 主题：通过 body[data-theme] 覆盖全局变量，旧样式无需改动 */
body[data-theme="ocean"] { --bg: #051221; --panel: rgba(10, 24, 42, .88); --panel-strong: #0b1a2e; --teal: #38bdf8; --cyan: #7dd3fc; --blue: #60a5fa; --amber: #fbbf24; --green: #34d399; }
body[data-theme="violet"] { --bg: #120a1f; --panel: rgba(26, 16, 44, .88); --panel-strong: #1c1132; --teal: #c084fc; --cyan: #e879f9; --blue: #818cf8; --amber: #fbbf24; --green: #4ade80; }
body[data-theme="sunset"] { --bg: #170d0a; --panel: rgba(38, 20, 14, .88); --panel-strong: #2a1710; --teal: #fb923c; --cyan: #fbbf24; --blue: #fb7185; --amber: #fde68a; --green: #4ade80; }
body[data-theme="slate"] { --bg: #0b0f14; --panel: rgba(20, 26, 34, .9); --panel-strong: #161d26; --teal: #94a3b8; --cyan: #cbd5e1; --blue: #94a3b8; --amber: #e2e8f0; --green: #86efac; }

/* 紧凑模式：收窄间距与字号 */
body.compact .shell { padding-top: 18px; }
body.compact .panel { padding: 14px 16px; }
body.compact .nav-card, body.compact .registry-card { padding: 10px 12px; }
body.compact .mission-hero { padding-bottom: 16px; }
body.compact .view-toolbar { padding: 5px 10px; margin-top: 6px; }
body.compact .nav-title { margin-top: 8px; font-size: 13px; }

/* 长辈模式：大字号 + 宽行距 */
body.elder { font-size: 17px; }
body.elder .panel p, body.elder .panel li, body.elder .panel-intro, body.elder .nav-card p, body.elder .resource-item p { font-size: 15px; line-height: 1.9; }
body.elder .nav-title, body.elder .registry-title, body.elder .resource-item strong { font-size: 17px; line-height: 1.7; }
body.elder .advice-item p { font-size: 15px; line-height: 1.9; }
body.elder .filter-chip, body.elder .ghost-btn, body.elder .theme-select { font-size: 14px; padding: 8px 16px; }
body.elder .hero-copy h1 { font-size: clamp(30px, 3.4vw, 48px); }

/* ============ P0-3.5 状态徽标 / 行动栏 / 探索中心 / 卡片按钮 ============ */

.state-pill { padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; border: 1px solid transparent; }
.state-pill.tone-idle { color: #9fb3c0; background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.25); }
.state-pill.tone-running { color: #67e8f9; background: rgba(103,232,249,.10); border-color: rgba(103,232,249,.35); animation: pulse 1.8s ease-in-out infinite; }
.state-pill.tone-ready { color: #6ee7b7; background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.35); }
.state-pill.tone-warning { color: #fcd34d; background: rgba(251,191,36,.10); border-color: rgba(251,191,36,.35); }
.state-pill.tone-failed { color: #fda4af; background: rgba(251,113,133,.10); border-color: rgba(251,113,133,.35); }

.action-bar {
  width: min(1380px, calc(100% - 56px));
  margin: 14px auto 0;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  border: 1px solid color-mix(in srgb, var(--cyan) 25%, transparent);
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--teal) 7%, transparent), rgba(255,255,255,.015));
  animation: lmPanelIn 0.5s ease both;
  animation-delay: 0.1s;
}
.action-primary-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.action-primary-wrap small { color: var(--muted); font-size: 11px; max-width: 340px; }
.action-bar .primary-btn { animation: pulse 2.4s ease-in-out infinite; }

/* v0.22.9 P1-E：探索中心信息架构——总览数字层 / 2:1 主工作区 / 折叠技术明细 / 全宽证据库 */
.explore-overview { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 4px 21px 12px; }
.explore-stat { border: 1px solid rgba(149,184,208,.12); border-radius: 12px; padding: 10px 12px; background: linear-gradient(160deg, rgba(255,255,255,.045), rgba(255,255,255,.015)); }
.explore-stat b { display: block; font-size: 22px; line-height: 1.2; color: var(--lm-action, #5eead4); }
.explore-stat small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted, #688494); }
.explore-stat.warn b { color: #fbbf24; }
.explore-stat.bad b { color: #f87171; }
.explore-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; padding: 0 21px 10px; }
.explore-main-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.explore-tech { margin: 0 21px 10px; border: 1px solid rgba(149,184,208,.12); border-radius: 12px; padding: 8px 12px; background: rgba(255,255,255,.015); }
.explore-tech summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--muted, #688494); }
.explore-tech-body { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.explore-col h3 { margin: 0 0 8px; font-size: 12px; color: var(--muted); font-weight: 700; }
.explore-list { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.explore-empty { color: #688494; font-size: 12px; padding: 8px 0; }
.explore-query { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid rgba(149,184,208,.10); border-radius: 9px; background: rgba(255,255,255,.02); font-size: 12px; color: #b8ccd8; }
.explore-query small { color: #688494; flex: 0 0 auto; }
/* M4 queryTrace 溯源 chips：规则词=青、AI 采用=紫、规则警示=琥珀、AI 被拒=红（悬停看拒绝原因） */
.qt-anchors { padding: 2px 0 6px; }
.qt-anchors small { color: #7fa6bb; font-size: 11px; }
.qt-chip { display: inline-block; margin: 0 6px 6px 0; padding: 5px 10px; border-radius: 999px; font-size: 12px; line-height: 1.4; border: 1px solid transparent; max-width: 100%; overflow-wrap: anywhere; }
.qt-rule { color: #9fd8e8; background: rgba(125,211,238,.10); border-color: rgba(125,211,238,.28); }
.qt-ai { color: #c9b8f5; background: rgba(167,139,250,.10); border-color: rgba(167,139,250,.30); }
.qt-warn { color: #fcd34d; background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.30); }
.qt-rejected { color: #f8a8b8; background: rgba(244,63,94,.08); border-color: rgba(244,63,94,.32); text-decoration: line-through; text-decoration-thickness: 1px; }
/* M2 候选抽屉：候选行 / 可信级别徽章 / 证据摘录 / 被拒来源展开 */
.cand-row { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; margin-bottom: 8px; border: 1px solid rgba(149,184,208,.16); border-radius: 11px; background: rgba(255,255,255,.03); }
.cand-row.is-adopted { border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.07); }
.cand-head { display: flex; align-items: center; gap: 8px; }
.cand-badge { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-size: 11px; border: 1px solid transparent; }
.cand-badge-verified { color: #6ee7b7; background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.35); }
.cand-badge-candidate { color: #fcd34d; background: rgba(251,191,36,.10); border-color: rgba(251,191,36,.35); }
.cand-badge-conflict { color: #f8a8b8; background: rgba(244,63,94,.10); border-color: rgba(244,63,94,.35); }
.cand-badge-rejected { color: #94a3b8; background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.30); }
.cand-value { font-size: 13px; color: #d7e6ef; overflow-wrap: anywhere; }
.cand-quote { font-size: 12px; color: #8fb0c2; border-left: 3px solid rgba(149,184,208,.30); padding-left: 8px; overflow-wrap: anywhere; }
.cand-meta small { color: #688494; font-size: 11px; }
.cand-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cand-actions .mini-action-btn:disabled { opacity: .45; cursor: not-allowed; }
.cand-drop { color: #f8a8b8; }
.cand-rejected-toggle { margin: 4px 0 6px; color: #94a3b8; border-style: dashed; }
.cand-rejected-detail { padding: 6px 10px; border: 1px dashed rgba(148,163,184,.30); border-radius: 9px; margin-bottom: 8px; }
.cand-rejected-line { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 12px; color: #94a3b8; }
.cand-request-id { display: block; color: #688494; font-size: 11px; margin-top: 4px; }
.explore-gap { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid rgba(251,191,36,.22); border-radius: 9px; background: rgba(251,191,36,.05); font-size: 12px; color: #fcd34d; }
.explore-gap.is-ok { color: #6ee7b7; border-color: rgba(52,211,153,.25); background: rgba(52,211,153,.06); }
.explore-trace { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid rgba(149,184,208,.11); border-radius: 9px; background: rgba(255,255,255,.02); color: #b8ccd8; font-size: 11px; }
.explore-trace b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: #07131d; background: #6ee7b7; font-size: 10px; }
.explore-trace span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explore-trace small { color: #6ee7b7; }
.explore-trace.is-checkpoint { border-color: rgba(251,191,36,.25); background: rgba(251,191,36,.05); }
.explore-trace.is-checkpoint b { background: #fbbf24; }
.explore-trace.is-checkpoint small { color: #fcd34d; }
.explore-trace.is-blocked { border-color: rgba(248,113,113,.24); background: rgba(248,113,113,.05); }
.explore-trace.is-blocked b { color: white; background: #f87171; }
.explore-trace.is-blocked small { color: #fca5a5; }
.explore-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 10px 21px 18px; }
.explore-actions .mini-action-btn:disabled { opacity: .45; cursor: not-allowed; }

.card-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.card-action {
  padding: 5px 11px; border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); border-radius: 999px;
  background: color-mix(in srgb, var(--cyan) 7%, transparent); color: var(--cyan);
  font-size: 11px; font-weight: 700; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s;
}
.card-action:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--cyan) 14%, transparent); }
.card-action.is-disabled { opacity: .45; cursor: not-allowed; border-color: var(--line); color: var(--muted); background: transparent; }

/* 操作层级：只有真实入口是高强调；核验/提醒/模板使用轻量语义色，避免整页同色抢焦点。 */
.card-action.action-open_url {
  color: #061d32; border-color: transparent;
  background: linear-gradient(135deg, #5eead4 0%, #38bdf8 52%, #818cf8 100%);
  box-shadow: 0 6px 16px rgba(56,189,248,.16);
}
.card-action.action-view_evidence { color: #c4b5fd; border-color: rgba(167,139,250,.28); background: rgba(139,92,246,.08); }
.card-action.action-research { color: #93c5fd; border-color: rgba(96,165,250,.24); background: rgba(59,130,246,.065); }
.card-action.action-research.purpose-template { color: #f0abfc; border-color: rgba(217,70,239,.24); background: rgba(192,38,211,.065); }
.card-action.action-remind { color: #fcd34d; border-color: rgba(251,191,36,.24); background: rgba(245,158,11,.065); }
.card-action.action-mark_done { color: #6ee7b7; border-color: rgba(52,211,153,.28); background: rgba(16,185,129,.08); }
.card-action.action-manual { color: #b8c7d4; border-color: rgba(148,163,184,.20); background: rgba(148,163,184,.055); }
.card-action.action-view_conflict, .card-action.action-choose_source { color: #fda4af; border-color: rgba(251,113,133,.28); background: rgba(244,63,94,.075); }
.card-action.action-open_url:hover { background: linear-gradient(135deg, #99f6e4, #7dd3fc 52%, #a5b4fc); }
.card-action.action-view_evidence:hover { background: rgba(139,92,246,.15); }
.card-action.action-research:hover { background: rgba(59,130,246,.14); }
.card-action.action-research.purpose-template:hover { background: rgba(192,38,211,.14); }
.card-action.action-remind:hover { background: rgba(245,158,11,.14); }
.card-action.action-mark_done:hover { background: rgba(16,185,129,.16); }

.material.is-done { opacity: .75; }
.material.is-done strong { text-decoration: line-through; }
.material-done-badge { margin-left: 8px; padding: 2px 8px; border-radius: 999px; font-size: 10px; color: #052d33; background: linear-gradient(135deg, var(--teal), var(--cyan)); font-weight: 800; }

/* ============ 所有按钮共用的可见结果面板 ============ */
.action-result-panel {
  width: min(1480px, calc(100% - 48px)); margin: 14px auto 22px; padding: 18px 20px;
  display: grid; grid-template-columns: 50px 1fr; gap: 15px; position: relative; overflow: hidden;
  border: 1px solid rgba(45,212,191,.34); border-radius: 20px;
  background: linear-gradient(125deg, rgba(6,78,89,.82), rgba(20,34,68,.92) 55%, rgba(76,29,149,.72));
  box-shadow: 0 20px 56px rgba(0,0,0,.26), inset 0 1px rgba(255,255,255,.05);
  animation: lmResultReveal .42s cubic-bezier(.2,.8,.2,1) both;
}
.action-result-panel::after { content:""; position:absolute; width:220px; height:220px; right:-80px; top:-130px; border:1px solid rgba(103,232,249,.18); border-radius:50%; box-shadow:0 0 0 34px rgba(167,139,250,.05),0 0 0 68px rgba(45,212,191,.035); pointer-events:none; }
.action-result-panel.hidden { display: none; }
.action-result-panel.is-warning { border-color:rgba(251,191,36,.42); background:linear-gradient(125deg,rgba(92,57,12,.82),rgba(36,31,52,.94) 60%,rgba(127,29,29,.62)); }
.action-result-panel.is-loading .action-result-icon { animation: lmResultSpin 1.1s linear infinite; }
.action-result-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:16px; color:#042f36; background:linear-gradient(135deg,#5eead4,#67e8f9); font-size:23px; box-shadow:0 8px 24px rgba(45,212,191,.25); }
.action-result-main { min-width:0; position:relative; z-index:1; }
.action-result-head { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.action-result-head > span { color:#67e8f9; font-size:10px; font-weight:900; letter-spacing:.16em; }
.action-result-head button { width:28px; height:28px; border:1px solid rgba(255,255,255,.14); border-radius:9px; background:rgba(255,255,255,.04); color:#b9d2dd; cursor:pointer; }
.action-result-main h2 { margin:5px 0 4px; color:#f0fdfa; font-size:18px; }
.action-result-main > p { margin:0; color:#a9c7d4; line-height:1.65; font-size:12px; }
.action-result-changes { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }
.action-change { padding:6px 10px; border:1px solid rgba(94,234,212,.18); border-radius:10px; color:#d5faf3; background:rgba(255,255,255,.04); font-size:11px; }
.action-result-links { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.action-result-row { display:inline-flex; align-items:center; gap:6px; }
.action-result-link { padding:7px 11px; border-radius:10px; color:#071c27; background:linear-gradient(135deg,#a7f3d0,#67e8f9); text-decoration:none; font-size:11px; font-weight:800; transition:transform .15s,box-shadow .15s; }
.action-result-link:hover { transform:translateY(-2px); box-shadow:0 8px 18px rgba(45,212,191,.20); }
/* v0.21.5 M3：补搜结果"采用此结果"按钮 */
.adopt-btn { padding:5px 10px; font-size:12px; border-radius:9px; border:1px solid rgba(103,232,249,.4); background:rgba(34,211,238,.1); color:var(--cyan); cursor:pointer; font-weight:700; transition:background .15s,transform .15s; }
.adopt-btn:hover { background:rgba(34,211,238,.22); transform:translateY(-1px); }
.gp-card-update { margin-top:9px; padding:9px 11px; border-left:3px solid #5eead4; border-radius:8px; color:#bff7ee; background:rgba(45,212,191,.07); font-size:11px; line-height:1.55; animation:lmResultReveal .35s ease both; }
.gp-card-update a { color:#67e8f9; margin-right:9px; }
.card-action[aria-busy="true"] { opacity:.7; cursor:progress; animation:pulse 1s ease-in-out infinite; }
@keyframes lmResultReveal { from{opacity:0;transform:translateY(-10px) scale(.985)} to{opacity:1;transform:none} }
@keyframes lmResultSpin { to{transform:rotate(360deg)} }

/* ============ P0-4 M3-M5 安全执行台 ============ */
.execution-safety {
  width: min(1480px, calc(100% - 48px)); margin: 14px auto 22px; padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--cyan) 28%, transparent); border-radius: 20px;
  background: radial-gradient(circle at 100% 0, color-mix(in srgb, var(--intent-b, var(--blue)) 13%, transparent), transparent 40%), rgba(4,18,29,.86);
  box-shadow: 0 18px 46px rgba(0,0,0,.24);
}
.execution-safety.hidden { display: none; }
.execution-head, .ledger-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.execution-head h2 { margin: 2px 0 0; font-size: 18px; }
.execution-status { padding: 4px 10px; border-radius: 999px; color: #99f6e4; background: rgba(20,184,166,.10); border: 1px solid rgba(45,212,191,.28); font-size: 11px; font-weight: 800; }
.action-preview { margin-top: 14px; padding: 14px 16px; display: grid; grid-template-columns: minmax(150px,.7fr) minmax(220px,1.5fr) minmax(140px,.8fr); gap: 12px; border-radius: 14px; border: 1px solid rgba(149,184,208,.14); background: rgba(255,255,255,.035); }
.action-preview.hidden, .action-preview-buttons.hidden { display: none; }
.action-preview strong { display: block; margin-bottom: 4px; color: #ecfeff; font-size: 13px; }
.action-preview span { color: #8fa8b8; font-size: 12px; line-height: 1.55; word-break: break-word; }
.action-preview .risk-forbidden { color: #fda4af; }
.action-preview .risk-personal { color: #fcd34d; }
.action-preview .risk-ordinary { color: #6ee7b7; }
.action-preview-buttons { display: flex; justify-content: flex-end; gap: 9px; margin: 10px 0 2px; }
.ledger-head { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(149,184,208,.10); }
.ledger-head strong { font-size: 13px; }
.ledger-head span { color: #7894a5; font-size: 11px; }
.action-ledger { display: flex; flex-direction: column; gap: 7px; margin-top: 9px; }
.ledger-row { display: grid; grid-template-columns: minmax(130px,1fr) auto minmax(180px,1.2fr) auto; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px; background: rgba(255,255,255,.025); border: 1px solid rgba(149,184,208,.09); font-size: 12px; }
.ledger-row strong { color: #dff7f8; }
.ledger-row small { color: #7691a1; }
.ledger-badge { padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.ledger-badge.verified { color: #6ee7b7; background: rgba(52,211,153,.10); }
.ledger-badge.probable, .ledger-badge.manual { color: #fcd34d; background: rgba(251,191,36,.10); }
.ledger-badge.failed, .ledger-badge.blocked { color: #fda4af; background: rgba(251,113,133,.10); }
.ledger-badge.undone { color: #c4b5fd; background: rgba(167,139,250,.12); }
.ledger-undo { border: 0; background: none; color: var(--cyan); font-size: 11px; cursor: pointer; }
.ledger-undo:disabled { opacity: .45; cursor: default; }

@media (max-width: 1100px) {
  .explore-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explore-main { grid-template-columns: 1fr; }
  .explore-tech-body { grid-template-columns: 1fr; }
  .action-bar { width: min(1480px, calc(100% - 32px)); }
  .execution-safety { width: min(1480px, calc(100% - 32px)); }
  .action-result-panel { width: min(1480px, calc(100% - 32px)); grid-template-columns:40px 1fr; }
  .action-result-icon { width:40px;height:40px;border-radius:13px; }
  .action-preview { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 1fr auto; }
}

/* ============ P0-3.6 顶部大输入框（一句话新建目标） ============ */

.goal-composer {
  margin: 0 0 22px;
  padding: 22px 24px 18px;
  border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent);
  border-radius: 22px;
  background:
    radial-gradient(circle at 96% 0%, color-mix(in srgb, var(--intent-b, var(--blue)) 14%, transparent), transparent 42%),
    linear-gradient(150deg, color-mix(in srgb, var(--teal) 8%, transparent), rgba(255,255,255,.015));
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  animation: lmPanelIn 0.5s ease both;
}
.composer-label { display: block; font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 12px; letter-spacing: .02em; }
.composer-row { display: flex; gap: 10px; }
.composer-row input {
  flex: 1; min-width: 0; padding: 14px 16px; font-size: 15px; color: var(--text);
  border: 1px solid rgba(153,186,205,.25); border-radius: 13px; outline: 0;
  background: rgba(3,11,18,.55); transition: border-color .15s, box-shadow .15s;
}
.composer-row input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cyan) 18%, transparent); }
.composer-row .primary-btn { padding: 14px 22px; font-size: 14px; white-space: nowrap; }
.composer-modes { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.composer-mode { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b8ccd8; cursor: pointer; }
.composer-mode input { accent-color: var(--cyan); cursor: pointer; }
.composer-hint { color: #688494; font-size: 11px; width: 100%; }
.composer-quick, .composer-recent { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.composer-recent:empty { display: none; }
.composer-recent-label { color: #688494; font-size: 11px; flex: 0 0 auto; }
.composer-chip {
  padding: 5px 13px; border: 1px solid rgba(153,186,205,.22); border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.03); color: #a9c0cd; font-size: 12px;
  transition: transform .15s ease, border-color .15s, color .15s, background .15s;
}
.composer-chip:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--cyan) 45%, transparent); color: var(--cyan); }
.composer-chip.recent { border-style: dashed; }

/* ============ P0-3.6 目标办事台（固定渲染器输出） ============ */

.goal-page-panel {
  margin: 0 0 22px;
  padding: 22px 24px 20px;
  border: 1px solid color-mix(in srgb, var(--teal) 26%, transparent);
  border-radius: 22px;
  background:
    radial-gradient(circle at 2% 0%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 40%),
    linear-gradient(150deg, rgba(255,255,255,.045), rgba(255,255,255,.012));
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
  animation: lmPanelIn 0.5s ease both;
  animation-delay: 0.05s;
}
.goal-page-panel.hidden { display: none; }
.gp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.gp-eyebrow { padding: 3px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .12em; color: #052d33; background: linear-gradient(135deg, var(--teal), var(--cyan)); }
.gp-title { margin: 0 0 6px; font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; color: var(--text); }
.gp-summary { margin: 0 0 14px; color: #9fb8c6; font-size: 13px; line-height: 1.7; max-width: 860px; }
.gp-adopted { margin: 0 0 14px; padding: 12px 14px; border: 1px solid rgba(52,211,153,.28); border-radius: 14px; background: linear-gradient(155deg, rgba(16,185,129,.09), rgba(255,255,255,.02) 55%); animation: lmFadeUp .4s ease both; }
.gp-adopted-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; color: #6ee7b7; margin-bottom: 8px; }
.gp-adopted-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-top: 1px dashed rgba(110,231,183,.16); font-size: 12.5px; }
.gp-adopted-row:first-of-type { border-top: 0; }
.gp-adopted-row strong { color: var(--text); font-size: 12.5px; }
.gp-adopted-val { color: #a9c6b8; line-height: 1.6; flex: 1 1 260px; }
.gp-adopted-row a { color: var(--cyan); font-size: 12px; white-space: nowrap; }
.gp-primary { margin-bottom: 14px; }
.gp-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.gp-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.gp-section { min-width: 0; padding: 14px 16px; border: 1px solid rgba(149,184,208,.12); border-radius: 16px; background: rgba(255,255,255,.02); animation: lmFadeUp .4s ease both; }
.gp-section.tone-info { border-color: rgba(96,165,250,.18); background: linear-gradient(155deg, rgba(59,130,246,.07), rgba(255,255,255,.014) 48%); }
.gp-section.tone-time { border-color: rgba(251,191,36,.18); background: linear-gradient(155deg, rgba(245,158,11,.065), rgba(255,255,255,.014) 48%); }
.gp-section.tone-material { border-color: rgba(52,211,153,.18); background: linear-gradient(155deg, rgba(16,185,129,.065), rgba(255,255,255,.014) 48%); }
.gp-section.tone-entry { border-color: rgba(129,140,248,.20); background: linear-gradient(155deg, rgba(99,102,241,.075), rgba(255,255,255,.014) 48%); }
.gp-section.tone-action { border-color: rgba(34,211,238,.18); background: linear-gradient(155deg, rgba(6,182,212,.065), rgba(255,255,255,.014) 48%); }
.gp-section.tone-risk { border-color: rgba(251,113,133,.20); background: linear-gradient(155deg, rgba(244,63,94,.07), rgba(255,255,255,.014) 48%); }
.gp-section:nth-child(2) { animation-delay: .05s; }
.gp-section:nth-child(3) { animation-delay: .1s; }
.gp-section:nth-child(4) { animation-delay: .15s; }
.gp-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.gp-section-head h3 { margin: 0; font-size: 14px; color: var(--text); }
.gp-section-head small { color: #688494; font-size: 10px; }
.gp-cards { display: flex; flex-direction: column; gap: 8px; }
.gp-card { padding: 11px 13px; border: 1px solid rgba(149,184,208,.10); border-radius: 12px; background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.01)); transition: transform .18s ease, border-color .18s ease; }
.gp-card.type-fact { border-left: 3px solid rgba(96,165,250,.72); }
.gp-card.type-time { border-left: 3px solid rgba(251,191,36,.72); }
.gp-card.type-material { border-left: 3px solid rgba(52,211,153,.72); }
.gp-card.type-official_entry, .gp-card.type-web_entry { border-left: 3px solid rgba(129,140,248,.72); }
.gp-card.type-action { border-left: 3px solid rgba(34,211,238,.72); }
.gp-card.type-risk { border-left: 3px solid rgba(251,113,133,.76); }
.gp-card.state-needs_review { opacity: .88; }
.gp-card.state-ok, .gp-card.state-done { background: linear-gradient(145deg, rgba(52,211,153,.055), rgba(255,255,255,.012)); }
.gp-card:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--cyan) 28%, transparent); }
.gp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gp-card-top strong { font-size: 13px; line-height: 1.5; color: #e8f4f8; }
.gp-state { flex: 0 0 auto; padding: 2px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.gp-state.s-ok { color: #052d33; background: linear-gradient(135deg, var(--teal), var(--cyan)); }
.gp-state.s-needs_review { color: #fcd34d; background: rgba(251,191,36,.10); border: 1px solid rgba(251,191,36,.30); }
.gp-state.s-warning { color: #fda4af; background: rgba(251,113,133,.10); border: 1px solid rgba(251,113,133,.30); }
.gp-state.s-done { color: #6ee7b7; background: rgba(52,211,153,.10); border: 1px solid rgba(52,211,153,.30); }
.gp-card > p { margin: 6px 0 0; color: #8fa8b8; font-size: 12px; line-height: 1.65; }



/* V3 M2：固定同步状态区（立即同步 + 状态 + 可操作明细） */
.sync-strip { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: rgba(149,184,208,.06); border: 1px solid rgba(149,184,208,.12); }
.sync-now-btn { flex: none; padding: 7px 14px; border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--cyan, #6ee7f9); border: 1px solid rgba(110,231,249,.35); background: rgba(110,231,249,.08); cursor: pointer; }
.sync-now-btn:hover { background: rgba(110,231,249,.16); }
.sync-state-text { flex: none; font-size: 12px; font-weight: 700; color: #dff7f8; }
.sync-detail { min-width: 0; font-size: 11px; color: #7894a5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sync-recommendation-links:not([hidden]) { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 6px 0; }
.sync-recommendation-links a { font-size: 13px; line-height: 1.8; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.sync-repair-handoff { flex: 1 1 100%; padding: 8px 10px; border: 1px solid currentColor; border-radius: 6px; overflow-wrap: anywhere; }
.sync-repair-handoff summary { cursor: pointer; margin-bottom: 4px; }
.sync-repair-handoff p, .sync-repair-handoff ol { margin: 4px 0; }
.sync-strip[data-mode="syncing"] .sync-state-text { color: #6ee7f9; }
.sync-strip[data-mode="synced"] .sync-state-text { color: #6ee7b7; }
.sync-strip[data-mode="pending"] .sync-state-text { color: #fcd34d; }
.sync-strip[data-mode="offline"] .sync-state-text,
.sync-strip[data-mode="error"] .sync-state-text { color: #fda4af; }

/* ===== V3 M5：歧义候选选择 ===== */
.ambiguity-panel {
  margin: 18px 0; padding: 20px 22px; border-radius: 18px;
  border: 1px solid rgba(251, 191, 36, .35);
  background: linear-gradient(160deg, rgba(251,191,36,.08), rgba(12,26,38,.92) 55%);
  box-shadow: 0 12px 34px rgba(0,0,0,.28);
}
.ambiguity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.ambiguity-kicker { font-size: 11px; letter-spacing: 2px; color: #fbbf24; font-weight: 800; }
.ambiguity-head h2 { margin: 5px 0 0; font-size: 17px; color: #f4f9fb; }
.ambiguity-count {
  flex: none; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800;
  color: #1c1206; background: linear-gradient(135deg, #fde68a, #fbbf24);
}
.ambiguity-note { margin: 12px 0 16px; font-size: 12px; line-height: 1.7; color: #9fb4c0; }
.ambiguity-item { margin-bottom: 14px; padding: 14px 16px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid rgba(148,184,208,.16); }
.ambiguity-item-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ambiguity-item-head strong { font-size: 13.5px; color: #e8f4f8; }
.ambiguity-item-reason { font-size: 11px; color: #fbbf24; }
.ambiguity-cand {
  display: flex; flex-direction: column; gap: 6px; width: 100%; margin-bottom: 8px;
  padding: 11px 14px; border-radius: 12px; text-align: left; cursor: pointer;
  border: 1.5px solid rgba(148,184,208,.2); background: rgba(10,22,32,.65); color: #dff0f5;
  transition: border-color .2s ease, transform .18s ease, box-shadow .2s ease;
}
.ambiguity-cand:hover { border-color: rgba(45,212,191,.55); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.3); }
.ambiguity-cand.selected { border-color: #2dd4bf; background: rgba(45,212,191,.1); box-shadow: 0 0 0 3px rgba(45,212,191,.15); }
.ambiguity-cand.protected { border-style: dashed; }
.ambiguity-cand-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ambiguity-cand-title b { font-size: 13px; color: #fff; }
.ambiguity-cand-title small { font-size: 11px; color: #8fa8b8; }
.ambiguity-cand-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; }
.ambiguity-cand-meta i { font-style: normal; color: #6ee7f9; font-weight: 700; }
.ambiguity-cand-meta em { font-style: normal; color: #9fb4c0; }
.ambiguity-risk { text-decoration: none; font-style: normal; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: #fecaca; background: rgba(251,113,133,.16); border: 1px solid rgba(251,113,133,.4); }
.ambiguity-risk.level-personal { color: #fcd34d; background: rgba(251,191,36,.14); border-color: rgba(251,191,36,.4); }
.ambiguity-risk.level-critical { color: #fda4af; background: rgba(248,81,73,.16); border-color: rgba(248,81,73,.45); }
.ambiguity-scope { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; padding: 10px 12px; border-radius: 10px; background: rgba(45,212,191,.07); }
.ambiguity-scope span { font-size: 12px; color: #6ee7b7; font-weight: 700; }
.ambiguity-scope .ghost-btn { padding: 6px 14px; font-size: 12px; }
.ambiguity-gate { margin: 10px 0 0; font-size: 12px; font-weight: 700; color: #fcd34d; }

/* ============================================================
   v0.20.8 智能舱视觉分层与动效升级（纯增量，不改既有规则语义）
   原则：重要信息一眼可见（风险/自检/置信度），次要信息安静退后；
   所有动效遵守 prefers-reduced-motion。
   ============================================================ */

/* ---- 全局氛围：流动极光背景 + 细腻网格 ---- */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 42% 30% at 18% 12%, rgba(34,211,238,.10), transparent 70%),
    radial-gradient(ellipse 38% 28% at 85% 20%, rgba(52,211,153,.08), transparent 70%),
    radial-gradient(ellipse 45% 35% at 55% 95%, rgba(96,165,250,.09), transparent 70%);
  animation: lmAuroraDrift 26s ease-in-out infinite alternate;
}
@keyframes lmAuroraDrift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
  to   { transform: translate3d(1.5%, 1.5%, 0) scale(1.04); }
}

/* ---- 任务英雄区：目标标题是最重要的信息 ---- */
.mission-hero h1 {
  font-size: clamp(24px, 3vw, 34px); line-height: 1.25; letter-spacing: .3px;
  background: linear-gradient(120deg, #edf7fb 30%, #67e8f9 65%, #5eead4 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 34px rgba(103,232,249,.14);
}
.eyebrow .type-badge { box-shadow: 0 0 14px rgba(94,234,212,.25); }

/* ---- 面板分层：三级重要性体系 ---- */
/* 一级（必须看）：风险、独立自检、置信度 */
.panel.risks-panel, .panel.audit-panel, .panel.confidence-panel {
  border-width: 1.5px; position: relative; overflow: hidden;
}
.panel.risks-panel { border-color: rgba(251,113,133,.32); }
.panel.risks-panel.has-risks {
  box-shadow: 0 0 0 1px rgba(251,113,133,.12), 0 10px 34px rgba(244,63,94,.10);
  background: linear-gradient(170deg, rgba(244,63,94,.06), rgba(15,27,40,.86) 42%);
}
.panel.risks-panel.has-risks::before {
  content: "优先处理"; position: absolute; top: 12px; right: -32px; transform: rotate(38deg);
  padding: 3px 36px; font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: #fff; background: linear-gradient(135deg, #f43f5e, #fb7185);
  box-shadow: 0 4px 14px rgba(244,63,94,.4);
}
.panel.audit-panel { border-color: rgba(52,211,153,.26); }
.panel.confidence-panel { border-color: rgba(103,232,249,.26); }
/* 二级（建议看）：导航、探索中心 */
.panel.explore-panel, .panel:has(#navigationList) { border-color: rgba(96,165,250,.20); }
/* 三级（需要时才看）：资料、建议——安静退后，悬停回亮 */
.panel.resources-panel, .panel.advice-panel { opacity: .82; transition: opacity .25s ease, border-color .25s ease; }
.panel.resources-panel:hover, .panel.advice-panel:hover { opacity: 1; border-color: rgba(148,184,208,.3); }

/* 面板序号徽标升级为渐变芯片 */
.panel-no {
  background: linear-gradient(135deg, rgba(103,232,249,.18), rgba(94,234,212,.10));
  border: 1px solid rgba(103,232,249,.30); border-radius: 9px;
  box-shadow: inset 0 0 12px rgba(103,232,249,.08);
}

/* ---- 卡片动效：入场交错 + 悬停浮起 + 流光边框 ---- */
.intent-section { animation: lmRise .4s ease both; }
.intent-section:nth-child(2) { animation-delay: .05s; }
.intent-section:nth-child(3) { animation-delay: .1s; }
.intent-section:nth-child(4) { animation-delay: .15s; }
.intent-section:nth-child(5) { animation-delay: .2s; }
@keyframes lmRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.intent-card {
  position: relative; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.intent-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(120deg, transparent 30%, rgba(103,232,249,.10) 50%, transparent 70%);
  background-size: 240% 100%; background-position: 130% 0; opacity: 0; transition: opacity .2s ease;
}
.intent-card:hover {
  transform: translateY(-3px); border-color: rgba(103,232,249,.38);
  box-shadow: 0 14px 34px rgba(0,0,0,.34), 0 0 0 1px rgba(103,232,249,.08);
}
.intent-card:hover::after { opacity: 1; animation: lmSheen 1.1s ease; }
@keyframes lmSheen { from { background-position: 130% 0; } to { background-position: -110% 0; } }

/* 关键操作徽章脉冲提醒（critical 按钮不被忽视） */
.intent-card-badge { letter-spacing: .4px; }
.intent-card:has(.intent-action[critical]) .intent-card-badge,
.intent-card:has([data-critical="true"]) .intent-card-badge { animation: lmPulse 2.2s ease-in-out infinite; }
@keyframes lmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50% { box-shadow: 0 0 0 4px rgba(251,191,36,.14); }
}

/* ---- 按钮微交互 ---- */
.primary-btn {
  position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .2s ease, filter .2s ease;
}
.primary-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(34,211,238,.28); filter: brightness(1.06); }
.primary-btn:active { transform: translateY(0) scale(.985); }
.ghost-btn { transition: transform .16s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.ghost-btn:hover { transform: translateY(-1px); }
.ghost-btn:active { transform: translateY(0) scale(.98); }

/* ---- 导航卡 / 登记册卡 / 风险条目浮起 ---- */
.nav-card, .registry-card, .risk, .resource-item, .journey-item {
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.nav-card:hover, .registry-card:hover, .resource-item:hover, .journey-item:hover {
  transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0,0,0,.3);
}
.risk.high { border-left: 3px solid #f43f5e; background: linear-gradient(90deg, rgba(244,63,94,.10), rgba(255,255,255,.02) 55%); }
.risk.medium { border-left: 3px solid #fbbf24; }
.risk.low { border-left: 3px solid rgba(148,184,208,.4); }

/* ---- Toast 滑入 ---- */
#toast { animation: lmToastIn .24s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes lmToastIn { from { opacity: 0; transform: translate(-50%, 10px) scale(.96); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }

/* ---- 目标步骤条流光 ---- */
#loadingBar {
  background: linear-gradient(90deg, #22d3ee, #34d399, #60a5fa, #22d3ee);
  background-size: 220% 100%; animation: lmBarFlow 2.4s linear infinite;
  box-shadow: 0 0 14px rgba(34,211,238,.45);
}
@keyframes lmBarFlow { from { background-position: 0 0; } to { background-position: 220% 0; } }

/* ---- 置信度环呼吸光 ---- */
.confidence-panel { box-shadow: inset 0 0 30px rgba(103,232,249,.05); }

/* ---- 动效可及性：系统减少动效时全部关闭 ---- */
@media (prefers-reduced-motion: reduce) {
  body::before, .intent-card:hover::after, #loadingBar,
  .intent-card:has(.intent-action[critical]) .intent-card-badge,
  .intent-card:has([data-critical="true"]) .intent-card-badge { animation: none !important; }
  .intent-section, .intent-card, .nav-card, .registry-card, .risk, .resource-item, .journey-item,
  .primary-btn, .ghost-btn { transition: none !important; }
}

/* ================= V5 研究文档 · 亮白"文档纸"设计（2026-09-22 视觉重设计） =================
 * 设计目标：从暗色玻璃拟态改为大众审美的浅色纸张风——
 * 白底卡片、靛蓝主强调色、柔和阴影、克制动效；类名不变，DOM 契约不受影响。 */
.goal-doc-panel, .intent-confirm-bar { --gd-ink:#1c2942; --gd-muted:#5b6b83; --gd-faint:#8b99ad;
  --gd-line:#e6ecf4; --gd-card:#ffffff; --gd-bg:#f5f8fc; --gd-accent:#3b6ef0; --gd-accent-soft:#eef3ff;
  --gd-ok:#0e9f6e; --gd-warn:#d97706; --gd-danger:#dc2626;
  color: var(--gd-ink); }
@keyframes gdFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- 意图确认条：白底卡片 ---- */
.intent-confirm-bar {
  margin-top: 14px; padding: 16px 18px; border-radius: 14px;
  background: var(--gd-card); border: 1px solid var(--gd-line);
  box-shadow: 0 4px 18px rgba(28,41,66,.08);
  animation: gdFadeUp .28s cubic-bezier(.2,.9,.3,1.1) both;
}
.intent-confirm-bar.hidden { display: none; }
.icb-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.icb-title { font-size: 15px; font-weight: 700; color: var(--gd-ink); }
.icb-sub { color: var(--gd-muted); font-size: 12px; }
.icb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.icb-chip {
  padding: 3px 10px; border-radius: 999px; font-size: 12px;
  background: var(--gd-accent-soft); color: #2f4bd7; border: 1px solid #d8e2fd;
}
.icb-chip.tone-warn { background: #fdf3e3; color: #9a5b07; border-color: #f3ddb5; }
.icb-form { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.icb-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--gd-muted); }
.icb-row input {
  width: 110px; padding: 6px 10px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--gd-line); background: #fbfcfe; color: var(--gd-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.icb-row input:focus { outline: none; border-color: var(--gd-accent); box-shadow: 0 0 0 3px rgba(59,110,240,.14); }
.icb-actions { display: flex; gap: 8px; }
.icb-recovered { margin: 0 0 10px; font-size: 13px; color: var(--gd-muted); }

/* ---- 面板外壳：浅灰蓝纸面 ---- */
.goal-doc-panel {
  margin-top: 18px; padding: 20px; border-radius: 18px;
  background: var(--gd-bg); border: 1px solid var(--gd-line);
  box-shadow: 0 10px 34px rgba(28,41,66,.10);
  animation: gdFadeUp .3s cubic-bezier(.2,.9,.3,1.1) both;
}
.goal-doc-panel.hidden { display: none; }
.gd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.gd-eyebrow {
  font-size: 11px; letter-spacing: .12em; font-weight: 700; color: #2f4bd7;
  padding: 3px 10px; border-radius: 7px; background: var(--gd-accent-soft); border: 1px solid #d8e2fd;
}
.gd-rev { color: var(--gd-faint); font-size: 13px; }
/* 亮底上的状态药丸覆盖 */
.goal-doc-panel .state-pill.tone-ok, .goal-doc-panel .state-pill.tone-ready { color: #0b7a55; background: #e5f7ef; border-color: #bfe8d6; }
.goal-doc-panel .state-pill.tone-warn { color: #9a5b07; background: #fdf3e3; border-color: #f3ddb5; }
.goal-doc-panel .state-pill.tone-idle { color: #5b6b83; background: #eef2f7; border-color: #dbe3ee; }
.goal-doc-panel .state-pill.tone-failed { color: #b91c1c; background: #fdecec; border-color: #f5c6c6; }
/* 亮底上的按钮覆盖 */
.goal-doc-panel .primary-btn, .intent-confirm-bar .primary-btn {
  min-height: 0; padding: 7px 16px; font-size: 13px; border-radius: 10px;
  background: linear-gradient(180deg, #4a7bf5, #3560e0); color: #fff; border: none;
  box-shadow: 0 2px 8px rgba(59,110,240,.30);
}
.goal-doc-panel .primary-btn:hover, .intent-confirm-bar .primary-btn:hover { box-shadow: 0 4px 14px rgba(59,110,240,.40); filter: brightness(1.05); }
.goal-doc-panel .ghost-btn, .intent-confirm-bar .ghost-btn {
  min-height: 0; padding: 6px 12px; font-size: 12px; border-radius: 9px;
  background: #fff; border: 1px solid var(--gd-line); color: #3a4a63;
}
.goal-doc-panel .ghost-btn:hover, .intent-confirm-bar .ghost-btn:hover { border-color: #c6d6f8; color: var(--gd-accent); background: #f7faff; }
.goal-doc-panel .empty-copy { color: #9aa7ba; font-size: 12px; min-height: 0; }
.goal-doc-panel a { color: var(--gd-accent); }
.gd-warning {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 12px; font-size: 13px;
  background: #fdf6e8; border: 1px solid #f3e3bd; color: #8a5a08;
}

/* ---- 区块卡片 ---- */
.gd-sections { display: grid; gap: 14px; }
.gd-sec {
  padding: 16px 18px; border-radius: 14px; background: var(--gd-card);
  border: 1px solid var(--gd-line); box-shadow: 0 1px 3px rgba(28,41,66,.05);
  transition: box-shadow .22s ease, transform .22s ease;
}
.gd-sec:hover { box-shadow: 0 8px 24px rgba(28,41,66,.10); transform: translateY(-1px); }
.gd-sec-title {
  margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--gd-ink);
  display: flex; align-items: center; gap: 8px;
}
.gd-sec-title::before {
  content: ""; width: 4px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, #4a7bf5, #7aa0f8);
}
.gd-headline { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: #2f4bd7; }
.gd-points { margin: 0; padding-left: 18px; font-size: 13px; color: #33415c; }
.gd-points li { margin: 3px 0; }

/* ---- 单实体卡片（entity-card） ---- */
.gd-entity { display: flex; flex-direction: column; gap: 8px; }
.gd-entity-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gd-entity-head strong { font-size: 15px; color: var(--gd-ink); }
.gd-research-btn { font-size: 12px; }
.gd-entity a { font-size: 12px; }
.gd-facts { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
.gd-facts dt { color: var(--gd-muted); padding-top: 5px; }
.gd-facts dd { margin: 0; color: var(--gd-ink); }

/* ---- 事实行：悬停浮现编辑按钮 ---- */
.gd-fact-row { display: flex; align-items: flex-start; gap: 6px; border-radius: 8px; padding: 3px 6px; margin: -3px -6px; transition: background .15s ease; }
.gd-fact-row:hover { background: #f2f6fd; }
.gd-fact-val { flex: 1 1 auto; min-width: 0; line-height: 1.6; }
.gd-fact-tools { flex: 0 0 auto; display: flex; gap: 2px; opacity: 0; transition: opacity .15s ease; }
.gd-fact-row:hover .gd-fact-tools, .gd-fact-row.editing .gd-fact-tools { opacity: 1; }
.gd-icon-btn {
  border: none; background: transparent; cursor: pointer; font-size: 12px; line-height: 1;
  padding: 4px 5px; border-radius: 6px; color: var(--gd-faint); transition: background .15s ease, color .15s ease;
}
.gd-icon-btn:hover { background: #e5edfb; color: var(--gd-accent); }
.gd-fact-edit-input {
  flex: 1 1 auto; min-width: 0; padding: 6px 10px; border-radius: 8px; font-size: 13px;
  border: 1px solid var(--gd-accent); background: #fbfcff; color: var(--gd-ink);
  box-shadow: 0 0 0 3px rgba(59,110,240,.12);
}
.gd-resrch-btn {
  font-size: 12px; color: #0e9f6e; border: 1px solid #bfe8d6; background: #f2fbf7;
  border-radius: 8px; padding: 4px 9px; cursor: pointer; transition: background .15s ease;
}
.gd-resrch-btn:hover { background: #e2f6ec; }
.gd-resrch-btn:disabled { opacity: .6; cursor: wait; }
.gd-user-badge {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  font-size: 11px; color: #7c3aed; background: #f1ebfd; border: 1px solid #ddccf9; vertical-align: 1px;
}
.gd-missing { color: var(--gd-warn) !important; }
.gd-none { color: #c3cdd9; }

/* ---- 一左一右实体对比列 ---- */
.gd-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; width: 100%; }
.gd-entity-col {
  background: #fbfcfe; border: 1px solid var(--gd-line); border-radius: 14px;
  padding: 14px; display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 1px 3px rgba(28,41,66,.05);
  animation: gdFadeUp .3s cubic-bezier(.2,.9,.3,1.1) both;
}
.gd-entity-col:nth-child(2) { animation-delay: .06s; }
.gd-entity-col:nth-child(3) { animation-delay: .12s; }
.gd-entity-col:nth-child(4) { animation-delay: .18s; }
.gd-entity-col:hover { border-color: #c6d6f8; box-shadow: 0 8px 22px rgba(59,110,240,.10); }
.gd-ecol-head { display: flex; align-items: center; gap: 9px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed var(--gd-line); }
.gd-ecol-avatar {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(145deg, #4a7bf5, #7c5cf0);
}
.gd-entity-col:nth-child(2) .gd-ecol-avatar { background: linear-gradient(145deg, #0ea5a4, #22c1a3); }
.gd-entity-col:nth-child(3) .gd-ecol-avatar { background: linear-gradient(145deg, #f59e0b, #f97316); }
.gd-ecol-name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 700; color: var(--gd-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-ecol-research { flex: 0 0 auto; font-size: 11px; padding: 4px 9px; }
.gd-ecol-row { display: flex; flex-direction: column; gap: 1px; padding: 7px 2px; border-bottom: 1px solid #f0f4f9; }
.gd-ecol-row:last-child { border-bottom: none; }
.gd-ecol-label { font-size: 11px; color: var(--gd-faint); }
.gd-ecol-val { font-size: 13px; color: var(--gd-ink); }
.gd-ecol-empty { font-size: 12px; color: #b3c0d1; padding: 8px 2px; }

/* ---- 时间线 ---- */
.gd-timeline { display: flex; flex-direction: column; gap: 0; }
.gd-tl-item { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-bottom: 14px; }
.gd-tl-item::before {
  content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px;
  background: linear-gradient(180deg, #cddcfb, transparent);
}
.gd-tl-item:last-child::before { display: none; }
.gd-tl-item::after {
  content: ""; position: absolute; left: 1px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--gd-accent); box-shadow: 0 0 0 3px rgba(59,110,240,.12);
}
.gd-tl-date {
  flex: 0 0 auto; font-size: 12px; color: #2f4bd7; font-weight: 600;
  padding: 2px 9px; border-radius: 7px; background: var(--gd-accent-soft); margin-left: 20px;
}
.gd-tl-body { flex: 1 1 auto; min-width: 0; }
.gd-tl-body strong { font-size: 13px; color: var(--gd-ink); }
.gd-tl-body p { margin: 2px 0 0; font-size: 12px; color: var(--gd-muted); }

.gd-cost-list, .gd-sources { margin: 0; padding-left: 18px; font-size: 13px; color: #33415c; }
.gd-cost-list li, .gd-sources li { margin: 4px 0; }

/* ---- V5 阶段 2：组合勾选与添加对象 ---- */
.gd-pick { display: flex; align-items: flex-start; gap: 7px; cursor: pointer; }
.gd-pick input[type="checkbox"] { accent-color: #3b6ef0; width: 14px; height: 14px; margin-top: 3px; cursor: pointer; flex: 0 0 auto; }
.gd-pick > span { flex: 1 1 auto; min-width: 0; line-height: 1.6; }
.gd-combo { margin-top: 12px; }
.gd-combo-btn { font-size: 13px; }
.gd-combo-result {
  margin-top: 12px; padding: 14px 16px; border-radius: 12px;
  background: #f2fbf7; border: 1px solid #bfe8d6;
  animation: gdFadeUp .24s cubic-bezier(.2,.9,.3,1.1) both;
}
.gd-combo-title { display: block; font-size: 14px; color: #0b7a55; margin-bottom: 8px; }
.gd-combo-stats { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; margin-bottom: 6px; }
.gd-combo-total { font-weight: 700; color: var(--gd-ink); }
.gd-combo-count { color: var(--gd-muted); }
.gd-combo-unknown { color: var(--gd-warn); }
.gd-combo-conflict {
  margin-top: 8px; padding: 9px 12px; border-radius: 10px; font-size: 13px;
  background: #fdf0f0; border: 1px solid #f5c6c6; color: #b91c1c;
}
.gd-combo-conflict p { margin: 3px 0 0; }
.gd-combo-ok { margin: 0; font-size: 13px; color: var(--gd-ok); }
.gd-add-entity { margin-top: 12px; }
.gd-add-form { display: inline-flex; align-items: center; gap: 8px; }
.gd-add-form input {
  padding: 7px 12px; border-radius: 9px; font-size: 13px; width: 200px;
  border: 1px solid var(--gd-line); background: #fbfcfe; color: var(--gd-ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gd-add-form input:focus { outline: none; border-color: var(--gd-accent); box-shadow: 0 0 0 3px rgba(59,110,240,.14); }
.gd-add-ok { padding: 7px 14px; font-size: 13px; }

/* ---- 事实编辑区（成本/材料/评价区块的行内编辑） ---- */
.gd-fact-edit-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.gd-fact-edit-row .gd-fact-val { flex: 1 1 auto; }

@media (prefers-reduced-motion: reduce) {
  .gd-sec, .gd-entity-col, .primary-btn, .ghost-btn { transition: none !important; animation: none !important; }
}

/* ---- V5 阶段 3：反馈弹窗（与工作舱暗色主题一致） ---- */
.fb-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; }
.fb-modal.hidden { display: none; }
.fb-backdrop { position: absolute; inset: 0; background: rgba(4, 12, 18, .62); backdrop-filter: blur(6px); animation: gdFadeUp .18s ease both; }
.fb-box {
  position: relative; width: min(620px, calc(100vw - 48px)); max-height: 82vh; overflow: auto;
  background: #0d1a26; border: 1px solid rgba(103,232,249,.28); border-radius: 16px;
  padding: 18px 20px 20px; box-shadow: 0 24px 70px rgba(0,0,0,.5);
  animation: gdFadeUp .24s cubic-bezier(.2,.9,.3,1.1) both; color: #edf7fb;
}
.fb-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fb-head strong { font-size: 15px; }
.fb-tip { margin: 0 0 12px; font-size: 12px; color: #8fa8b8; }
.fb-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.fb-tab {
  padding: 6px 14px; border-radius: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  color: #a9bdc9; font-size: 12px; cursor: pointer; transition: border-color .15s ease, color .15s ease;
}
.fb-tab.active { border-color: rgba(103,232,249,.5); color: #67e8f9; background: rgba(103,232,249,.08); }
.fb-pane.hidden { display: none; }
.fb-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.fb-label { flex: 0 0 56px; font-size: 12px; color: #8fa8b8; padding-top: 8px; }
.fb-input, .fb-textarea, .fb-select {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px; border-radius: 9px; font-size: 13px;
  border: 1px solid rgba(149,184,208,.25); background: rgba(255,255,255,.05); color: #edf7fb;
}
.fb-input:focus, .fb-textarea:focus, .fb-select:focus { outline: none; border-color: rgba(103,232,249,.55); box-shadow: 0 0 0 3px rgba(103,232,249,.12); }
.fb-textarea { min-height: 96px; resize: vertical; font-family: inherit; }
.fb-select { flex: 0 1 220px; }
.fb-btnrow { display: flex; gap: 10px; margin-top: 4px; }
.fb-submit { min-height: 0; padding: 9px 18px; font-size: 13px; }
.fb-list { display: grid; gap: 10px; }
.fb-item { padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid rgba(149,184,208,.16); }
.fb-item-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-item-top strong { font-size: 13px; color: #edf7fb; flex: 1 1 auto; min-width: 0; }
.fb-badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid; }
.fb-kind-bug { color: #fb7185; border-color: rgba(251,113,133,.4); background: rgba(251,113,133,.08); }
.fb-kind-suggestion { color: #67e8f9; border-color: rgba(103,232,249,.4); background: rgba(103,232,249,.08); }
.fb-kind-experience { color: #fbbf24; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.fb-kind-other { color: #a9bdc9; border-color: rgba(169,189,201,.4); background: rgba(169,189,201,.08); }
.fb-status { font-size: 11px; padding: 2px 8px; border-radius: 999px; }
.fb-st-open { color: #fb7185; background: rgba(251,113,133,.12); }
.fb-st-processing { color: #fbbf24; background: rgba(251,191,36,.12); }
.fb-st-done { color: #34d399; background: rgba(52,211,153,.12); }
.fb-item-detail { margin: 6px 0 4px; font-size: 12px; color: #c6d6e0; line-height: 1.6; }
.fb-item-meta { font-size: 11px; color: #6f8899; }

/* ---------- P0-1 输入收口：empty / active / creatingNew 三态 ---------- */
.composer-topbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.composer-title { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.new-goal-btn { margin-left: auto; }
.goal-composer.collapsed #composerBody { display: none; }
.goal-confirm-bar {
  margin-top: 10px; padding: 12px 14px; border-radius: 12px;
  background: rgba(255, 184, 77, 0.1); border: 1px solid rgba(255, 184, 77, 0.45);
}
.goal-confirm-bar p { margin: 0 0 10px; font-size: 13px; line-height: 1.7; }
.goal-confirm-bar .gc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* 来源覆盖度小条：已核实/未找到/来源数（V5 覆盖度，2026-09-23） */
.gd-coverage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; }
.gd-coverage-track { display: flex; width: 110px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--line, #e3e6ee); flex: none; }
.gd-coverage-ok { display: block; height: 100%; background: linear-gradient(90deg, #34c08b, #2ea36f); transition: width .4s ease; }
.gd-coverage-miss { display: block; height: 100%; background: #c9cedb; }
.gd-coverage-text { font-size: 11px; color: var(--sub, #7a8199); white-space: nowrap; }
.gd-coverage-dots { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.gd-coverage-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.gd-coverage-dot.ok { background: #34c08b; box-shadow: 0 0 0 2px rgba(52, 192, 139, .15); }
.gd-coverage-dot.miss { background: #c9cedb; }
.gd-coverage-dot.ok:hover { transform: scale(1.35); }

/* AI 事实核验三态（V5 AI 核验，2026-09-23）：pending 琥珀待选 / unverified 灰标 */
.gd-pending-val { color: #b26a00; background: rgba(240, 173, 78, .12); border-radius: 4px; padding: 0 4px; }
/* v0.22.0 冲突采用徽章：用户选中的时间值在事实行上直接可见 */
.gd-adopted-badge { display: inline-block; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 8px; margin-left: 6px;
  color: #0e7d5a; background: rgba(46, 204, 150, .14); border: 1px solid rgba(46, 204, 150, .35); vertical-align: middle; white-space: nowrap; }
.gd-ai-tag { display: inline-block; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: 8px; margin-left: 6px;
  color: #7a8199; background: #eef0f5; vertical-align: middle; white-space: nowrap; }
.gd-ai-tag.pending { color: #b26a00; background: rgba(240, 173, 78, .16); cursor: help; }
.gd-ai-tag.local { color: #0e7d5a; background: rgba(46, 204, 150, .14); border: 1px solid rgba(46, 204, 150, .35); cursor: help; }
.gd-ai-actions { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.gd-ai-btn { font-size: 11px; line-height: 1; padding: 4px 8px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; transition: all .15s ease; }
.gd-ai-btn.adopt { color: #1d7a4f; background: rgba(52, 192, 139, .12); border-color: rgba(52, 192, 139, .35); }
.gd-ai-btn.adopt:hover { background: rgba(52, 192, 139, .22); }
.gd-ai-btn.drop { color: #a33; background: rgba(220, 90, 90, .08); border-color: rgba(220, 90, 90, .3); }
.gd-ai-btn.drop:hover { background: rgba(220, 90, 90, .18); }
.gd-coverage-dot.pending { background: #f0ad4e; box-shadow: 0 0 0 2px rgba(240, 173, 78, .18); }
.gd-coverage-dot.pending:hover { transform: scale(1.35); }

/* ================= V5.1：克制浅色工作台 + 比较来源说明 =================
   保留既有 DOM、主题偏好与交互契约；只统一灵眸工作区的视觉层级。
   目标：暖灰画布、纸白内容面、墨色正文、单一墨绿行动色，不再用整屏光效和多色大卡片。 */
body[data-theme] {
  color-scheme: light;
  --bg: #f3f3f0;
  --panel: #ffffff;
  --panel-strong: #fbfbf9;
  --line: #e3e5e1;
  --text: #25312f;
  --muted: #687572;
  --teal: #226a60;
  --cyan: #226a60;
  --blue: #446e8a;
  --amber: #9a6a19;
  --red: #a94b4b;
  --green: #36745b;
  background: #f3f3f0 !important;
  color: #25312f;
}
/* 浅色主题下保留氛围光斑与极光，仅调淡颜色避免喧宾夺主（2026-09-24 恢复动画） */
body[data-theme]::before {
  background:
    radial-gradient(ellipse 42% 30% at 18% 12%, color-mix(in srgb, var(--theme-accent) 10%, transparent), transparent 70%),
    radial-gradient(ellipse 38% 28% at 85% 20%, color-mix(in srgb, var(--theme-accent) 7%, transparent), transparent 70%),
    radial-gradient(ellipse 45% 35% at 55% 95%, rgba(96,165,250,.06), transparent 70%);
  animation: lmAuroraDrift 26s ease-in-out infinite alternate;
}
body[data-theme] .ambient { display: block; opacity: .14; filter: blur(80px); animation: lmDrift 14s ease-in-out infinite; }
body[data-theme] .ambient-a { background: var(--theme-accent); }
body[data-theme] .ambient-b { background: #5aa3c9; }
body[data-theme] .topbar {
  background: rgba(250, 250, 247, .96);
  border-bottom-color: #e2e4df;
  box-shadow: 0 2px 10px rgba(35, 49, 46, .035);
  backdrop-filter: blur(10px);
}
body[data-theme] .brand-mark {
  background: #e7efeb;
  border-color: #d5e3dc;
  box-shadow: none;
}
body[data-theme] .brand-mark::before { border-color: #39776b; }
body[data-theme] .brand-mark span, body[data-theme] .live-dot { background: #39776b; box-shadow: none; }
body[data-theme] .brand small { color: #75817d; }
body[data-theme] .top-source, body[data-theme] .ghost-btn, body[data-theme] .danger-ghost {
  color: #586560;
  border-color: #dfe3de;
  background: #fff;
}
body[data-theme] .ghost-btn:hover { color: #205f56; border-color: #aac5ba; background: #f0f5f1; }
body[data-theme] .shell { padding-top: 24px; }
body[data-theme] .goal-composer, body[data-theme] .goal-box, body[data-theme] .process-panel,
body[data-theme] .panel, body[data-theme] .action-bar, body[data-theme] .action-result-panel,
body[data-theme] .ambiguity-panel, body[data-theme] .execution-safety, body[data-theme] .goal-page-panel {
  color: #25312f;
  background: #fff;
  border: 1px solid #e1e5e0;
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(36, 49, 45, .045);
}
body[data-theme] .goal-composer { padding: 20px 22px 16px; }
body[data-theme] .composer-title, body[data-theme] .composer-label,
body[data-theme] .hero-copy h1, body[data-theme] .panel-heading h2,
body[data-theme] .process-head h2, body[data-theme] .ambiguity-head h2 { color: #25312f; }
body[data-theme] .composer-row input, body[data-theme] .goal-row input,
body[data-theme] .icb-row input {
  color: #25312f;
  background: #fbfcfa;
  border-color: #d9dfda;
}
body[data-theme] .composer-row input::placeholder, body[data-theme] .goal-row input::placeholder { color: #929b96; }
body[data-theme] .composer-row input:focus, body[data-theme] .goal-row input:focus {
  border-color: #6d9e8c;
  box-shadow: 0 0 0 3px rgba(70, 126, 105, .11);
}
body[data-theme] .composer-mode, body[data-theme] .goal-box label,
body[data-theme] .panel-intro, body[data-theme] .summary-text,
body[data-theme] .fact strong, body[data-theme] .journey-item,
body[data-theme] .timeline-item, body[data-theme] .material-item,
body[data-theme] .task-item, body[data-theme] .resource-item { color: #46534e; }
body[data-theme] .timeline-item strong, body[data-theme] .material strong,
body[data-theme] .task-copy strong, body[data-theme] .resource-item strong,
body[data-theme] .risk strong, body[data-theme] .audit-check strong,
body[data-theme] .confidence-copy strong, body[data-theme] .registry-title { color: #2d3934; }
body[data-theme] .timeline-item p, body[data-theme] .material p,
body[data-theme] .task-copy p, body[data-theme] .resource-item p,
body[data-theme] .audit-summary, body[data-theme] .audit-check p,
body[data-theme] .correction small, body[data-theme] .confidence-copy,
body[data-theme] .confidence-ring small, body[data-theme] .registry-meta,
body[data-theme] .nav-card > p, body[data-theme] .nav-footer,
body[data-theme] .advice-item p { color: #68746e; }
body[data-theme] .fact label { color: #687a70; }
body[data-theme] .composer-hint, body[data-theme] .composer-recent-label,
body[data-theme] .panel-no, body[data-theme] .muted-label,
body[data-theme] .process-kicker, body[data-theme] .step small,
body[data-theme] .step { color: #7a8580; }
body[data-theme] .composer-trust-note {
  margin: 10px 0 0;
  color: #66736d;
  font-size: 12px;
  line-height: 1.6;
}
body[data-theme] .composer-chip {
  color: #496259;
  background: #f7f9f6;
  border-color: #dce4dd;
}
body[data-theme] .composer-chip:hover { color: #205f56; background: #edf4ef; border-color: #afc9bb; }
body[data-theme] .primary-btn, body[data-theme] .composer-row .primary-btn {
  color: #fff;
  background: #286e61;
  box-shadow: none;
}
body[data-theme] .primary-btn:hover { background: #205c52; box-shadow: none; filter: none; }
body[data-theme] .panel { overflow: hidden; }
body[data-theme] .panel-heading { border-bottom: 1px solid #eef0ec; }
body[data-theme] .panel.risks-panel, body[data-theme] .panel.audit-panel,
body[data-theme] .panel.confidence-panel, body[data-theme] .panel.explore-panel,
body[data-theme] .panel:has(#navigationList) { border-color: #e1e5e0; }
body[data-theme] .panel.risks-panel.has-risks { border-color: #e7c7c3; }
body[data-theme] .step.active .step-dot, body[data-theme] .step.done .step-dot {
  color: #fff; background: #39776b; border-color: #39776b; box-shadow: none; animation: none;
}
body[data-theme] .step.active strong, body[data-theme] .step.done strong { color: #315c50; }
body[data-theme] .step.failed .step-dot { background: #ad5550; }
body[data-theme] .loading-track { background: #e8ece8; }
body[data-theme] .loading-track span { background: #39776b; box-shadow: none; }
body[data-theme] .timeline-item { border-left-color: #d6e3dc; }
body[data-theme] .timeline-item::before { background: #4d8b77; box-shadow: none; }
body[data-theme] .timeline-date, body[data-theme] .external-link { color: #286e61; }
body[data-theme] .material-icon { color: #496b5c; background: #edf3ee; }
body[data-theme] .material, body[data-theme] .task-item, body[data-theme] .resource-item,
body[data-theme] .advice-item { border-bottom-color: #e9ece8; }
body[data-theme] .task-progress, body[data-theme] .evidence-bar { background: #e8ece8; }
body[data-theme] .task-progress span { background: #4b8a72; }
body[data-theme] .task-check { border-color: #bdc9c1; background: #fff; }
body[data-theme] .task-check:checked { background: #4b8a72; }
body[data-theme] .priority.high { color: #934a48; background: #f8e9e6; }
body[data-theme] .priority.medium { color: #876320; background: #f6f0df; }
body[data-theme] .priority.low { color: #4c6879; background: #eaf0f3; }
body[data-theme] .risk { background: #f8f9f7; }
body[data-theme] .risk.high { background: #fbf1ef; }
body[data-theme] .risk.medium { background: #faf6ea; }
body[data-theme] .audit-sub { background: #f7f8f6; }
body[data-theme] .audit-sub h3 { color: #58665f; }
body[data-theme] .missing-item { color: #85661f; }
body[data-theme] details.evidence summary { color: #526d61; }
body[data-theme] details.evidence p { color: #59675f; background: #f0f5f1; border-left-color: #a9c6b5; }
body[data-theme] .confidence-ring { box-shadow: none; }
body[data-theme] .confidence-ring::before { background: #fff; }
body[data-theme] .registry-summary { color: #416553; background: #f0f5f1; }
body[data-theme] .registry-card, body[data-theme] .nav-card {
  color: #34413b; background: #fbfcfa; border-color: #e2e7e2; box-shadow: none;
}
body[data-theme] .registry-card.flagged { background: #fff8f6; border-color: #e8c9c4; }
body[data-theme] .registry-cred.official { color: #35664d; background: #e9f2ec; }
body[data-theme] .registry-cred.platform { color: #4c6879; background: #edf2f4; }
body[data-theme] .registry-cred.normal { color: #68746e; background: #f0f2ef; }
body[data-theme] .registry-year { color: #80621f; background: #f7f2e6; }
body[data-theme] .registry-flag { color: #934a48; }
body[data-theme] .nav-footer { border-top-color: #e9ece8; }
body[data-theme] .resource-meta span { color: #496b5c; background: #edf3ee; }
body[data-theme] .history-drawer { color: #25312f; background: #fbfbf8; border-left-color: #e0e4de; box-shadow: -16px 0 40px rgba(36,49,45,.14); }
body[data-theme] .drawer-head h2, body[data-theme] .history-item strong { color: #25312f; }
body[data-theme] .drawer-head span, body[data-theme] .history-item span,
body[data-theme] .history-empty { color: #68746e; }
body[data-theme] .history-item { color: #34413b; background: #fff; }
body[data-theme] .history-item:hover { border-color: #aac5b8; background: #f3f7f3; }
body[data-theme] .empty-copy { color: #75817b; }
body[data-theme] .error-banner { color: #813b37; background: #fff7f5; border-color: #edcfca; }
body[data-theme] .error-banner p { color: #765955; }
body[data-theme] .intent-experience {
  color: #25312f;
  background: #fff;
  border: 1px solid #e1e5e0;
  border-radius: 16px;
  box-shadow: 0 3px 14px rgba(36, 49, 45, .045);
}
body[data-theme] .intent-orbit { display: block; border-color: color-mix(in srgb, var(--theme-accent) 22%, transparent); animation: lmDrift 16s ease-in-out infinite; }
body[data-theme] .intent-eyebrow, body[data-theme] .intent-copy h2,
body[data-theme] .intent-card h4 { color: #25312f; }
body[data-theme] .intent-copy p, body[data-theme] .intent-coverage p,
body[data-theme] .intent-section-head p, body[data-theme] .intent-card > p { color: #687572; }
body[data-theme] .intent-section { border-top-color: #e9ece8; }
body[data-theme] .intent-card, body[data-theme] .intent-card.field,
body[data-theme] .intent-card.warning {
  background: #fbfcfa;
  border-color: #e2e7e2;
  box-shadow: none;
}
body[data-theme] .intent-card:hover { transform: translateY(-1px); background: #f7faf7; border-color: #bfd1c6; }
body[data-theme] .intent-card::after {
  display: block;
  background: linear-gradient(120deg, transparent 30%, color-mix(in srgb, var(--theme-accent) 14%, transparent) 50%, transparent 70%);
  background-size: 240% 100%; background-position: 130% 0;
}
body[data-theme] .intent-card:hover::after { animation: lmSheen 1.1s ease forwards; }
body[data-theme] .intent-card-badge { color: #586d63; background: #edf2ee; }
body[data-theme] .intent-safety { color: #65716c; border-top-color: #e9ece8; }
body[data-theme] .view-toolbar { background: transparent; border: 0; }
body[data-theme] .confidence-ring { filter: saturate(.68); }
body[data-theme] .status-badge, body[data-theme] .research-badge,
body[data-theme] .state-pill, body[data-theme] .type-badge { box-shadow: none; }
body[data-theme] .action-bar .primary-btn { animation: none; }
body[data-theme] .primary-btn::after {
  display: block;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  animation: lmSheen 3.4s ease-in-out infinite;
}
body[data-theme] .mini-action-btn { color: #42675a; border-color: #d6e2da; background: #f4f8f5; }
body[data-theme] .mini-action-btn:hover { color: #205f56; border-color: #abc6b8; background: #eaf2ec; }
body[data-theme] .goal-doc-panel, body[data-theme] .intent-confirm-bar { box-shadow: 0 3px 14px rgba(36,49,45,.045); }
/* V5.2：保留用户的配色选择，并修复浅底上的低对比文字。
   主题只改变强调色和轻量底纹；正文始终保持深色，状态仍靠文字+形状表达。 */
body[data-theme] {
  --theme-accent: #286e61;
  --theme-accent-strong: #205c52;
  --theme-tint: #edf4ef;
  --theme-edge: #bfd3c7;
}
body[data-theme="ocean"] { --theme-accent: #356f9b; --theme-accent-strong: #285879; --theme-tint: #edf4f9; --theme-edge: #c3d7e5; }
body[data-theme="violet"] { --theme-accent: #73569a; --theme-accent-strong: #5c437e; --theme-tint: #f3eff8; --theme-edge: #d8cbe7; }
body[data-theme="sunset"] { --theme-accent: #a65b37; --theme-accent-strong: #854629; --theme-tint: #fbf1eb; --theme-edge: #e7cbb9; }
body[data-theme="slate"] { --theme-accent: #526574; --theme-accent-strong: #3d4f5d; --theme-tint: #eef2f4; --theme-edge: #cbd5da; }

body[data-theme] #themeSelect {
  display: block;
  min-height: 34px;
  color: #34423c;
  background: #fff;
  border-color: #d7dfd9;
}
body[data-theme] #themeSelect option { color: #25312f; background: #fff; }
body[data-theme] #themeSelect:focus-visible,
body[data-theme] .ghost-btn:focus-visible,
body[data-theme] .primary-btn:focus-visible,
body[data-theme] .composer-mode:focus-within {
  outline: 3px solid color-mix(in srgb, var(--theme-accent) 42%, white);
  outline-offset: 2px;
}
body[data-theme] .filter-chip.active,
body[data-theme] .type-badge,
body[data-theme] .gp-eyebrow,
body[data-theme] .intent-eyebrow {
  color: #fff;
  background: var(--theme-accent);
  border-color: var(--theme-accent);
}
body[data-theme] .primary-btn,
body[data-theme] .composer-row .primary-btn {
  background: var(--theme-accent);
}
body[data-theme] .primary-btn:hover { background: var(--theme-accent-strong); }

/* 目标工作台分区：轻微语义底色区分信息，不再靠大片渐变或浅色文字制造层级。 */
body[data-theme] .gp-summary,
body[data-theme] .gp-section-head small,
body[data-theme] .gp-card > p,
body[data-theme] .gp-card-update,
body[data-theme] .intent-copy p,
body[data-theme] .intent-coverage p,
body[data-theme] .intent-coverage span,
body[data-theme] .intent-section-head p,
body[data-theme] .intent-card > p,
body[data-theme] .intent-more summary,
body[data-theme] .intent-more summary small,
body[data-theme] .intent-safety {
  color: #3f4f47;
}
body[data-theme] .gp-title,
body[data-theme] .gp-section-head h3,
body[data-theme] .gp-card-top strong,
body[data-theme] .intent-copy h2,
body[data-theme] .intent-card h4 { color: #25312f; }
body[data-theme] .gp-section {
  border-color: #e1e6e1;
  background: #fbfcfa;
}
body[data-theme] .gp-section.tone-info { border-color: #d4e1ed; background: #f1f6fa; }
body[data-theme] .gp-section.tone-time { border-color: #e7dcb9; background: #faf6e9; }
body[data-theme] .gp-section.tone-material { border-color: #d4e5d7; background: #f1f7f1; }
body[data-theme] .gp-section.tone-entry { border-color: #ddd5e9; background: #f5f2f9; }
body[data-theme] .gp-section.tone-action { border-color: #cfe3e0; background: #eff7f6; }
body[data-theme] .gp-section.tone-risk { border-color: #e8d1cd; background: #fbf2f0; }
body[data-theme] .gp-card,
body[data-theme] .intent-card,
body[data-theme] .intent-card.field,
body[data-theme] .intent-card.warning {
  color: #34413b;
  border-color: #dfe5df;
  background: #fff;
  box-shadow: 0 1px 3px rgba(35,49,46,.035);
}
body[data-theme] .gp-card.state-ok,
body[data-theme] .gp-card.state-done { background: #f4f8f4; }
body[data-theme] .gp-card.state-needs_review { opacity: 1; background: #fffaf0; }
body[data-theme] .gp-state.s-ok,
body[data-theme] .gp-state.s-done { color: #245c43; background: #e4f0e7; border: 1px solid #c7ddce; }
body[data-theme] .gp-state.s-needs_review { color: #725617; background: #f8efd4; border-color: #e8d79f; }
body[data-theme] .gp-state.s-warning { color: #8a3934; background: #f8e8e5; border-color: #eac7c2; }
body[data-theme] .gp-card-update { border-left-color: var(--theme-accent); background: var(--theme-tint); }
body[data-theme] .gp-card-update a,
body[data-theme] .intent-action.secondary,
body[data-theme] .intent-safety button { color: var(--theme-accent-strong); }

/* 意图重构卡片也可能出现在浅色目标页中，确保输入、说明和备用功能均可读。 */
body[data-theme] .intent-coverage { border-color: #dfe5df; background: #f7f9f6; }
body[data-theme] .intent-coverage strong,
body[data-theme] .intent-card-badge { color: var(--theme-accent-strong); }
body[data-theme] .intent-section { border-top-color: #e2e7e2; }
body[data-theme] .intent-card.warning { background: #fffaf0; border-color: #e8d79f; }
body[data-theme] .intent-control input,
body[data-theme] .intent-control select,
body[data-theme] .intent-control textarea {
  color: #25312f;
  background: #fff;
  border-color: #cfd9d1;
}
body[data-theme] .intent-control input::placeholder,
body[data-theme] .intent-control textarea::placeholder { color: #69756f; }
body[data-theme] .intent-more { border-top-color: #e2e7e2; }
body[data-theme] .intent-safety { border-top-color: #e2e7e2; }
body[data-theme] .composer-help { color: #596760; }
body[data-theme] .composer-scope-label { color: #46534d; }
body[data-theme] .composer-mode {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 62px;
  padding: 10px 12px;
  color: #34413b;
  border: 1px solid #dfe5df;
  border-radius: 11px;
  background: #fbfcfa;
}
body[data-theme] .composer-mode:has(input:checked) {
  border-color: var(--theme-edge);
  background: var(--theme-tint);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--theme-accent) 16%, transparent);
}
body[data-theme] .composer-mode input { flex: 0 0 auto; margin: 3px 0 0; accent-color: var(--theme-accent); }
body[data-theme] .composer-mode strong { display: block; color: #2d3934; font-size: 12px; }
body[data-theme] .composer-mode small { display: block; margin-top: 3px; color: #65716b; font-size: 11px; }
body[data-theme] .composer-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
body[data-theme] .composer-hint { grid-column: 1 / -1; width: auto; color: #596760; font-size: 12px; line-height: 1.5; }
body[data-theme] .composer-promises { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
body[data-theme] .composer-promises span { padding: 5px 9px; border: 1px solid #dce5dd; border-radius: 999px; font-size: 11px; }
body[data-theme] .goal-composer { border-top: 3px solid var(--theme-accent); }
body[data-theme] .composer-promises span { color: #44554b; background: #f0f4f0; border-color: #dce5dd; }
body[data-theme] .composer-chip { color: #3f5f51; }
body[data-theme] .view-toggle[aria-pressed="true"] { color: var(--theme-accent-strong); border-color: var(--theme-edge); background: var(--theme-tint); }

@media (max-width: 1200px) {
  body[data-theme] .topbar {
    height: auto;
    min-height: 68px;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 8px 12px;
    padding: 10px 16px;
  }
  body[data-theme] .top-source { display: none; }
  body[data-theme] .top-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  body[data-theme] .top-actions .ghost-btn { flex: 0 0 auto; white-space: nowrap; }
}
@media (max-width: 900px) {
  body[data-theme] .shell { width: min(100% - 24px, 720px); padding-top: 14px; }
  body[data-theme] .topbar { padding: 10px 14px; }
  body[data-theme] .goal-composer { padding: 16px; }
  body[data-theme] .composer-trust-note { font-size: 11px; }
  body[data-theme] .composer-modes { grid-template-columns: 1fr; }
  body[data-theme] .composer-hint { grid-column: auto; }
}

/* V5.3: 修正浅色主题中仍沿用暗色字色的组件。颜色用于轻底纹与状态，正文保持高对比。 */
body[data-theme] .panel.resources-panel,
body[data-theme] .panel.advice-panel { opacity: 1; }

body[data-theme] .gp-title { color: #20332f !important; }
body[data-theme] .gp-summary,
body[data-theme] .gp-section-head small { color: #4f625b !important; font-size: 14px; line-height: 1.65; }
body[data-theme] .gp-section-head h3 { color: #263c35 !important; font-size: 17px; }
body[data-theme] .gp-card-top strong { color: #263832 !important; font-size: 15px; line-height: 1.55; }
body[data-theme] .gp-card > p { color: #52625c !important; font-size: 14px; line-height: 1.7; }
body[data-theme] .gp-card-update { color: #40574e !important; font-size: 13px; line-height: 1.7; }
body[data-theme] .gp-state { font-size: 12px; font-weight: 700; }
body[data-theme] .gp-card {
  opacity: 1;
  background: #fff !important;
  border-color: #dce5df;
  box-shadow: 0 1px 3px rgba(35,49,46,.045);
}
body[data-theme] .gp-card.type-fact { border-left: 4px solid #6b9fc2; }
body[data-theme] .gp-card.type-time { border-left: 4px solid #c59437; }
body[data-theme] .gp-card.type-material { border-left: 4px solid #5b9b74; }
body[data-theme] .gp-card.type-official_entry,
body[data-theme] .gp-card.type-web_entry { border-left: 4px solid #8974b5; }
body[data-theme] .gp-card.type-action { border-left: 4px solid #438d83; }
body[data-theme] .gp-card.type-risk { border-left: 4px solid #bd6b65; }
body[data-theme] .gp-card.state-ok,
body[data-theme] .gp-card.state-done { background: #f3f8f4 !important; }
body[data-theme] .gp-card.state-needs_review { background: #fff9ec !important; }

/* 研究文档：每一栏用低饱和色区分，标题、正文和来源统一使用可读深色。 */
body[data-theme] .goal-doc-panel { color: #273832; background: #f5f7f4; }
body[data-theme] .goal-doc-panel .gd-rev,
body[data-theme] .goal-doc-panel .gd-coverage-text,
body[data-theme] .goal-doc-panel .gd-ecol-label { color: #596b63 !important; font-size: 13px; }
body[data-theme] .goal-doc-panel .gd-points,
body[data-theme] .goal-doc-panel .gd-cost-list,
body[data-theme] .goal-doc-panel .gd-sources,
body[data-theme] .goal-doc-panel .gd-facts,
body[data-theme] .goal-doc-panel .gd-ecol-val { color: #34483f !important; font-size: 14px; line-height: 1.75; }
body[data-theme] .goal-doc-panel .gd-sec-title,
body[data-theme] .goal-doc-panel .gd-entity-head strong,
body[data-theme] .goal-doc-panel .gd-tl-body strong { color: #253a32 !important; font-size: 16px; }
body[data-theme] .goal-doc-panel .gd-headline,
body[data-theme] .goal-doc-panel .gd-tl-date { color: var(--theme-accent-strong) !important; }
body[data-theme] .goal-doc-panel .gd-ecol-empty,
body[data-theme] .goal-doc-panel .gd-none,
body[data-theme] .goal-doc-panel .empty-copy { color: #68776f !important; }
body[data-theme] .goal-doc-panel .gd-entity-col { background: rgba(255,255,255,.86); }
body[data-theme] .goal-doc-panel .gd-ecol-label { color: #53665d !important; }
body[data-theme] .goal-doc-panel .gd-coverage-text { color: #43574d !important; }

/* AI 自检和操作结果面板：避免白色面板上出现旧版浅青色文字。 */
body[data-theme] .action-result-panel {
  color: #253832;
  background: linear-gradient(110deg, #eef6f3, #f4f6fb 68%, #f8f3fb) !important;
  border-color: #d7e4dd;
}
body[data-theme] .action-result-head > span { color: #477465 !important; font-size: 13px; letter-spacing: .04em; }
body[data-theme] .action-result-head button { color: #43574f; border-color: #d4dfd8; background: #fff; }
body[data-theme] .action-result-main h2 { color: #263b33 !important; font-size: 20px; }
body[data-theme] .action-result-main > p { color: #4d6158 !important; font-size: 14px; line-height: 1.75; }
body[data-theme] .action-change { color: #3f5a4e; background: #e7f1eb; border-color: #cfe0d4; font-size: 13px; }
body[data-theme] .action-result-panel.is-warning { background: linear-gradient(110deg, #fff7e8, #fbf5ef) !important; border-color: #ead8b8; }
body[data-theme] .audit-summary { color: #4e6058 !important; font-size: 14px; line-height: 1.75; }
body[data-theme] .audit-check strong { color: #283c34 !important; font-size: 14px; }
body[data-theme] .audit-check p,
body[data-theme] .audit-sub h3 { color: #53655d !important; font-size: 13px; line-height: 1.7; }
body[data-theme] .audit-sub { background: #f2f6f2; border: 1px solid #e0e8e1; }

/* 探索记录、流程卡和来源卡：从旧暗色变量明确覆盖到浅色语义层。 */
body[data-theme] .explore-col h3 { color: #30483e; font-size: 14px; }
body[data-theme] .explore-empty { color: #5c6d64; font-size: 13px; }
body[data-theme] .explore-query,
body[data-theme] .explore-trace { color: #33483e; background: #f5f8f5; border-color: #dce6de; font-size: 13px; }
body[data-theme] .explore-query small,
body[data-theme] .explore-trace small { color: #526e60; font-size: 12px; }
body[data-theme] .explore-gap { color: #735717; background: #fcf6e8; border-color: #eadcb9; font-size: 13px; }
/* 浅色主题下的 queryTrace chips */
body[data-theme] .qt-anchors small { color: #526e60; font-size: 12px; }
body[data-theme] .qt-chip { font-size: 13px; }
body[data-theme] .qt-rule { color: #1d5f74; background: #eaf5f9; border-color: #b9d9e4; }
body[data-theme] .qt-ai { color: #5b44a8; background: #f1ecfb; border-color: #d3c6ef; }
body[data-theme] .qt-warn { color: #735717; background: #fcf6e8; border-color: #eadcb9; }
body[data-theme] .qt-rejected { color: #a3324a; background: #fbecef; border-color: #eec4cd; }
/* 浅色主题下的 M2 候选抽屉 */
body[data-theme] .cand-row { background: #f7faf8; border-color: #dce6de; }
body[data-theme] .cand-row.is-adopted { border-color: #7fc7a3; background: #eef8f2; }
body[data-theme] .cand-value { color: #2c443a; font-size: 14px; }
body[data-theme] .cand-quote { color: #5c6d64; border-left-color: #c1cec6; font-size: 13px; }
body[data-theme] .cand-badge-verified { color: #1d7a52; background: #e4f5ec; border-color: #a9dcc2; }
body[data-theme] .cand-badge-candidate { color: #735717; background: #fcf6e8; border-color: #eadcb9; }
body[data-theme] .cand-badge-conflict { color: #a3324a; background: #fbecef; border-color: #eec4cd; }
body[data-theme] .cand-badge-rejected { color: #5c6d64; background: #eef1ee; border-color: #d5ddd6; }
body[data-theme] .cand-rejected-detail { border-color: #d5ddd6; }
body[data-theme] .cand-rejected-line { color: #5c6d64; }
body[data-theme] .explore-gap.is-ok { color: #286348; background: #edf6ef; border-color: #d0e5d4; }
body[data-theme] .explore-trace.is-checkpoint { color: #705616; background: #fbf6ea; border-color: #e9ddb9; }
body[data-theme] .explore-trace.is-blocked { color: #813f3b; background: #fcf0ee; border-color: #ecd2ce; }
body[data-theme] .journey-item { color: #2d4439; background: #f0f5f1; }
body[data-theme] .journey-item:nth-child(3n + 2) { background: #f1f5f8; }
body[data-theme] .journey-item:nth-child(3n) { background: #faf5e9; }
body[data-theme] .journey-copy small { color: var(--theme-accent-strong); font-size: 13px; }
body[data-theme] .journey-copy strong { color: #293d34; font-size: 16px; }
body[data-theme] .journey-copy p { color: #52655c; font-size: 14px; line-height: 1.75; }
body[data-theme] .nav-card,
body[data-theme] .registry-card { background: #f4f7f4; color: #33483e; }
body[data-theme] .registry-card.flagged { background: #fbf0ee; }
body[data-theme] .nav-title,
body[data-theme] .registry-title,
body[data-theme] .resource-item strong { color: #2a4035 !important; font-size: 15px; }
body[data-theme] .nav-card > p,
body[data-theme] .resource-item p,
body[data-theme] .registry-meta { color: #52655c !important; font-size: 14px; line-height: 1.7; }
body[data-theme] .resource-item { opacity: 1; }

/* 小屏顶栏按钮保持整词，不再按汉字逐字断行。 */
body[data-theme] .top-actions .ghost-btn { flex: 0 0 auto; white-space: nowrap; word-break: keep-all; }

/* 交互/辅助信息的底线字号：确保截图中的说明与来源不再缩成难辨的小字。 */
body[data-theme] .gp-card .card-action,
body[data-theme] .goal-doc-panel .ghost-btn,
body[data-theme] .goal-doc-panel .gd-research-btn,
body[data-theme] .goal-doc-panel .gd-ai-btn,
body[data-theme] .resource-meta,
body[data-theme] .registry-cred,
body[data-theme] .registry-year { font-size: 12px; }
body[data-theme] .goal-doc-panel .gd-entity a,
body[data-theme] .goal-doc-panel .gd-rev,
body[data-theme] .goal-doc-panel .gd-tl-body p { font-size: 13px; }

/* V5.4：视觉验收规则（2026-09-24）
   灰绿暖中性色做画布；蓝/绿/琥珀/紫/红只表达信息类别或状态。
   所有说明性文字使用深色，普通文字目标对比度 >= 4.5:1；重要边界/控件 >= 3:1。
   状态必须同时有文字标签，不允许只用颜色/小圆点表示。 */
body[data-theme] {
  --ui-ink: #24342e;
  --ui-secondary: #44584f;
  --ui-muted: #506158;
  --ui-border: #829088;
  --ui-canvas: #edf1ed;
  --ui-brand: #286e61;
  --ui-success-ink: #1f5a38;
  --ui-success-bg: #e1f3e7;
  --ui-pending-ink: #6b4800;
  --ui-pending-bg: #fff2d8;
  --ui-danger-ink: #7a2e29;
  --ui-danger-bg: #fcebea;
}
body[data-theme="ocean"] { --theme-accent: #2f6f98; --theme-accent-strong: #235778; --theme-tint: #eaf3f8; --theme-edge: #bbd2e0; }
body[data-theme="violet"] { --theme-accent: #8056a6; --theme-accent-strong: #62407f; --theme-tint: #f1ebf7; --theme-edge: #d4c4e3; }
body[data-theme="sunset"] { --theme-accent: #a2522f; --theme-accent-strong: #803d23; --theme-tint: #faf0e9; --theme-edge: #e2c3b2; }
body[data-theme="slate"] { --theme-accent: #536775; --theme-accent-strong: #3e505d; --theme-tint: #edf1f2; --theme-edge: #c2cdd2; }

/* 色彩切换入口、筛选和顶栏动作保持可见且可读；不隐藏用户的主题选择器。 */
body[data-theme] .topbar { background: #f7f8f5; border-bottom-color: #cbd5ce; }
body[data-theme] .topbar .brand strong,
body[data-theme] .brand strong { color: var(--ui-ink); }
body[data-theme] .topbar .brand small { color: #52665c; font-size: 12px; }
body[data-theme] .top-actions .ghost-btn,
body[data-theme] .view-controls .ghost-btn,
body[data-theme] #themeSelect {
  min-height: 42px;
  color: #33483e;
  background: #f2f5f1;
  border: 1px solid #aab9af;
  font-size: 14px;
}
body[data-theme] .top-actions .ghost-btn:hover,
body[data-theme] .view-controls .ghost-btn:hover,
body[data-theme] #themeSelect:hover { color: var(--theme-accent-strong); background: var(--theme-tint); border-color: var(--theme-accent); }
body[data-theme] #themeSelect { display: block; }
body[data-theme] .filter-chip { color: #44584f; border-color: #aab9af; background: #f2f5f1; font-size: 14px; }
body[data-theme] .filter-chip.active { color: #fff; background: var(--theme-accent); border-color: var(--theme-accent); }
body[data-theme] .view-toolbar { align-items: center; row-gap: 10px; }
body[data-theme] .view-controls { justify-content: flex-end; }

/* 目标卡不再全白：类别由低饱和底色+深色文字+左侧实色条共同表达。 */
body[data-theme] .gp-card {
  color: var(--ui-ink) !important;
  background: #f2f5f1 !important;
  border-color: #c2cec5 !important;
  opacity: 1 !important;
}
body[data-theme] .gp-card.type-fact { background: #edf4f8 !important; border-left: 4px solid #34739a !important; }
body[data-theme] .gp-card.type-time { background: #faf4e5 !important; border-left: 4px solid #9a6d16 !important; }
body[data-theme] .gp-card.type-material { background: #edf5ef !important; border-left: 4px solid #397448 !important; }
body[data-theme] .gp-card.type-official_entry,
body[data-theme] .gp-card.type-web_entry { background: #f3eef8 !important; border-left: 4px solid #76509a !important; }
body[data-theme] .gp-card.type-action { background: #eaf4f2 !important; border-left: 4px solid #28746c !important; }
body[data-theme] .gp-card.type-risk { background: #fbefed !important; border-left: 4px solid #a3423e !important; }
body[data-theme] .gp-card.state-needs_review { opacity: 1 !important; background: #fff4dc !important; }
body[data-theme] .gp-card-top strong { color: var(--ui-ink) !important; font-size: 16px; line-height: 1.55; }
body[data-theme] .gp-card > p,
body[data-theme] .gp-card-update,
body[data-theme] .gp-card small { color: var(--ui-secondary) !important; font-size: 15px; line-height: 1.7; }
body[data-theme] .gp-state { font-size: 13px !important; line-height: 1.4; padding: 4px 10px; }
body[data-theme] .gp-state.s-ok,
body[data-theme] .gp-state.s-done { color: var(--ui-success-ink) !important; background: var(--ui-success-bg) !important; border: 1px solid #85ad91; }
body[data-theme] .gp-state.s-needs_review { color: var(--ui-pending-ink) !important; background: var(--ui-pending-bg) !important; border: 1px solid #b18a39; }
body[data-theme] .gp-state.s-warning { color: var(--ui-danger-ink) !important; background: var(--ui-danger-bg) !important; border: 1px solid #bd7973; }

/* 行动按钮每种任务一种可辨颜色；状态仍用文案，禁用也不通过透明度隐藏字。 */
body[data-theme] .gp-card .card-action { min-height: 36px; padding: 7px 12px; border-width: 1px; font-size: 14px !important; font-weight: 700; }
body[data-theme] .gp-card .card-action.action-open_url { color: #ffffff !important; background: #256a5d !important; border-color: #256a5d !important; }
body[data-theme] .gp-card .card-action.action-view_evidence { color: #4d3780 !important; background: #eee8ff !important; border-color: #8c75b2 !important; }
body[data-theme] .gp-card .card-action.action-research { color: #164b86 !important; background: #e5f1ff !important; border-color: #7098bf !important; }
body[data-theme] .gp-card .card-action.action-research.purpose-template { color: #6a286f !important; background: #f6e8f8 !important; border-color: #ad77b2 !important; }
body[data-theme] .gp-card .card-action.action-remind { color: #6b4800 !important; background: #fff2d8 !important; border-color: #b18a39 !important; }
body[data-theme] .gp-card .card-action.action-mark_done { color: #1f5a38 !important; background: #e1f3e7 !important; border-color: #78a184 !important; }
body[data-theme] .gp-card .card-action.action-manual { color: #40515c !important; background: #eef1f3 !important; border-color: #89969d !important; }
body[data-theme] .gp-card .card-action.action-view_conflict,
body[data-theme] .gp-card .card-action.action-choose_source { color: #7a2e29 !important; background: #fcebea !important; border-color: #b7746e !important; }
body[data-theme] .gp-card .card-action.is-disabled,
body[data-theme] .gp-card .card-action:disabled { opacity: 1 !important; color: #46564e !important; background: #e8ede9 !important; border-color: #a5b2aa !important; filter: none; }

/* 研究文档：有色分区而非纯白长页；比较对象并排，不挤压/覆盖；补全空值与状态对比。 */
body[data-theme] .goal-doc-panel { color: var(--ui-ink); background: #edf1ed; }
body[data-theme] .goal-doc-panel .gd-head { flex-wrap: wrap; gap: 10px; }
body[data-theme] .goal-doc-panel .gd-rev,
body[data-theme] .goal-doc-panel .gd-coverage-text,
body[data-theme] .goal-doc-panel .gd-ecol-label { color: #465a50 !important; font-size: 14px !important; line-height: 1.5; }
body[data-theme] .goal-doc-panel .gd-points,
body[data-theme] .goal-doc-panel .gd-cost-list,
body[data-theme] .goal-doc-panel .gd-sources,
body[data-theme] .goal-doc-panel .gd-facts,
body[data-theme] .goal-doc-panel .gd-ecol-val { color: #2c4036 !important; font-size: 15px !important; line-height: 1.75; }
body[data-theme] .goal-doc-panel .gd-sec-title,
body[data-theme] .goal-doc-panel .gd-entity-head strong,
body[data-theme] .goal-doc-panel .gd-tl-body strong,
body[data-theme] .goal-doc-panel .gd-ecol-name { color: #24372f !important; font-size: 17px !important; }
body[data-theme] .goal-doc-panel .gd-headline,
body[data-theme] .goal-doc-panel .gd-tl-date { color: var(--theme-accent-strong) !important; font-size: 15px !important; }
body[data-theme] .goal-doc-panel .gd-ecol-empty,
body[data-theme] .goal-doc-panel .gd-none,
body[data-theme] .goal-doc-panel .empty-copy { color: #506158 !important; font-size: 14px !important; }
body[data-theme] .goal-doc-panel .gd-none { display: inline-block; padding: 2px 7px; border-radius: 6px; background: #e8ede9; font-weight: 650; }
body[data-theme] .goal-doc-panel .gd-missing { color: #7a4d00 !important; background: #fff2d8; border-radius: 5px; padding: 2px 5px; }
body[data-theme] .goal-doc-panel .gd-pending-val { color: #6b4800 !important; background: #fff0c9; border: 1px solid #dfc47c; border-radius: 5px; padding: 2px 6px; }
body[data-theme] .goal-doc-panel .gd-ai-tag { color: #46564e !important; background: #e6ebe7; border: 1px solid #abb8af; font-size: 13px !important; line-height: 1.35; padding: 3px 7px; }
body[data-theme] .goal-doc-panel .gd-ai-tag.pending { color: #6b4800 !important; background: #fff2d8; border-color: #b18a39; }
body[data-theme] .goal-doc-panel .gd-ai-tag.local { color: #0e5c41 !important; background: #d9f2e7; border-color: #4aa883; }
body[data-theme] .goal-doc-panel .gd-ai-btn { min-height: 30px; font-size: 13px !important; font-weight: 700; }
body[data-theme] .goal-doc-panel .gd-coverage-track { height: 9px; background: #d8dfda; }
body[data-theme] .goal-doc-panel .gd-coverage-miss,
body[data-theme] .goal-doc-panel .gd-coverage-dot.miss { background: #85938a; }
body[data-theme] .goal-doc-panel .gd-coverage-dot { width: 9px; height: 9px; }
body[data-theme] .goal-doc-panel .gd-ecol-row { min-height: 56px; padding: 9px 8px; border-color: #cbd5ce; background: rgba(255,255,255,.45); }
body[data-theme] .goal-doc-panel .gd-sec { border-left-width: 4px; border-color: #bdc9c0; box-shadow: 0 1px 3px rgba(35,49,46,.06); }
body[data-theme] .goal-doc-panel .gd-compare { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); align-items: start; gap: 16px; }
body[data-theme] .goal-doc-panel .gd-entity-col { min-width: 0; background: #eaf2f6; border: 1px solid #9cb7c8; border-top: 4px solid #34739a; border-radius: 13px; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(3n + 2) { background: #edf4ef; border-color: #9db8a5; border-top-color: #397448; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(3n) { background: #f8f1e5; border-color: #c8b58b; border-top-color: #9a6d16; }
body[data-theme] .goal-doc-panel .gd-ecol-avatar { background: #34739a; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(3n + 2) .gd-ecol-avatar { background: #397448; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(3n) .gd-ecol-avatar { background: #8a6116; }
body[data-theme] .goal-doc-panel .gd-ecol-research { min-height: 34px; color: #263e35; background: #fff; border-color: #9cac9f; font-size: 13px !important; }
body[data-theme] .goal-doc-panel .gd-add-entity { margin: 0 0 0 auto; }
body[data-theme] .goal-doc-panel .gd-add-entity-btn { min-height: 40px; padding: 8px 14px; background: #286e61; color: #fff; font-size: 14px; }
body[data-theme] .goal-doc-panel .gd-add-form { display: flex; flex-wrap: wrap; align-items: center; }
body[data-theme] .goal-doc-panel .gd-add-form input { min-height: 40px; width: min(280px, 60vw); color: #24342e; background: #fff; border: 1px solid #829088; font-size: 15px; }
body[data-theme] .goal-doc-panel .gd-add-form button { min-height: 40px; font-size: 14px; }
body[data-theme] .goal-doc-panel .gd-add-error { flex-basis: 100%; min-height: 18px; color: #7a2e29; font-size: 13px; }
body[data-theme] .goal-doc-panel .gd-combo-btn { min-height: 38px; font-size: 14px; }

/* 其余截图中的来源、流程、审核和探索辅助信息也统一字号/透明度底线。 */
body[data-theme] .workspace-grid.is-loading { opacity: .9; }
body[data-theme] .task-item.completed .task-copy,
body[data-theme] .material.is-done { opacity: .82; }
body[data-theme] .explore-query,
body[data-theme] .explore-trace { font-size: 14px; line-height: 1.55; }
body[data-theme] .explore-query small,
body[data-theme] .explore-trace small,
body[data-theme] .registry-cred,
body[data-theme] .registry-year,
body[data-theme] .resource-meta span { font-size: 13px; }
body[data-theme] .resource-meta,
body[data-theme] .registry-meta,
body[data-theme] .registry-flag,
body[data-theme] .nav-footer,
body[data-theme] .history-item span,
body[data-theme] .confidence-copy,
body[data-theme] .audit-check p,
body[data-theme] .correction,
body[data-theme] .missing-item,
body[data-theme] .risk strong,
body[data-theme] .empty-copy { color: #4b5d54 !important; font-size: 13px; line-height: 1.65; }
body[data-theme] .primary-btn { min-height: 40px; font-size: 14px; }

@media (max-width: 760px) {
  body[data-theme] .view-controls { width: 100%; justify-content: flex-start; }
  body[data-theme] .goal-doc-panel { padding: 14px; }
  body[data-theme] .goal-doc-panel .gd-compare { grid-template-columns: minmax(0, 1fr); }
  body[data-theme] .goal-doc-panel .gd-entity-col { width: 100%; }
  body[data-theme] .goal-doc-panel .gd-add-entity { width: 100%; margin: 8px 0 0; }
}

/* V5.5 修复：完整主题底色 + 语义分区 + 关键字可读性 + 低饱和动效。
   避免“全白隐形”和按区块位置轮换六色；每个色块表达信息类型，正文一律高对比。 */
/* Use the final palette for the document canvas before workspace hydration. */
html[data-workspace-theme],
body[data-theme] {
  --ui-ink: #22342e;
  --ui-secondary: #40564d;
  --ui-muted: #50645b;
  --ui-border: #a5b5ab;
  --ui-canvas: #e9efea;
  --ui-panel: #f4f7f3;
  --ui-raised: #e6efea;
  --ui-brand: #286e61;
  --theme-accent: #286e61;
  --theme-accent-strong: #205c52;
  --theme-tint: #e1eee7;
  --theme-edge: #9cb9a9;
  --ui-surface-fact: #eaf2f7;
  --ui-surface-time: #f8f1df;
  --ui-surface-material: #eaf3eb;
  --ui-surface-entry: #f0ebf6;
  --ui-surface-review: #f1edf6;
  --ui-surface-risk: #faecea;
  --ui-surface-action: #e8f1ef;
  color-scheme: light;
  color: var(--ui-ink);
  background: var(--ui-canvas) !important;
}
html[data-workspace-theme="ocean"],
body[data-theme="ocean"] {
  --ui-canvas: #e7edf2; --ui-panel: #f1f5f8; --ui-raised: #e2ebf2;
  --theme-accent: #2e6e93; --theme-accent-strong: #245674; --theme-tint: #e4eef5; --theme-edge: #9db9ca;
  --ui-surface-fact: #e6f0f6; --ui-surface-time: #f7f0df; --ui-surface-material: #e8f2ed;
  --ui-surface-entry: #eceef7; --ui-surface-review: #eff0f7; --ui-surface-risk: #f8eae8; --ui-surface-action: #e6f1ef;
}
html[data-workspace-theme="violet"],
body[data-theme="violet"] {
  --ui-canvas: #ede9f1; --ui-panel: #f5f1f7; --ui-raised: #e9e2f0;
  --theme-accent: #755194; --theme-accent-strong: #5e4078; --theme-tint: #eee7f4; --theme-edge: #baa6cc;
  --ui-surface-fact: #e9edf6; --ui-surface-time: #f7f0df; --ui-surface-material: #e8f1eb;
  --ui-surface-entry: #f0eaf5; --ui-surface-review: #eeeaf5; --ui-surface-risk: #f8e9e8; --ui-surface-action: #e6f0ed;
}
html[data-workspace-theme="sunset"],
body[data-theme="sunset"] {
  --ui-canvas: #f1eae4; --ui-panel: #f8f3ee; --ui-raised: #efe4da;
  --theme-accent: #9b5732; --theme-accent-strong: #784226; --theme-tint: #f5e8dc; --theme-edge: #c5a58f;
  --ui-surface-fact: #edf0f4; --ui-surface-time: #f8eddf; --ui-surface-material: #edf2e7;
  --ui-surface-entry: #f4ebe7; --ui-surface-review: #f1ebed; --ui-surface-risk: #f8e8e4; --ui-surface-action: #e9f0eb;
}
html[data-workspace-theme="slate"],
body[data-theme="slate"] {
  --ui-canvas: #e8edef; --ui-panel: #f2f5f6; --ui-raised: #e2e9ec;
  --theme-accent: #526a78; --theme-accent-strong: #3e5360; --theme-tint: #e6eef1; --theme-edge: #a2b4bd;
  --ui-surface-fact: #e7eef2; --ui-surface-time: #f2f0e7; --ui-surface-material: #e8f0ec;
  --ui-surface-entry: #ebeff2; --ui-surface-review: #edf0f3; --ui-surface-risk: #f6e9e7; --ui-surface-action: #e6efed;
}

body[data-theme]::before { display: block !important; opacity: .28; }
body[data-theme] .ambient { display: block !important; opacity: .16; filter: blur(82px); }
body[data-theme] .intent-orbit {
  display: block !important;
  border-color: color-mix(in srgb, var(--theme-accent) 24%, transparent);
  opacity: .7;
}
body[data-theme] .primary-btn::after { display: block !important; opacity: .38; }
body[data-theme] .intent-card::after { display: block !important; opacity: .28; }
body[data-theme] .action-bar .primary-btn { animation: lmGlowPulse 3.8s ease-in-out infinite; }

body[data-theme] .topbar { background: color-mix(in srgb, var(--ui-panel) 94%, transparent); border-bottom-color: var(--ui-border); }
body[data-theme] .shell { color: var(--ui-ink); }
body[data-theme] .panel,
body[data-theme] .goal-box,
body[data-theme] .process-panel,
body[data-theme] .mission-hero,
body[data-theme] .goal-composer,
body[data-theme] .intent-experience,
body[data-theme] .action-result-panel,
body[data-theme] .goal-doc-panel {
  color: var(--ui-ink);
  background-color: var(--ui-panel) !important;
  border-color: var(--ui-border);
}
body[data-theme] .panel p,
body[data-theme] .panel li,
body[data-theme] .panel-intro,
body[data-theme] .intent-copy p,
body[data-theme] .goal-doc-panel .gd-points,
body[data-theme] .goal-doc-panel .gd-cost-list,
body[data-theme] .goal-doc-panel .gd-sources,
body[data-theme] .goal-doc-panel .gd-ecol-val { color: var(--ui-secondary) !important; }
body[data-theme] .brand strong,
body[data-theme] .mission-hero h1,
body[data-theme] .goal-composer h2,
body[data-theme] .action-result-main h2 { color: var(--ui-ink) !important; -webkit-text-fill-color: var(--ui-ink); }
body[data-theme] .top-actions .ghost-btn,
body[data-theme] .view-controls .ghost-btn,
body[data-theme] #themeSelect { background: var(--ui-raised); border-color: var(--ui-border); }

/* 目标卡的内容类型决定底色；needs_review 通过边框和文字表达，不把所有卡统一刷成黄块。 */
body[data-theme] .gp-card { color: var(--ui-ink) !important; opacity: 1 !important; }
body[data-theme] .gp-card.type-fact,
body[data-theme] .gp-card.type-fact.state-needs_review { background: var(--ui-surface-fact) !important; border-left-color: #34739a !important; }
body[data-theme] .gp-card.type-time,
body[data-theme] .gp-card.type-time.state-needs_review { background: var(--ui-surface-time) !important; border-left-color: #93650f !important; }
body[data-theme] .gp-card.type-material,
body[data-theme] .gp-card.type-material.state-needs_review { background: var(--ui-surface-material) !important; border-left-color: #397448 !important; }
body[data-theme] .gp-card.type-official_entry,
body[data-theme] .gp-card.type-web_entry,
body[data-theme] .gp-card.type-official_entry.state-needs_review,
body[data-theme] .gp-card.type-web_entry.state-needs_review { background: var(--ui-surface-entry) !important; border-left-color: #76509a !important; }
body[data-theme] .gp-card.type-action,
body[data-theme] .gp-card.type-action.state-needs_review { background: var(--ui-surface-action) !important; border-left-color: #28746c !important; }
body[data-theme] .gp-card.type-risk,
body[data-theme] .gp-card.type-risk.state-needs_review { background: var(--ui-surface-risk) !important; border-left-color: #a3423e !important; }
body[data-theme] .gp-card.state-needs_review { outline: 1px solid #b18a39; }
body[data-theme] .gp-card-top strong,
body[data-theme] .gp-card > p,
body[data-theme] .gp-card-update,
body[data-theme] .gp-card small { color: var(--ui-ink) !important; opacity: 1 !important; }

/* 研究文档颜色按信息语义固定：事实/比较蓝、时间琥珀、材料绿、评价/来源紫、风险红。 */
body[data-theme] .goal-doc-panel { --gd-ink: var(--ui-ink); --gd-muted: var(--ui-secondary); --gd-faint: var(--ui-muted); --gd-line: var(--ui-border); --gd-card: var(--ui-panel); --gd-bg: var(--ui-panel); --gd-accent: var(--theme-accent); }
body[data-theme] .goal-doc-panel .gd-sec { border-left-width: 4px; border-color: var(--ui-border); color: var(--ui-ink); box-shadow: 0 2px 7px rgba(34,52,46,.07); }
body[data-theme] .goal-doc-panel .gd-summary,
body[data-theme] .goal-doc-panel .gd-entity-card,
body[data-theme] .goal-doc-panel .gd-compare-table { background: var(--ui-surface-fact); border-left-color: #34739a; }
body[data-theme] .goal-doc-panel .gd-timeline,
body[data-theme] .goal-doc-panel .gd-cost-detail { background: var(--ui-surface-time); border-left-color: #93650f; }
body[data-theme] .goal-doc-panel .gd-material-list { background: var(--ui-surface-material); border-left-color: #397448; }
body[data-theme] .goal-doc-panel .gd-review-evidence { background: var(--ui-surface-review); border-left-color: #76509a; }
body[data-theme] .goal-doc-panel .gd-sources-next { background: var(--ui-surface-entry); border-left-color: #76509a; }
body[data-theme] .goal-doc-panel .gd-compare { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); width: 100%; min-width: 0; gap: 14px; }
body[data-theme] .goal-doc-panel .gd-entity-col { min-width: 0; color: var(--ui-ink); background: var(--ui-surface-fact); border: 1px solid #a9bfce; border-top: 4px solid #34739a; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(2) { background: var(--ui-surface-material); border-color: #adc5b0; border-top-color: #397448; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(3) { background: var(--ui-surface-entry); border-color: #c0b0cf; border-top-color: #76509a; }
body[data-theme] .goal-doc-panel .gd-ecol-avatar { background: #34739a; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(2) .gd-ecol-avatar { background: #397448; }
body[data-theme] .goal-doc-panel .gd-entity-col:nth-child(3) .gd-ecol-avatar { background: #76509a; }
body[data-theme] .goal-doc-panel .gd-entity-head,
body[data-theme] .goal-doc-panel .gd-ecol-row { min-width: 0; }
body[data-theme] .goal-doc-panel .gd-sec-title,
body[data-theme] .goal-doc-panel .gd-entity-head strong,
body[data-theme] .goal-doc-panel .gd-tl-body strong,
body[data-theme] .goal-doc-panel .gd-ecol-name { color: var(--ui-ink) !important; font-size: 17px !important; line-height: 1.5; overflow-wrap: anywhere; }
body[data-theme] .goal-doc-panel .gd-rev,
body[data-theme] .goal-doc-panel .gd-coverage-text,
body[data-theme] .goal-doc-panel .gd-ecol-label { color: var(--ui-secondary) !important; font-size: 14px !important; line-height: 1.55; }
body[data-theme] .goal-doc-panel .gd-points,
body[data-theme] .goal-doc-panel .gd-cost-list,
body[data-theme] .goal-doc-panel .gd-sources,
body[data-theme] .goal-doc-panel .gd-facts,
body[data-theme] .goal-doc-panel .gd-ecol-val,
body[data-theme] .goal-doc-panel .gd-ecol-row { color: var(--ui-ink) !important; font-size: 15px !important; line-height: 1.7; overflow-wrap: anywhere; }
body[data-theme] .goal-doc-panel .gd-ecol-row { min-height: 58px; padding: 9px; background: color-mix(in srgb, var(--ui-panel) 62%, transparent); border-color: #c1cec6; }
body[data-theme] .goal-doc-panel .gd-none,
body[data-theme] .goal-doc-panel .gd-ecol-empty,
body[data-theme] .goal-doc-panel .empty-copy { color: #495d53 !important; font-size: 14px !important; line-height: 1.6; }
body[data-theme] .goal-doc-panel .gd-none { display: inline-block; padding: 3px 8px; background: #e2e9e4; border-radius: 6px; }
body[data-theme] .goal-doc-panel .gd-ai-tag { color: #40534a !important; background: #e2e9e4; border: 1px solid #9ead9f; font-size: 13px !important; }
body[data-theme] .goal-doc-panel .gd-ai-tag.pending,
body[data-theme] .goal-doc-panel .gd-pending-val,
body[data-theme] .goal-doc-panel .gd-missing { color: #664900 !important; background: #fff0c7; border-color: #b18a39; }
body[data-theme] .goal-doc-panel .gd-ai-tag.local { color: #0e5c41 !important; background: #d9f2e7; border-color: #4aa883; }
body[data-theme] .goal-doc-panel .gd-coverage-track { height: 9px; background: #cbd5ce; }
body[data-theme] .goal-doc-panel .gd-coverage-dot { width: 9px; height: 9px; }
body[data-theme] .goal-doc-panel .gd-coverage-dot.miss,
body[data-theme] .goal-doc-panel .gd-coverage-miss { background: #77877d; }
body[data-theme] .goal-doc-panel .gd-url-value a { color: #245d8d; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; font-weight: 700; }
body[data-theme] .goal-doc-panel .gd-add-entity { margin: 0 0 0 auto; }
body[data-theme] .goal-doc-panel .gd-add-entity-btn { min-height: 42px; padding: 9px 16px; color: #fff; background: var(--theme-accent); border: 1px solid var(--theme-accent-strong); font-size: 14px; font-weight: 750; box-shadow: 0 3px 9px color-mix(in srgb, var(--theme-accent) 22%, transparent); }
body[data-theme] .goal-doc-panel .gd-add-entity-btn:hover { color: #fff; background: var(--theme-accent-strong); }
body[data-theme] .goal-doc-panel .gd-ecol-research,
body[data-theme] .goal-doc-panel .gd-combo-btn { min-height: 38px; color: #334c42; background: var(--ui-panel); border: 1px solid #91a499; font-size: 14px !important; }
body[data-theme] .goal-doc-panel .gd-add-form input { min-height: 42px; color: var(--ui-ink); background: var(--ui-panel); border: 1px solid #82978b; font-size: 15px; }
body[data-theme] .goal-doc-panel .gd-add-form button { min-height: 40px; font-size: 14px; }
body[data-theme] .goal-doc-panel .gd-add-error { color: #7a2e29; font-size: 14px; }

/* 窄窗不裁切对象列和操作按钮。 */
@media (max-width: 1000px) {
  body[data-theme] .goal-doc-panel .gd-compare { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
}

/* ============ 2026-09-24 Kimi 大改：对比度修复 + 对比排版拓宽 ============ */
/* 对比度修复（审计驱动）：浅底上的浅色文字全部加深 */
body[data-theme] .state-pill.tone-idle { color: #4a5a52; background: #e6ede8; border: 1px solid #b7c6bc; }
body[data-theme] .intent-coverage b,
body[data-theme] .goal-v2-cover b { color: var(--theme-accent-strong); font-weight: 800; }
.gp-state.s-todo,
body[data-theme] .gp-state.s-todo { color: #3f4f47; background: #e3e9e4; border: 1px solid #b3c2b7; }
body[data-theme] .intent-more summary b { color: var(--theme-accent-strong); background: var(--theme-tint); }
body[data-theme] .intent-more summary::before { color: var(--theme-accent-strong); background: var(--theme-tint); }

/* 对比排版拓宽：对象列更宽、行距更舒展，避免多机构挤在一起 */
body[data-theme] .goal-doc-panel .gd-compare {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 18px;
}
body[data-theme] .goal-doc-panel .gd-entity-col { padding: 14px; gap: 10px; }
body[data-theme] .goal-doc-panel .gd-ecol-row { min-height: 66px; padding: 12px; }
@media (max-width: 1000px) {
  body[data-theme] .goal-doc-panel .gd-compare { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 14px; }
}

/* ============ 研究看板（2026-09-24）============ */
.research-dashboard {
  margin: 18px 0; padding: 18px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(166, 197, 215, .12);
  animation: lmPanelIn .45s ease both;
}
body[data-theme] .research-dashboard {
  background: #fff; border-color: #e2e7e2;
  box-shadow: 0 3px 14px rgba(36, 49, 45, .05);
}
.rdb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.rdb-eyebrow { font-size: 11px; font-weight: 850; letter-spacing: 1.6px; text-transform: uppercase; color: var(--intent-a, #5eead4); }
body[data-theme] .rdb-eyebrow { color: var(--theme-accent-strong); }
.rdb-pill { padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.rdb-pill.s-verified { color: #0c5132; background: #d1e7dd; }
.rdb-pill.s-partial { color: #664900; background: #fff0c7; }
.rdb-pill.s-unavailable { color: #5a6a74; background: #e6ede8; }
.rdb-time { margin-left: auto; font-size: 12px; color: #7a8a82; }
.rdb-block-title { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 800; color: #53625b; }

.rdb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rdb-stat {
  padding: 12px 14px; border-radius: 12px; text-align: center;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(166, 197, 215, .1);
  transition: transform .18s ease, box-shadow .18s ease;
}
body[data-theme] .rdb-stat { background: #f7faf7; border-color: #e2e7e2; }
.rdb-stat:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(36, 49, 45, .08); }
.rdb-stat-label { display: block; font-size: 11px; color: #6b7b73; margin-bottom: 4px; }
.rdb-stat-value { font-size: 26px; font-weight: 850; color: var(--theme-accent-strong, #5eead4); line-height: 1.1; }
.rdb-stat-value small { font-size: 12px; font-weight: 600; color: #6b7b73; }

.rdb-engines { margin-bottom: 14px; }
.rdb-engine-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, .07); }
body[data-theme] .rdb-engine-bar { background: #e6ede8; }
.rdb-engine-seg { display: block; height: 100%; animation: lmRise .6s ease both; }
.rdb-engine-seg.e-bing { background: #0f6ab4; }
.rdb-engine-seg.e-baidu { background: #2932e1; }
.rdb-engine-seg.e-sogou { background: #fb6f6f; }
.rdb-engine-seg.e-bingRss { background: #5a9bd5; }
.rdb-engine-legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.rdb-engine-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #53625b; }
.rdb-engine-item.ai { color: var(--theme-accent-strong); font-weight: 700; }
.e-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.e-dot.e-bing { background: #0f6ab4; }
.e-dot.e-baidu { background: #2932e1; }
.e-dot.e-sogou { background: #fb6f6f; }
.e-dot.e-bingRss { background: #5a9bd5; }
.e-dot.e-ai { background: var(--theme-accent, #286e61); }

.rdb-cover { margin-bottom: 14px; }
.rdb-cover-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 52px; align-items: center; gap: 10px; padding: 5px 0; }
.rdb-cover-name { font-size: 13px; font-weight: 700; color: #33413a; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rdb-cover-track { height: 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); overflow: hidden; }
body[data-theme] .rdb-cover-track { background: #e6ede8; }
.rdb-cover-fill { height: 100%; border-radius: 999px; transition: width .8s cubic-bezier(.22, 1, .36, 1); }
.rdb-cover-fill.full { background: linear-gradient(90deg, #2e9e6b, #57c98d); }
.rdb-cover-fill.part { background: linear-gradient(90deg, #c9932b, #e6c35c); }
.rdb-cover-fill.none { background: #b0838a; }
.rdb-cover-num { font-size: 12px; font-weight: 700; color: #53625b; text-align: right; }

.rdb-queries summary { cursor: pointer; font-size: 12px; font-weight: 800; color: #53625b; padding: 4px 0; }
.rdb-query-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rdb-query-chip {
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-family: inherit;
  background: rgba(94, 234, 212, .09); color: #7fd8c8; border: 1px solid rgba(94, 234, 212, .18);
}
body[data-theme] .rdb-query-chip { background: var(--theme-tint); color: var(--theme-accent-strong); border-color: var(--theme-edge); }
.rdb-note { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: #6b7b73; }

/* 看板文字色双主题适配（暗色默认 + 浅色 data-theme） */
.research-dashboard { --rdb-ink: #cfdfd8; --rdb-ink-soft: #93aca1; }
body[data-theme] .research-dashboard { --rdb-ink: #33413a; --rdb-ink-soft: #53625b; }
.research-dashboard .rdb-block-title,
.research-dashboard .rdb-stat-label,
.research-dashboard .rdb-engine-item,
.research-dashboard .rdb-cover-num,
.research-dashboard .rdb-queries summary,
.research-dashboard .rdb-note,
.research-dashboard .rdb-time { color: var(--rdb-ink-soft); }
.research-dashboard .rdb-cover-name { color: var(--rdb-ink); }

/* ============ 2026-09-24 第二轮：真实 DOM 审计对比度修复 ============ */
/* 办事台/文档头部状态徽章（tone-ready/running 等在浅底上是浅色，看不见） */
body[data-theme] .state-pill.tone-ready,
body[data-theme] .state-pill.tone-ok { color: #0b6b4a; background: #ddf2e7; border: 1px solid #a9d8c2; }
body[data-theme] .state-pill.tone-running { color: #155e75; background: #d9f0f7; border: 1px solid #a3d3e0; }
body[data-theme] .state-pill.tone-warning,
body[data-theme] .state-pill.tone-warn { color: #8a5a08; background: #fdf0d3; border: 1px solid #ecc987; }
body[data-theme] .state-pill.tone-failed { color: #b02a2a; background: #fbe4e4; border: 1px solid #eeb2b2; }

/* goal-v2 视图（V2 步骤卡/封面统计/摘要，注入样式是硬编码暗色） */
body[data-theme] .goal-v2 { background: #fff; border-color: var(--theme-edge); }
body[data-theme] .goal-v2-step { background: #fbfcfa; border-color: #e2e7e2; }
body[data-theme] .goal-v2-step:hover { border-color: var(--theme-edge); box-shadow: 0 10px 26px rgba(36,49,45,.10); }
body[data-theme] .goal-v2-step-head h4 { color: #25312f; }
body[data-theme] .goal-v2-summary { color: #5a6a62; }
body[data-theme] .goal-v2-missing { color: #8a5a08; }
body[data-theme] .goal-v2-cover { color: #53625b; background: #f4f6f3; border-color: #dde5de; }
body[data-theme] .goal-v2-trust .t-badge { color: #b02a2a; background: #fbe4e4; box-shadow: none; }
body[data-theme] .goal-v2-trust .t-reasons { color: #6b7b73; }

/* 导航卡与来源登记册徽章 */
body[data-theme] .nav-kind { color: #4c6879; background: #e8f0f4; }
body[data-theme] .nav-kind.official { color: #35664d; background: #e9f2ec; }
body[data-theme] .source-proof { background: rgba(0,0,0,.04); }
body[data-theme] .source-proof.verified { color: #2e7d5f; }
body[data-theme] .source-proof.search { color: #8a6413; }
body[data-theme] .registry-cred { color: #4c5a53; }

/* 看板指标单位小字 */
body[data-theme] .rdb-stat-value small { color: #4a5a52; }

/* 导航卡正文（来源域名等小字） */
body[data-theme] .nav-footer,
body[data-theme] .nav-footer span { color: #55645c; }
body[data-theme] .nav-title { color: #25312f; }

/* 二轮审计收尾：内联色板与更高优先级类的补刀 */
body[data-theme] .registry-cred.normal { color: #4c5a53; }
body[data-theme] .source-proof.verified { color: #1f6b4e; }

/* v0.22.1 主体缺失引导：目标框绿色描边闪烁 + 内联示例提示 */
.goal-box-flash { animation: goalBoxFlash 1.1s ease-in-out 3; }
@keyframes goalBoxFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); }
  50% { box-shadow: 0 0 0 5px rgba(31, 122, 77, 0.55); }
}
.goal-subject-hint { margin: 10px 0 0; padding: 10px 14px; border-radius: 12px;
  background: rgba(217, 143, 43, 0.14); border: 1px solid rgba(217, 143, 43, 0.5);
  color: #7a4e0f; font-size: 13px; line-height: 1.7; animation: lmPanelIn 0.35s ease both; }
body[data-theme] .goal-subject-hint { color: #7a4e0f; }

/* v0.22.1 冲突采用：选中条目除绿勾外再加鲜明背景，一眼看出选的是哪条 */
.lm-conflict-option.is-chosen { background: linear-gradient(90deg, rgba(31, 122, 77, 0.18), rgba(31, 122, 77, 0.06));
  border: 1px solid rgba(31, 122, 77, 0.7); border-radius: 10px;
  box-shadow: inset 3px 0 0 #1f7a4d; }
.lm-conflict-option { border: 1px solid transparent; border-radius: 10px; transition: background .18s ease, border-color .18s ease; }
.lm-conflict-explore-btn { margin-left: auto; font-size: 12px; padding: 4px 10px; border-radius: 999px;
  border: 1px solid rgba(31, 122, 77, .5); background: rgba(31, 122, 77, .1); color: #1f7a4d; cursor: pointer; }
.lm-conflict-explore-btn:hover { background: rgba(31, 122, 77, .2); }
.lm-conflict-explore-btn[disabled] { opacity: .55; cursor: wait; }


/* ============ v0.22.3 收口层：对比度与字号底线（置于最末，确保最终生效） ============ */
/* 审计结论：历史层最终胜出的 --ui-ink/--ui-secondary 已达标，本层只补仍有短板的散点：
   1) .empty-copy 两类作用域对比度不足 4.5:1；
   2) 研究/任务下滑区小字字号底线（辅助 ≥13px、正文 ≥15px、按钮 ≥14px）；
   3) 时间线正文与来源链接颜色兜底，防止旧层变量解析失败时回退到浅色。 */
body[data-theme] .empty-copy,
body[data-theme] .goal-doc-panel .empty-copy { color: #55645c !important; font-size: 13px !important; }
body[data-theme] .goal-doc-panel .gd-tl-body p,
body[data-theme] .goal-doc-panel .gd-facts dd,
body[data-theme] .goal-doc-panel .gd-sources li { font-size: 14px !important; line-height: 1.7; }
body[data-theme] .goal-doc-panel .gd-research-btn,
body[data-theme] .goal-doc-panel .gd-ai-btn,
body[data-theme] .goal-doc-panel .gd-combo-btn,
body[data-theme] .goal-doc-panel .gd-add-entity-btn { font-size: 14px !important; }
body[data-theme] .explore-trace,
body[data-theme] .explore-query { color: #40564d !important; font-size: 14px !important; }
body[data-theme] .goal-doc-panel a { color: #245674 !important; }


/* ============ v0.22.4 灵眸品牌徽标：渐变徽章 + 白眼 + 青绿虹膜 + 轨道弧 ============ */
body[data-theme] .brand-mark,
.brand-mark {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1B3A5C 0%, #2C7A7B 100%);
  border: 1px solid rgba(103, 232, 249, 0.35);
  box-shadow: 0 4px 14px rgba(27, 58, 92, 0.28), inset 0 1px 4px rgba(255, 255, 255, 0.16);
  animation: lmGlowPulse 3s ease-in-out infinite;
}
/* 眼白（椭圆白片，替换旧的眼线框） */
body[data-theme] .brand-mark::before,
.brand-mark::before {
  content: "";
  width: 23px; height: 14px;
  border: none;
  background: #ffffff;
  border-radius: 50% / 62%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}
/* 虹膜+瞳孔（原 span 复用，避免改 HTML 结构） */
body[data-theme] .brand-mark span,
.brand-mark span {
  position: absolute;
  left: 50%; top: 50%;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #5eead4 0%, #0e7490 55%, #134e4a 100%);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.7);
}
/* 轨道弧： brand-mark 只有 ::before/span，用背景渐变弧线表现 */
body[data-theme] .brand-mark,
.brand-mark {
  background:
    conic-gradient(from 210deg at 50% 50%, rgba(125, 211, 252, 0) 0deg, rgba(125, 211, 252, 0) 250deg, rgba(125, 211, 252, 0.85) 320deg, rgba(125, 211, 252, 0) 360deg),
    linear-gradient(135deg, #1B3A5C 0%, #2C7A7B 100%);
}


/* ============ v0.22.4 可读性大改：目标页十大面板（时间轴/材料/风险/清单/建议） ============ */
/* 背景：这些面板的基线样式是早期暗色版（9~12px 浅灰蓝字），浅色主题下大量文字对比度不足。
   本层按真实截图逐区修复：正文字号、文字颜色、彩色药丸、风险卡，全部按 AA 对比度选色。 */

/* —— 时间轴（关键时间轴）：日期、标题、说明三层级拉开 —— */
body[data-theme] .timeline-date { color: #245674 !important; font-size: 12px !important; font-weight: 700; letter-spacing: .3px; }
body[data-theme] .timeline-item strong { color: #24372f !important; font-size: 15px !important; line-height: 1.5; }
body[data-theme] .timeline-item p { color: #40564d !important; font-size: 13px !important; line-height: 1.7; }
body[data-theme] .timeline-item { border-left-color: #9cb9a9; }

/* —— 优先级药丸：实心语义色 + 白字浅底药丸，不再 pastel-on-pastel —— */
body[data-theme] .priority { font-size: 11px !important; font-weight: 800; padding: 3px 9px; border: 1px solid transparent; }
body[data-theme] .priority.high { color: #a02634 !important; background: #fde7ea !important; border-color: #f0b6be; }
body[data-theme] .priority.medium { color: #8a5a08 !important; background: #fdf0d3 !important; border-color: #ecc987; }
body[data-theme] .priority.low { color: #2e5f8a !important; background: #e8f1f9 !important; border-color: #b3d2e8; }

/* —— 风险与不确定项：卡片亮底、文字深色系、左边条保留语义色 —— */
body[data-theme] .risk { background: #ffffff !important; border: 1px solid #d8e0da; border-left-width: 4px; box-shadow: 0 1px 4px rgba(35,49,46,.07); }
body[data-theme] .risk strong { color: #33463d !important; font-size: 13px !important; line-height: 1.7; }
body[data-theme] .risk.high { border-left-color: #c04a54; background: #fdf3f4 !important; }
body[data-theme] .risk.high strong { color: #7a2e29 !important; }
body[data-theme] .risk.medium { border-left-color: #d9a43b; background: #fdf8ec !important; }
body[data-theme] .risk.medium strong { color: #6b4800 !important; }
body[data-theme] .risk.low { border-left-color: #7fa3b8; }

/* —— 给你的建议 / 资料列表：正文加深加大，序号徽章实色 —— */
body[data-theme] .advice-item p { color: #34483f !important; font-size: 14px !important; line-height: 1.75; }
body[data-theme] .advice-item > span { color: #ffffff !important; background: linear-gradient(135deg, #2C7A7B, #34739a) !important; font-size: 12px !important; box-shadow: 0 2px 6px rgba(44,122,123,.3); }
body[data-theme] .advice-item { border-bottom-color: #d5dfda; }

/* —— 材料/清单正文 —— */
body[data-theme] .material p,
body[data-theme] .task-copy p,
body[data-theme] .material strong,
body[data-theme] .task-copy strong { color: #34483f !important; font-size: 14px !important; line-height: 1.7; }
body[data-theme] .task-item.completed .task-copy { opacity: 1; }
body[data-theme] .task-item.completed .task-copy p { color: #6a7d73 !important; }

/* —— 面板标题与分区编号：更大更醒目 —— */
body[data-theme] .panel-heading h2 { font-size: 17px !important; color: #22342e !important; }
body[data-theme] .panel-no { color: #ffffff !important; background: linear-gradient(135deg, #2C7A7B, #34739a) !important; }

/* —— goal-v2 注入样式的暗色残留：证据项/状态徽章/官方标 —— */
body[data-theme] .goal-v2-ev-item { color: #40564d !important; font-size: 13px !important; }
body[data-theme] .goal-v2-ev-official { color: #6d5bb8 !important; font-size: 11px !important; background: #efeafd; border-radius: 999px; padding: 2px 8px; font-weight: 700; }
body[data-theme] .goal-v2-state { font-size: 11px !important; font-weight: 800; }
body[data-theme] .goal-v2-step p,
body[data-theme] .goal-v2-step li { color: #34483f !important; font-size: 14px !important; line-height: 1.75; }
body[data-theme] .goal-v2-advice li,
body[data-theme] .goal-v2-advice p { color: #34483f !important; font-size: 14px !important; line-height: 1.75; }
body[data-theme] .goal-v2 small { font-size: 12px !important; }

/* —— 操作按钮（查看冲突来源/选择采用哪条等）：实心边框+深色字，不再半透明粉 —— */
body[data-theme] .card-action,
body[data-theme] .goal-v2 .card-action { font-size: 13px !important; font-weight: 700; border-width: 1px; opacity: 1 !important; }


/* ============ v0.22.5 精准收口：动作按钮族 / ⏰提醒芯片 / 独立自检区 ============ */
/* 上一轮只改到 .gp-card 内的按钮与部分面板，截图证实：行动清单的 ⏰提醒、
   各区块的 查看证据/继续核验/选择采用哪条 仍是暗色底样式的半透明浅字，浅色主题下看不见。
   本层不看容器、直接按类名接管，一律「白/浅底 + 深色字 + 语义色实边框」。 */

/* —— 卡片动作按钮族（查看冲突来源/选择采用哪条/查看证据/继续核验/继续探索/手动补充/提醒/标记完成） —— */
body[data-theme] .card-action,
.card-action {
  color: #3a4a43 !important;
  background: #ffffff !important;
  border: 1px solid #a5b5ab !important;
  font-size: 13px !important;
  font-weight: 700;
  opacity: 1 !important;
  box-shadow: 0 1px 3px rgba(35, 49, 46, 0.08);
}
body[data-theme] .card-action:hover,
.card-action:hover { filter: brightness(0.97); }
body[data-theme] .card-action.action-view_evidence,
.card-action.action-view_evidence { color: #5b4390 !important; background: #f1ebfa !important; border-color: #c5b3e3 !important; }
body[data-theme] .card-action.action-research,
.card-action.action-research { color: #245674 !important; background: #e8f1f9 !important; border-color: #a9c8e0 !important; }
body[data-theme] .card-action.action-research.purpose-template,
.card-action.action-research.purpose-template { color: #8a3d7e !important; background: #faeef7 !important; border-color: #e0b8d8 !important; }
body[data-theme] .card-action.action-remind,
.card-action.action-remind { color: #8a5a08 !important; background: #fdf3dc !important; border-color: #e8c98a !important; }
body[data-theme] .card-action.action-mark_done,
.card-action.action-mark_done { color: #1f6b4e !important; background: #e2f4ea !important; border-color: #a4d4bc !important; }
body[data-theme] .card-action.action-manual,
.card-action.action-manual { color: #40515c !important; background: #eef2f4 !important; border-color: #9fadb5 !important; }
body[data-theme] .card-action.action-view_conflict,
body[data-theme] .card-action.action-choose_source,
.card-action.action-view_conflict,
.card-action.action-choose_source { color: #a02634 !important; background: #fdeef0 !important; border-color: #eeb9c0 !important; }
body[data-theme] .card-action.action-open_url,
.card-action.action-open_url { color: #ffffff !important; background: #2456a8 !important; border-color: #1d4689 !important; }
body[data-theme] .card-action.is-disabled,
body[data-theme] .card-action:disabled,
.card-action.is-disabled,
.card-action:disabled { color: #4c5f56 !important; background: #eef1ee !important; border-color: #9fadb5 !important; opacity: 1 !important; }

/* —— ⏰ 提醒芯片（行动清单行内 + 智能加入 + 已加入态） —— */
body[data-theme] .task-remind-btn,
body[data-theme] .mini-action-btn,
.task-remind-btn,
.mini-action-btn {
  color: #1d5f8a !important;
  background: #e5f1f9 !important;
  border: 1px solid #a9cee3 !important;
  font-size: 12px !important;
  font-weight: 700;
  opacity: 1 !important;
  box-shadow: none;
}
body[data-theme] .task-remind-btn:hover,
body[data-theme] .mini-action-btn:hover,
.task-remind-btn:hover,
.mini-action-btn:hover { background: #d3e7f4 !important; }
body[data-theme] .task-remind-btn:disabled,
body[data-theme] .mini-action-btn:disabled,
.task-remind-btn:disabled,
.mini-action-btn:disabled {
  color: #1f6b4e !important;
  background: #e2f4ea !important;
  border-color: #a4d4bc !important;
  opacity: 1 !important;
  cursor: default;
}
body[data-theme] .muted-label,
.muted-label { color: #40564d !important; font-size: 12px !important; font-weight: 600; }

/* —— 独立自检（07 面板）：摘要、检查项、本轮修正、仍需确认 —— */
body[data-theme] .audit-summary { color: #40564d !important; font-size: 13px !important; line-height: 1.7; }
body[data-theme] .audit-check { border-bottom-color: #d5dfda; }
body[data-theme] .audit-check .check-icon { font-size: 13px !important; }
body[data-theme] .audit-check strong { color: #24372f !important; font-size: 14px !important; }
body[data-theme] .audit-check p { color: #40564d !important; font-size: 13px !important; line-height: 1.7; }
body[data-theme] .audit-sub { background: #f4f7f4 !important; border: 1px solid #d8e0da; }
body[data-theme] .audit-sub h3 { color: #2c4036 !important; font-size: 13px !important; letter-spacing: 0.5px; }
body[data-theme] .correction { font-size: 12px !important; line-height: 1.7; border-bottom-color: #ccd6d0; color: #40564d !important; }
body[data-theme] .correction del { color: #a02634 !important; }
body[data-theme] .correction ins { color: #1f6b4e !important; text-decoration: none; font-weight: 700; }
body[data-theme] .correction small { color: #6a7d73 !important; }
body[data-theme] .missing-item { color: #6b4800 !important; font-size: 13px !important; line-height: 1.7; }
body[data-theme] .missing-item::before { background: #fdf0d3 !important; color: #8a5a08 !important; }

/* —— 可信度/证据覆盖小条 —— */
body[data-theme] .confidence-copy { color: #40564d !important; font-size: 13px !important; }
body[data-theme] .confidence-copy strong { color: #24372f !important; }
body[data-theme] .evidence-bar { background: #d8dfda; }

/* —— 2026-09-28 三处对比度与排版强化（亮色主题）：安全执行台 / 探索中心 / 完整任务路径 —— */

/* 1. 安全执行台：凭证行、徽标、状态 chip 在亮色下的可读性 */
body[data-theme] .execution-status {
  color: #0c5c50;
  background: #d9f2ea;
  border: 1px solid #8fccb9;
  font-size: 12px;
}
body[data-theme] .ledger-head span { color: #46584f; font-size: 12px; font-weight: 600; }
body[data-theme] .ledger-row { background: #f7faf8; border-color: #d3ded6; }
body[data-theme] .ledger-row strong { color: #1f2d28; font-size: 13px; }
body[data-theme] .ledger-row small { color: #4a5c53; font-size: 12px; }
body[data-theme] .ledger-badge { font-size: 11px; border: 1px solid transparent; }
body[data-theme] .ledger-badge.verified { color: #146c43; background: #d9f2e3; border-color: #96cfae; }
body[data-theme] .ledger-badge.probable,
body[data-theme] .ledger-badge.manual { color: #7a5206; background: #fbeecd; border-color: #dfc084; }
body[data-theme] .ledger-badge.failed,
body[data-theme] .ledger-badge.blocked { color: #9c2b33; background: #fbe3e4; border-color: #e6a9ad; }
body[data-theme] .ledger-badge.undone { color: #54399b; background: #ece6fb; border-color: #c2b2ee; }
body[data-theme] .ledger-undo { color: #1d5f8a; font-weight: 700; }

/* 2. 探索中心：搜索行 / 轨迹行主文字与状态字加深 */
body[data-theme] .explore-query,
body[data-theme] .explore-trace { color: #24372f !important; background: #fbfcfa; border-color: #ccd8d0; }
body[data-theme] .explore-query small { color: #2f4438 !important; font-size: 12px !important; font-weight: 600; }
body[data-theme] .explore-query small.is-miss { color: #8a5a08 !important; font-weight: 800; }
body[data-theme] .explore-trace small { color: #146c43 !important; font-size: 12px !important; font-weight: 700; }
body[data-theme] .explore-trace.is-checkpoint small { color: #7a5206 !important; }
body[data-theme] .explore-trace.is-blocked small { color: #9c2b33 !important; }
body[data-theme] .explore-empty { color: #46584f !important; font-weight: 500; }
body[data-theme] .explore-gap { color: #6b4800; background: #fdf3d7; border-color: #e6cd8b; font-weight: 600; }
body[data-theme] .explore-gap.is-ok { color: #146c43; background: #e4f4ea; border-color: #a3d6b8; }

/* 3. 完整任务路径：统一白卡 + 顶部三色条，文字加深，间距拉开 */
body[data-theme] .journey-list {
  gap: 14px;
  padding: 4px;
  background: transparent;
  border-top: 0;
}
body[data-theme] .journey-item {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: 20px;
  background: #fff !important;
  border: 1px solid #dde5df;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(36, 49, 45, .06);
}
body[data-theme] .journey-item::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}
body[data-theme] .journey-item:nth-child(3n + 1)::before { background: linear-gradient(90deg, #286e61, #3fa287); }
body[data-theme] .journey-item:nth-child(3n + 2)::before { background: linear-gradient(90deg, #2456a8, #4a83d6); }
body[data-theme] .journey-item:nth-child(3n)::before { background: linear-gradient(90deg, #b7791f, #dfa943); }
body[data-theme] .journey-copy small { color: #286e61 !important; font-size: 13px !important; font-weight: 800; letter-spacing: .5px; }
body[data-theme] .journey-copy strong { color: #1f2d28; font-size: 17px; }
body[data-theme] .journey-copy p { color: #40504a !important; font-size: 14.5px !important; line-height: 1.8; }
body[data-theme] .journey-index { box-shadow: 0 2px 6px rgba(40, 110, 97, .28); }

/* —— 2026-09-28 第二轮：任务路径编号 / 资料 chips / 选中态美化（亮色主题） —— */

/* 4. 任务路径编号 chips：深青底 + 白色粗体数字，替代黑字衬绿 */
body[data-theme] .journey-index {
  color: #ffffff;
  background: linear-gradient(135deg, #2e7d6f, #226a60);
  text-shadow: 0 1px 2px rgba(6, 46, 40, .35);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: 0 2px 6px rgba(40, 110, 97, .30);
}

/* 5. 资料与延伸阅读：元信息 chips 分角色着色，一眼区分类型与读取状态 */
body[data-theme] .resource-meta span {
  font-size: 12px !important;
  font-weight: 700;
  border: 1px solid transparent;
}
body[data-theme] .resource-meta span.meta-kind { color: #205f56; background: #d9ece2; border-color: #aed1c1; }
body[data-theme] .resource-meta span.is-verified { color: #146c43; background: #d9f2e3; border-color: #96cfae; }
body[data-theme] .resource-meta span.is-found { color: #7a5206; background: #fbeecd; border-color: #dfc084; }

/* 6. 悬停/选中态：柔和浮起 + 圆角光环，去掉死板方形黑影 */
body[data-theme] .journey-item:hover,
body[data-theme] .resource-item:hover,
body[data-theme] .nav-card:hover,
body[data-theme] .registry-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(36, 49, 45, .12);
  border-color: #b9cec4;
}
body[data-theme] .journey-item:active,
body[data-theme] .nav-card:active,
body[data-theme] .registry-card:active { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(36, 49, 45, .10); }
body[data-theme] .journey-item:focus-visible,
body[data-theme] .nav-card:focus-visible,
body[data-theme] .registry-card:focus-visible,
body[data-theme] .resource-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(40, 110, 97, .25), 0 10px 24px rgba(36, 49, 45, .10);
  border-color: #7fa793;
}
body[data-theme] .journey-index,
body[data-theme] .resource-meta span { user-select: none; }

/* —— v0.22.6 覆盖度圆点新状态：待核验（有值未过 AI 自检） —— */
.gd-coverage-dot.unv { background: #7fb3e0; box-shadow: 0 0 0 2px rgba(127, 179, 224, .18); }
.gd-coverage-dot.unv:hover { transform: scale(1.35); }
body[data-theme] .goal-doc-panel .gd-coverage-dot.unv { background: #4a90c4; }


/* ==========================================================================
   v0.22.9 阶段1：卡片级「AI 全网核验」就地研究面板（全局加载，不再走 JS 运行时字符串）
   设计：与 gp-card 同体系的圆角抽屉；官网=蓝 / 混合=青 / 评价=紫 小面积语义色；
   正文 ≥14px、标签 ≥13px、按钮 ≥36px；错误内联显示，不跳页。
   ========================================================================== */
@keyframes lmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gpCardFlash {
  0% { box-shadow: 0 0 0 3px rgba(103, 232, 249, .9), 0 0 24px rgba(103, 232, 249, .5); }
  70% { box-shadow: 0 0 0 3px rgba(103, 232, 249, .45), 0 0 12px rgba(103, 232, 249, .25); }
  100% { box-shadow: none; }
}

.gp-inline-verify {
  margin-top: 10px;
  align-self: flex-start;
  border-radius: 10px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--lm-action);
  background: color-mix(in srgb, var(--lm-action) 10%, transparent);
  color: var(--lm-action);
  transition: transform var(--lm-dur) var(--lm-ease), box-shadow var(--lm-dur) var(--lm-ease), background var(--lm-dur) var(--lm-ease);
}
.gp-inline-verify:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.gp-inline-verify.is-open { background: color-mix(in srgb, var(--lm-action) 26%, transparent); }

.gp-inline-research {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  animation: lmFadeIn .2s var(--lm-ease);
}
.gp-inline-research.hidden { display: none; }

.gp-ir-row { display: flex; gap: 10px; align-items: flex-start; }
.gp-ir-row1 .gp-ir-obj { flex: 6 1 0; }
.gp-ir-row1 .gp-ir-year { flex: 4 1 0; }
.gp-ir-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gp-ir-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.gp-ir-input {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
  outline: none;
  transition: border-color var(--lm-dur) var(--lm-ease), box-shadow var(--lm-dur) var(--lm-ease);
}
.gp-ir-input::placeholder { color: var(--muted); opacity: .75; }
.gp-ir-input:focus {
  border-color: var(--lm-action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lm-action) 20%, transparent);
}

.gp-ir-modes { display: flex; gap: 6px; flex-wrap: wrap; }
.gp-ir-mode {
  border-radius: 999px;
  padding: 6px 14px;
  min-height: 32px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  transition: all var(--lm-dur) var(--lm-ease);
}
.gp-ir-mode:hover { transform: translateY(-1px); }
.gp-ir-mode[data-mode="official"].active,
.gp-ir-mode.active { border-color: currentColor; }
.gp-ir-modes .gp-ir-mode:nth-child(1) { color: var(--lm-fact); }
.gp-ir-modes .gp-ir-mode:nth-child(2) { color: var(--lm-action); }
.gp-ir-modes .gp-ir-mode:nth-child(3) { color: var(--lm-source); }
.gp-ir-mode.active { background: color-mix(in srgb, currentColor 14%, transparent); font-weight: 800; }

.gp-ir-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gp-ir-preview { font-size: 13px; color: var(--lm-action); word-break: break-all; flex: 1 1 60%; }
.gp-ir-start {
  border-radius: 10px;
  padding: 9px 20px;
  min-height: 38px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid var(--lm-action);
  background: linear-gradient(135deg, color-mix(in srgb, var(--lm-action) 85%, #0891b2), color-mix(in srgb, var(--lm-action) 60%, #0e7490));
  color: var(--lm-on-accent);
  transition: transform var(--lm-dur) var(--lm-ease), box-shadow var(--lm-dur) var(--lm-ease);
}
.gp-ir-start:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }

.gp-ir-error {
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--lm-risk);
  background: color-mix(in srgb, var(--lm-risk) 12%, transparent);
  color: var(--lm-risk);
  animation: lmFadeIn .18s var(--lm-ease);
}
.gp-ir-error.hidden { display: none; }

.gp-card.is-flash{animation:gpCardFlash 2s ease}

/* —— v0.22.9 P0-4：结果展开全部 —— */
.cand-expand-total { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; }
.cand-expand-box { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; animation: lmFadeIn .18s var(--lm-ease); }
.cand-expand-box.hidden { display: none; }
.cand-expand-toggle { margin-top: 6px; }

/* —— v0.22.9 P0-1：多对象研究队列状态条 —— */
.entity-queue-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 2px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--lm-action) 40%, transparent);
  background: color-mix(in srgb, var(--lm-action) 6%, transparent);
  animation: lmFadeIn .2s var(--lm-ease);
}
.eq-chip {
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 12px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.eq-chip.eq-searching { border-color: var(--lm-action); color: var(--lm-action); background: color-mix(in srgb, var(--lm-action) 12%, transparent); }
.eq-chip.eq-done { border-color: var(--lm-success); color: var(--lm-success); background: color-mix(in srgb, var(--lm-success) 10%, transparent); }
.eq-chip.eq-failed { border-color: var(--lm-risk); color: var(--lm-risk); background: color-mix(in srgb, var(--lm-risk) 10%, transparent); }
.gd-research-all { border-color: var(--lm-action); color: var(--lm-action); }


/* —— v0.22.9 阶段2：本轮检索诊断（搜索漏斗，只读观测） —— */
.sweep-diag-funnel { display: flex; gap: 6px; flex-wrap: wrap; }
.sweep-diag-cell {
  display: flex; flex-direction: column; align-items: center;
  min-width: 56px; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 4%, transparent);
}
.sweep-diag-cell b { font-size: 16px; color: var(--lm-action); }
.sweep-diag-cell small { font-size: 11px; color: var(--muted); }
.sweep-diag-toggle { margin-top: 6px; }
/* v0.22.9 阶段3：对象研究范围 chip */
.gd-scope-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1.5;
  color: var(--lm-action, #1f6feb);
  background: color-mix(in srgb, var(--lm-action, #1f6feb) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--lm-action, #1f6feb) 35%, transparent);
  white-space: nowrap;
}
/* v0.22.9 阶段5：比较模式单对象详情默认折叠 */
.gd-entity-details.is-collapsed { display: none; }
.gd-entity-toggle {
  align-self: flex-start; margin: 2px 0 6px;
  padding: 3px 10px; border-radius: 8px; font-size: 12px;
  color: var(--lm-action, #1f6feb);
  background: color-mix(in srgb, var(--lm-action, #1f6feb) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--lm-action, #1f6feb) 30%, transparent);
  cursor: pointer;
}
.gd-entity-toggle:hover { background: color-mix(in srgb, var(--lm-action, #1f6feb) 16%, transparent); }
/* v0.22.9 阶段1补漏：采用写回原卡高亮动画（flashCardById 依赖，必须全局加载） */
@keyframes gpCardFlash {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); border-color: rgba(94, 234, 212, 0); }
  18% { box-shadow: 0 0 0 4px rgba(94, 234, 212, .38); border-color: rgba(94, 234, 212, .95); }
  55% { box-shadow: 0 0 0 3px rgba(94, 234, 212, .22); border-color: rgba(94, 234, 212, .6); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); border-color: rgba(149, 184, 208, .10); }
}
.gp-card.is-flash{animation:gpCardFlash 2s ease}
@keyframes lmFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* v0.22.9 P0-A/B：比较分组标题 + AI 拒绝事实折叠区 */
.gd-compare-group-title { margin: 10px 0 6px; font-size: 13px; font-weight: 700; color: var(--lm-action, #5eead4); letter-spacing: .02em; }
.gd-rejected-box { margin-top: 8px; border: 1px dashed color-mix(in srgb, #f87171 45%, transparent); border-radius: 10px; padding: 6px 10px; background: color-mix(in srgb, #f87171 6%, transparent); }
.gd-rejected-box summary { cursor: pointer; font-size: 12px; font-weight: 600; color: #f87171; }
.gd-rejected-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-top: 6px; font-size: 12px; }
.gd-rejected-field { font-weight: 600; color: var(--text, #dcebf2); }
.gd-rejected-value { color: var(--muted, #8fa8b8); text-decoration: line-through; }
.gd-rejected-reason { color: #f87171; }
/* v0.22.9 P1-C：我的证据库 */
.evidence-library { margin-top: 12px; border: 1px solid color-mix(in srgb, var(--lm-action, #5eead4) 25%, transparent); border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--lm-action, #5eead4) 5%, transparent); }
.evidence-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.evidence-head strong { font-size: 13px; color: var(--lm-action, #5eead4); }
.evidence-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 8px; border: 1px solid rgba(149,184,208,.12); margin-top: 6px; background: color-mix(in srgb, var(--bg, #0b1d26) 40%, transparent); }
.evidence-main { min-width: 0; flex: 1 1 220px; }
.evidence-title { display: block; font-size: 13px; font-weight: 600; color: #e8f4f8; text-decoration: none; overflow-wrap: anywhere; }
.evidence-title:hover { text-decoration: underline; color: var(--lm-action, #5eead4); }
.evidence-meta { display: block; margin-top: 2px; font-size: 12px; color: var(--muted, #8fa8b8); }
.evidence-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.evidence-actions .mini-action-btn { font-size: 11px; padding: 3px 8px; }
.evidence-actions .mini-action-btn.danger { color: #f87171; border-color: color-mix(in srgb, #f87171 40%, transparent); }
@keyframes evidenceFlash { 0% { box-shadow: 0 0 0 0 rgba(94,234,212,0); } 25% { box-shadow: 0 0 0 4px rgba(94,234,212,.35); } 100% { box-shadow: 0 0 0 0 rgba(94,234,212,0); } }
.evidence-library.evidence-flash { animation: evidenceFlash 2s ease; }
/* v0.22.9 P1-D：任务卡完成/恢复按钮 */
.gp-task-toggle {
  margin-top: 8px; padding: 5px 12px; border-radius: 9px; font-size: 12px; font-weight: 600;
  color: #0f766e; background: color-mix(in srgb, #5eead4 14%, transparent);
  border: 1px solid color-mix(in srgb, #5eead4 45%, transparent); cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.gp-task-toggle:hover { background: color-mix(in srgb, #5eead4 24%, transparent); transform: translateY(-1px); }
.gp-task-toggle.is-done { color: #94a3b8; background: rgba(148,163,184,.10); border-color: rgba(148,163,184,.35); }
/* v0.22.9 P1-E：深度探索主按钮置右 */
.explore-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#deepExploreBtn { order: -1; font-weight: 700; padding: 7px 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--lm-action, #5eead4) 22%, transparent), color-mix(in srgb, var(--lm-action, #5eead4) 8%, transparent)); border: 1px solid color-mix(in srgb, var(--lm-action, #5eead4) 50%, transparent); color: var(--lm-action, #5eead4); }
.explore-query span { overflow-wrap: anywhere; }

/* TASK-007 E8/E9：发布五门核验面板 */
.cloud-gate-panel { margin: 10px 20px 0; padding: 12px 16px; border-radius: 12px;
  background: color-mix(in srgb, var(--lm-surface, #10202b) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--lm-action, #5eead4) 35%, transparent);
  box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.gate-panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gate-panel-head strong { color: var(--lm-action, #5eead4); font-size: 14px; }
.gate-panel-summary { flex: 1; font-size: 12px; color: var(--lm-text-dim, #8fa3b0); }
.gate-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.gate-list li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 8px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); font-size: 12px; line-height: 1.5; }
.gate-list li .gate-ico { flex: 0 0 auto; }
.gate-list li.gate-pass .gate-ico { color: #34d399; }
.gate-list li.gate-fail { border-color: rgba(248,113,113,.45); }
.gate-list li.gate-fail .gate-ico { color: #f87171; }
.gate-list li .gate-name { color: var(--lm-text, #e6f1f7); font-weight: 600; }
.gate-list li .gate-msg { color: var(--lm-text-dim, #8fa3b0); }
.gate-panel-hint { margin-top: 8px; font-size: 12px; color: var(--lm-text-dim, #8fa3b0); line-height: 1.6; }

/* ============================================================================
 * DS-10 · workspace 1366×768 / 1920×1080 / 浏览器缩放 100%·125%·150% 防溢出
 * 1366@150% ≈ 911 CSS px、1920@150% = 1280 CSS px：所有栅格必须允许收缩，
 * 不允许固定宽度子项把页面撑出横向滚动，也不允许卡片互相压盖。
 * ========================================================================== */
html, body { max-width: 100%; }
body { overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; }
.shell,
.workspace-grid,
.mission-hero,
.facts-grid,
.split-row,
.side-column,
.steps,
.journey-list,
.navigation-list { min-width: 0; }
.workspace-grid > *,
.mission-hero > *,
.facts-grid > *,
.split-row > *,
.side-column > *,
.steps > *,
.journey-list > *,
.navigation-list > * { min-width: 0; }
.hero-copy h1,
.source-title,
.gp-summary,
.journey-copy p,
.action-result-main h2,
.gd-fact-val { overflow-wrap: anywhere; }

/* 正文/元数据不得被 nowrap 固定高度截断：空间不足时允许换行 */
.step small { white-space: normal; }

/* 缩放 125%/150%（视口 <1180px）时取消最小宽度，避免根级横向滚动 */
@media (max-width: 1180px) {
  body { min-width: 0; }
}
@media (max-width: 900px) {
  .shell { width: calc(100% - 32px); }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* 1920×1080：内容区上限 1480px，两侧留白，不因拉伸产生错位 */
@media (min-width: 1600px) {
  .shell { width: min(1480px, calc(100% - 64px)); }
}

/* ===== DS-11 P1-01：双实体比较结果区 + 保存回执（默认私有） ===== */
.explore-compare {
  margin: 4px 21px 2px;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, .30);
  border-radius: 12px;
  background: rgba(15, 32, 55, .40);
}
.explore-compare.hidden { display: none; }
.dual-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.dual-head b { font-size: 13px; color: #dbeafe; letter-spacing: .02em; }
.dual-pair { font-size: 13px; color: #f8fafc; }
.dual-cue { color: var(--muted); font-size: 11px; }
.dual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dual-side {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .26);
  background: rgba(148, 163, 184, .08);
}
.dual-side b { font-size: 12px; color: #e2e8f0; }
.dual-count { font-size: 11px; color: var(--muted); }
.dual-hit { font-size: 11px; color: #cbd5e1; overflow-wrap: anywhere; }
.dual-hit.is-miss { color: #fca5a5; }
.dual-tally { margin-top: 8px; font-size: 11px; color: var(--muted); }
.dual-missing {
  margin-top: 8px; padding: 7px 10px; border-radius: 8px;
  font-size: 12px; line-height: 1.5; color: #fde68a;
  border: 1px solid rgba(251, 191, 36, .38); background: rgba(251, 191, 36, .10);
}
.dual-unknown {
  margin-top: 6px; font-size: 11px; line-height: 1.5; color: #cbd5e1;
  border-left: 2px solid rgba(148, 163, 184, .45); padding-left: 8px; overflow-wrap: anywhere;
}
.dual-ok { margin-top: 8px; font-size: 11px; color: #86efac; }
.save-receipt {
  margin: 0 21px 16px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid rgba(34, 211, 238, .34); background: rgba(34, 211, 238, .08);
  display: grid; gap: 3px;
}
.save-receipt.hidden { display: none; }
.save-receipt-row { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; }
.save-receipt-row span { color: var(--muted); min-width: 56px; }
.save-receipt-row b { color: #e0f2fe; font-weight: 600; overflow-wrap: anywhere; }
.save-receipt-note { color: var(--muted); font-size: 11px; }
@media (max-width: 720px) {
  .dual-grid { grid-template-columns: minmax(0, 1fr); }
  .explore-compare, .save-receipt { margin-left: 12px; margin-right: 12px; }
}

/* DS-17-R3：横向对比表（A/B 各一列，行对齐；新增对象向右扩展，窄屏横向滚动不堆叠） */
.explore-compare .dual-table{display:grid;gap:6px 10px;align-items:stretch;overflow-x:auto;padding-bottom:4px}
.explore-compare .dual-th{font-size:12px;font-weight:600;color:#e2e8f0;padding:6px 8px;border-bottom:1px solid rgba(148,163,184,.28);overflow-wrap:anywhere}
.explore-compare .dual-th-corner{border-bottom:none}
.explore-compare .dual-row-label{font-size:11px;color:var(--muted);padding:6px 4px;white-space:nowrap}
.explore-compare .dual-cell{font-size:11px;color:#cbd5e1;padding:6px 8px;border-radius:8px;background:rgba(148,163,184,.08);overflow-wrap:anywhere;min-width:0}
.explore-compare .dual-cell.is-miss{color:#fca5a5}
/* 221-R2：多对象对比必须左右排列——不再用 auto-fit（面板窄时会塌成 1 列，看起来像上下堆叠）。
   两/三/四列保持横向，超宽时横向滚动，列内字段行顺序一致即可左右对齐。 */
.gd-compare {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
}
.gd-compare > .gd-entity-col {
  /* 1 个对象占满整行；2 个各 1/2；3 个各 1/3；4 个各 1/4。
     只有窄到 min-width 以下才横向滚动，绝不掉到下一行。 */
  flex: 1 1 0;
  min-width: 200px;
  max-width: none;
}
@media (max-width: 360px) {
  .gd-compare > .gd-entity-col { min-width: 160px; }
}/* GPT evidence-v2: optional preferences follow the existing light theme. */
.composer-research-options { margin:12px 0; padding:12px 16px; border:1px solid #c8dcd5; border-radius:12px; background:#f7fbf9; scroll-margin-top:96px; color:#234b43; }
.composer-research-options summary { cursor:pointer; font-weight:600; line-height:1.7; }
.composer-research-options select { max-width:100%; min-height:36px; padding:6px 10px; color:#234b43; background:white; border:1px solid #afc9c0; border-radius:8px; }
.composer-research-options fieldset { display:flex; flex-wrap:wrap; gap:12px 18px; margin:12px 0; border:1px solid #c8dcd5; border-radius:8px; padding:12px; }
.composer-research-options label { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.gd-evidence-choices { margin-top:10px; padding:8px; border:1px solid #c8dcd5; border-radius:8px; }
.gd-evidence-choice { display:grid; gap:6px; margin-top:10px; padding-top:10px; border-top:1px solid #dbe7e2; overflow-wrap:anywhere; }

/* GPT 478: medium-width header actions must wrap instead of being clipped. */
@media (min-width: 761px) and (max-width: 1000px) {
 body[data-theme] .topbar { display:flex;flex-wrap:wrap;gap:12px; }
 body[data-theme] .top-actions { display:flex;flex-wrap:wrap;justify-content:flex-start;max-width:100%;flex-basis:100%; }
}

/* Closed history must not enlarge the mobile layout viewport through offscreen content. */
.history-drawer[aria-hidden="true"] { display:none; }

/* GPT full-chain: keep the source-return action reachable on phone widths. */
@media (max-width: 760px) {
  body[data-theme] .top-actions { flex-wrap: wrap; max-width: 100%; justify-content: flex-start; }
  body[data-theme] .top-actions #openSourceBtn,
  body[data-theme] .top-actions #exportBtn { display: inline-flex; }
  body[data-theme] .top-actions #syncBtn { display: none; }
}

/* Price evidence, directly below the original conclusion. */
.price-followup[hidden] { display: none; }
.price-followup { margin: 6px 20px 20px; padding: 18px; border: 1px solid #bfd4cc; border-radius: 12px; background: #f6faf8; color: #193d31; }
.price-followup h3 { margin: 0 0 12px; font-size: 16px; color: #15392d; }
.price-followup-fields, .price-followup-actions, .price-followup-record footer { display: flex; flex-wrap: wrap; gap: 10px; }
.price-followup-fields label { flex: 1 1 160px; font-size: 13px; font-weight: 600; }
.price-followup-fields label:last-child { flex: 2 1 220px; }
.price-followup-fields :is(select,input) { display: block; width: 100%; box-sizing: border-box; min-height: 38px; margin-top: 5px; padding: 7px 9px; border: 1px solid #94ada2; border-radius: 6px; background: white; color: #172d24; font: inherit; }
.price-followup-actions { margin: 12px 0 6px; }
.price-followup-actions button { min-height: 36px; padding: 7px 13px; border: 1px solid #276951; border-radius: 6px; background: #fff; color: #16523c; font: inherit; font-weight: 600; cursor: pointer; }
.price-followup-actions button:first-child { background: #185c45; color: white; }
.price-followup-actions button:disabled { opacity: .65; cursor: wait; }
.price-followup :focus-visible { outline: 2px solid #14664c; outline-offset: 2px; }
.price-followup-help,.price-followup-record small,.price-followup-record footer { display: block; margin: 6px 0; color: #3d594e; font-size: 13px; line-height: 1.55; }
.price-followup-status { margin: 8px 0 0; font-weight: 600; }
.price-followup-status:empty { display: none; }
.price-followup-record { margin-top: 12px; padding: 12px 0 0; border-top: 1px solid #cfdfd7; overflow-wrap: anywhere; }
.price-followup-record p,.price-followup-record ul { margin: 5px 0; }
.price-followup-record ul { padding-left: 18px; }
.price-followup-record footer { display: flex; }
.price-followup-record a { color: #085239; text-decoration: underline; }


/* 653：当前任务的续接摘要，与任务名同组；数据全部来自现有计划与信封。 */
.workspace-continuity{max-width:680px;margin-top:20px;padding:15px 16px;border:1px solid color-mix(in srgb,var(--teal) 24%,transparent);border-radius:14px;background:linear-gradient(140deg,color-mix(in srgb,var(--teal) 7%,transparent),rgba(255,255,255,.018))}.continuity-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.continuity-meta span{display:inline-flex;align-items:center;min-height:28px;padding:4px 9px;border:1px solid color-mix(in srgb,var(--teal) 20%,transparent);border-radius:999px;color:var(--text);background:rgba(255,255,255,.035);font-size:11px;font-weight:700}.continuity-next{display:flex;align-items:center;box-sizing:border-box;min-height:44px;margin-top:12px;padding:10px 13px;border-radius:10px;background:var(--teal);color:#082e32;font-size:13px;font-weight:800;line-height:1.55;text-decoration:none;overflow-wrap:anywhere}.continuity-next:hover{filter:brightness(1.08)}.continuity-history{min-height:40px;margin-top:8px;padding:7px 0;border:0;background:transparent;color:var(--teal);font-family:inherit;font-size:12px;font-weight:600;line-height:1.6;cursor:pointer}.continuity-history:hover{text-decoration:underline}.workspace-continuity.hidden{display:none}
@media(max-width:760px){.workspace-continuity{margin-top:16px;padding:13px}.continuity-meta{align-items:flex-start}.continuity-meta span{white-space:normal}.continuity-next{font-size:13px}.continuity-history{min-height:44px}}
