.sidebar-brand{width:100%;text-align:left;cursor:pointer}
.theme-toggle{display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:20px;padding:8px 11px;font-size:calc(10px * var(--workspace-text-scale, 1));color:#6b7f8c;white-space:nowrap}
.theme-toggle:hover{border-color:var(--gold);color:#927644}
.staff-profile-menu .profile-dropdown{width:280px}
.profile-dropdown .profile-theme-toggle{border:1px solid var(--line);margin:5px 0;border-radius:7px}
.theme-menu-switch{width:31px;height:18px;border:1px solid #aab8bf;border-radius:20px;background:#dbe2e5;margin-left:auto;display:flex;align-items:center;padding:2px}
.theme-menu-switch>span{display:block;width:12px;height:12px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #081f3122;transition:transform .18s}
.profile-theme-toggle[aria-pressed=true] .theme-menu-switch{background:#d3b578;border-color:#d3b578}
.profile-theme-toggle[aria-pressed=true] .theme-menu-switch>span{background:#173346;transform:translateX(12px)}
.profile-dropdown>button:focus-visible{outline:2px solid var(--gold);outline-offset:1px}
.avatar.avatar-animal{background:transparent;overflow:hidden;padding:0;display:inline-flex;align-items:center;justify-content:center}
.animal-portrait{width:100%;height:100%;display:block;flex:none}
.animal-bob{transform-origin:50px 80px;animation:animal-bob 4.5s ease-in-out infinite}
.animal-eyes{transform-origin:50px 53px;animation:animal-blink 6s ease-in-out infinite}
.animal-wave{transform-origin:80px 89px;animation:animal-wave 5s ease-in-out infinite}
.animal-panda .animal-bob,.animal-otter .animal-bob{animation-delay:-1.5s}
.animal-cat .animal-eyes,.animal-koala .animal-eyes{animation-delay:-2s}
.avatar.small :is(.animal-bob,.animal-eyes,.animal-wave){animation:none}
@keyframes animal-bob{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-2px) rotate(1deg)}}
@keyframes animal-blink{0%,42%,46%,100%{transform:scaleY(1)}44%{transform:scaleY(.12)}}
@keyframes animal-wave{0%,65%,100%{transform:rotate(0)}70%,80%{transform:rotate(13deg)}75%,85%{transform:rotate(-8deg)}}
.animal-avatar-picker{border:0;padding:0;margin:0 0 25px;min-width:0}
.animal-avatar-picker legend{font-size:calc(14px * var(--workspace-text-scale, 1));font-weight:500;margin-bottom:5px}
.animal-avatar-picker>.field-help{margin:0 0 16px;font-size:calc(10px * var(--workspace-text-scale, 1))}
.animal-avatar-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.dialog-body form .animal-avatar-option{position:relative;margin:0;display:block;cursor:pointer}
.animal-avatar-option input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.animal-avatar-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:14px 5px 12px;border:1px solid var(--line);border-radius:9px;background:#f7f9f7;transition:border-color .15s,background .15s;text-align:center;height:100%}
.animal-avatar-choice>.avatar{width:60px;height:60px;border:2px solid #fff;box-shadow:0 2px 7px #12273715}
.animal-avatar-choice strong{font-size:calc(11px * var(--workspace-text-scale, 1));font-weight:500;color:var(--ink)}
.animal-avatar-choice small{font-size:calc(8px * var(--workspace-text-scale, 1));color:var(--muted);line-height:1.6}
.animal-avatar-option input:checked+.animal-avatar-choice{border-color:#ab8c4c;background:#f6efd9;box-shadow:inset 0 0 0 1px #ab8c4c}
.animal-avatar-option input:focus-visible+.animal-avatar-choice{outline:2px solid var(--gold);outline-offset:3px}
.animal-avatar-option:hover .animal-avatar-choice{border-color:#bca371}
.animal-avatar-picker:disabled .animal-avatar-option{cursor:default}
#profile-avatar-preview{display:inline-flex;flex:none}
.tab-loading{display:flex;align-items:center;gap:10px;padding:32px;font-size:calc(12px * var(--workspace-text-scale, 1));color:var(--muted)}
.journey-bucket>header{position:relative}
.journey-bucket>header:after{content:'';position:absolute;left:10px;right:10px;bottom:3px;height:1px;background:linear-gradient(90deg,#c5b184,#dde5e8);pointer-events:none}
html[data-workspace-theme=dark] .journey-bucket>header:after{background:linear-gradient(90deg,#a58e60,#395269)}
.table-search:has(.user-filter-grid){flex-wrap:wrap}
.user-filter-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px;width:100%;padding:17px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
.user-filter{display:flex;flex-direction:column;gap:6px;font-size:calc(10px * var(--workspace-text-scale, 1));color:var(--muted)}
.user-filter select{font-size:calc(11px * var(--workspace-text-scale, 1));padding:9px;min-height:39px}
.paired-flow-editor{--flow-card:var(--surface);position:relative}
.flow-editor-guide{display:flex;align-items:center;gap:13px;border:1px solid #d9cfb6;background:#f9f5e9;padding:16px 20px;border-radius:8px;margin-bottom:22px;color:#75623b;font-size:calc(11px * var(--workspace-text-scale, 1))}
.flow-editor-guide>span{display:grid;place-items:center;width:33px;height:33px;flex:none;border-radius:8px;background:#ece3cb}
.paired-flow-headings,.paired-flow-row,.paired-flow-add{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.paired-flow-headings{position:sticky;top:82px;z-index:7;background:var(--bg);padding:12px 0 18px}
.paired-flow-headings>div{display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #b9a16a;padding:12px 16px 16px}
.paired-flow-headings h2{font-family:WGEditorial,Georgia,serif;font-size:calc(30px * var(--workspace-text-scale, 1));font-weight:400}
.paired-flow-headings span{font-size:calc(11px * var(--workspace-text-scale, 1));color:var(--muted)}
.paired-flow-rows{display:flex;flex-direction:column;gap:22px}
.paired-flow-step{background:var(--flow-card);border:1px solid var(--line);border-radius:11px;padding:23px;min-width:0;box-shadow:0 3px 12px #081f3104;display:flex;flex-direction:column;gap:15px}
.paired-flow-step>header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:2px}
.paired-flow-step>header{background:#e8f1f6;border-color:#c4d8e4;border-radius:7px;padding:13px 14px}
.paired-flow-step>header h3{color:#164664}
.paired-flow-step>header .overline{font-size:calc(8px * var(--workspace-text-scale, 1));letter-spacing:.1em;color:var(--muted)}
.paired-flow-step>header .overline,.paired-flow-step>header h3 small{color:#3c6176}
.paired-flow-step h3{font-size:calc(18px * var(--workspace-text-scale, 1));margin-top:4px;font-weight:500}
.paired-flow-step h3 small{font-size:calc(10px * var(--workspace-text-scale, 1));color:var(--muted);font-weight:400}
.paired-flow-step>label{display:flex;flex-direction:column;gap:8px;font-size:calc(11px * var(--workspace-text-scale, 1))}
.paired-flow-step>label.checkbox-label{margin:0;padding:13px;border:1px solid var(--line);background:#f8f9f7;border-radius:6px;color:#4b6271}
.paired-flow-step textarea{min-height:156px;resize:vertical;font-size:calc(12px * var(--workspace-text-scale, 1))}
.paired-flow-step input{font-size:calc(12px * var(--workspace-text-scale, 1))}
.flow-step-tools{display:flex;align-items:center;gap:5px}
.flow-step-tools .icon-button{border:1px solid var(--line);font-size:calc(16px * var(--workspace-text-scale, 1))}
.paired-flow-step>footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:auto;padding-top:4px}
.paired-flow-step>footer .text-button{font-size:calc(10px * var(--workspace-text-scale, 1))}
.flow-duplicate{font-size:calc(10px * var(--workspace-text-scale, 1));gap:7px;padding:10px}
.paired-flow-add{margin:22px 0}
.paired-flow-add button{border-style:dashed;padding:15px}
.flow-step-placeholder{border:1px dashed var(--line);border-radius:11px;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:25px;color:var(--muted);gap:12px;font-size:calc(11px * var(--workspace-text-scale, 1));background:#eef2f3}
.flow-step-placeholder span{font-size:calc(10px * var(--workspace-text-scale, 1));text-transform:uppercase;letter-spacing:.08em}
.flow-save-bar{position:sticky;bottom:12px;z-index:8;background:#102c3f;color:#e9edf0;box-shadow:0 8px 32px #081f3128;border:1px solid #315064;border-radius:10px;display:flex;align-items:center;justify-content:flex-end;gap:13px;padding:18px;margin-top:24px}
.flow-save-bar>p{margin-right:auto;font-size:calc(11px * var(--workspace-text-scale, 1));max-width:550px;line-height:1.8;color:#c6d3dc}
.flow-save-bar .crm-btn.primary{background:#d7c08b;color:#132e40;border-color:#d7c08b;flex:none}
.flow-save-bar .crm-btn.secondary{background:transparent;border-color:#7d99aa;color:#edf2f5;flex:none}
#flow-save-area{position:sticky;bottom:12px;z-index:8;margin-top:24px}
#flow-save-area:empty{display:none}
#flow-save-area>.flow-save-bar{position:static;margin-top:0}
.flow-review-queue{margin-bottom:23px}
.flow-review-queue h2{font-size:calc(18px * var(--workspace-text-scale, 1))}
.flow-review-queue>div>p{font-size:calc(11px * var(--workspace-text-scale, 1));margin-top:5px}
.flow-review-queue article{display:flex;align-items:center;gap:15px;padding:15px 0;border-top:1px solid var(--line);margin-top:15px}
.flow-review-queue article>div{flex:1}
.flow-review-queue article strong{font-size:calc(12px * var(--workspace-text-scale, 1))}
.flow-review-queue article small{display:block;font-size:calc(10px * var(--workspace-text-scale, 1));color:var(--muted);margin-top:5px}
.flow-review-queue article button{font-size:calc(11px * var(--workspace-text-scale, 1))}
.flow-review-banner{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;background:#f8f1df;border:1px solid #d9bd80;border-radius:9px;margin-bottom:18px;font-size:calc(12px * var(--workspace-text-scale, 1))}
.flow-review-banner p{font-size:calc(11px * var(--workspace-text-scale, 1));margin-top:7px;line-height:1.8}
.flow-review-banner>button{flex:none}
.flow-step-changed{border-color:#b49757;box-shadow:inset 3px 0 #b49757}
.flow-comparison{padding:12px;border:1px solid var(--line);border-radius:6px;font-size:calc(11px * var(--workspace-text-scale, 1))}
.flow-comparison summary{cursor:pointer;color:#92733b}
.flow-comparison strong,.flow-comparison p{display:block;margin-top:10px;white-space:pre-wrap}
.flow-comparison small{display:block;margin-top:9px;color:var(--muted)}

html[data-workspace-theme=dark]{color-scheme:dark;--ink:#e4ecf2;--muted:#a9b9c8;--line:#304557;--bg:#091925;--surface:#122737;--surface2:#1a3245;--gold:#d8bb7c;--goldlight:#ecd9ae;--red:#fb888e;--green:#7bd1ad;--field:#102333}
html[data-workspace-theme=dark] body{background:var(--bg);color:var(--ink)}
html[data-workspace-theme=dark] :is(input,textarea,select){background:var(--field);border-color:#41596b;color:#edf2f6}
html[data-workspace-theme=dark] :is(input,textarea)::placeholder{color:#93a7b8;opacity:1}
html[data-workspace-theme=dark] input[type=checkbox]{accent-color:#d8bb7c}
html[data-workspace-theme=dark] :is(h1,h2,h3,h4){color:#f1f1e8}
html[data-workspace-theme=dark] :is(.crm-topbar,.panel,.table-wrap,.crm-dialog,.case-card,.inbox-layout,.thread-panel,.journey-bucket,.journey-board-toolbar .search-box,.journey-board-toolbar>.icon-button){background:var(--surface);border-color:var(--line)}
html[data-workspace-theme=dark] .crm-sidebar{background:linear-gradient(170deg,#061521,#0b2030);border-right:1px solid #233b4e}
html[data-workspace-theme=dark] .crm-topbar{background:#102535f5;backdrop-filter:blur(12px)}
html[data-workspace-theme=dark] :is(.profile-name,.workspace-title,.profile-button,.theme-toggle,.notification-button,.icon-button,.crm-table td,.message>div,.thread-head p,.compact-label,.checkbox-label){color:#bdcbd7}
html[data-workspace-theme=dark] :is(.muted,.field-help,.optional,.crm-table td small,.crm-table th,.toolbar-help,.case-email,.coordinator,.case-time,.case-created,.access-caption,.inbox-item small,.inbox-item p,.thread-messages .message small,.journey-bucket-empty,.journey-bucket header p,.journey-client-open small,.journey-board-footer,.journey-board-divider>p){color:#a8b9c8}
html[data-workspace-theme=dark] :is(.crm-table td strong,.case-card h3,.empty-state h3,.journey-client-open strong,.journey-bucket-count>strong,.message strong,.profile-dropdown-user strong){color:#edf2f6}
html[data-workspace-theme=dark] :is(.overline,.text-button,.journey-bucket-all,.journey-board-divider>span,.journey-board-footer button,.audit-action,.visibility-tag,.journey-client-open .journey-profile-mark){color:#e0c58c}
html[data-workspace-theme=dark] :is(.crm-table th,.inbox-queue,.inbox-item,.kanban-column,.flow-step-placeholder,.summary-tiles>div,.stat-row>div,.role-explainer,.payment-reference,.fixed-field){background:#172f41;border-color:var(--line)}
html[data-workspace-theme=dark] :is(.inbox-item.selected,.message,.journey-client-row,.panel.inset,.thread-head,.reply-form,.profile-dropdown){background:#142b3d;border-color:var(--line)}
html[data-workspace-theme=dark] :is(.crm-table td,.dialog-head,.dialog-tabs,.inbox-item,.thread-head,.reply-form,.case-time,.summary-tiles>div,.journey-client-row){border-color:var(--line)}
html[data-workspace-theme=dark] .crm-btn.primary{background:#d8bb7c;border-color:#d8bb7c;color:#102838}
html[data-workspace-theme=dark] .crm-btn.primary:hover{background:#ecd2a0;border-color:#ecd2a0}
html[data-workspace-theme=dark] .crm-btn.secondary{background:#193346;border-color:#4e6575;color:#f0dfb9}
html[data-workspace-theme=dark] .crm-btn.secondary:hover{background:#24455c;border-color:#c4aa70}
html[data-workspace-theme=dark] :is(.role-pill,.avatar,.client-initials,.journey-profile-mark,.journey-bucket-number,.column-count){background:#233d4e;border-color:#4a6070;color:#ead4a4}
html[data-workspace-theme=dark] .avatar{box-shadow:0 0 0 3px #1e3b50}
html[data-workspace-theme=dark] :is(.success-callout,.status-completed){background:#173d35;border-color:#396a59;color:#a1e4c2}
html[data-workspace-theme=dark] .success-callout strong{color:#b3f0d1}
html[data-workspace-theme=dark] :is(.waiting-callout,.status-in_progress,.inbox-filters button.active,.review-note,.flow-review-banner,.flow-editor-guide){background:#343423;border-color:#827047;color:#efdaa5}
html[data-workspace-theme=dark] :is(.waiting-callout p,.review-note p,.flow-review-banner p){color:#e1d3ae}
html[data-workspace-theme=dark] .flow-editor-guide>span{background:#48432c;color:#ead29f}
html[data-workspace-theme=dark] :is(.status-open,.status-awaiting_client,.status-resolved){background:#233e52;color:#c7d8e6}
html[data-workspace-theme=dark] :is(.status-pending_staff,.form-error){background:#492932;border-color:#a35a64;color:#ffbdc2}
html[data-workspace-theme=dark] .danger-text{color:#ffaaa7}
html[data-workspace-theme=dark] .red-badge{background:#d64e5a;color:#fff;border-color:#142b3d}
html[data-workspace-theme=dark] .dialog-head{border-bottom-color:var(--line)}
html[data-workspace-theme=dark] .dialog-tabs button{color:#a8bac9}
html[data-workspace-theme=dark] .dialog-tabs button.active{color:#efd6a1;border-color:#d3b579}
html[data-workspace-theme=dark] .message.own{background:#223d50}
html[data-workspace-theme=dark] :is(.message p,.inbox-item strong,.thread-head h2){color:#ebf1f5}
html[data-workspace-theme=dark] .journey-client-row:hover{background:#1e3c51;border-color:#718477}
html[data-workspace-theme=dark] .journey-bucket-all:hover{background:#1b3548}
html[data-workspace-theme=dark] .onboarding-bucket .journey-bucket-number{background:#29495e;border-color:#4f6a7b;color:#ecd29b}
html[data-workspace-theme=dark] .journey-board-divider:after{background:linear-gradient(90deg,#aa945f,#304557)}
html[data-workspace-theme=dark] .paired-flow-step>label.checkbox-label{background:#193245;color:#d8e2eb}
html[data-workspace-theme=dark] .flow-save-bar{background:#102b3e;border-color:#a28b58}
html[data-workspace-theme=dark] .flow-comparison summary{color:#e4c88e}
html[data-workspace-theme=dark] :is(.invoice-summary,.payment-instructions,.document-guide,.catalog-guide-tooltip p,.onboarding-document-guide,.required-forms-summary){background:#1c3546;border-color:var(--line);color:#c4d2de}
html[data-workspace-theme=dark] .crm-dialog::backdrop{background:#020a13b8;backdrop-filter:blur(4px)}
html[data-workspace-theme=dark] :is(.dialog-body form label,.required-form-options legend,.form-catalog-search,.document-guide-search,.credential-list dd,.task-row strong,.task-row p,.document-guide-group>summary,.document-guide-group h4,.selected-form-guide strong){color:#c6d4df}
html[data-workspace-theme=dark] :is(.credential-list dt,.document-guide-heading p,.document-guide-group article p,.summary-tiles span,.review-document-links small){color:#a9bcca}
html[data-workspace-theme=dark] :is(.profile-access-note,.selected-form-guide,.credential-list code,.preview-list button){background:#1c3546;border-color:var(--line);color:#e5cf9e}
html[data-workspace-theme=dark] :is(.selected-form-guide p,.selected-form-guide small,.required-form-tag){color:#d4dfdc}
html[data-workspace-theme=dark] .required-form-tag{background:#343b2b;border-color:#6a7150}
html[data-workspace-theme=dark] .task-state{background:#233e50;color:#ddc38c;border-color:#4a6172}
html[data-workspace-theme=dark] .task-state.done{background:#1d463b;color:#a0e8c4;border-color:#40775e}
html[data-workspace-theme=dark] .summary-tiles strong{color:#e7cf98}
html[data-workspace-theme=dark] .profile-dropdown>button:hover{background:#28465b;color:#f0d7a3}
html[data-workspace-theme=dark] .profile-dropdown-user{border-color:var(--line)}
html[data-workspace-theme=dark] .animal-avatar-choice{background:#183143;color:#e4edf3}
html[data-workspace-theme=dark] .animal-avatar-option input:checked+.animal-avatar-choice{background:#3b3c2d;border-color:#dfc28b;box-shadow:inset 0 0 0 1px #dfc28b}
html[data-workspace-theme=dark] .animal-avatar-choice>.avatar{border-color:#5d7584;box-shadow:none}
html[data-workspace-theme=dark] .animal-avatar-choice strong{color:#e9f0f5}
/* Match every modal surface to its theme, including the client-view chooser. */
html[data-workspace-theme=dark] :is(.dialog-head,.thread-messages,.assignment-form,.note-list article,.case-ticket-list>button,.file-drop,.submitted-document-packet,.welcome-message,.main-template-row,.journey-grid-pages button){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-workspace-theme=dark] :is(.preview-list strong,.case-ticket-list strong,.note-list p,.profile-summary h3,.profile-summary p,.fixed-field){color:#e4edf3}
html[data-workspace-theme=dark] :is(.preview-list small,.note-list small,.case-ticket-list small,.file-drop p,.file-drop small){color:#b6c6d3}
html[data-workspace-theme=dark] :is(.preview-list button:hover,.case-ticket-list>button:hover){background:#25455b;color:#f3dfb5}
html[data-workspace-theme=dark] :is(.message-attachment,.private-callout,.client-type-badge){background:#263d49;border-color:#506575;color:#e5cf9e}
html[data-workspace-theme=dark] .required-forms-missing{background:#492932;color:#ffbdc2}
html[data-workspace-theme=dark] .approval-step-option{background:#193245;border-color:#496273;color:#e4edf3!important}
html[data-workspace-theme=dark] .paired-flow-step>header{background:#1c3b52;border-color:#436983}
html[data-workspace-theme=dark] .paired-flow-step>header h3{color:#d4eafb}
html[data-workspace-theme=dark] .paired-flow-step>header .overline,html[data-workspace-theme=dark] .paired-flow-step>header h3 small{color:#b9d2e3}
/* Clearer light-theme guidance and navigation text on neutral surfaces. */
html:not([data-workspace-theme=dark]) :is(.muted,.preview-list small,.crm-table th,.crm-table td small,.field-help,.optional,.profile-summary p,.journey-bucket header p,.journey-client-open small,.case-email,.case-time,.coordinator,.case-created,.paired-flow-headings span,.user-filter,.flow-review-queue article small,.animal-avatar-choice small){color:#526a7a}
html:not([data-workspace-theme=dark]) :is(.flow-number,.onboarding-nav>button,.main-nav-steps>button>span,.journey-step>span,.journey-step small){color:#476579}
html:not([data-workspace-theme=dark]) :is(.journey-bucket-number,.journey-bucket h2,.task-state){color:#164664}
html:not([data-workspace-theme=dark]) .onboarding-bucket .journey-bucket-number{color:#f0dcae}
html:not([data-workspace-theme=dark]) .main-nav-steps>button.current>span,html:not([data-workspace-theme=dark]) .onboarding-nav>button.current>span{color:#f0dcae}
/* Client dark mode uses the same readable surfaces throughout both journeys. */
html[data-workspace-theme=dark] .workspace.client-workspace{background:var(--bg)}
html[data-workspace-theme=dark] :is(.guided-progress,.client-progress-panel,.guided-panel,.journey-task,.journey-step,.contract-viewer,.contract-viewer>a){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-workspace-theme=dark] .journey-step.selected{background:#203f54;border-color:#c6ab73}
html[data-workspace-theme=dark] :is(.journey-step strong,.flow-switch strong,.onboarding-nav>button.current,.main-journey-heading h1,.contract-extra-fields label){color:#e4edf3}
html[data-workspace-theme=dark] :is(.journey-step small,.flow-switch small,.flow-progress-value span,.flow-progress-help,.client-journey-footer,.onboarding-nav>button,.client-home-link,.payment-instructions p,.invoice-summary span){color:#b5c7d5}
html[data-workspace-theme=dark] :is(.journey-step>span,.flow-number,.onboarding-nav>button>span,.main-nav-steps>button>span){background:#1b3549;border-color:#506b7e;color:#d4e5f1}
html[data-workspace-theme=dark] :is(.main-nav-steps>button.current>span,.onboarding-nav>button.current>span,.flow-switch.active .flow-number){background:#315b75;border-color:#78a3bf;color:#fff0c7}
html[data-workspace-theme=dark] :is(.main-nav-steps>button.done>span,.onboarding-nav>button.done>span,.journey-step.done>span){background:#1d463b;border-color:#517962;color:#b6edce}
html[data-workspace-theme=dark] :is(.flow-progress-value strong,.guided-progress-top>strong,.main-journey-heading>strong,.invoice-summary small,.contract-viewer>a){color:#e4ca92}
html[data-workspace-theme=dark] :is(.progress-track,.flow-progress-track,.main-nav-track){background:#30495b}
html[data-workspace-theme=dark] .flow-switcher{border-color:var(--line)}
html[data-workspace-theme=dark] .signature-lock{background:#152f41ed;border-color:#617e90;color:#d2e0e9}
html[data-workspace-theme=dark] .signature-lock>svg{color:#e4ca92}
html[data-workspace-theme=dark] .wait-symbol{background:#263d49;border-color:#566d7b;color:#e4ca92}
html[data-workspace-theme=dark] :is(.profile-switcher>button:hover,.profile-switcher>button[aria-current=true]){background:#234256;color:#e6d09e}
html[data-workspace-theme=dark] .profile-switch-icon{background:#233d4e;border-color:#4a6070;color:#ead4a4}
html[data-workspace-theme=dark] .profile-switcher small{color:#b5c7d5}
html:not([data-workspace-theme=dark]) :is(.main-journey-heading>strong,.guided-progress-top>strong,.flow-progress-value strong){color:#164664}
@media(max-width:1200px){.user-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.paired-flow-step{padding:17px}.paired-flow-step>footer{flex-wrap:wrap}.theme-toggle span{display:none}.paired-flow-row,.paired-flow-headings,.paired-flow-add{gap:15px}.flow-save-bar{flex-wrap:wrap}.flow-save-bar>p{flex-basis:100%;max-width:none}}
@media(max-width:750px){.paired-flow-row{grid-template-columns:1fr;gap:10px;border-bottom:1px solid var(--line);padding-bottom:20px}.paired-flow-headings{position:static;top:auto;gap:8px}.paired-flow-headings h2{font-size:calc(23px * var(--workspace-text-scale, 1))}.paired-flow-step textarea{min-height:120px}.paired-flow-step>header .overline{display:block}.user-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.flow-review-queue article{flex-wrap:wrap}.flow-review-banner{align-items:flex-start;flex-direction:column}.flow-save-bar{position:static}.flow-save-bar .crm-btn{flex:1}.flow-review-queue article>div{min-width:200px}.flow-step-placeholder{min-height:100px}.theme-toggle{padding:7px}}
@media(prefers-reduced-motion:reduce){.paired-flow-step,.theme-toggle{transition:none}}
@media(prefers-reduced-motion:reduce){.animal-bob,.animal-eyes,.animal-wave{animation:none!important}.animal-avatar-choice,.theme-menu-switch>span{transition:none}}
@media(max-width:420px){.animal-avatar-options{gap:7px}.animal-avatar-choice>.avatar{width:50px;height:50px}.animal-avatar-choice small{font-size:calc(7px * var(--workspace-text-scale, 1))}}
@media(max-width:750px){#flow-save-area{position:static}}
/* Keep the supplied crest intact, with a bright wordmark on the client dark header. */
html[data-workspace-theme=dark] .client-brand>span{color:#f0dfb6}
html[data-workspace-theme=dark] .client-brand img{background:#f7f3e8;border-radius:50%;box-shadow:0 0 0 1px #cfb67a}

/* Journey authoring keeps tools compact and renders only validated text data. */
.rich-editor-label{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.rich-editor-label>label{font-size:calc(11px * var(--workspace-text-scale, 1));font-weight:500}
.rich-format-toggle{display:inline-flex;align-items:center;gap:6px;font-size:calc(11px * var(--workspace-text-scale, 1));color:#355f7a;border:1px solid var(--line);border-radius:6px;padding:6px 9px;min-height:32px}
.rich-format-toggle[aria-expanded=true]{background:#eaf2f6;border-color:#9eb9c9}
.rich-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:9px;padding:12px;background:#f2f6f8;border:1px solid #c7d7e1;border-radius:8px 8px 0 0}
.rich-toolbar[hidden]{display:none}
.rich-toolbar-group{display:flex;gap:2px;border:1px solid #cad8e0;border-radius:5px;overflow:hidden;background:#fff;min-height:32px}
.rich-toolbar button{font-size:calc(11px * var(--workspace-text-scale, 1));min-width:31px;min-height:32px;padding:5px 8px;color:#23465d}
.rich-toolbar button:hover{background:#dceaf2}
.rich-toolbar button:focus-visible,.rich-format-toggle:focus-visible{outline:2px solid #a78a4e;outline-offset:-2px}
.paired-flow-step .rich-toolbar label{display:flex;flex-direction:column;gap:4px;font-size:calc(9px * var(--workspace-text-scale, 1));color:#526c7d;min-width:0}
.rich-toolbar select{padding:6px 7px;font-size:calc(11px * var(--workspace-text-scale, 1));min-height:32px;border:1px solid #cad8e0;background:#fff;color:#203d51;border-radius:5px}
.rich-toolbar [data-rich-control=font]{width:142px;max-width:100%}
.paired-flow-step .rich-toolbar input[type=color]{width:38px;height:32px;min-height:32px;padding:3px;border:1px solid #cad8e0;cursor:pointer;background:#fff;border-radius:5px}
.rich-editable{display:block;min-height:180px;max-height:580px;overflow:auto;resize:vertical;padding:18px;border:1px solid #bccdd8;border-radius:7px;background:#fff;color:#203748;outline:none;font-size:calc(16px * var(--workspace-text-scale, 1))}
.rich-toolbar:not([hidden])~.rich-editable{border-top:0;border-radius:0 0 7px 7px}
.rich-editable:focus{border-color:#a98d54;box-shadow:0 0 0 2px #bfa26725}
.rich-editable[contenteditable=false]{resize:none;min-height:140px}
.rich-paste-help{font-size:calc(10px * var(--workspace-text-scale, 1));margin-top:8px;line-height:1.6}
.journey-rich-content{display:flow-root;container-type:inline-size;font-size:calc(16px * var(--workspace-text-scale, 1));line-height:1.7;overflow-wrap:anywhere;text-align:left}
.journey-rich-content :is(p,h2,h3,li){white-space:pre-wrap;margin:0 0 12px;font-family:inherit;line-height:inherit;font-size:inherit;color:inherit;letter-spacing:normal;max-width:none}
.journey-rich-content h2{font-size:calc(26px * var(--workspace-text-scale, 1));font-weight:600;line-height:1.4}
.journey-rich-content h3{font-size:calc(21px * var(--workspace-text-scale, 1));font-weight:600;line-height:1.5}
.journey-rich-content strong,.journey-rich-content b{font-weight:700}
.journey-rich-content :is(em,i){font-family:inherit;color:inherit}
.journey-rich-content :is(ul,ol){padding-left:26px;margin:0;list-style-position:outside}
.journey-rich-content ul{list-style-type:disc}
.journey-rich-content ol{list-style-type:decimal}
.journey-rich-content li{padding-left:3px}
.journey-rich-content p:last-child{margin-bottom:0}
.journey-colored-text{color:var(--journey-ink-light)}
html[data-workspace-theme=dark] .journey-colored-text{color:var(--journey-ink-dark)}
.journey-highlighted-text{color:var(--journey-highlight-ink)}
.flow-images{border-top:1px solid var(--line);padding-top:16px}
.flow-images-heading{display:flex;justify-content:space-between;align-items:center;gap:10px}
.flow-images-heading>strong{font-size:calc(12px * var(--workspace-text-scale, 1));font-weight:500}
.flow-images-heading small{font-size:calc(10px * var(--workspace-text-scale, 1));color:var(--muted);font-weight:400;margin-left:5px}
.image-upload-button{position:relative;overflow:hidden;min-height:32px;font-size:calc(10px * var(--workspace-text-scale, 1));cursor:pointer}
.image-upload-button input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%;font-size:calc(30px * var(--workspace-text-scale, 1))}
.image-upload-button:focus-within{outline:2px solid #b1975c;outline-offset:3px}
.flow-images>.field-help{margin-top:12px;font-size:calc(10px * var(--workspace-text-scale, 1));line-height:1.7}
.flow-image-list{display:flex;flex-direction:column;gap:12px;margin-top:14px}
.flow-image-list figure{display:grid;grid-template-columns:104px minmax(0,1fr);gap:13px;border:1px solid var(--line);border-radius:8px;padding:11px;background:var(--bg)}
.flow-image-list img{width:100%;height:100px;object-fit:contain;background:#eff2f3;border-radius:5px}
.flow-image-list label{display:flex;flex-direction:column;gap:5px;font-size:calc(10px * var(--workspace-text-scale, 1));margin:0 0 8px}
.flow-image-list input{min-height:32px;padding:7px;font-size:calc(11px * var(--workspace-text-scale, 1))}
.flow-image-list select{min-height:32px;padding:7px;font-size:calc(11px * var(--workspace-text-scale, 1))}
.flow-image-list .text-button{font-size:calc(10px * var(--workspace-text-scale, 1));margin-top:3px}
.journey-step-gallery{display:grid;gap:20px;margin:24px 0 12px}
.journey-step-gallery img{display:block;width:auto;max-width:100%;max-height:650px;margin:auto;object-fit:contain;border-radius:8px;border:1px solid var(--line)}
.journey-step-gallery figcaption{font-size:calc(12px * var(--workspace-text-scale, 1));line-height:1.7;color:var(--muted);text-align:center;margin-top:10px;white-space:pre-wrap}
.journey-rich-content .journey-inline-image,.journey-step-gallery .journey-inline-image{display:block;clear:both;width:100%;box-sizing:border-box;margin:18px 0;padding:0;line-height:0;white-space:normal}
.journey-rich-content .journey-inline-image img,.journey-step-gallery .journey-inline-image img{display:inline-block;width:auto;height:auto;max-width:100%;max-height:650px;margin:0;object-fit:contain;vertical-align:middle;border:1px solid var(--line);border-radius:8px}
.journey-rich-content .journey-inline-image figcaption,.journey-step-gallery .journey-inline-image figcaption{font:calc(12px * var(--workspace-text-scale, 1))/1.7 WGText,Arial,sans-serif;text-align:inherit;color:var(--muted);margin-top:10px;white-space:pre-wrap}
.rich-editable .journey-inline-image:focus{outline:2px solid #a98d54;outline-offset:4px}
/* Float only placed images. The content root contains the float so it cannot
   overlap the next step or action buttons. Lists keep their markers beside it. */
.journey-rich-content .journey-image-wrap-left{float:left;clear:none;width:33%;margin:0 22px 14px 0}
.journey-rich-content .journey-image-wrap-right{float:right;clear:none;width:33%;margin:0 0 14px 22px}
.journey-rich-content :is(ul,ol){display:flow-root}
@container (max-width:380px){
 .journey-rich-content .journey-image-wrap-left,.journey-rich-content .journey-image-wrap-right{float:none;width:100%;margin:18px 0}
}
.flow-comparison .journey-rich-content{font-size:calc(14px * var(--workspace-text-scale, 1));margin-top:12px}
.flow-comparison .journey-step-gallery img{max-height:180px}
.flow-review-queue>summary,.flow-review-item>summary{display:flex;align-items:center;justify-content:space-between;gap:16px;cursor:pointer;list-style:none}
.flow-review-queue>summary::-webkit-details-marker,.flow-review-item>summary::-webkit-details-marker{display:none}
.flow-review-queue>summary h2{font-size:calc(18px * var(--workspace-text-scale, 1));margin:0}
.flow-review-queue>summary p{font-size:calc(11px * var(--workspace-text-scale, 1));margin-top:6px}
.review-collapse-hint{display:flex;align-items:center;gap:10px;font-size:calc(10px * var(--workspace-text-scale, 1));color:var(--muted)}
.review-chevron{display:inline-block;font-size:calc(19px * var(--workspace-text-scale, 1));line-height:1;transition:transform .15s}
details[open]>.review-chevron,details[open]>summary>.review-chevron,details[open]>summary>.review-collapse-hint>.review-chevron{transform:rotate(180deg)}
.flow-review-items{margin-top:18px;display:grid;gap:10px;max-height:390px;overflow:auto}
.flow-review-item{border:1px solid var(--line);border-radius:7px;background:var(--bg);padding:13px}
.flow-review-item>summary>div{flex:1;min-width:0}
.flow-review-item strong{font-size:calc(12px * var(--workspace-text-scale, 1));font-weight:500;overflow-wrap:anywhere}
.flow-review-item small{display:block;font-size:calc(10px * var(--workspace-text-scale, 1));color:var(--muted);line-height:1.7;margin-top:3px}
.flow-review-item-body{border-top:1px solid var(--line);padding-top:13px;margin-top:13px;display:flex;flex-wrap:wrap;align-items:center;gap:12px;font-size:calc(11px * var(--workspace-text-scale, 1));line-height:1.8}
.flow-review-item-body .crm-btn{margin-left:auto}
.flow-review-queue summary:focus-visible,.flow-review-item summary:focus-visible{outline:2px solid var(--gold);outline-offset:5px}
html[data-workspace-theme=dark] .rich-format-toggle{color:#cae2f2;border-color:#4a687d}
html[data-workspace-theme=dark] .rich-format-toggle[aria-expanded=true]{background:#25455b}
html[data-workspace-theme=dark] .rich-toolbar{background:#193549;border-color:#4b667a}
html[data-workspace-theme=dark] .rich-toolbar label{color:#c4d8e5}
html[data-workspace-theme=dark] .rich-toolbar-group{border-color:#506b7f;background:#203f55}
html[data-workspace-theme=dark] .rich-toolbar button{color:#e4eef5}
html[data-workspace-theme=dark] .rich-toolbar button:hover{background:#345a74}
/* The editing canvas is a white sheet in either theme, preserving pasted inks. */
html[data-workspace-theme=dark] .rich-editable{background:#fff;color:#203748;border-color:#627b8d}
html[data-workspace-theme=dark] .rich-editable :is(p,h2,h3,li){color:inherit}
html[data-workspace-theme=dark] .flow-image-list img{background:#cbd4da}
@media(max-width:750px){.rich-toolbar{gap:7px;padding:10px}.rich-editable{min-height:160px;padding:14px}.flow-image-list figure{grid-template-columns:75px minmax(0,1fr);gap:10px;padding:9px}.flow-image-list img{height:75px}.review-collapse-hint{font-size:0;gap:0}.review-collapse-hint .review-chevron{font-size:calc(19px * var(--workspace-text-scale, 1))}.flow-review-queue>summary h2{font-size:calc(16px * var(--workspace-text-scale, 1))}.journey-rich-content{font-size:calc(15px * var(--workspace-text-scale, 1))}}

.flow-publishing-panel{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:20px;border-color:#d7cba9;background:#faf7ee}
.flow-publishing-panel .overline{font-size:calc(9px * var(--workspace-text-scale, 1));color:#826c3c}
.flow-publishing-panel h2{font-size:calc(17px * var(--workspace-text-scale, 1));font-weight:500;margin:7px 0;color:#173e58}
.flow-publishing-panel p{font-size:calc(11px * var(--workspace-text-scale, 1));line-height:1.8;color:#566e7b}
.flow-publishing-control{display:flex;align-items:center;gap:12px;flex:none}
.flow-publishing-control>span{font-size:calc(10px * var(--workspace-text-scale, 1));color:#5b6c76;white-space:nowrap}
.flow-publishing-toggle{display:flex;align-items:center;flex:none;width:48px;height:28px;padding:3px;border:1px solid #8295a1;border-radius:20px;background:#d2dce2;transition:background .15s}
.flow-publishing-toggle>span{display:block;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #19344938;transition:transform .15s}
.flow-publishing-toggle[aria-checked=true]{background:#ac8a42;border-color:#957538}
.flow-publishing-toggle[aria-checked=true]>span{transform:translateX(19px)}
.flow-publishing-toggle:focus-visible{outline:2px solid #a98b4c;outline-offset:4px}
.flow-publishing-toggle[aria-busy=true]{opacity:.6}
html[data-workspace-theme=dark] .flow-publishing-panel{background:#1c3344;border-color:#6a6046}
html[data-workspace-theme=dark] .flow-publishing-panel h2{color:#e8dfc6}
html[data-workspace-theme=dark] .flow-publishing-panel .overline{color:#e1c58a}
html[data-workspace-theme=dark] .flow-publishing-panel p{color:#b9ccd9}
html[data-workspace-theme=dark] .flow-publishing-control>span{color:#d3dee7}
html[data-workspace-theme=dark] .flow-publishing-toggle{background:#365369;border-color:#8097a8}
html[data-workspace-theme=dark] .flow-publishing-toggle[aria-checked=true]{background:#d0b070;border-color:#d0b070}
html[data-workspace-theme=dark] .flow-publishing-toggle[aria-checked=true]>span{background:#17374d}
@media(max-width:750px){.flow-publishing-panel{align-items:flex-start;flex-direction:column;gap:16px}.flow-publishing-control{width:100%;justify-content:space-between}.flow-publishing-panel h2{font-size:calc(16px * var(--workspace-text-scale, 1))}}

/* Expanded step authoring and the real client panel use the same reading width. */
.journey-step-panel .task-instruction{max-width:none;width:100%}
.flow-step-tools{flex-wrap:wrap;justify-content:flex-end}
.flow-step-view-tool{color:#244e68;background:#f7fbfe;min-width:32px;min-height:32px}
.flow-step-view-tool:hover{background:#d6e7f2}
.flow-step-view-tool:focus-visible{outline:2px solid #a68b53;outline-offset:3px}
.flow-step-workspace{width:calc(100vw - 24px);max-width:none;height:calc(100dvh - 24px);max-height:none;margin:auto;padding:0;border:1px solid var(--line);border-radius:12px;background:var(--bg);color:var(--ink);box-shadow:0 24px 90px #03152177;overflow:hidden}
.flow-step-workspace[open]{display:flex;flex-direction:column}
.flow-step-workspace::backdrop{background:#041725c9;backdrop-filter:blur(4px)}
.flow-workspace-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 25px;background:var(--surface);border-bottom:1px solid var(--line);flex:none}
.flow-workspace-header .overline{font-size:calc(9px * var(--workspace-text-scale, 1));letter-spacing:.12em;color:#866d3b}
.flow-workspace-header h2{font-size:calc(23px * var(--workspace-text-scale, 1));margin-top:6px;font-weight:500;color:var(--navy)}
.flow-workspace-header h2 small{font-size:calc(12px * var(--workspace-text-scale, 1));font-weight:400;color:var(--muted)}
.flow-workspace-header-actions{display:flex;align-items:center;gap:20px}
.flow-workspace-modes{display:flex;align-items:center;border:1px solid var(--line);border-radius:8px;padding:3px;background:var(--bg);gap:3px}
.flow-workspace-modes button{display:flex;align-items:center;gap:7px;padding:10px 15px;min-height:38px;font-size:calc(12px * var(--workspace-text-scale, 1));border-radius:5px;color:#47677b}
.flow-workspace-modes button[aria-pressed=true]{color:#17374e;background:#e4d3ad;box-shadow:0 1px 3px #17334612}
.flow-workspace-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;min-height:50px;padding:10px 25px;background:var(--surface);border-bottom:1px solid var(--line);flex:none}
.flow-workspace-toolbar>p{font-size:calc(11px * var(--workspace-text-scale, 1));line-height:1.7;color:var(--muted)}
.flow-preview-themes{display:flex;align-items:center;gap:6px;flex:none}
.flow-preview-themes[hidden]{display:none}
.flow-preview-themes button{display:flex;align-items:center;gap:5px;min-height:31px;padding:6px 10px;font-size:calc(11px * var(--workspace-text-scale, 1));border:1px solid var(--line);border-radius:6px;color:#426176}
.flow-preview-themes button[aria-pressed=true]{border-color:#ab8e50;background:#f5eedf;color:#66502c}
.flow-workspace-body{display:flex;flex:1;min-height:0;overflow:hidden}
.flow-workspace-edit{width:100%;min-height:0;overflow:auto;scrollbar-gutter:stable;background:var(--bg)}
.flow-workspace-edit[hidden],.flow-workspace-preview[hidden]{display:none}
.flow-workspace-edit-page{width:100%;max-width:1188px;padding:34px 24px 40px;margin:0 auto}
.flow-step-workspace .paired-flow-step{padding:32px;gap:20px}
.flow-step-workspace .paired-flow-step>header,.flow-step-workspace .paired-flow-step>footer{display:none}
.flow-step-workspace .paired-flow-step>label:not(.checkbox-label){font-size:calc(12px * var(--workspace-text-scale, 1))}
.flow-step-workspace .paired-flow-step>label>input{font-size:calc(16px * var(--workspace-text-scale, 1));padding:13px 15px}
.flow-step-workspace .journey-rich-editor{margin:0 -18px;padding:18px;border-radius:8px;background:#fff;color:#203748}
.flow-step-workspace .rich-editor-label>label{font-size:calc(12px * var(--workspace-text-scale, 1));color:#314e61}
.flow-step-workspace .rich-format-toggle{color:#355f7a;border-color:#bcced9;background:#f1f6f9}
.flow-step-workspace .rich-editable{padding:0;border:0;border-radius:0;min-height:320px;max-height:none;resize:none;background:#fff;color:#203748;box-shadow:none}
.flow-step-workspace .rich-editable:focus{outline:none}
.flow-step-workspace .rich-toolbar{margin-bottom:18px;border-radius:6px}
.flow-step-workspace .rich-paste-help{color:#526c7d}
.flow-workspace-preview{width:100%;min-height:0;overflow:hidden;background:var(--bg)}
.flow-workspace-preview iframe{width:100%;height:100%;display:block;border:0;background:var(--bg)}
.flow-workspace-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 25px;border-top:1px solid var(--line);background:var(--surface);flex:none}
.flow-workspace-footer>span{font-size:calc(11px * var(--workspace-text-scale, 1));color:var(--muted);line-height:1.6}
.flow-workspace-footer .crm-btn{flex:none;min-height:39px;font-size:calc(12px * var(--workspace-text-scale, 1))}
.flow-workspace-modes button:focus-visible,.flow-preview-themes button:focus-visible{outline:2px solid #ad925a;outline-offset:2px}
.flow-expanded-placeholder{min-height:170px;border:1px dashed var(--line);border-radius:10px}
html[data-workspace-theme=dark] .flow-step-view-tool{background:#1d3a50;color:#d2e7f5;border-color:#4a6a80}
html[data-workspace-theme=dark] .flow-step-view-tool:hover{background:#2b526d}
html[data-workspace-theme=dark] .flow-workspace-header h2{color:#e5eaf0}
html[data-workspace-theme=dark] .flow-workspace-header .overline{color:#dec48e}
html[data-workspace-theme=dark] .flow-workspace-modes button{color:#c6d9e7}
html[data-workspace-theme=dark] .flow-workspace-modes button[aria-pressed=true]{background:#d0b77e;color:#143449}
html[data-workspace-theme=dark] .flow-preview-themes button{color:#d0e0eb;border-color:#506a7c}
html[data-workspace-theme=dark] .flow-preview-themes button[aria-pressed=true]{background:#3d3d2f;color:#f0d89e;border-color:#b99c5c}
html[data-workspace-theme=dark] .flow-step-workspace .rich-editor-label>label{color:#314e61}
html[data-workspace-theme=dark] .flow-step-workspace .rich-paste-help{color:#526c7d}
@media(max-width:800px){.flow-workspace-edit-page{padding:25px 22px 30px}.flow-workspace-header{padding:16px 18px}.flow-workspace-toolbar{padding:10px 18px}.flow-workspace-header-actions{gap:10px}}
@media(max-width:600px){.flow-step-workspace{width:100vw;height:100dvh;border:0;border-radius:0}.flow-workspace-header{align-items:flex-start;gap:12px;padding:14px 15px}.flow-workspace-header h2{font-size:calc(19px * var(--workspace-text-scale, 1))}.flow-workspace-header-actions{align-items:flex-start;gap:8px}.flow-workspace-modes button{padding:8px 9px;gap:5px;font-size:calc(10px * var(--workspace-text-scale, 1))}.flow-workspace-modes button svg{width:14px}.flow-workspace-toolbar{padding:9px 15px;align-items:flex-start;flex-wrap:wrap;gap:10px}.flow-workspace-toolbar>p{font-size:calc(10px * var(--workspace-text-scale, 1))}.flow-workspace-edit-page{padding:19px 15px 30px}.flow-step-workspace .paired-flow-step{padding:25px 20px}.flow-workspace-footer{padding:12px 15px;gap:12px}.flow-workspace-footer>span{font-size:calc(10px * var(--workspace-text-scale, 1))}.flow-workspace-footer .crm-btn{font-size:calc(11px * var(--workspace-text-scale, 1));padding:10px}.flow-step-workspace .rich-editable{min-height:260px}}
.main-step-actions>.crm-btn.primary{margin-left:auto;font-size:calc(12px * var(--workspace-text-scale, 1));min-height:43px;padding:12px 19px}

.flow-workspace-error{padding:12px 25px;background:#fff0f0;color:#8a2c35;border-bottom:1px solid #e5b7ba;font-size:calc(12px * var(--workspace-text-scale, 1));line-height:1.7;flex:none}
.flow-workspace-error[hidden]{display:none}
html[data-workspace-theme=dark] .flow-workspace-error{background:#3e232b;color:#ffced5;border-color:#a96672}

.journey-rich-content a.journey-link{color:inherit;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;cursor:pointer}
.rich-link-panel{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;padding:12px;border:1px solid var(--line);border-radius:6px;margin:8px 0;background:var(--bg)}
.paired-flow-step .rich-link-panel label{flex:1;min-width:180px;margin:0;display:flex;flex-direction:column;gap:5px;font-size:calc(11px * var(--workspace-text-scale, 1))}
.rich-link-panel button{min-height:36px;padding:8px 12px;border:1px solid var(--line);border-radius:5px;font-size:calc(12px * var(--workspace-text-scale, 1))}
.rich-link-panel [role=alert]{width:100%;font-size:calc(12px * var(--workspace-text-scale, 1));color:#b2414a}
.journey-pdf-frame{display:block;width:100%;height:min(76vh,900px);min-height:480px;border:1px solid var(--line);border-radius:6px;background:#e4e6e8}.journey-pdf-dialog{width:min(1200px,96vw);max-height:96vh;padding:12px}.journey-pdf-dialog>button{padding:10px}.flow-pdf-panel{padding:14px;border:1px solid var(--line);border-radius:6px}.flow-pdf-panel p{overflow-wrap:anywhere;margin:8px 0}.legacy-instructions{margin:15px 0}.legacy-instructions summary{cursor:pointer;margin-bottom:12px}@media(max-width:600px){.journey-pdf-frame{min-height:400px;height:72vh}}

/* One shared journey definition; account profiles remain separate. */
.shared-flow-editor .paired-flow-headings,.shared-flow-editor .paired-flow-row,.shared-flow-editor .paired-flow-add{grid-template-columns:minmax(0,1fr)}
.flow-reference{margin:20px 0;padding:20px}
.flow-reference>summary{cursor:pointer;font-weight:600}
.flow-reference>p{margin:14px 0;color:var(--muted)}
.flow-reference-type,.flow-reference-step{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:7px}
.flow-reference-type>summary,.flow-reference-step>summary{cursor:pointer}
.flow-reference-step .journey-rich-content{margin-top:16px}

.paired-flow-step>footer{flex-wrap:wrap;gap:12px}.flow-step-position{display:flex;align-items:center;gap:8px;margin:0}.flow-step-position select{width:auto;min-width:90px}
.crm-sidebar>nav{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#385060 transparent}
.crm-sidebar .sidebar-bottom{flex-shrink:0;padding-top:18px}
.sidebar-nav-group>summary{cursor:pointer;list-style:none;user-select:none}
.sidebar-nav-group>summary::-webkit-details-marker{display:none}
.sidebar-nav-group>summary>span:not(.nav-group-chevron){flex:1}
.sidebar-nav-group .nav-group-chevron{display:flex;align-items:center;transition:transform .15s;transform:rotate(90deg)}
.sidebar-nav-group[open] .nav-group-chevron{transform:rotate(-90deg)}
.sidebar-nav-group.group-current>summary{color:#ead4a4}
.sidebar-nav-children{display:flex;flex-direction:column;gap:4px;margin:3px 0 5px 20px;padding-left:8px;border-left:1px solid #385060}
.sidebar-nav-children .nav-item{padding:10px 9px;gap:9px;font-size:calc(10px * var(--workspace-text-scale, 1));min-height:38px}
.sidebar-nav-children .nav-item svg{width:16px;height:16px}
.workspace-folder-tabs{display:flex;align-items:flex-end;gap:5px;border-bottom:2px solid #b49a68;margin:0 0 28px;overflow-x:auto}
.workspace-folder-tabs>button{border:1px solid #bcaa86;border-bottom:0;border-radius:11px 11px 0 0;background:#e5d6b4;color:#4d432e;padding:13px 22px;min-height:46px;white-space:nowrap;font-size:calc(13px * var(--workspace-text-scale, 1));font-weight:600}
.workspace-folder-tabs>button[aria-current=page]{background:#f3e9d0;color:#243d48;padding-top:18px;border-top:3px solid #a68c58}
html[data-workspace-theme=dark] .workspace-folder-tabs>button{background:#5b5039;color:#f4e4bf;border-color:#786847}
html[data-workspace-theme=dark] .workspace-folder-tabs>button[aria-current=page]{background:#887448;color:#fff6de}
@media(max-width:600px){.workspace-folder-tabs{margin-bottom:22px}.workspace-folder-tabs>button{padding:12px 15px;font-size:calc(11px * var(--workspace-text-scale, 1))}}

/* Admin/supervisor sidebar: change layout without remounting the workspace. */
.staff-sidebar-header{display:flex;align-items:center;gap:6px;margin-bottom:22px;flex-shrink:0}
.staff-sidebar-header .sidebar-brand{padding:0;min-width:0;flex:1;gap:8px}
.staff-sidebar-header .sidebar-brand img{width:40px;height:40px;flex-shrink:0}
.staff-sidebar-header .sidebar-brand span{font-size:calc(8px * var(--workspace-text-scale,1));letter-spacing:.1em}
.sidebar-toggle{display:grid;place-items:center;flex-shrink:0;width:32px;height:38px;border:1px solid #385060;border-radius:6px;color:#e4d2a8;background:transparent;cursor:pointer}
.sidebar-toggle:hover{background:#254253}
.sidebar-toggle>svg{transform:rotate(180deg)}
.staff-workspace .nav-item:focus-visible,.sidebar-toggle:focus-visible{outline:2px solid #e4d2a8;outline-offset:2px}
.sidebar-backdrop{display:none}
@media(min-width:961px){
 .staff-workspace.sidebar-collapsed{grid-template-columns:76px minmax(0,1fr)}
 .sidebar-collapsed .crm-sidebar{padding:20px 8px 14px}
 .sidebar-collapsed .staff-sidebar-header{flex-direction:column;gap:14px;margin-bottom:18px}
 .sidebar-collapsed .sidebar-brand{justify-content:center;flex:none}
 .sidebar-collapsed .sidebar-toggle>svg{transform:none}
 .sidebar-collapsed .sidebar-brand span,.sidebar-collapsed .sidebar-label,.sidebar-collapsed .nav-label,.sidebar-collapsed .nav-group-chevron,.sidebar-collapsed .sidebar-nav-children,.sidebar-collapsed .sidebar-bottom>p{display:none}
 .sidebar-collapsed .nav-item{position:relative;justify-content:center;min-height:44px;padding:12px 0}
 .sidebar-collapsed .nav-notification,.sidebar-collapsed .milestone-nav-badge{position:absolute;top:2px;right:0;margin:0}
 .sidebar-collapsed .nav-item .red-badge{min-width:14px;height:14px;font-size:9px}
 .sidebar-collapsed .crm-sidebar>nav{overflow-x:hidden}
}
@media(max-width:960px){
 .staff-workspace.nav-open .crm-topbar{padding-left:22px}
 .staff-workspace.nav-open .sidebar-backdrop{display:block;position:fixed;inset:0;border:0;background:#03152170;z-index:25;cursor:pointer}
 .staff-workspace .crm-sidebar{visibility:hidden}
 .staff-workspace.nav-open .crm-sidebar{visibility:visible}
}
@media(max-width:700px){.staff-workspace.nav-open .crm-topbar{padding-left:15px}}
@media print{.sidebar-backdrop{display:none!important}.staff-workspace.sidebar-collapsed{display:block}}

/* Shared admin clarifications stay compact in the journey tile header. */
.journey-note-button{position:relative;display:grid;place-items:center;flex:none;width:28px;height:30px;padding:5px;border:1px solid var(--line);border-radius:6px;color:var(--muted,#657e8e);background:var(--surface,#fff)}
.journey-note-button:hover,.journey-note-button.has-notes{color:#84652d;border-color:#bea776;background:#faf5e8}
.journey-note-button:focus-visible{outline:2px solid #b69b63;outline-offset:2px}
.journey-note-dot{position:absolute;right:3px;top:3px;width:5px;height:5px;border-radius:50%;background:#a28142}
.journey-notes>h3{font-size:calc(17px * var(--workspace-text-scale,1));line-height:1.4;margin:0 0 8px;overflow-wrap:anywhere}
.journey-notes>.field-help{display:flex;gap:7px;align-items:center}
.journey-notes-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 12px;font-size:calc(12px * var(--workspace-text-scale,1));color:var(--muted,#657e8e)}
.journey-notes-toolbar .crm-btn{flex:none;padding:7px 10px}
.journey-note{padding:14px 0;border-bottom:1px solid var(--line)}
.journey-note>header{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:calc(12px * var(--workspace-text-scale,1))}
.journey-note time{color:var(--muted,#657e8e);font-size:calc(11px * var(--workspace-text-scale,1))}
.journey-note>header>button{margin-left:auto;font-size:calc(11px * var(--workspace-text-scale,1))}
.journey-note>p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;margin:9px 0 0;font-size:calc(14px * var(--workspace-text-scale,1))}
.journey-notes>form{margin-top:20px}.journey-notes textarea{min-height:112px;resize:vertical}
.journey-notes>[data-action="journey-notes-older"]{margin-top:14px}
html[data-workspace-theme=dark] .journey-note-button{background:#233d4e;border-color:#4a6070;color:#c2d0da}
html[data-workspace-theme=dark] .journey-note-button:is(:hover,.has-notes){background:#3b3d30;color:#ecd29b;border-color:#a58e60}
html[data-workspace-theme=dark] .journey-note-dot{background:#ecd29b}
@media(max-width:600px){.journey-bucket>header{gap:6px;padding-left:8px;padding-right:8px}.journey-note-button{width:28px;height:32px}.journey-notes .form-footer{align-items:flex-start;gap:10px;flex-wrap:wrap}}
@media print{.journey-note-button{display:none}}

/* Optional step instructions, file downloads and client response fields. */
.step-extras-editor{border:1px solid var(--line);border-radius:8px;padding:14px;margin:15px 0;background:var(--surface,#fff)}
.step-extras-editor>summary{cursor:pointer;font-size:calc(14px * var(--workspace-text-scale,1));font-weight:600;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.step-extras-editor>summary>small{font-weight:400;color:var(--muted,#6a7f8d)}
.step-extras-editor>section,.step-extras-editor>.step-guidance{margin-top:22px}
.step-extras-editor h4{margin:0 0 10px;font-size:calc(15px * var(--workspace-text-scale,1))}
.step-guidance .rich-editable{min-height:100px;max-height:360px;overflow:auto}
.step-field-edit,.step-attachment-edit{border:1px solid var(--line);border-radius:7px;padding:14px;margin:12px 0;min-width:0}
.step-field-edit legend{padding:0 6px;font-size:calc(12px * var(--workspace-text-scale,1));color:var(--muted,#6a7f8d)}
.step-field-edit textarea{resize:vertical;min-height:60px}
.step-field-tools,.step-add-field{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-top:14px}
.step-field-tools>button:last-child{margin-left:auto}.step-add-field>label{flex:1;min-width:160px}
.step-attachment-edit>small{display:block;overflow-wrap:anywhere;color:var(--muted,#6a7f8d);margin:8px 0}
.step-extras-client{margin:24px 0}.step-guidance-content{margin:18px 0}
.step-downloads,.step-response-panel{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}
.step-extras-client h3,.step-response-panel h3{font-size:calc(20px * var(--workspace-text-scale,1));margin:0 0 14px}
.step-download{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px;border:1px solid var(--line);border-radius:7px;margin:10px 0}
.step-download>div{min-width:0;overflow-wrap:anywhere}.step-download strong{font-size:calc(14px * var(--workspace-text-scale,1));display:block}
.step-download small{display:block;color:var(--muted,#6a7f8d);margin-top:4px}.step-download>button{flex:none}
.step-response-fields{border:0;padding:0;margin:0;min-width:0}.step-answer{margin:20px 0;min-width:0}
.step-answer>label,.step-answer legend{display:block;font-size:calc(14px * var(--workspace-text-scale,1));font-weight:600;margin-bottom:8px}
.step-answer>.field-help{margin:0 0 8px}.step-answer>fieldset{border:0;padding:0;min-width:0}
.step-answer-options{display:grid;gap:10px;margin-top:8px}.step-answer-options .checkbox-label{font-size:calc(14px * var(--workspace-text-scale,1))}
.step-answer-options .checkbox-label input{flex:none;width:17px;height:17px;min-height:0}
.step-field-required{color:#a25a28}.step-answer textarea{min-height:130px;resize:vertical}
.step-answer [data-upload-result]{overflow-wrap:anywhere;margin:8px 0}
.step-response-panel .form-footer{gap:14px}.step-response-panel .form-footer>span{flex:1;overflow-wrap:anywhere}
html[data-workspace-theme=dark] .step-field-required{color:#e8c88c}
@media(max-width:600px){.step-download{align-items:flex-start;flex-direction:column}.step-extras-editor{padding:10px}.step-field-edit{padding:10px}.step-response-panel .form-footer{flex-direction:column;align-items:stretch}.step-add-field>button{width:100%}}

/* Optional step links and the client PDF library. */
.step-quick-links{margin:24px 0}.step-quick-links-list{display:grid;gap:10px}.step-quick-link{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border:1px solid var(--line,#dae2e8);border-radius:10px;background:var(--surface,#fff);color:var(--gold,#a87931);text-decoration:none;overflow-wrap:anywhere}.step-quick-link:hover{border-color:currentColor}.step-quick-link small{display:block;margin-top:4px;color:var(--muted,#637785);font-weight:400}.step-quick-link-edit{margin:12px 0;padding:16px;border:1px solid var(--line,#dae2e8);border-radius:10px}.step-quick-links-editor{margin-block:24px}.step-quick-link-edit legend{padding:0 7px;font-weight:600}
.client-library-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.client-library-card{display:flex;flex-direction:column;gap:14px;padding:24px;min-width:0}.library-file-icon{display:flex;align-items:center;gap:9px;color:var(--gold,#a87931);font-size:calc(12px * var(--workspace-text-scale,1));font-weight:700}.library-card-copy{flex:1;min-width:0}.library-card-copy h2{margin:6px 0 10px;font-size:calc(20px * var(--workspace-text-scale,1));line-height:1.3;overflow-wrap:anywhere}.library-card-copy p{white-space:pre-wrap;overflow-wrap:anywhere}.library-card-copy small{display:block;overflow-wrap:anywhere;color:var(--muted,#637785)}.library-audience{font-size:calc(12px * var(--workspace-text-scale,1));color:var(--muted,#637785)}.library-card-actions{display:flex;gap:8px;flex-wrap:wrap}.library-card-actions .crm-btn{min-height:40px}.library-empty{grid-column:1/-1;text-align:center;padding:48px 24px}.library-search{align-items:end;flex-wrap:wrap}.library-search>label{margin:0}.library-search .search-box{flex:1;min-width:180px}.library-permissions{border:1px solid var(--line,#dae2e8);padding:14px;border-radius:10px;margin:16px 0}.library-permissions legend{padding:0 6px}.library-pdf-view .journey-pdf-frame{width:100%;height:min(72vh,850px);min-height:360px;border:0}.library-search input{min-width:0}
@media(max-width:700px){.client-library-grid{grid-template-columns:1fr}.client-library-card{padding:18px}.library-search>label{width:100%}.library-card-actions .crm-btn{flex:1 1 auto}.step-quick-link-edit{padding:12px}}

/* Keep the full journey total readable in expanded and collapsed navigation. */
.nav-item [data-journey-notification] .red-badge{box-sizing:border-box;width:auto;min-width:20px;padding-inline:4px;border-radius:999px;font-variant-numeric:tabular-nums}
@media(min-width:961px){.sidebar-collapsed .nav-item [data-journey-notification] .red-badge{min-width:14px;padding-inline:2px}}
