/* Scoped to the workspace. Semantic palette colors come from the existing shell. */
.xc-workbench{--xc-border:var(--border-color,var(--border,#deddd4));--xc-muted:var(--text-muted,#777);--xc-accent:var(--accent-color,var(--accent,#52745d));color:inherit;font:inherit;max-width:1600px;margin:auto;position:relative}.xc-workbench *{box-sizing:border-box}.xc-workbench h2{font-size:1.3rem;margin:0}.xc-workbench h3{font-size:1.06rem;margin:0 0 14px}.xc-workbench .panel{padding:20px;margin-bottom:16px}.xc-topbar,.xc-section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}.xc-topbar nav,.xc-actions,.xc-tabs{display:flex;gap:8px;flex-wrap:wrap}.xc-workbench button{font:inherit;cursor:pointer}.xc-workbench button[aria-current=page],.xc-workbench button[aria-selected=true]{outline:1px solid var(--xc-accent)}.xc-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}.xc-entry{text-align:left;display:flex;flex-direction:column;gap:12px;min-height:126px;background:var(--xc-surface);color:inherit;border:1px solid var(--xc-border);border-radius:inherit}.xc-entry span,.xc-muted,.xc-save-state,.xc-section-head small{font-size:.86rem;color:var(--xc-muted)}.xc-field{display:flex;flex-direction:column;gap:7px;margin-bottom:16px;min-width:0}.xc-field>span{font-size:.88rem}.xc-workbench input:not([type=file]),.xc-workbench textarea,.xc-workbench select{width:100%;font:inherit;line-height:1.7;color:inherit;background:var(--xc-input);border:1px solid var(--xc-border);border-radius:8px;padding:10px 12px}.xc-workbench textarea{resize:vertical}.xc-workbench input[type=color]{height:44px;padding:4px}.xc-two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.xc-work-row,.xc-work-card{display:flex;align-items:center;justify-content:space-between;gap:14px}.xc-work-row{width:100%;padding:16px 6px;text-align:left;background:transparent;color:inherit;border:0;border-bottom:1px solid var(--xc-border)}.xc-work-row small{color:var(--xc-muted)}.xc-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:22px}.xc-main-editor{min-width:0}.xc-assistant{align-self:start;position:sticky;top:14px}.xc-jobs article{border-top:1px solid var(--xc-border);padding:12px 0}.xc-jobs small{display:block;white-space:pre-wrap;font-size:.8rem;color:var(--xc-muted);margin:8px 0}.xc-workbench details{margin-bottom:18px}.xc-workbench summary{cursor:pointer;margin-bottom:12px}.xc-issue{display:block;width:100%;text-align:left;margin:8px 0;padding:12px;border:1px solid var(--xc-border);border-radius:8px;background:transparent;color:inherit}.xc-error,.xc-warning,.xc-conflict{padding:14px;border:1px solid var(--danger-color,#b36555);border-radius:8px;margin-bottom:16px}.xc-error{display:flex;justify-content:space-between;gap:14px}.xc-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px}.xc-compare pre,.xc-json,.xc-caption{white-space:pre-wrap;overflow-wrap:anywhere;max-height:60vh;overflow:auto;font:inherit;line-height:1.8}.xc-compare pre{padding:12px;border:1px solid var(--xc-border)}.xc-gallery{display:flex;gap:10px;overflow-x:auto;margin:18px 0;padding-bottom:8px}.xc-gallery button{flex:0 0 106px;background:transparent;border:1px solid var(--xc-border);border-radius:6px;padding:5px;color:inherit}.xc-gallery canvas{width:94px;height:auto;display:block;aspect-ratio:3/4}.xc-gallery .selected{outline:2px solid var(--xc-accent)}.xc-artwork-layout{display:grid;grid-template-columns:minmax(200px,1fr) 255px;gap:18px}.xc-canvas{display:block;width:100%;height:auto;max-width:540px;margin:0 auto 14px;box-shadow:0 4px 16px #0002}.xc-layer-editor{padding:14px!important}.xc-drawer-backdrop{position:fixed;inset:0;background:#0005;z-index:2000;display:flex;justify-content:flex-end}.xc-workbench .xc-drawer{width:min(800px,90vw);max-height:100vh;height:100%;overflow:auto;margin:0;border-radius:12px 0 0 12px;padding:26px;box-shadow:-6px 0 28px #0002}.xc-file{display:block;padding:14px;border:1px dashed var(--xc-border);border-radius:8px;margin:14px 0}.xc-file input{display:block;margin-top:8px}.xc-service-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.xc-template-preview canvas{width:min(42%,300px)}.xc-mobile .xc-topbar{display:block}.xc-mobile .xc-topbar nav{display:flex;overflow-x:auto;flex-wrap:nowrap;margin-top:16px}.xc-mobile .xc-topbar nav button{white-space:nowrap;flex-shrink:0}.xc-mobile .xc-body{padding:12px}.xc-mobile .xc-entry-grid{grid-template-columns:1fr;gap:10px}.xc-mobile .xc-entry{min-height:108px;padding:16px}.xc-mobile .xc-editor-layout{display:flex;flex-direction:column}.xc-mobile .xc-assistant{position:static;order:2;width:100%}.xc-mobile .xc-artwork-layout{display:flex;flex-direction:column}.xc-mobile .panel{padding:14px}.xc-mobile .xc-section-head{align-items:flex-start;flex-wrap:wrap}.xc-mobile .xc-two,.xc-mobile .xc-compare{grid-template-columns:1fr}.xc-mobile .xc-work-row{display:block}.xc-mobile .xc-work-row small{display:block;margin-top:7px}.xc-mobile .xc-service-grid{grid-template-columns:1fr 1fr}.xc-mobile .xc-drawer{width:100vw;border-radius:0}.xc-mobile textarea[data-xc-field='content.body']{min-height:55vh}.xc-mobile .xc-work-card{flex-wrap:wrap}@media(max-width:1150px){.xc-topbar{display:block}.xc-topbar nav{margin-top:14px}.xc-editor-layout{grid-template-columns:minmax(0,1fr) 240px}.xc-artwork-layout{grid-template-columns:1fr}.xc-assistant{position:static}}@media(max-width:850px){.xc-editor-layout{display:block}.xc-assistant{margin-top:18px}.xc-entry-grid{grid-template-columns:1fr}.xc-compare{grid-template-columns:1fr}}

.xc-workbench{container-type:inline-size}.xc-workbench [data-xc-assistant-launch]{display:none}.xc-drawer .xc-assistant{display:block!important;position:static;width:100%}@container(max-width:950px){.xc-editor-layout{display:block}.xc-editor-layout>.xc-assistant{display:none}.xc-workbench [data-xc-assistant-launch]{display:inline-flex}}

.xc-mobile .panel{background:var(--xc-surface);border:1px solid var(--xc-border);border-radius:var(--m-radius,12px)}.xc-mobile>.xc-body{background:transparent;border:0;padding:0}.xc-mobile .xc-drawer{background:var(--xc-surface);padding:20px;padding-bottom:max(20px,env(safe-area-inset-bottom))}.xc-mobile .xc-drawer .xc-section-head{position:sticky;top:-20px;padding-block:12px;background:var(--xc-surface);z-index:1}.xc-mobile .m-button{font-weight:400}.xc-mobile .xc-topbar nav{margin-top:0}

.xc-workbench button:disabled{cursor:wait;opacity:.58}.xc-workbench button:focus-visible,.xc-workbench summary:focus-visible{outline:2px solid var(--xc-accent);outline-offset:3px}.xc-workbench .xc-name-targets{margin:-4px 0 20px}.xc-workbench .xc-name-targets>.xc-muted{display:block;margin-bottom:8px}.xc-workbench .xc-research-counts{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:.85rem;color:var(--xc-muted);margin:10px 0}.xc-workbench .xc-research-counts span{white-space:nowrap}.xc-workbench .xc-drawer .xc-assistant{padding:0;border:0;box-shadow:none;margin:0}.xc-workbench .xc-drawer{overscroll-behavior:contain}.xc-mobile [data-xc-assistant-launch]{display:inline-flex}.xc-mobile .xc-editor-layout>.xc-assistant{display:none}.xc-mobile .xc-actions>button{min-height:44px;white-space:normal;line-height:1.5;flex:1 1 130px;padding:10px 14px;justify-content:center;text-align:center}.xc-mobile .xc-topbar nav button{min-height:42px;padding:9px 14px}.xc-mobile .xc-drawer .xc-section-head>button{min-height:42px;flex:0 0 auto}.xc-mobile .xc-assistant .xc-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.xc-mobile .xc-assistant> .xc-actions>button:first-child{grid-column:1/-1}.xc-mobile .xc-work-row{min-height:60px}.xc-mobile .xc-drawer input,.xc-mobile .xc-drawer textarea,.xc-mobile .xc-drawer select{font-size:16px}.xc-mobile .xc-gallery button{min-height:44px}.xc-mobile .xc-name-targets .xc-actions>button{flex:0 1 auto;min-width:88px}.xc-mobile .xc-error{align-items:flex-start}.xc-mobile .xc-error>button{flex-shrink:0;min-height:40px}

.xc-workbench .xc-next-step{border:1px solid var(--xc-accent);border-radius:10px;padding:18px;margin:0 0 20px;background:var(--xc-surface)}.xc-workbench .xc-next-step>strong{display:block;font-size:1.03rem}.xc-workbench .xc-next-step p{color:var(--xc-muted);line-height:1.7;margin:9px 0 14px}.xc-mobile .xc-next-step{padding:16px}.xc-mobile .xc-next-step>button{width:100%;min-height:46px}.xc-workbench .xc-warning>p:first-child{margin-top:0}

.xc-workbench .xc-text-count{display:block;color:var(--xc-muted);font-size:.82rem;line-height:1.6;margin:-8px 0 12px;overflow-wrap:anywhere}.xc-workbench .xc-text-count.is-over-limit{color:var(--danger-color,#a13d35)}.xc-studio-return{padding:16px 20px;margin:0 0 16px;border:1px solid var(--xc-return-border,var(--border,#ded8cf));border-radius:10px;background:var(--xc-return-surface,var(--panel,#fff));color:inherit}.xc-studio-return strong{font-size:1rem;overflow-wrap:anywhere}.xc-studio-return p{margin:8px 0 12px;line-height:1.6}.xc-studio-return .xc-studio-return-error{color:var(--danger-color,#a13d35);margin-bottom:0}.xc-studio-return.xc-mobile{padding:14px}.xc-studio-return.xc-mobile .xc-actions>button{min-height:44px;flex:1 1 160px}

.xc-workbench .xc-canvas-stage{position:relative;width:100%;max-width:540px;margin:0 auto 14px;aspect-ratio:3/4}.xc-workbench .xc-canvas-stage .xc-canvas{width:100%;max-width:none;margin:0;cursor:pointer;touch-action:manipulation}.xc-workbench .xc-layer-selection{position:absolute;box-sizing:border-box;pointer-events:none;border:2px solid var(--xc-accent);outline:1px solid #fff9;transform-origin:center;z-index:1}.xc-workbench .xc-canvas-hint{line-height:1.6;margin:0 0 12px}

.xc-workbench .xc-download-link{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 14px;margin:8px 8px 0 0;border:1px solid var(--xc-border);border-radius:8px;color:var(--xc-accent);font:inherit;text-decoration:none}

/* Local capture and recovery use the same palette surfaces as the workbench. */
.xc-recovery-summary,.xc-collection-connection,.xc-collection-card,.xc-collection-item{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:14px;border:1px solid var(--xc-border,var(--border));border-radius:14px;background:var(--xc-surface,var(--panel));margin:12px 0}
.xc-collector-install{flex-basis:100%;min-width:0;line-height:1.75}.xc-collector-install ol{padding-left:1.5em}.xc-collector-install li{margin-bottom:8px}.xc-collector-install code{overflow-wrap:anywhere;color:inherit}
.xc-recovery-summary>span,.xc-collection-card>div{min-width:0;flex:1;overflow-wrap:anywhere}.xc-recovery-summary>span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.xc-collection-connection>div:first-child{flex:1;min-width:200px}.xc-collection-connection>p{flex-basis:100%;margin:0}.xc-install-link{color:var(--xc-accent,var(--accent));text-decoration:underline;min-height:44px;display:inline-flex;align-items:center}.xc-collection-item{padding:12px;border-radius:10px}.xc-collection-item p{flex-basis:100%;margin:0}.xc-mobile .xc-collection-connection,.xc-mobile .xc-collection-card{align-items:stretch;flex-direction:column}.xc-mobile .xc-recovery-summary{padding:12px}.xc-mobile .xc-collection-card .xc-actions,.xc-mobile .xc-collection-connection .xc-actions{width:100%}

.xc-collected-content{flex-basis:100%;min-width:0}.xc-collected-image{margin:12px 0;max-width:100%;width:100%}.xc-collected-image img{display:block;max-width:100%;max-height:65vh;width:auto;height:auto;object-fit:contain;margin:auto;background:var(--xc-input,var(--panel))}.xc-collected-image figcaption{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-top:8px}.xc-confirm-check{display:flex;align-items:flex-start;gap:10px;padding:12px 0}.xc-confirm-check input{width:auto!important;min-height:20px!important;margin-top:3px;flex:none}

.xc-logout-notice{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 16px;border:1px solid var(--ui-border,#aaa);border-radius:10px;background:var(--ui-panel,#fff);color:var(--ui-text,#222);z-index:10000;}

.xc-workbench .xc-recovery-form,.xc-workbench .xc-recovery-choices{min-width:0;padding:14px;border:1px solid var(--xc-border);border-radius:10px;margin:12px 0}.xc-workbench .xc-recovery-choices label{display:flex;align-items:flex-start;gap:9px;margin:9px 0;line-height:1.6}.xc-workbench .xc-recovery-choices input[type=checkbox]{width:auto;min-height:20px;flex:none;margin-top:3px}.xc-recovery-form>h3{margin-top:0}

/* Auxiliary task pages inherit the system palette. */
.xc-workbench .xc-flow-filters{display:grid;grid-template-columns:minmax(200px,2fr) repeat(3,minmax(130px,1fr)) auto;gap:12px;align-items:end;margin:14px 0 22px}.xc-flow-filters .xc-field{margin-bottom:0}.xc-flow-filters>button{min-height:48px}.xc-workbench .xc-flow-work{display:flex;align-items:center;justify-content:space-between;gap:20px}.xc-flow-work>div:first-child{min-width:0}.xc-flow-work h3{overflow-wrap:anywhere;margin-bottom:8px}.xc-flow-work .xc-actions{flex-shrink:0}.xc-workbench .xc-flow-badge{display:inline-flex;border:1px solid var(--xc-border);border-radius:999px;padding:4px 10px;font-size:.8rem;color:var(--xc-muted)}.xc-workbench .xc-flow-context{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--xc-accent);border-radius:10px;padding:12px 16px;margin:0 0 18px;line-height:1.7}.xc-workbench .xc-flow-resource-content{margin-top:22px}.xc-workbench .xc-flow-source-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.xc-flow-source-grid>.panel{margin:0}.xc-flow-source-grid h3,.xc-flow-source-grid p{overflow-wrap:anywhere}.xc-flow-source-grid p{white-space:pre-wrap;line-height:1.65}.xc-workbench .xc-tabs{border-bottom:1px solid var(--xc-border);padding-bottom:12px;margin-bottom:18px}@media(max-width:1100px){.xc-workbench .xc-flow-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.xc-workbench .xc-flow-work{align-items:flex-start;flex-wrap:wrap}}@media(max-width:700px){.xc-workbench .xc-flow-source-grid{grid-template-columns:1fr}.xc-workbench .xc-flow-context{align-items:flex-start;flex-wrap:wrap}.xc-workbench .xc-flow-filters{grid-template-columns:1fr}.xc-workbench .xc-flow-work .xc-actions{width:100%}}

/* Task-based text workflow, using shell palette only. */
.xc-text-flow .xc-flow-entries{grid-template-columns:repeat(3,minmax(0,1fr))}.xc-text-flow .xc-entry{min-height:150px;padding:24px;line-height:1.6}.xc-text-flow .xc-entry strong{font-size:1.1rem}.xc-flow-intro{padding:12px 0 8px}.xc-flow-section{padding:20px 0;border-top:1px solid var(--xc-border);margin-top:20px}.xc-recovery-summary small{display:block;color:var(--xc-muted);margin-top:6px}.xc-flow-steps{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:24px;border-bottom:1px solid var(--xc-border);padding-bottom:14px}.xc-flow-steps span{color:var(--xc-muted);padding:8px 14px;border-radius:8px;font-size:.9rem}.xc-flow-steps .is-current{color:var(--xc-accent);font-weight:600;background:var(--xc-input);outline:1px solid var(--xc-accent)}.xc-flow-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;position:sticky;bottom:0;background:var(--xc-surface);padding:16px 0 4px;margin-top:22px;border-top:1px solid var(--xc-border);z-index:2}.xc-flow-tools{display:flex;flex-wrap:wrap;gap:8px;padding:10px 0}.xc-flow-more{margin:0!important;position:relative}.xc-flow-more summary{border:1px solid var(--xc-border);padding:10px 14px;border-radius:8px;margin:0!important}.xc-flow-more[open]{padding-bottom:8px}.xc-flow-more[open]>button{display:block;margin-top:10px}.xc-breadcrumb{color:var(--xc-muted);font-size:.85rem;margin-bottom:16px}.xc-flow-task{display:flex;gap:16px;justify-content:space-between;align-items:center;padding:12px 16px;border:1px solid var(--xc-border);border-radius:8px;margin:12px 0 20px}.xc-flow-options{padding:16px;border:1px solid var(--xc-border);border-radius:8px}.xc-flow-confirm{padding:14px;border:1px solid var(--xc-border);border-radius:8px}.xc-flow-publication,.xc-flow-manuscript{max-width:1000px;margin:auto}.xc-flow-manuscript textarea[data-xc-field="content.body"]{height:clamp(350px,54vh,680px);overflow:auto;line-height:1.95}.xc-flow-publication textarea{line-height:1.9}.xc-inline-create{align-self:center}.xc-text-flow textarea::placeholder,.xc-text-flow input::placeholder{color:var(--xc-muted);opacity:.75}.xc-text-flow .xc-drawer [readonly]{background:var(--xc-surface)}@media(max-width:1000px){.xc-text-flow .xc-flow-entries{grid-template-columns:1fr}.xc-text-flow .xc-entry{min-height:100px}.xc-flow-footer{position:static}.xc-flow-steps{gap:4px}.xc-flow-steps span{padding:7px}.xc-flow-task{flex-wrap:wrap}}

/* Reviewed text-note UI V1: page responsibilities stay separate; shell palette stays authoritative. */
.xc-text-flow{
 --xc-v1-form-width:960px;
 --xc-v1-article-width:840px;
 --xc-v1-radius:12px;
 --xc-v1-soft:color-mix(in srgb,var(--xc-accent) 5%,var(--xc-surface));
 --xc-v1-focus:color-mix(in srgb,var(--xc-accent) 12%,var(--xc-surface));
 --xc-v1-rule:color-mix(in srgb,var(--xc-border) 75%,var(--xc-surface));
 min-width:0;
}
.xc-text-flow .xc-topbar{margin:0 0 24px;gap:24px;align-items:center}
.xc-text-flow .xc-topbar h2{font-size:22px;line-height:1.5;letter-spacing:.01em;white-space:nowrap}
.xc-text-flow .xc-topbar nav{gap:4px;align-items:center;margin-top:0}
.xc-text-flow .xc-topbar nav button{
 min-height:40px;padding:8px 13px;border-color:transparent;background:transparent;
 box-shadow:none;color:var(--xc-muted);font-size:14px;line-height:1.5;
}
.xc-text-flow .xc-topbar nav button[aria-current="page"]{
 color:var(--xc-accent);background:var(--xc-v1-soft);border-color:var(--xc-border);outline:0;font-weight:600;
}
.xc-text-flow .xc-topbar nav button:focus-visible{outline:2px solid var(--xc-accent);outline-offset:2px}
.xc-text-flow>.xc-body{padding:32px clamp(24px,3vw,48px);border-radius:var(--xc-v1-radius);min-width:0}
.xc-text-flow .xc-body>.xc-v1-home,.xc-text-flow .xc-v1-form{width:100%;max-width:var(--xc-v1-form-width);margin-inline:auto}
.xc-text-flow .xc-v1-page-head{
 display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px;
}
.xc-text-flow .xc-v1-page-head>div:first-child{min-width:0;flex:1}
.xc-text-flow .xc-v1-page-head h3,.xc-text-flow .xc-v1-home>.xc-section-head h3{
 margin:0 0 8px;font-size:clamp(24px,1.7vw,28px);line-height:1.45;font-weight:600;overflow-wrap:anywhere;
}
.xc-text-flow .xc-v1-page-head p{margin:8px 0 0;line-height:1.7;color:var(--xc-muted)}
.xc-text-flow .xc-v1-save-state,.xc-text-flow .xc-v1-draft-status{font-size:13px;line-height:1.6;color:var(--xc-muted);overflow-wrap:anywhere}
.xc-text-flow .xc-v1-save-state{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap}
.xc-text-flow .xc-v1-target{
 border:1px solid var(--xc-border);border-radius:8px;padding:12px 16px;margin:0 0 20px;
 background:var(--xc-v1-soft);font-size:14px;line-height:1.7;overflow-wrap:anywhere;
}
.xc-text-flow .xc-v1-target strong{font-weight:600}
.xc-text-flow .xc-v1-submit-note{font-size:13px;line-height:1.7;color:var(--xc-muted);margin:12px 0 0;overflow-wrap:anywhere}
.xc-text-flow .xc-v1-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0 16px}
.xc-text-flow .xc-v1-entry{
 display:flex;flex-direction:column;justify-content:center;align-items:flex-start;gap:10px;
 width:100%;min-width:0;min-height:146px;padding:24px;text-align:left;color:inherit;
 background:var(--xc-surface);border:1px solid var(--xc-border);border-radius:10px;line-height:1.65;
}
.xc-text-flow .xc-v1-entry strong{font-size:18px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.xc-text-flow .xc-v1-entry span,.xc-text-flow .xc-v1-entry small{font-size:14px;color:var(--xc-muted);overflow-wrap:anywhere}
.xc-text-flow .xc-v1-entry:hover{border-color:var(--xc-accent)}
.xc-text-flow .xc-v1-entry.is-selected,.xc-text-flow .xc-v1-entry[aria-pressed="true"]{
 border-color:var(--xc-accent);outline:1px solid var(--xc-accent);background:var(--xc-v1-soft);
}
.xc-text-flow .xc-v1-entry:focus-visible{outline:2px solid var(--xc-accent);outline-offset:3px}
.xc-text-flow .xc-v1-home-start{display:flex;justify-content:flex-end;gap:12px;margin-bottom:32px}
.xc-text-flow .xc-v1-home-start>.primary{min-width:176px}
.xc-text-flow .xc-v1-recents{padding-top:24px;margin-top:8px;border-top:1px solid var(--xc-v1-rule)}
.xc-text-flow .xc-v1-recents h3{font-size:17px;margin-bottom:16px}
.xc-text-flow .xc-v1-record{
 display:flex;align-items:center;justify-content:space-between;gap:16px;
 padding:16px 18px;margin:0 0 10px;background:var(--xc-surface);
 border:1px solid var(--xc-border);border-radius:9px;min-width:0;
}
.xc-text-flow .xc-v1-record>div:first-child{min-width:0;flex:1}
.xc-text-flow .xc-v1-record strong{display:block;font-size:15px;font-weight:600;line-height:1.65;overflow-wrap:anywhere}
.xc-text-flow .xc-v1-record p{margin:6px 0 0;line-height:1.65}
.xc-text-flow .xc-v1-record-meta{display:flex;gap:4px 12px;flex-wrap:wrap;font-size:13px;line-height:1.7;color:var(--xc-muted);margin-top:5px;overflow-wrap:anywhere}
.xc-text-flow .xc-v1-record>.xc-actions{flex:none;align-items:center}
.xc-text-flow .xc-v1-recents .xc-v1-record{padding:13px 16px}
.xc-text-flow .xc-v1-form .xc-field{margin-bottom:24px;gap:8px}
.xc-text-flow .xc-v1-form .xc-field>span{font-size:16px;font-weight:500;line-height:1.6}
.xc-text-flow .xc-v1-form input:not([type=file]),.xc-text-flow .xc-v1-form select,.xc-text-flow .xc-v1-form textarea{font-size:16px;line-height:1.75;padding:11px 13px}
.xc-text-flow .xc-v1-form textarea{min-height:96px}
.xc-text-flow .xc-v1-form-section{margin:0 0 24px;padding:0;min-width:0}
.xc-text-flow .xc-v1-form-section+.xc-v1-form-section{padding-top:20px;border-top:1px solid var(--xc-v1-rule)}
.xc-text-flow .xc-v1-form-section>h4{margin:0 0 12px;font-size:16px;line-height:1.6;font-weight:600}
.xc-text-flow .xc-v1-form-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.xc-text-flow .xc-v1-form-heading h3,.xc-text-flow .xc-v1-form-heading strong{margin:0;font-size:16px;font-weight:600}
.xc-text-flow .xc-v1-form-heading p,.xc-text-flow .xc-v1-form-section>p{font-size:14px;line-height:1.75;color:var(--xc-muted)}
.xc-text-flow .xc-v1-types{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 24px}
.xc-text-flow .xc-v1-types .xc-field{width:min(360px,100%);margin-bottom:0}
.xc-text-flow .xc-v1-types button{min-height:42px;padding:9px 16px;background:var(--xc-surface);color:inherit;border:1px solid var(--xc-border);border-radius:8px}
.xc-text-flow .xc-v1-types .is-selected,.xc-text-flow .xc-v1-types button[aria-pressed="true"],.xc-text-flow .xc-v1-types button[aria-selected="true"]{background:var(--xc-v1-soft);color:var(--xc-accent);border-color:var(--xc-accent);outline:0}
.xc-text-flow .xc-v1-accounts{display:block}
.xc-text-flow .xc-v1-account-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px 24px;align-items:start}
.xc-text-flow .xc-v1-account-fields>div{min-width:0}
.xc-text-flow .xc-v1-accounts .xc-field{margin-bottom:10px}
.xc-text-flow .xc-v1-accounts .xc-two{grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:end}
.xc-text-flow .xc-v1-accounts .xc-two>.xc-field{margin-bottom:0}
.xc-text-flow .xc-v1-accounts .xc-inline-create{margin:0;align-self:end;padding-bottom:0}
.xc-text-flow .xc-v1-accounts .xc-inline-create>button{min-height:50px;white-space:nowrap}
.xc-text-flow .xc-v1-account-fields>div>p{margin:8px 0 0;font-size:13px;line-height:1.65;color:var(--xc-muted)}
.xc-text-flow .xc-v1-account-fields>div>button{display:inline-flex;width:auto;min-height:34px;padding:4px 0;border-color:transparent;background:transparent;color:var(--xc-accent);font-size:13px;line-height:1.65}
.xc-text-flow .xc-v1-form details:not(.xc-v1-more){margin-top:16px;padding-top:16px;border-top:1px solid var(--xc-v1-rule)}
.xc-text-flow .xc-v1-form details>summary{font-size:14px;line-height:1.7;color:var(--xc-accent);margin-bottom:16px}
.xc-text-flow .xc-v1-form details .xc-flow-options{padding:16px}
.xc-text-flow .xc-v1-writing,.xc-text-flow .xc-v1-publication{width:100%;max-width:var(--xc-v1-article-width);margin-inline:auto;min-width:0}
.xc-text-flow .xc-v1-writing .xc-field>span,.xc-text-flow .xc-v1-publication .xc-field>span{font-size:15px;font-weight:500;line-height:1.6}
.xc-text-flow .xc-v1-writing textarea[data-xc-field="content.body"]{
 width:100%;height:auto;min-height:360px;max-height:none;overflow:hidden;resize:none;
 padding:20px 22px;font-size:18px;line-height:1.9;letter-spacing:.015em;scroll-margin-top:24px;
}
.xc-text-flow .xc-v1-writing input[data-xc-field="content.title"]{font-size:15px;line-height:1.7;padding:8px 11px}
.xc-text-flow .xc-v1-writing .xc-field:focus-within>span,.xc-text-flow .xc-v1-publication .xc-field:focus-within>span{color:var(--xc-accent)}
.xc-text-flow .xc-v1-writing textarea[data-xc-field="content.body"]:focus-visible{outline:2px solid var(--xc-accent);outline-offset:3px}
.xc-text-flow .xc-v1-toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:0 0 16px;margin-bottom:20px;border-bottom:1px solid var(--xc-v1-rule)}
.xc-text-flow .xc-v1-toolbar button,.xc-text-flow .xc-v1-toolbar summary{min-height:40px;padding:8px 13px;font-size:14px;line-height:1.6}
.xc-text-flow .xc-v1-toolbar .xc-v1-more{margin:0!important}
.xc-text-flow .xc-v1-more{position:relative;margin:0!important;min-width:0}
.xc-text-flow .xc-v1-more>summary{display:inline-flex;align-items:center;min-height:40px;padding:8px 12px;margin:0!important;border:1px solid var(--xc-border);border-radius:8px;background:var(--xc-surface);font-size:14px;line-height:1.6;list-style:revert}
.xc-text-flow .xc-v1-more>summary:focus-visible{outline:2px solid var(--xc-accent);outline-offset:3px}
.xc-text-flow .xc-v1-more[open]{padding-bottom:0}
.xc-text-flow .xc-v1-more[open]>div,.xc-text-flow .xc-v1-more[open]>.xc-actions{
 position:absolute;inset-inline-end:0;top:calc(100% + 6px);z-index:6;
 display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:208px;max-width:min(320px,calc(100vw - 48px));
 padding:8px;border:1px solid var(--xc-border);border-radius:9px;background:var(--xc-surface);box-shadow:0 10px 28px color-mix(in srgb,var(--xc-muted) 14%,transparent);
}
.xc-text-flow .xc-v1-more[open]>button{display:block;width:100%;margin-top:6px;white-space:normal;text-align:start}
.xc-text-flow .xc-v1-more[open]>div>button,.xc-text-flow .xc-v1-more[open]>.xc-actions>button{justify-content:flex-start;text-align:start;width:100%;margin:0;min-height:40px}
.xc-text-flow .xc-v1-field-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px;flex-wrap:wrap}
.xc-text-flow .xc-v1-field-tools>strong,.xc-text-flow .xc-v1-field-tools>label,.xc-text-flow .xc-v1-field-tools>span{font-size:16px;font-weight:500;line-height:1.6}
.xc-text-flow .xc-v1-field-tools .xc-actions{gap:6px}
.xc-text-flow .xc-v1-field-tools button,.xc-text-flow .xc-v1-field-tools summary{font-size:13px;min-height:36px;padding:6px 10px}
.xc-text-flow .xc-v1-publication .xc-field{margin-bottom:24px;gap:8px}
.xc-text-flow .xc-v1-publication input,.xc-text-flow .xc-v1-publication textarea{font-size:16px;line-height:1.85}
.xc-text-flow .xc-v1-publication textarea[data-xc-field="content.publishBody"]{min-height:280px;max-height:none;resize:vertical}
.xc-text-flow .xc-v1-publication details{margin:20px 0;padding-top:14px;border-top:1px solid var(--xc-v1-rule)}
.xc-text-flow .xc-v1-publication details>summary{font-size:14px;line-height:1.7;margin-bottom:12px}
.xc-text-flow .xc-v1-copy-preview{
 margin:16px 0 24px;padding:20px 22px;white-space:pre-wrap;overflow-wrap:anywhere;
 max-height:none;overflow:visible;background:var(--xc-input);border:1px solid var(--xc-border);border-radius:9px;
 font:inherit;font-size:16px;line-height:1.85;
}
.xc-text-flow .xc-v1-copy-preview textarea{margin:0;min-height:240px;width:100%;font-size:16px;line-height:1.85}
.xc-text-flow .xc-v1-copy-fallback{padding:16px;border:1px solid var(--xc-accent);border-radius:9px;margin:16px 0;background:var(--xc-v1-soft)}
.xc-text-flow .xc-v1-copy-fallback p{margin:0 0 10px;line-height:1.75}
.xc-text-flow .xc-v1-copy-fallback textarea{font-size:16px;line-height:1.8;min-height:220px;white-space:pre-wrap}
.xc-text-flow .xc-v1-footer{
 position:sticky;bottom:0;z-index:3;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
 padding:18px 0 8px;margin-top:28px;border-top:1px solid var(--xc-v1-rule);background:var(--xc-surface);
}
.xc-text-flow .xc-v1-footer>.xc-actions{justify-content:flex-end;gap:10px}
.xc-text-flow .xc-v1-footer button,.xc-text-flow .xc-v1-home-start>button{min-height:44px;padding:10px 18px;line-height:1.6}
.xc-text-flow .xc-v1-footer .primary{min-width:168px}
.xc-text-flow .xc-v1-list-tabs,.xc-text-flow .xc-v1-subnav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px;padding-bottom:12px;border-bottom:1px solid var(--xc-v1-rule)}
.xc-text-flow .xc-v1-list-tabs button,.xc-text-flow .xc-v1-subnav button{padding:8px 14px;min-height:40px;border-color:transparent;background:transparent;color:var(--xc-muted);line-height:1.6}
.xc-text-flow .xc-v1-list-tabs button[aria-current="page"],.xc-text-flow .xc-v1-list-tabs button[aria-selected="true"],.xc-text-flow .xc-v1-list-tabs .is-current,.xc-text-flow .xc-v1-subnav button[aria-current="page"],.xc-text-flow .xc-v1-subnav .is-current{outline:0;border-color:var(--xc-border);color:var(--xc-accent);background:var(--xc-v1-soft);font-weight:600}
.xc-text-flow .xc-v1-empty{padding:32px 24px;border:1px dashed var(--xc-border);border-radius:10px;text-align:center;color:var(--xc-muted);line-height:1.8;background:var(--xc-surface)}
.xc-text-flow .xc-v1-empty p{margin:0 0 12px}
.xc-text-flow .xc-v1-detail{width:100%;max-width:1160px;margin-inline:auto;min-width:0}
.xc-text-flow .xc-v1-detail .xc-caption,.xc-text-flow .xc-v1-detail .xc-json{max-height:none;overflow:visible;line-height:1.8}
.xc-text-flow .xc-v1-detail .xc-compare{align-items:start;gap:24px}
.xc-text-flow .xc-v1-detail .xc-compare pre{max-height:none;overflow:visible;margin-top:0;line-height:1.85}
.xc-text-flow .xc-v1-detail .xc-section-head{gap:16px;align-items:flex-start;flex-wrap:wrap}
.xc-text-flow .xc-v1-detail img{max-width:100%;height:auto;object-fit:contain}
.xc-text-flow .xc-drawer{width:min(640px,94vw);padding:24px;background:var(--xc-surface)}
.xc-text-flow .xc-drawer>.xc-section-head{padding-bottom:16px;margin-bottom:24px;border-bottom:1px solid var(--xc-v1-rule);align-items:flex-start}
.xc-text-flow .xc-drawer>.xc-section-head h3{font-size:19px;line-height:1.5}
.xc-text-flow .xc-drawer>.xc-section-head button{flex:none;min-height:40px}
.xc-text-flow .xc-drawer .xc-field{margin-bottom:24px}
.xc-text-flow .xc-drawer .xc-field>span{font-size:15px;line-height:1.6}
.xc-text-flow .xc-drawer input,.xc-text-flow .xc-drawer select,.xc-text-flow .xc-drawer textarea{font-size:16px;line-height:1.75}
.xc-text-flow .xc-drawer.xc-drawer-wide{width:min(1320px,calc(100vw - 64px));border-radius:12px;padding:28px}
.xc-text-flow .xc-drawer-backdrop.xc-drawer-wide{justify-content:center;align-items:center;padding:24px}
.xc-text-flow .xc-drawer-backdrop.xc-drawer-wide>.xc-drawer{width:min(1320px,100%);height:100%;max-height:calc(100vh - 48px);border-radius:12px}
.xc-text-flow .xc-drawer.xc-drawer-wide .xc-compare pre{max-height:none;overflow:visible;line-height:1.85}
.xc-text-flow .xc-v1-form .xc-file,.xc-text-flow .xc-v1-detail .xc-file{padding:16px;margin:16px 0;border-radius:9px}
.xc-text-flow .xc-v1-form .xc-collection-item,.xc-text-flow .xc-v1-detail .xc-collection-item{gap:12px;margin:12px 0;border-radius:9px}
.xc-text-flow .xc-v1-form .xc-collection-item>span,.xc-text-flow .xc-v1-detail .xc-collection-item>span{min-width:0;overflow-wrap:anywhere}
.xc-text-flow .xc-v1-form .xc-text-count,.xc-text-flow .xc-v1-publication .xc-text-count{font-size:13px;line-height:1.7;margin:-16px 0 20px}
.xc-text-flow .xc-v1-detail .xc-collector-install{line-height:1.85}
.xc-text-flow .xc-v1-detail .xc-collected-image img{max-height:none}
.xc-text-flow .xc-v1-detail .xc-flow-source-grid{gap:18px}
.xc-text-flow .xc-v1-detail .xc-flow-source-grid>.panel{padding:20px}
.xc-text-flow .xc-v1-detail .xc-flow-work{gap:20px;align-items:center}
.xc-text-flow .xc-v1-detail .xc-flow-work>.xc-actions{align-items:center}
.xc-text-flow .xc-v1-detail .xc-flow-context{font-size:14px;background:var(--xc-v1-soft);margin-bottom:24px}
.xc-text-flow .xc-v1-writing .xc-flow-task,.xc-text-flow .xc-v1-publication .xc-flow-task{padding:12px 16px;font-size:14px;line-height:1.7}
.xc-text-flow .xc-v1-writing .xc-warning,.xc-text-flow .xc-v1-publication .xc-warning,.xc-text-flow .xc-v1-form .xc-warning{font-size:14px;line-height:1.75;overflow-wrap:anywhere}
.xc-text-flow .xc-v1-writing .xc-breadcrumb,.xc-text-flow .xc-v1-publication .xc-breadcrumb,.xc-text-flow .xc-v1-form .xc-breadcrumb{font-size:13px;line-height:1.7;margin-bottom:16px}
.xc-text-flow .xc-v1-writing .xc-text-count{font-size:13px;line-height:1.7}
.xc-text-flow .xc-v1-writing .xc-flow-steps,.xc-text-flow .xc-v1-publication .xc-flow-steps,.xc-text-flow .xc-v1-form .xc-flow-steps{gap:8px;margin-bottom:24px;padding-bottom:12px}
.xc-text-flow .xc-v1-writing .xc-flow-steps span,.xc-text-flow .xc-v1-publication .xc-flow-steps span,.xc-text-flow .xc-v1-form .xc-flow-steps span{font-size:13px;padding:6px 10px}
@media(max-width:1280px){
 .xc-text-flow>.xc-body{padding:28px}
 .xc-text-flow .xc-topbar{gap:16px;align-items:flex-start}
 .xc-text-flow .xc-v1-entry{padding:20px;min-height:136px}
 .xc-text-flow .xc-v1-record{padding:14px 16px}
}
@media(max-width:1150px){
 .xc-text-flow .xc-topbar{display:flex}
 .xc-text-flow .xc-topbar nav{margin-top:0}
}
@media(max-width:1024px){
 .xc-text-flow>.xc-body{padding:24px}
 .xc-text-flow .xc-topbar{display:block}
 .xc-text-flow .xc-topbar nav{margin-top:14px}
 .xc-text-flow .xc-v1-entry-grid{gap:12px}
 .xc-text-flow .xc-v1-entry{padding:18px;min-height:128px}
 .xc-text-flow .xc-v1-entry strong{font-size:17px}
 .xc-text-flow .xc-v1-toolbar{gap:6px}
 .xc-text-flow .xc-v1-toolbar button,.xc-text-flow .xc-v1-toolbar summary{padding:8px 11px}
 .xc-text-flow .xc-drawer.xc-drawer-wide{width:calc(100vw - 32px);padding:24px}
}
@media(max-width:1000px){
 .xc-text-flow .xc-v1-footer{position:static}
 .xc-text-flow .xc-v1-more[open]>div,.xc-text-flow .xc-v1-more[open]>.xc-actions{position:static;top:auto;margin-top:8px;box-shadow:none}
 .xc-text-flow .xc-v1-writing textarea[data-xc-field="content.body"]{font-size:17px;padding:18px;min-height:340px}
}
@media(max-width:760px){
 .xc-text-flow>.xc-body{padding:20px}
 .xc-text-flow .xc-v1-entry-grid{grid-template-columns:1fr;gap:10px}
 .xc-text-flow .xc-v1-entry{min-height:104px;padding:18px 20px;gap:6px}
 .xc-text-flow .xc-v1-home-start{margin-top:18px;margin-bottom:28px}
 .xc-text-flow .xc-v1-record{align-items:flex-start;flex-wrap:wrap;gap:12px}
 .xc-text-flow .xc-v1-record>.xc-actions{justify-content:flex-end;margin-inline-start:auto}
 .xc-text-flow .xc-v1-account-fields{grid-template-columns:1fr;gap:18px}
 .xc-text-flow .xc-v1-detail .xc-compare{grid-template-columns:1fr;gap:16px}
 .xc-text-flow .xc-v1-page-head{gap:12px;margin-bottom:20px}
 .xc-text-flow .xc-v1-form-section{margin-bottom:20px}
 .xc-text-flow .xc-v1-form-section+.xc-v1-form-section{padding-top:18px}
 .xc-text-flow .xc-v1-footer{gap:12px;padding-top:16px;margin-top:24px}
 .xc-text-flow .xc-v1-footer>.xc-actions{gap:8px}
 .xc-text-flow .xc-v1-publication textarea[data-xc-field="content.publishBody"]{min-height:250px}
 .xc-text-flow .xc-v1-copy-preview{padding:16px 18px}
 .xc-text-flow .xc-drawer-backdrop.xc-drawer-wide{padding:0}
 .xc-text-flow .xc-drawer-backdrop.xc-drawer-wide>.xc-drawer,.xc-text-flow .xc-drawer.xc-drawer-wide{width:100vw;max-height:100vh;border-radius:0}
}
@media(max-width:600px){
 .xc-text-flow>.xc-body{padding:18px 16px}
 .xc-text-flow .xc-topbar{margin-bottom:18px}
 .xc-text-flow .xc-topbar h2{font-size:20px}
 .xc-text-flow .xc-topbar nav{gap:4px;overflow:visible;flex-wrap:wrap}
 .xc-text-flow .xc-topbar nav button{font-size:13px;min-height:40px;padding:8px 10px;white-space:normal}
 .xc-text-flow .xc-v1-page-head h3,.xc-text-flow .xc-v1-home>.xc-section-head h3{font-size:24px}
 .xc-text-flow .xc-v1-home-start>.primary{width:100%;min-width:0}
 .xc-text-flow .xc-v1-types{gap:6px}
 .xc-text-flow .xc-v1-types button{flex:1 1 120px;padding:9px 10px}
 .xc-text-flow .xc-v1-record{padding:14px}
 .xc-text-flow .xc-v1-record-meta{gap:3px 10px}
 .xc-text-flow .xc-v1-toolbar button,.xc-text-flow .xc-v1-toolbar summary{min-height:42px;font-size:13px}
 .xc-text-flow .xc-v1-writing textarea[data-xc-field="content.body"]{font-size:17px;line-height:1.9;padding:16px;min-height:320px}
 .xc-text-flow .xc-v1-footer{align-items:stretch}
 .xc-text-flow .xc-v1-footer>.xc-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}
 .xc-text-flow .xc-v1-footer .primary{flex:1 1 160px;min-width:0}
 .xc-text-flow .xc-v1-field-tools{gap:8px}
 .xc-text-flow .xc-v1-field-tools button,.xc-text-flow .xc-v1-field-tools summary{min-height:40px}
 .xc-text-flow .xc-v1-list-tabs,.xc-text-flow .xc-v1-subnav{gap:4px;margin-bottom:20px}
 .xc-text-flow .xc-v1-list-tabs button,.xc-text-flow .xc-v1-subnav button{font-size:13px;padding:8px 10px}
 .xc-text-flow .xc-v1-empty{padding:26px 18px}
 .xc-text-flow .xc-v1-detail .xc-flow-work{align-items:flex-start;gap:14px}
 .xc-text-flow .xc-v1-detail .xc-flow-work>.xc-actions{width:100%;justify-content:flex-end}
 .xc-text-flow .xc-drawer{width:100vw;border-radius:0;padding:20px}
 .xc-text-flow .xc-drawer>.xc-section-head{margin-bottom:20px}
 .xc-text-flow .xc-drawer>.xc-section-head h3{font-size:18px}
}

/* The shell fixes body height and normally clips screen-main. Keep scrolling on
   the stable parent: repaint replaces xc-workbench, so its scroll would reset. */
.main.screen-main:has(.xc-text-flow){overflow-y:auto;overflow-x:hidden;min-height:0;scrollbar-gutter:stable}
.xc-text-flow .xc-model-text{max-height:none;overflow:visible;white-space:pre-wrap;overflow-wrap:anywhere}
