/* Scoped UI-only shell. Classic layout, business dialogs and API contracts stay intact. */
@media(min-width:821px) and (min-height:501px){
  #app.console-shell>.cs-rail{margin:12px;border-radius:24px;background:#191919;padding-block:16px;min-height:0;scrollbar-color:#626262 transparent}
  #app.console-shell .cs-rail button{border-radius:12px}
  #app.console-shell>.cs-context{margin:12px 12px 12px 0;border:1px solid var(--cs-line);border-radius:16px}
  #app.console-shell>.cs-context.cs-collapsed:not(.cs-flyout){margin:12px 0;border:0}
  /* Adjacent to the rail: no dead hover gap and no clipping ancestor. */
  #app.console-shell>.cs-context.cs-flyout{left:88px;top:12px;bottom:12px;margin:0;border:1px solid var(--cs-line);border-radius:16px}
  #app.console-shell .cs-context-links button{border-radius:12px}
  #app.console-shell .cs-context-links button.active{background:var(--cs-yellow);color:var(--ink);border-color:transparent;box-shadow:none}
  #app.console-shell .cs-context-links button.active small{color:#45402e}
  #app.console-shell .cs-context-links button:hover:not(.active){background:#eeeeee}
}
#app.console-shell{--cs-yellow:#ffc63d;--cs-yellow-soft:#fffbe9;--cs-focus:#303030;--cs-line:rgba(32,32,32,.14);--cs-glass:rgba(255,255,255,.62);--cs-shadow:0 8px 28px #0000000a,inset 0 1px 0 #fffffff0;--bg:#f4f4f4;--panel:#fafafa;--ink:#202020;--ink-soft:#3d3d3d;--muted:#606060;--faint:#6b6b6b;--line:#e0e0e0;--line-strong:#c8c8c8;--accent:#1c1c1c;--accent-hover:#333333;--accent-soft:#eeeeee;--action:var(--cs-yellow);--action-hover:#f2b624;--font-ui:ui-rounded,"SF Pro Rounded","Hiragino Maru Gothic ProN","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-family:var(--font-ui);color:var(--ink);background-color:#f4f4f4;background-image:none;isolation:isolate}
.console-shell :is(button,a,summary,input,select,textarea):focus-visible{outline-color:var(--cs-focus)}
.console-shell .input:focus{border-color:#7a7a7a;box-shadow:0 0 0 3px #ffc63d40}
.console-shell .btn-primary{background:var(--cs-yellow);color:var(--ink);border-color:var(--cs-yellow)}
.console-shell .btn-primary:hover:not(:disabled){background:var(--action-hover);color:var(--ink);border-color:var(--action-hover)}
.console-shell>.main{min-width:0;background:transparent}
.console-shell>.main>.header{background:rgba(255,255,255,.8);backdrop-filter:blur(6px);border-bottom:1px solid var(--cs-line);padding:14px 24px;min-height:68px;box-shadow:none;gap:12px}
.console-shell .header .shell-page-heading{font-size:18px;letter-spacing:-.025em;flex-shrink:1}
.console-shell .header .nav-command-header-trigger{display:flex}
.console-shell .header .system-clock{font-size:11px;background:transparent;border:0}
.console-shell .header .system-clock-zone{display:none}
.cs-rail{--cs-focus:var(--cs-yellow);flex:0 0 76px;width:76px;display:flex;flex-direction:column;gap:5px;background:#1c1c1c;color:#f5f5f5;z-index:30;padding:16px 8px;overflow-y:auto;scrollbar-width:thin}
.cs-rail button{border:0;background:transparent;color:#c9c9c9;border-radius:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;padding:11px 2px;min-height:58px;font:inherit;font-size:10px;cursor:pointer;flex-shrink:0;transition:background-color 160ms,color 160ms}
.cs-rail .nav-svg{width:21px;height:21px}
.cs-rail button.active{background:var(--cs-yellow);color:var(--ink)}
.cs-rail button:hover:not(.active){color:#fff;background:#ffffff14}
.cs-rail .cs-hub-icon{min-height:46px;margin-bottom:18px;border:1px solid #ffffff29;color:var(--cs-yellow)}
.cs-rail .cs-rail-search{margin-top:auto}
.cs-rail button:focus-visible{outline-color:var(--cs-yellow)}
.cs-context{position:relative;flex:0 0 var(--cs-sidebar-width,212px);width:var(--cs-sidebar-width,212px);display:flex;flex-direction:column;min-height:0;min-width:0;padding:0;overflow:hidden;background:rgba(255,255,255,.72);backdrop-filter:blur(2px);border-right:1px solid var(--cs-line);z-index:29;transition:flex-basis 220ms cubic-bezier(.22,1,.36,1),width 220ms cubic-bezier(.22,1,.36,1)}
.cs-context-inner{display:flex;flex-direction:column;flex:1;min-height:0;width:var(--cs-sidebar-width,212px);box-sizing:border-box;padding:22px 20px 16px 16px;transition:opacity 140ms ease,transform 220ms cubic-bezier(.22,1,.36,1)}
.cs-context.cs-collapsed{flex-basis:0;width:0;border-right:0;pointer-events:none}
.cs-context.cs-collapsed .cs-context-inner{opacity:0;transform:translateX(-8px)}
.cs-context.cs-resizing,.cs-context.cs-resizing .cs-context-inner{transition:none}
/* The overlay shares the app stack: header 70 < navigation 80 < modal 90.
   Keep the pinned sidebar at 29; never raise navigation above business dialogs. */
.cs-context.cs-flyout{position:fixed;left:76px;top:0;bottom:0;width:var(--cs-sidebar-width,212px);border:1px solid var(--cs-line);border-top:0;border-bottom:0;background:#fff;box-shadow:8px 0 18px #0000000c;opacity:1;transform:translateX(0);transition:transform 180ms cubic-bezier(.22,1,.36,1),opacity 180ms ease;z-index:80}
.cs-context.cs-flyout.cs-collapsed{width:var(--cs-sidebar-width,212px);opacity:0;transform:translateX(-12px);pointer-events:none;visibility:hidden;transition:transform 180ms cubic-bezier(.22,1,.36,1),opacity 180ms ease,visibility 180ms}
.cs-context.cs-flyout .cs-context-inner{transition:none}
.cs-context.cs-flyout.cs-resizing{transition:none}
.cs-rail button.peek:not(.active){background:#ffffff20;color:#fff}
.cs-layout-return{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:42px;padding:10px 12px;background:#fff8df;color:#282828;border:1px solid #d9c98f;border-radius:8px;font:inherit;font-size:12px;cursor:pointer;margin-bottom:10px}
.shell-layout-toggle{display:flex;align-items:center;gap:7px;min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface,#fff);color:var(--ink);font:inherit;font-size:11px;cursor:pointer;white-space:nowrap;margin-right:auto}
.shell-layout-toggle:hover,.cs-layout-return:hover{background:#fff4cc;border-color:#a69869}
.shell-layout-toggle svg{width:16px;height:16px}
@media(max-width:600px){#main-content>.header{position:relative}#main-content>.header>.shell-layout-toggle{position:absolute;right:16px;top:7px;width:44px;min-width:44px;height:44px;padding:11px;margin:0}#main-content>.header>.shell-page-heading{padding-right:52px;min-height:44px}.shell-layout-toggle span{display:none}}
@media(prefers-reduced-motion:reduce){.cs-context.cs-flyout,.cs-context.cs-flyout.cs-collapsed{transition:none}}
.cs-brand-row{display:flex;align-items:flex-start;gap:4px;flex-shrink:0}
.cs-brand-row .cs-brand{flex:1;min-width:0}
.cs-brand-row .cs-brand img{max-width:100%}
.cs-collapse-button{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer;transition:background-color 150ms ease,color 150ms ease}
.cs-collapse-button:hover{background:#00000007;color:var(--ink)}
.cs-collapse-button svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.cs-sidebar-resizer{position:absolute;top:0;bottom:0;right:0;width:12px;z-index:2;cursor:col-resize;touch-action:none;outline:none}
.cs-sidebar-resizer::after{content:"";position:absolute;right:3px;top:50%;width:3px;height:42px;border-radius:3px;background:#c8c8c8;transform:translateY(-50%);transition:background-color 140ms ease,height 140ms ease}
.cs-sidebar-resizer:hover::after,.cs-sidebar-resizer:focus-visible::after,.cs-resizing .cs-sidebar-resizer::after{height:64px;background:var(--cs-yellow);box-shadow:0 0 0 1px #20202080}
.cs-sidebar-resizer:focus-visible{outline:2px solid var(--cs-focus);outline-offset:-2px}
.cs-context.cs-collapsed .cs-sidebar-resizer{visibility:hidden}
html.cs-sidebar-dragging,html.cs-sidebar-dragging *{cursor:col-resize!important;user-select:none!important}
.console-shell .shell-nav-toggle{transition:background-color 150ms ease,border-color 150ms ease}
.console-shell .shell-nav-toggle:hover{background:var(--cs-yellow-soft);border-color:#a8a8a8}
@media(prefers-reduced-motion:reduce){.cs-context,.cs-context-inner,.cs-sidebar-resizer::after,.cs-collapse-button,.console-shell .shell-nav-toggle{transition:none}}
.cs-brand{padding:0 4px 22px;min-width:0}
.cs-brand img{display:block;width:auto;max-width:164px;height:auto;max-height:36px;object-fit:contain;object-position:left center}
.cs-brand strong{font-size:16px;overflow-wrap:anywhere}
.cs-brand a{display:block;font-size:10px;color:var(--muted);text-decoration:none;margin-top:13px;overflow-wrap:anywhere}
.cs-search{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--cs-line);background:rgba(255,255,255,.55);border-radius:8px;padding:10px;font:inherit;font-size:12px;color:var(--muted);cursor:pointer}
.cs-search kbd{font:inherit;font-size:10px;color:var(--faint)}
.cs-domain-heading{display:flex;align-items:baseline;justify-content:space-between;margin:28px 4px 14px;gap:8px}
.cs-domain-heading h2{font-size:14px;margin:0;font-weight:600}
.cs-domain-heading>span{font-size:10px;color:var(--faint);white-space:nowrap}
.cs-context-links{overflow:auto;min-height:0;flex:1;display:flex;flex-direction:column;gap:4px;scrollbar-width:thin;margin:0 -4px;padding:0 4px 12px}
.cs-context-links button{display:flex;align-items:center;gap:10px;border:1px solid transparent;background:transparent;border-radius:8px;padding:11px 10px;text-align:left;font:inherit;font-size:12px;color:var(--muted);cursor:pointer;flex-shrink:0;transition:background-color 160ms,border-color 160ms,color 160ms}
.cs-context-links button>span{min-width:0;flex:1}
.cs-context-links small{display:block;font-size:10px;margin-top:5px;font-weight:400;line-height:1.5;color:var(--faint)}
.cs-context-links .nav-svg{width:17px;height:17px;flex-shrink:0}
.cs-context-links button.active{border-color:#dedede;background:#fff;color:var(--ink);font-weight:600;box-shadow:inset 3px 0 var(--cs-yellow),0 2px 4px #00000006}
.cs-context-links button:hover{background:#ffffffa8;color:var(--ink)}
.cs-context-footer{border-top:1px solid var(--cs-line);padding-top:10px;display:grid;gap:10px}
.cs-context-footer button{display:flex;justify-content:space-between;border:0;background:none;color:var(--muted);padding:7px 4px;text-align:left;font:inherit;font-size:11px;cursor:pointer}
.cs-context-footer button:first-child{color:var(--ink);font-weight:600}
.cs-connections{display:flex;gap:12px;font-size:10px;color:var(--muted);padding:4px}
.cs-connections span{display:flex;align-items:center;gap:5px}
.cs-connections .status-dot{width:5px;height:5px}
.cs-recent{display:flex;align-items:center;gap:4px;padding:0 24px;border-bottom:1px solid var(--cs-line);min-height:42px;background:rgba(255,255,255,.57);flex-shrink:0;overflow-x:auto;scrollbar-width:thin}
.cs-recent button{border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font:inherit;font-size:11px;padding:11px 12px;white-space:nowrap;cursor:pointer}
.cs-recent button[aria-current=page]{border-bottom-color:var(--cs-yellow);color:var(--ink);background:#ffffff6e}
.cs-recent button:hover{background:#ffffffa0;color:var(--ink)}
.cs-recent-label{font-size:10px;color:var(--muted);padding-left:12px;margin-left:8px;border-left:1px solid var(--cs-line)}
.cs-recent .cs-directory-trigger{padding-left:0;color:var(--ink);font-weight:600}
.console-shell :is(.dashboard-page,.leads-workspace,.wf-pane,.publication-workspace,.bl-growth-page,.bento-dashboard){background:transparent}
.console-shell :is(.dashboard-page,.wf-pane,.publication-workspace){padding:28px 30px 40px}
.console-shell :is(.ops-card,.wf-card,.cs-shortcuts){background:var(--cs-glass);border:1px solid rgba(255,255,255,.88);box-shadow:var(--cs-shadow);border-radius:14px;backdrop-filter:blur(.65px);-webkit-backdrop-filter:blur(.65px)}
.console-shell :is(.table-wrap,.posts-list,.publication-card,.apollo-prospect-table-wrap){background:rgba(255,255,255,.86)}
.console-shell :is(.collection-toolbar,.collection-summary,.post-workspace-nav){background:rgba(255,255,255,.65);border-color:var(--cs-line)}
.console-shell :is(.dashboard-page-title){font-size:28px;font-weight:600;letter-spacing:-.025em}
.console-shell .dashboard-page-subtitle{font-size:12px;line-height:1.8;max-width:68ch}
.console-shell .dashboard-kpi-grid.cs-staircase{display:grid;grid-template-columns:.88fr 1fr 1.13fr 1.3fr;gap:12px;align-items:end;margin:24px 0 8px}
.console-shell .cs-staircase .kb-stat{border:1px solid #20202018!important;box-shadow:none;border-radius:12px;padding:18px;min-width:0;display:flex;flex-direction:column;justify-content:space-between;gap:16px;position:relative;overflow:hidden;text-align:left;transition:box-shadow 160ms}
.console-shell .cs-staircase .kb-stat::before,.console-shell .cs-staircase .kb-stat::after{display:none}
.console-shell .cs-staircase .kb-stat:hover{transform:none;box-shadow:0 5px 14px #0000000e}
.console-shell .cs-staircase .kb-stat .label{font-size:11px;color:#414141;line-height:1.6}
.console-shell .cs-staircase .kb-stat .value{color:var(--ink);font-size:38px;font-weight:500;letter-spacing:-.035em;font-variant-numeric:tabular-nums;text-align:left;background:none;border:0;padding:0;line-height:1.1}
.console-shell .cs-staircase .kb-stat a{color:#333333!important;align-self:flex-start;border-bottom:1px solid #33333340;padding-bottom:3px}
.console-shell .cs-staircase .cs-step-0{min-height:145px;background:#e6e6e6}
.console-shell .cs-staircase .cs-step-1{min-height:174px;background:repeating-linear-gradient(135deg,transparent 0 5px,rgba(32,32,32,.11) 5px 6px),#f7f7f7}
.console-shell .cs-staircase .cs-step-2{min-height:203px;background:linear-gradient(140deg,#fafafa,#ededed 52%,#d9d9d9)}
.console-shell .cs-staircase .cs-step-3{min-height:232px;background:var(--cs-yellow)}
.cs-metric-note{font-size:10px;line-height:1.7;color:var(--muted);margin:8px 0 24px}
.cs-shortcuts{padding:22px;margin-bottom:22px}
.cs-section-heading{display:flex;justify-content:space-between;gap:16px;align-items:center;margin-bottom:18px}
.cs-section-heading h2{font-size:15px;margin:0 0 6px;font-weight:600}
.cs-section-heading p{font-size:11px;margin:0;color:var(--muted)}
.cs-shortcut-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--cs-line);border:1px solid var(--cs-line);border-radius:10px;overflow:hidden}
.cs-shortcut-grid button{display:grid;grid-template-columns:24px 1fr 16px;gap:7px 10px;align-items:center;background:#fafafae6;border:0;padding:16px;text-align:left;font:inherit;color:#333333;cursor:pointer;transition:background-color 160ms}
.cs-shortcut-grid button:hover{background:var(--cs-yellow-soft)}
.cs-shortcut-grid strong{font-size:12px;font-weight:600;min-width:0}
.cs-shortcut-grid small{grid-column:2;grid-row:2;font-size:10px;color:var(--muted)}
.cs-shortcut-grid button>span{grid-column:3;grid-row:1;color:var(--faint)}
.cs-shortcut-grid .nav-svg{width:19px;height:19px;grid-row:1 / 3}
.cs-directory-overlay{position:fixed;inset:0;z-index:650;display:flex;align-items:center;justify-content:center;background:#1c1c1c66;padding:24px;backdrop-filter:blur(4px)}
.cs-directory{display:flex;flex-direction:column;min-height:0;max-height:90dvh;width:min(1040px,100%);background:#f7f7f7;border:1px solid #fff;border-radius:18px;box-shadow:0 24px 70px #00000033;padding:26px;color:var(--ink)}
.cs-directory header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.cs-directory h2{font-size:23px;letter-spacing:-.03em;margin:0 0 8px}
.cs-directory header p{font-size:12px;line-height:1.6;color:var(--muted);margin:0}
.cs-directory>.input{flex-shrink:0;background:#ffffffc4;min-height:44px}
.cs-directory-body{overflow:auto;min-height:0;padding:4px 6px 12px;margin:0 -6px;overscroll-behavior:contain}
.cs-directory-body section{margin-top:24px}
.cs-directory-body h3{font-size:14px;margin:0 0 5px}
.cs-directory-body p{font-size:11px;color:var(--muted);margin:0 0 12px}
.cs-module-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cs-module{display:flex;align-items:stretch;background:#ffffffb5;border:1px solid #dedede;border-radius:10px;min-width:0}
.cs-module>button:first-child{display:flex;align-items:center;gap:12px;padding:16px 8px 16px 16px;min-width:0;flex:1;text-align:left;background:none;border:0;color:inherit;font:inherit;cursor:pointer}
.cs-module>button:first-child>span:nth-child(2){flex:1;min-width:0}
.cs-module strong{display:block;font-size:12px;font-weight:600}
.cs-module small{display:block;font-size:10px;color:var(--muted);line-height:1.6;margin-top:4px}
.cs-module .nav-svg{width:18px;height:18px;flex-shrink:0}
.cs-module:focus-within,.cs-module:hover{border-color:#9b9b9b;background:var(--cs-yellow-soft)}
.cs-star{border:0;background:transparent;padding:6px 10px;font-size:20px;color:var(--faint);cursor:pointer}
.cs-star[aria-pressed=true]{color:var(--ink);background:var(--cs-yellow-soft);box-shadow:inset 0 -3px var(--cs-yellow);border-radius:0 9px 9px 0}
.cs-directory .cs-empty{padding:32px;text-align:center;font-size:13px}
@media(min-width:821px) and (max-width:1200px){.console-shell .header .system-clock{display:none}.console-shell :is(.dashboard-page,.wf-pane,.publication-workspace){padding-inline:22px}.console-shell .cs-staircase .kb-stat{padding:14px}.console-shell .header .tab-freshness-text{display:none}}
@media(max-width:820px),(max-width:1024px) and (max-height:500px){.cs-rail,.cs-context{display:none}.console-shell>.main>.header{padding:12px 16px}.console-shell .header .shell-page-heading{font-size:16px}.console-shell .header .system-clock{display:none}.cs-recent{padding-inline:16px;min-height:42px}.cs-recent-label{display:none}.cs-recent button{padding-inline:10px}.console-shell :is(.dashboard-page,.wf-pane,.publication-workspace){padding:22px 16px 32px}.console-shell .dashboard-page-title{font-size:24px}.console-shell .dashboard-kpi-grid.cs-staircase{grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:20px}.console-shell .cs-staircase .kb-stat{padding:10px 8px;border-radius:8px;gap:12px}.console-shell .cs-staircase .kb-stat .label{font-size:10px;line-height:1.5}.console-shell .cs-staircase .kb-stat .value{font-size:28px}.console-shell .cs-staircase .kb-stat a{font-size:10px!important}.console-shell .cs-staircase .cs-step-0{min-height:142px}.console-shell .cs-staircase .cs-step-1{min-height:162px}.console-shell .cs-staircase .cs-step-2{min-height:182px}.console-shell .cs-staircase .cs-step-3{min-height:202px}.cs-metric-note{font-size:10px}.cs-shortcuts{padding:16px}.cs-shortcut-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cs-shortcut-grid button{padding:14px 10px;grid-template-columns:20px 1fr;gap:7px}.cs-shortcut-grid button>span{display:none}.cs-section-heading{align-items:flex-start}.cs-section-heading p{line-height:1.6}.cs-section-heading .btn{white-space:nowrap}.cs-directory-overlay{padding:12px}.cs-directory{padding:18px 14px;max-height:calc(100dvh - 24px);border-radius:14px}.cs-directory h2{font-size:20px}.cs-directory header{align-items:flex-start}.cs-directory header .btn{white-space:nowrap;min-height:44px}.cs-module-grid{grid-template-columns:1fr}.cs-module>button:first-child{min-height:60px}.console-shell .m-tabbar{background:#f9faf2eb;backdrop-filter:blur(8px);border-color:#d8ddca}.cs-star{min-width:44px}.cs-recent button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.console-shell :is(.cs-rail button,.cs-context-links button,.cs-staircase .kb-stat,.cs-shortcut-grid button){transition:none}}
/* Match the legacy #app specificity; do not leave pale text on a light mobile bar. */
@media(max-width:820px),(max-width:1024px) and (max-height:500px){
  #app.console-shell .m-tabbar{background:rgba(255,255,255,.94);border-color:#dedede;box-shadow:0 -4px 18px #00000008;backdrop-filter:blur(8px)}
  #app.console-shell .m-tab{color:var(--muted)}
  #app.console-shell .m-tab.active{color:var(--ink);background:var(--cs-yellow)}
  #app.console-shell .m-tab.active .m-tab-icon{color:var(--ink);background:transparent}
}
/* Override the legacy #main-content mobile two-column KPI rule, only at home. */
@media(max-width:820px),(max-width:1024px) and (max-height:500px){.console-shell #main-content .dashboard-kpi-grid.cs-staircase{grid-template-columns:repeat(4,minmax(0,1fr))}.console-shell .cs-staircase .kb-stat .label{text-transform:none;letter-spacing:0}.console-shell .cs-staircase .cs-step-0{min-height:180px}.console-shell .cs-staircase .cs-step-1{min-height:200px}.console-shell .cs-staircase .cs-step-2{min-height:220px}.console-shell .cs-staircase .cs-step-3{min-height:240px}}
