/* 联网研究工作台：独立样式层，与主聊天共享主题令牌。 */
[data-research-promo][hidden],#researchControl[hidden]{display:none!important}
.research-control{display:flex;align-items:center;gap:10px;padding:0 5px 10px;min-width:0}
.research-mode-wrap{display:flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid rgba(99,102,241,.27);border-radius:20px;background:linear-gradient(120deg,rgba(14,165,233,.1),rgba(139,92,246,.1));color:var(--text);box-shadow:0 3px 12px rgba(99,102,241,.07)}
.research-mode-wrap svg{width:16px;height:16px;color:#6366f1}
.research-mode-wrap select{font:inherit;font-size:12px;font-weight:650;color:inherit;border:0;background:transparent;outline-offset:3px;cursor:pointer;max-width:118px}
.research-mode-wrap option{background:var(--surface);color:var(--text)}
.research-control.is-off .research-mode-wrap{opacity:.65;background:var(--surface)}
.research-price{font-size:10px;color:var(--text-secondary);line-height:1.5;min-width:0}
.research-promo{display:flex;align-items:center;gap:14px;width:100%;max-width:680px;margin:20px 0 4px;padding:16px 20px;text-align:left;border:1px solid rgba(99,102,241,.22);border-radius:18px;background:linear-gradient(115deg,rgba(14,165,233,.09),rgba(99,102,241,.07),rgba(168,85,247,.08));position:relative;overflow:hidden}
.research-promo .research-orbit{flex:0 0 44px;width:44px;height:44px}
.research-promo strong{display:block;font-size:14px;color:var(--text);line-height:1.6}
.research-promo small{display:block;font-size:12px;line-height:1.7;color:var(--text-secondary)}
.research-new{font-size:9px;font-weight:800;letter-spacing:1px;padding:3px 6px;border-radius:5px;color:#6366f1;background:rgba(99,102,241,.12);margin-left:auto;align-self:flex-start}
.research-panel{margin:8px 0 16px;border:1px solid rgba(99,102,241,.22);border-radius:16px;background:linear-gradient(125deg,rgba(14,165,233,.045),rgba(99,102,241,.045));overflow:hidden;max-width:100%;color:var(--text);box-shadow:0 6px 22px rgba(15,23,42,.035)}
.research-panel>summary{display:flex;align-items:center;gap:11px;padding:14px;cursor:pointer;list-style:none;user-select:none}
.research-panel>summary::-webkit-details-marker,.research-more>summary::-webkit-details-marker{display:none}
.research-orbit{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border:1px solid rgba(99,102,241,.2);border-radius:12px;background:linear-gradient(135deg,rgba(56,189,248,.13),rgba(139,92,246,.15));color:#6366f1;position:relative}
.research-orbit svg{width:22px;height:22px}
.is-active .research-orbit:after{content:'';position:absolute;inset:-3px;border:1px solid transparent;border-top-color:#818cf8;border-radius:14px;animation:research-orbit 2.8s linear infinite}
.research-heading{flex:1;min-width:0}.research-heading strong{display:block;font-size:13px;line-height:1.6;font-weight:700}.research-heading small{display:block;font-size:10.5px;line-height:1.7;color:var(--text-secondary);overflow-wrap:anywhere}
.research-chevron{font-size:20px;color:var(--text-secondary);transition:transform .2s}.research-panel[open]>summary .research-chevron{transform:rotate(180deg)}
.research-content{padding:0 16px 14px;border-top:1px solid rgba(99,102,241,.1)}
.research-eyebrow{font-size:9px;font-weight:750;letter-spacing:1.7px;color:#818cf8;margin:14px 0}
.research-timeline{list-style:none!important;margin:0 0 16px!important;padding:0!important;max-height:230px;overflow-y:auto;overscroll-behavior:contain}
.research-timeline li{display:flex;gap:12px;position:relative;padding:0 0 16px;margin:0!important}.research-timeline li:last-child{padding-bottom:0}
.research-timeline li:before{content:'';position:absolute;width:1px;background:rgba(99,102,241,.2);left:4px;top:14px;bottom:3px}.research-timeline li:last-child:before{display:none}
.rt-dot{flex:0 0 9px;width:9px;height:9px;border-radius:50%;margin-top:5px;background:#94a3b8}.rt-complete .rt-dot{background:#14b8a6;box-shadow:0 0 0 3px rgba(20,184,166,.1)}.rt-running .rt-dot{background:#818cf8;animation:research-pulse 1.4s ease-in-out infinite}.rt-failed .rt-dot,.rt-pending .rt-dot{background:#f59e0b}
.research-timeline li>div{min-width:0;flex:1}.rt-kind{font-size:10px;color:var(--text-secondary);margin-right:8px}.rt-label{font-size:12px;overflow-wrap:anywhere;line-height:1.7}.research-timeline small{display:block;font-size:10px;line-height:1.8;color:var(--text-secondary)}
.research-sources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.research-source{display:flex;flex-direction:column;gap:7px;padding:12px;min-width:0;border:1px solid rgba(99,102,241,.15);border-radius:12px;text-decoration:none!important;background:var(--surface);color:var(--text)!important;transition:transform .18s,border-color .18s,box-shadow .18s}
.research-source:hover{transform:translateY(-2px);border-color:rgba(99,102,241,.4);box-shadow:0 7px 20px rgba(99,102,241,.1)}
.rs-site{display:flex;align-items:center;gap:5px;font-size:9px;color:var(--text-secondary);overflow-wrap:anywhere}.rs-site svg{width:13px;height:13px;flex-shrink:0;margin-left:auto}.rs-number{display:grid;place-items:center;width:18px;height:18px;flex:0 0 18px;border-radius:5px;background:rgba(99,102,241,.12);color:#818cf8;font-weight:750}
.research-source strong{font-size:11.5px;line-height:1.6;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
.rs-summary{font-size:10px;line-height:1.7;color:var(--text-secondary);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}.rs-meta{font-size:9px;color:var(--text-secondary);margin-top:auto;line-height:1.5}
.research-more>summary{display:flex;justify-content:space-between;list-style:none;cursor:pointer;padding:12px 2px;font-size:11px;color:#818cf8}.research-more[open]>summary span{transform:rotate(45deg)}
.research-footnote{font-size:9px;color:var(--text-secondary);margin-top:12px;line-height:1.6;opacity:.8}
.research-citation{display:inline-flex;align-items:center;justify-content:center;min-width:23px;padding:1px 5px;margin:0 2px;border:1px solid rgba(99,102,241,.2);border-radius:6px;background:rgba(99,102,241,.09);color:#6366f1;font-size:10px;font-weight:650;font-family:inherit;line-height:1.5;cursor:pointer;vertical-align:super;transition:background .15s}
.research-citation:hover{background:rgba(99,102,241,.22)}
.research-dialog{width:min(460px,calc(100vw - 28px));padding:30px;border:1px solid rgba(99,102,241,.25);border-radius:22px;background:var(--surface-solid,var(--surface));color:var(--text);box-shadow:0 30px 90px rgba(0,0,0,.3);margin:auto;max-height:80dvh;overflow:auto}
.research-dialog::backdrop{background:rgba(10,15,35,.55);backdrop-filter:blur(4px)}.research-dialog-close{position:absolute;right:13px;top:10px;width:30px;height:30px;border:0;background:transparent;color:var(--text-secondary);font-size:24px;cursor:pointer}
.research-dialog h3{font-size:19px;line-height:1.5;margin:10px 0 14px;overflow-wrap:anywhere}.research-dialog p{font-size:13px;line-height:1.9;color:var(--text-secondary);overflow-wrap:anywhere}.research-dialog small{display:block;font-size:11px;color:var(--text-secondary);margin:16px 0}
.research-dialog>a{display:flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;background:linear-gradient(110deg,#6366f1,#8b5cf6);color:#fff;text-decoration:none;padding:12px;font-size:13px;font-weight:650}.research-dialog>a svg{width:16px;height:16px}
html[data-theme="dark"] .research-mode-wrap svg,html[data-theme="dark"] .research-orbit,html[data-theme="dark"] .research-citation{color:#a5b4fc}
@keyframes research-orbit{to{transform:rotate(360deg)}}@keyframes research-pulse{50%{box-shadow:0 0 0 5px rgba(129,140,248,.13)}}
@media(max-width:768px){.research-control{gap:8px;padding-bottom:8px}.research-price{font-size:9px}.research-mode-wrap{flex-shrink:0;padding:5px 8px}.research-mode-wrap select{font-size:11px}.research-promo{padding:13px;gap:10px}.research-promo strong{font-size:12px}.research-promo small{font-size:10px}.research-panel>summary{padding:11px;gap:9px}.research-content{padding:0 11px 12px}.research-sources{grid-template-columns:1fr}.research-source{gap:5px}.research-source strong{font-size:12px}.rs-summary{-webkit-line-clamp:2}.research-heading small{font-size:9px}.research-heading strong{font-size:12px}.research-dialog{padding:24px}.research-new{display:none}}
@media(prefers-reduced-motion:reduce){.is-active .research-orbit:after,.rt-running .rt-dot{animation:none}.research-source{transition:none}}
