/* One type scale for both creation workspaces. */
.topbar-login{padding:7px 13px;font-size:11px;white-space:nowrap}
.xhs-page-confirmations{margin:16px 0}
.xhs-page-confirmation{margin:10px 0;padding:12px;border:1px solid var(--line);border-radius:8px}
.xhs-page-confirmation summary{cursor:pointer;font-size:12px;color:var(--text)}
.xhs-page-confirmation label{display:block;margin-top:12px;font-size:11px}
.xhs-page-confirmation input,.xhs-page-confirmation textarea{display:block;width:100%;margin-top:6px;font-size:12px}
.xhs-page-confirmation textarea{min-height:80px;resize:vertical}
:is(#work-view,#xhs-view){--work-title:16px;--work-body:13px;--work-label:11px;--work-small:10px}
#work-view .section-title h2,#xhs-view .section-title h2,#xhs-create .xhs-create-intro h2{font-size:var(--work-title);font-weight:500;line-height:1.6}
#work-view #brief,#xhs-create .xhs-brief-field textarea{font-family:inherit;font-size:var(--work-body);line-height:1.95}
#work-view .composer-footer label,#xhs-create .xhs-composer-footer label,#xhs-create .xhs-ip-choice select,#work-view .budget-label input,#xhs-create .budget-label input{font-size:var(--work-label)}
#work-view .composer-footer>.primary,#xhs-create .xhs-composer-footer>.primary{font-size:12px;font-weight:600}
#work-view .preview-heading h2,#xhs-view .preview-heading h2{font-size:12px;font-weight:500}
#work-view .preview-tabs button,#xhs-view .preview-tabs button{font-size:var(--work-small)}
#work-view .expert-node b,#xhs-view .expert-node b{font-size:var(--work-label)}
#work-view .expert-node small,#xhs-view .expert-node small{font-size:var(--work-small)}
/* Keep card typography identical despite the separate button/div markup. */
:is(#work-view #network-experts,#xhs-view .xhs-network-grid) .expert-node{font-family:inherit;font-size:var(--work-label);line-height:1.5}
:is(#work-view #network-experts,#xhs-view .xhs-network-grid) .expert-node b{font-size:var(--work-label);font-weight:500;line-height:1.5}
:is(#work-view #network-experts,#xhs-view .xhs-network-grid) .expert-node small{font-size:var(--work-small);font-weight:400;line-height:1.4}
:is(#work-view #network-experts,#xhs-view .xhs-network-grid) .expert-platform-badge{font-size:var(--work-small);line-height:1.4}
/* Identical network frame, type and alignment in both workspaces. */
:is(#work-view,#xhs-view) .team-canvas{padding:0;margin:0 0 24px}
:is(#work-view,#xhs-view) .team-canvas .canvas-top{margin:0;padding:18px 20px 0;font-size:var(--work-label);font-weight:400;line-height:1.6}
:is(#work-view,#xhs-view) .team-canvas .canvas-top>span{display:flex;align-items:center;gap:7px}
:is(#work-view,#xhs-view) .team-canvas .canvas-top .text-button{font-size:var(--work-small);line-height:1.6}
:is(#work-view,#xhs-view) .team-canvas .network-stage{height:auto;padding:16px 20px 20px}
:is(#work-view,#xhs-view) .team-canvas .expert-network-grid{margin:0}
:is(#work-view,#xhs-view) .team-canvas .expert-node>span:last-child{text-align:left}
:is(#work-view,#xhs-view) .team-canvas .canvas-bottom{margin:0 20px;padding:13px 0;font-size:var(--work-small);font-weight:400;line-height:1.6;border-top:1px solid var(--line);color:var(--muted)}
#xhs-view .xhs-flow-diagram{margin:0 20px 20px}
@media(max-width:700px){:is(#work-view,#xhs-view) .team-canvas .canvas-top{padding:16px 13px 0}:is(#work-view,#xhs-view) .team-canvas .network-stage{padding:14px 13px 17px}:is(#work-view,#xhs-view) .team-canvas .canvas-bottom{margin:0 13px}#xhs-view .xhs-flow-diagram{margin:0 13px 17px}}
:is(#work-view,#xhs-view) .section-title :is([data-action="new"],[data-xhs-new]){flex:none;font-size:var(--work-label);font-weight:400;white-space:nowrap}
#work-view .composer-note,#xhs-view .composer-note,#xhs-create .xhs-create-intro p,#xhs-create .xhs-composer-help{font-size:var(--work-label);line-height:1.8}
.toolkit-guide{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px;padding:18px 20px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.toolkit-guide h2{font-size:16px;font-weight:600;margin-bottom:6px}
.toolkit-guide p{max-width:650px;font-size:12px;line-height:1.8;color:var(--muted)}
.toolkit-guide>button{flex:none;font-size:12px}
.expert-model-form fieldset{border:0;padding:0;margin:0;min-width:0}
.expert-independent-fields{padding-top:4px}
.expert-model-form .service-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.expert-model-form .service-result:empty{display:none}
.expert-model-form .service-result{margin-top:12px;font-size:12px;line-height:1.7}
.expert-model-status{line-height:1.7;overflow-wrap:anywhere}
@media(max-width:700px){:is(#work-view,#xhs-view){--work-title:15px;--work-body:12px}.toolkit-guide{align-items:flex-start;flex-direction:column;gap:12px}}
.xhs-topic-card{margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:10px}
.xhs-topic-decision h2,#xhs-brief-answer h2{font-size:16px;margin-bottom:12px}
.xhs-topic-card h3{font-size:14px;margin-bottom:8px}
.xhs-topic-card p,.xhs-topic-decision>p{font-size:12px;line-height:1.8;color:var(--muted);margin:8px 0}
#xhs-create .xhs-hot-option{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:11px}
#xhs-create .xhs-hot-option input{width:auto;min-height:0;margin:0;accent-color:var(--accent)}
#xhs-create .xhs-ip-choice{min-width:0;max-width:100%;color:var(--text)}
#xhs-create .xhs-ip-choice select{appearance:auto;display:block;flex:1 1 auto;width:220px;max-width:100%;min-width:140px;min-height:36px;padding:6px 28px 6px 10px;border:1px solid var(--line);background:var(--panel);color:var(--text);color-scheme:dark;cursor:pointer}
#xhs-profile-select option{background:var(--panel);color:var(--text)}
:root[data-theme=light] #xhs-profile-select{color-scheme:light}
@media(max-width:480px){#xhs-create .xhs-ip-choice{width:100%}#xhs-create .xhs-ip-choice select{width:100%}}

/* Platform labels share one restrained style across expert surfaces. */
.expert-platform-badge{display:inline-flex;align-items:center;vertical-align:middle;margin-inline-start:8px;padding:2px 6px;border:1px solid var(--line,#41454d);border-radius:5px;color:var(--muted,#9098a3);font-size:10px;font-weight:400;line-height:1.4;letter-spacing:0;white-space:nowrap}
.event-header>.expert-platform-badge{margin-inline-end:auto}
.event-header:has(>.expert-platform-badge){align-items:center;gap:4px}
.chat-message-meta>.expert-platform-badge{margin-inline-start:0}
.expert-node .expert-platform-badge{margin-block:3px}

/* Shared navigation rhythm for library, memory and task history. */
#knowledge-view #kb-tabs,#memory-view .memory-tabs,#history-view .history-filter-row{margin:2px 0 22px;padding:0;border-bottom:1px solid var(--line);min-height:42px;box-sizing:border-box}
#knowledge-view #kb-tabs,#memory-view .memory-tabs,#history-view .history-filters{display:flex;gap:24px;padding:0}
#history-view .history-filter-row .history-filters{margin:0;border:0}
#knowledge-view #kb-tabs button,#memory-view .memory-tabs button,#history-view .history-filters button{position:relative;font-family:inherit;font-size:12px;font-weight:400;line-height:20px;padding:9px 1px 11px;border:0;border-radius:0;background:transparent;color:var(--muted);box-shadow:none;cursor:pointer}
#knowledge-view #kb-tabs button[aria-selected=true],#memory-view .memory-tabs button[aria-selected=true],#history-view .history-filters button[aria-pressed=true]{color:var(--text);font-weight:600}
#knowledge-view #kb-tabs button[aria-selected=true]::after,#memory-view .memory-tabs button[aria-selected=true]::after,#history-view .history-filters button[aria-pressed=true]::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--accent)}

#history-view .history-row{min-width:0;box-sizing:border-box}#history-view .history-row>div:not(.history-actions){min-width:0}#history-view .history-row b{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:100%}#history-view .history-row .status-pill,#history-view .history-remove,#history-view .history-actions{flex-shrink:0}
/* Shared process diagrams: explicit direction, decisions and return paths. */
#work-view #network-toggle{display:inline-flex!important}
.team-process{padding:18px 20px;font-size:12px;line-height:1.6}
.team-process ol{list-style:none;margin:0;padding:0}
.process-chain{display:flex;flex-direction:column;gap:24px;max-width:760px;margin:auto!important}
.process-chain>.xhs-flow-node{margin:0;padding:14px 18px 14px 28px;border-radius:8px;border-left:3px solid var(--line)}
.process-chain>.xhs-flow-node:after{content:'↓';bottom:-24px;left:28px;height:24px;line-height:24px}
.process-chain>.xhs-flow-node:last-child:after{display:none}
.process-chain>.xhs-flow-node.is-current{border-left-color:var(--accent);background:color-mix(in srgb,var(--accent) 6%,var(--panel))}
.xhs-flow-node.is-decision{border-style:dashed;border-color:var(--accent)}
.process-route{margin:0 0 16px;color:var(--muted);font-size:11px}
.compact-process .process-chain{gap:18px}
.compact-process .xhs-flow-node{display:grid;grid-template-columns:minmax(100px,1fr) minmax(110px,1fr) auto;align-items:center;gap:8px;padding:10px 14px 10px 24px}
.compact-process .xhs-flow-node b{grid-column:1;grid-row:1;font-size:12px}
.compact-process .xhs-flow-node small{grid-column:2;grid-row:1;margin:0;font-size:11px}
.compact-process .xhs-flow-state{grid-column:3;grid-row:1;float:none;font-size:10px}
.compact-process .xhs-flow-node p{display:none}
.compact-process .xhs-flow-node:after{bottom:-18px;height:18px;line-height:18px;left:24px}
.process-return{max-width:760px;margin:24px auto 0;border:1px dashed var(--accent);border-radius:8px;padding:14px;color:var(--muted);box-sizing:border-box}
.process-return b{font-size:12px;color:var(--text)}.process-return p{font-size:11px;margin:8px 0 0}
#xhs-view .xhs-flow-diagram{border-top:0;padding-top:16px}
.xhs-flow-branches>section{background:color-mix(in srgb,var(--panel) 70%,transparent)}
.xhs-flow-branches>section h3{padding-bottom:12px;border-bottom:1px solid var(--line)}
.xhs-flow-intake:after{content:'按文案来源分流 ↓';display:block;text-align:center;color:var(--muted);font-size:11px;margin-top:16px}
@media(max-width:600px){.team-process{padding:16px 13px}.compact-process .xhs-flow-node{grid-template-columns:minmax(0,1fr) auto}.compact-process .xhs-flow-node small{grid-column:1;grid-row:2}.compact-process .xhs-flow-state{grid-column:2}.xhs-flow-state{float:none;display:block;margin:0 0 4px}}
.team-process{line-height:1.65}

/* Match task-history action buttons without large filled controls. */
#kb-list .knowledge-actions{display:flex;gap:14px;align-items:center;margin-top:14px}
#kb-list .knowledge-actions button{padding:5px 0;border:0;border-radius:0;background:transparent;box-shadow:none;color:var(--accent);font-family:inherit;font-size:11px;cursor:pointer}
#kb-list .knowledge-actions .danger-link{color:var(--danger)}
#kb-list .knowledge-actions button:disabled{opacity:.4;cursor:default}

/* Login gates share the standard page spacing and a single card surface. */
.view:has(.auth-gate) .auth-gate{box-sizing:border-box;width:100%;min-height:312px;padding:44px 28px}
#knowledge-view:has(.auth-gate) #kb-status{display:none}
#knowledge-view:has(.auth-gate) #kb-list{margin:0;border:0;border-radius:0;background:transparent;overflow:visible}
#history-view:has(.auth-gate) :is(.history-filter-row,#history-trash-note,#wechat-history-heading,#xhs-history-heading,#xhs-history-list),#memory-view:has(.auth-gate) :is(.memory-tabs,#ip-memory-content){display:none}
#history-view:has(.auth-gate) #history-list,#memory-view:has(.auth-gate) #memory-content{display:block;margin:0;width:100%;max-width:none}
@media(max-width:700px){.view:has(.auth-gate) .auth-gate{padding:32px 20px}}

#settings-content:has(>.auth-gate){display:block}

.task-next-step{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 20px;margin:0 0 22px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}
.task-next-copy{min-width:0}.task-next-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px;color:var(--muted);font-size:11px;margin-bottom:10px}.task-next-step strong{display:block;font-size:15px;font-weight:600;line-height:1.6}.task-next-step p{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.8;overflow-wrap:anywhere}.task-next-step>.primary{flex-shrink:0;font-size:12px}.task-next-step .status-pill{color:var(--accent)}
@media(max-width:700px){.task-next-step{align-items:stretch;flex-direction:column;gap:14px;padding:16px}.task-next-step>.primary{align-self:flex-start}}
