/* Bridge existing analytical tools to the editorial shell without replacing data views. */
body.ct-workspace { margin: 0; min-width: 320px; width: 100%; height: auto; min-height: 100vh; overflow-y: auto !important; background: var(--ct-bg) !important; color: var(--ct-ink); font: 14px/1.5 var(--ct-font-ui); }
body.ct-workspace #sidebar, body.ct-workspace #mobile-nav-overlay, body.ct-workspace #mobile-nav-panel { display: none !important; }
body.ct-workspace :is(#main-content, main.shell, main.ct-legacy-main) { width: min(1480px, calc(100% - 64px)); max-width: none; margin: 0 auto !important; padding-bottom: 48px !important; height: auto !important; min-width: 0; }
.ct-workspace-heading { width: min(1480px, calc(100% - 64px)); margin: 0 auto; padding: 40px 0 22px; }
.ct-workspace-heading .ct-eyebrow { font: 500 12px/1.5 var(--ct-font-ui); color: var(--ct-muted); text-transform: uppercase; }
.ct-workspace-heading h1 { font: 400 clamp(38px, 4vw, 60px)/1.08 var(--ct-font-display); text-transform: uppercase; margin: 12px 0; color: var(--ct-ink); }
.ct-workspace-heading p { margin: 0; max-width: 780px; }
body.ct-workspace :is(.terminal-header, .terminal-card, .terminal-panel) { background: var(--ct-bg) !important; border-color: var(--ct-line) !important; color: var(--ct-ink); }
body.ct-workspace .terminal-header { position: relative !important; top: auto; flex-wrap: wrap; margin-bottom: 16px; padding: 16px 0; }
body.ct-workspace :is(.terminal-card, .terminal-panel) { border-radius: var(--ct-radius); }
body.ct-workspace :is(h1,h2,h3,h4,p,span,div,a,button,input,select,td,th) { font-family: var(--ct-font-ui); }
body.ct-workspace .ct-workspace-heading h1 { font-family: var(--ct-font-display); }
body.ct-workspace :is(button, select, input) { font-size: 13px; }
body.ct-workspace :is(input,select) { background: var(--ct-panel) !important; color: var(--ct-ink) !important; border-color: var(--ct-line) !important; border-radius: var(--ct-radius); }
body.ct-workspace :is(.filter-chip,.tab-btn,.timeframe-btn,.range-btn) { min-height: 32px; border-radius: var(--ct-radius); background: var(--ct-panel); border-color: var(--ct-line); color: var(--ct-muted); }
/* Keep the offscreen inspector's shadow from leaking into the workspace. */
body.ct-workspace #detail-panel:not(.open) { box-shadow: none; }
body.ct-workspace #detail-panel { background: var(--ct-panel); color: var(--ct-ink); border-color: var(--ct-line); }
body.ct-workspace :is(.filter-chip,.tab-btn,.timeframe-btn,.range-btn).active { background: var(--ct-selected) !important; color: var(--ct-blue) !important; border-color: var(--ct-blue) !important; }
body.ct-workspace .tab-btn-active { background: var(--ct-selected) !important; color: var(--ct-blue) !important; border-color: var(--ct-blue) !important; }
body.ct-workspace [class*="bg-[#0"], body.ct-workspace [class*="bg-[#1"] { background-color: var(--ct-panel); }
body.ct-workspace [class*="text-[#8b949e]"], body.ct-workspace .text-gray-400 { color: var(--ct-muted) !important; }
body.ct-workspace .text-white { color: var(--ct-ink) !important; }
body.ct-workspace [class*="border-[#"] { border-color: var(--ct-line) !important; }
body.ct-workspace [class*="text-[#c586c0]"], body.ct-workspace [class*="text-[#9cdcfe]"] { color: var(--ct-blue) !important; }
body.ct-workspace :is(.text-green-400,[class*="text-[#a7f3d0]"]) { color: var(--ct-blue) !important; }
body.ct-workspace :is(.text-red-400,[class*="text-[#fecdd3]"],[class*="text-[#dcdcaa]"]) { color: var(--ct-negative) !important; }
body.ct-workspace button:focus-visible, body.ct-workspace a:focus-visible { outline: 2px solid var(--ct-blue); outline-offset: 3px; }
body.ct-workspace svg text { font-family: var(--ct-font-ui); }
body.ct-workspace svg :is([fill="#ffffff"],[fill="#fff"],[fill="#c9d1d9"]) { fill: var(--ct-ink); }
body.ct-workspace svg :is([fill="#8b949e"],[fill="#6b7280"]) { fill: var(--ct-muted); }
body.ct-workspace svg :is([stroke="#21262d"],[stroke="#30363d"],[stroke="#333"]) { stroke: var(--ct-line); }
body.ct-workspace svg :is([fill="#c586c0"],[fill="#9cdcfe"],[fill="#a7f3d0"]) { fill: var(--ct-blue); }
body.ct-workspace svg :is([stroke="#c586c0"],[stroke="#9cdcfe"],[stroke="#a7f3d0"]) { stroke: var(--ct-blue); }
body.ct-workspace svg :is([fill="#fecdd3"],[fill="#dcdcaa"]) { fill: var(--ct-negative); }
body.ct-workspace svg :is([stroke="#fecdd3"],[stroke="#dcdcaa"]) { stroke: var(--ct-negative); }
body.ct-workspace :is(.chart-tooltip,.tooltip) { background: var(--ct-panel); color: var(--ct-ink); border-color: var(--ct-line); }
@media(max-width: 800px) {
  body.ct-workspace :is(#main-content,main.shell,main.ct-legacy-main), .ct-workspace-heading { width: calc(100% - 32px); }
  .ct-workspace-heading { padding-top: 28px; }
  body.ct-workspace input { font-size: 16px; }
  body.ct-workspace #state-machine-container { width: min(400px,100%); max-width: 100%; padding-right: 0; }
  body.ct-workspace .terminal-card > div > .flex.items-center.gap-2 { flex-wrap: wrap; }
}
