/* Decision Studio, on the Oncotics tokens. © 2026 Oncotics™. */
:root { --st-bg: #F6F5F1; --st-surface: #FFFFFF; --st-surface-2: #F1EFE9; --st-line: rgba(11,14,19,.14); --st-line-2: rgba(11,14,19,.24); --st-text: #0E1726; --st-muted: #4A505B; --st-accent: #0A7566; --st-accent-ink: #FFFFFF; --st-good: #047857; --st-good-bg: rgba(5,150,105,.11); --st-warn: #92400E; --st-warn-bg: rgba(245,158,11,.16); --st-bad: #BE123C; --st-bad-bg: rgba(225,29,72,.10); --st-sim: #6D28D9; --st-sim-bg: rgba(124,58,237,.10); }
:root[data-theme="dark"] { --st-bg: #0B1322; --st-surface: #13203A; --st-surface-2: #172645; --st-line: rgba(236,239,244,.12); --st-line-2: rgba(236,239,244,.22); --st-text: #ECEFF4; --st-muted: #A7AEBA; --st-accent: #3DDCC4; --st-accent-ink: #04211C; --st-good: #6EE7B7; --st-good-bg: rgba(52,211,153,.14); --st-warn: #FCD34D; --st-warn-bg: rgba(251,191,36,.14); --st-bad: #FF9B8F; --st-bad-bg: rgba(255,107,74,.15); --st-sim: #C4B5FD; --st-sim-bg: rgba(167,139,250,.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --st-bg: #0B1322; --st-surface: #13203A; --st-surface-2: #172645; --st-line: rgba(236,239,244,.12); --st-line-2: rgba(236,239,244,.22); --st-text: #ECEFF4; --st-muted: #A7AEBA; --st-accent: #3DDCC4; --st-accent-ink: #04211C; --st-good: #6EE7B7; --st-good-bg: rgba(52,211,153,.14); --st-warn: #FCD34D; --st-warn-bg: rgba(251,191,36,.14); --st-bad: #FF9B8F; --st-bad-bg: rgba(255,107,74,.15); --st-sim: #C4B5FD; --st-sim-bg: rgba(167,139,250,.16); } }
#studio { max-width: 1320px; margin: 0 auto; padding: 16px; color: var(--st-text); min-height: 60vh; }
.st-casebar, .st-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.st-casebar { padding: 10px 12px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; }
.st-casepick { width: auto; max-width: 420px; flex: 0 1 auto; }
.st-end { justify-content: flex-end; margin-top: 14px; }
.st-spacer { flex: 1; }
.st-nav, .st-stages, .st-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 12px 0; }
.st-navbtn, .st-stage-tab, .st-tab { background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--st-muted); padding: 8px 12px; font: inherit; font-weight: 500; cursor: pointer; min-height: 38px; }
.st-navbtn:hover, .st-stage-tab:hover, .st-tab:hover { background: var(--st-surface-2); color: var(--st-text); }
.st-navbtn[aria-current="page"], .st-stage-tab[aria-current="step"], .st-tab[aria-selected="true"] { background: var(--st-surface); border-color: var(--st-line-2); color: var(--st-text); }
.st-stages { border-bottom: 1px solid var(--st-line); padding-bottom: 8px; }
.st-tabwrap { display: inline-flex; align-items: center; }
.st-x { background: none; border: 0; color: var(--st-muted); cursor: pointer; font-size: 18px; padding: 0 6px; min-height: 32px; }
.st-panel { background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; padding: 16px; margin: 0 0 14px; }
.st-panel h3 { margin: 0 0 8px; font-size: 1.05rem; font-weight: 600; }
.st-panel h4 { margin: 12px 0 6px; font-size: .95rem; font-weight: 600; }
.st-muted { color: var(--st-muted); }
.st-small { font-size: .84rem; }
.st-mono { font-family: "Geist Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; }
.st-wrap { overflow-wrap: anywhere; }
.st-warn { color: var(--st-warn); background: var(--st-warn-bg); padding: 8px 10px; border-radius: 8px; }
.st-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--st-surface); border: 1px solid var(--st-line-2); color: var(--st-text); border-radius: 8px; padding: 7px 12px; font: inherit; font-size: .9rem; font-weight: 500; cursor: pointer; min-height: 36px; text-decoration: none; }
.st-btn:hover { background: var(--st-surface-2); }
.st-btn.primary { background: var(--st-accent); border-color: var(--st-accent); color: var(--st-accent-ink); }
.st-btn.primary:hover { filter: brightness(1.08); }
.st-btn.danger { color: var(--st-bad); border-color: var(--st-bad); }
.st-btn:disabled { opacity: .5; cursor: not-allowed; }
.st-btn:focus-visible, .st-input:focus-visible, .st-navbtn:focus-visible, .st-tab:focus-visible, .st-stage-tab:focus-visible, .st-filerow:focus-visible { outline: 2px solid var(--st-accent); outline-offset: 2px; }
.st-link { background: none; border: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.st-input { width: 100%; box-sizing: border-box; background: var(--st-bg); border: 1px solid var(--st-line-2); color: var(--st-text); border-radius: 8px; padding: 8px 10px; font: inherit; min-height: 38px; }
.st-field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; flex: 1 1 180px; min-width: 0; font-size: .9rem; font-weight: 500; }
.st-field small { color: var(--st-muted); font-weight: 400; }
.st-check { display: inline-flex; gap: 6px; align-items: center; font-size: .9rem; margin: 3px 12px 3px 0; }
.st-fieldset { border: 1px solid var(--st-line); border-radius: 8px; margin: 8px 0; padding: 8px 12px; }
.st-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.st-badge { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: var(--st-surface-2); color: var(--st-muted); }
.st-badge.FACT { background: var(--st-good-bg); color: var(--st-good); }
.st-badge.DERIVED { background: rgba(14,116,144,.12); color: #0E7490; }
:root[data-theme="dark"] .st-badge.DERIVED { color: #67E8F9; }
.st-badge.ASSUMPTION { background: var(--st-warn-bg); color: var(--st-warn); }
.st-badge.SIMULATED { background: var(--st-sim-bg); color: var(--st-sim); }
.st-badge.good { background: var(--st-good-bg); color: var(--st-good); }
.st-badge.warn { background: var(--st-warn-bg); color: var(--st-warn); }
.st-badge.bad { background: var(--st-bad-bg); color: var(--st-bad); }
.st-empty { padding: 22px; text-align: center; color: var(--st-muted); border: 1px dashed var(--st-line-2); border-radius: 12px; margin: 8px 0; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.st-rec { background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 10px; padding: 10px 12px; margin: 0 0 8px; min-width: 0; overflow-wrap: anywhere; }
.st-rec p { margin: 6px 0; }
.st-superseded { opacity: .6; }
.st-kv { display: grid; grid-template-columns: max-content 1fr; gap: 2px 10px; margin: 6px 0 0; font-size: .82rem; }
.st-kv dt { color: var(--st-muted); }
.st-kv dd { margin: 0; overflow-wrap: anywhere; }
.st-tablewrap { overflow-x: auto; border: 1px solid var(--st-line); border-radius: 10px; margin: 8px 0; max-width: 100%; }
.st-table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.st-table th, .st-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--st-line); vertical-align: top; overflow-wrap: anywhere; }
.st-table thead th { background: var(--st-surface-2); font-weight: 600; white-space: nowrap; }
.st-cell { min-width: 170px; }
.st-cell .st-input { margin-bottom: 4px; min-height: 32px; padding: 4px 8px; }
.st-inputs .st-input { flex: 1 1 90px; width: auto; min-width: 80px; }
.st-chart { width: 100%; max-width: 680px; display: block; margin: 8px 0; }
.st-bar { fill: var(--st-accent); }
.st-axis { fill: var(--st-muted); font-size: 11px; }
/* chat */
.st-chat { display: flex; flex-direction: column; height: min(72vh, 780px); min-height: 420px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; }
.st-log { flex: 1; overflow-y: auto; padding: 14px; }
.st-msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; margin: 0 0 10px; overflow-wrap: anywhere; }
.st-msg p { margin: 4px 0; }
.st-msg.me { margin-left: auto; background: var(--st-surface-2); }
.st-msg.ai { border: 1px solid var(--st-line); }
.st-warnbox { background: var(--st-warn-bg); }
.st-live { white-space: pre-wrap; }
.st-toolcard { border: 1px solid var(--st-line); border-radius: 8px; padding: 6px 10px; margin: 0 0 8px; font-size: .84rem; }
.st-toolcard.err { border-color: var(--st-bad); }
.st-toolcard summary { cursor: pointer; font-weight: 500; }
.st-toolcard pre, .st-livetext { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; max-height: 320px; overflow: auto; font-family: "Geist Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; }
.st-composer { border-top: 1px solid var(--st-line); padding: 10px; }
.st-composer .st-row { margin-top: 6px; }
.st-composer .st-row .st-input { width: auto; flex: 0 1 220px; }
.st-compose { resize: vertical; }
.st-cmds { display: flex; gap: 4px; flex-wrap: wrap; }
.st-chip { background: var(--st-surface-2); border: 1px solid var(--st-line); color: var(--st-text); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: .8rem; cursor: pointer; margin-bottom: 4px; }
.md { overflow-wrap: anywhere; }
.md h1, .md h2, .md h3 { font-size: 1.02rem; margin: 10px 0 4px; font-weight: 600; }
.md table { border-collapse: collapse; display: block; overflow-x: auto; }
.md td, .md th { border: 1px solid var(--st-line); padding: 4px 8px; }
.md pre { overflow-x: auto; background: var(--st-surface-2); padding: 8px; border-radius: 8px; }
.md img { max-width: 100%; }
/* files */
.st-split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.st-filelist { max-height: 70vh; overflow-y: auto; }
.st-filerow { display: block; width: 100%; text-align: left; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 8px; padding: 7px 10px; margin-bottom: 4px; color: var(--st-text); font: inherit; font-size: .86rem; cursor: pointer; }
.st-filerow small { display: block; color: var(--st-muted); }
.st-preview { background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; padding: 12px; min-width: 0; min-height: 320px; }
.st-img, .st-pdf { max-width: 100%; height: auto; display: block; margin: 8px 0; background: #fff; }
.st-mol { position: relative; width: 100%; height: 480px; }
.st-editor { border: 1px solid var(--st-line); border-radius: 8px; margin-top: 8px; max-height: 65vh; overflow: auto; }
.st-cell-code pre { background: var(--st-surface-2); padding: 8px; border-radius: 8px; overflow-x: auto; }
.st-pdftext { white-space: pre-wrap; }
/* team */
.st-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 14px; align-items: start; }
.st-col { background: var(--st-surface-2); border-radius: 10px; padding: 8px; min-height: 90px; min-width: 0; }
.st-col h4 { margin: 2px 4px 8px; font-size: .84rem; font-weight: 600; }
/* dialogs and toasts */
.st-dialog { max-width: 560px; width: calc(100% - 32px); border: 1px solid var(--st-line-2); border-radius: 12px; background: var(--st-surface); color: var(--st-text); padding: 18px; }
.st-dialog h2 { margin: 0 0 8px; font-size: 1.1rem; }
.st-dialog::backdrop { background: rgba(0,0,0,.45); }
#st-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 6px; max-width: min(420px, calc(100vw - 32px)); }
.st-toast { background: var(--st-text); color: var(--st-bg); padding: 10px 14px; border-radius: 8px; font-size: .9rem; }
.st-toast.err { background: var(--st-bad); color: #fff; }
.st-print { display: none; }
@media print { html.st-printing body > *:not(.st-print) { display: none !important; } html.st-printing .st-print { display: block; color: #000; background: #fff; } }
@media (max-width: 760px) {
  #studio { padding: 16px; }
  .st-split { grid-template-columns: minmax(0, 1fr); }
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .st-msg { max-width: 100%; }
  .st-casepick { max-width: 100%; flex: 1 1 100%; }
  .st-composer .st-row .st-input { flex: 1 1 100%; width: 100%; }
}

.st-terminal { background: #0B1322; color: #ECEFF4; font-family: "Geist Mono", ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; padding: 10px; border-radius: 8px; height: 380px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
#st-toasts { bottom: 72px; }

/* Full-page editors: documents and LaTeX */
.st-editor-page { margin: 0; background: var(--st-bg); color: var(--st-text); }
.st-editorapp { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
.st-editorbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; background: var(--st-surface); border-bottom: 1px solid var(--st-line); }
.st-ribbon-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px 12px 0; background: var(--st-surface); }
.st-ribbon-tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--st-muted); font: inherit; font-size: 13px; padding: 6px 8px; cursor: pointer; min-height: 32px; }
.st-ribbon-tab.on { border-bottom-color: var(--st-text); color: var(--st-text); font-weight: 600; }
.st-ribbon-tab:disabled { opacity: .5; cursor: default; }
.st-ribbon-panel { display: flex; align-items: center; gap: 4px; padding: 6px 12px; overflow-x: auto; background: var(--st-surface); border-bottom: 1px solid var(--st-line); min-height: 46px; }
.st-ribbon-panel .st-input { width: auto; flex: none; min-height: 32px; padding: 4px 6px; }
.st-ribbon-panel input[type="color"] { width: 32px; height: 32px; padding: 2px; border: 1px solid var(--st-line); border-radius: 6px; background: none; flex: none; }
.st-ribbon-btn { flex: none; min-height: 32px; padding: 4px 8px; font-size: 13px; }
.st-ribbon-btn.on { background: var(--st-surface-2); border-color: var(--st-line-2); font-weight: 700; }
.st-ribbon-sep { flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--st-line); }
.st-ribbon-zoom { gap: 2px; flex-wrap: nowrap; }
.st-formula { display: flex; align-items: center; gap: 8px; padding: 4px 12px; background: var(--st-surface); border-bottom: 1px solid var(--st-line); }
.st-formula .st-input { flex: 1; min-width: 0; font-family: var(--st-mono, monospace); }
.st-office-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: #f4f4f5; }
.st-editorfoot { margin: 0; padding: 4px 12px; background: var(--st-surface); border-top: 1px solid var(--st-line); }
.st-latex-work { flex: 1; min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1fr); }
.st-latex-work.source { grid-template-columns: 170px minmax(0, 1fr); }
.st-latex-work.source .st-latex-pdf { display: none; }
.st-latex-work.pdf { grid-template-columns: minmax(0, 1fr); }
.st-latex-work.pdf .st-latex-source, .st-latex-work.pdf .st-latex-outline { display: none; }
.st-latex-outline { overflow: auto; padding: 8px; border-right: 1px solid var(--st-line); background: var(--st-surface); font-size: 13px; }
.st-latex-outline h3 { margin: 0 0 6px; font-size: 13px; }
.st-latex-oitem { display: block; width: 100%; text-align: left; padding-top: 3px; padding-bottom: 3px; }
.st-latex-source { min-width: 0; min-height: 0; overflow: hidden; background: var(--st-surface); }
.st-latex-source .cm-editor { height: 100%; }
.st-latex-source .cm-scroller { overflow: auto; font-size: 14px; }
.st-latex-pdf { min-width: 0; min-height: 0; overflow: auto; background: var(--st-surface-2); border-left: 1px solid var(--st-line); }
.st-latex-pages { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; min-width: min-content; }
.st-latex-page { position: relative; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); flex: none; }
.st-latex-hit { position: absolute; background: rgba(255, 205, 0, .4); outline: 1px solid rgba(180, 130, 0, .8); pointer-events: none; }
.st-latex-flash { background: rgba(255, 205, 0, .3); }
.st-latex-notice { padding: 6px 12px; }
.st-latex-foot { background: var(--st-surface); border-top: 1px solid var(--st-line); padding: 6px 12px; }
.st-latex-problems { max-height: 16vh; overflow: auto; }
.st-latex-list { list-style: none; margin: 4px 0; padding: 0; font-size: 13px; }
.st-latex-list .st-link { text-align: left; padding: 2px 0; }
.st-latex-log { max-height: 60vh; overflow: auto; font-size: 12px; white-space: pre-wrap; }
.st-latex-diff { max-height: 50vh; overflow: auto; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.st-latex-diff .add { background: rgba(0, 150, 80, .18); }
.st-latex-diff .del { background: rgba(200, 40, 40, .18); text-decoration: line-through; }
@media (max-width: 760px) {
  .st-latex-work.split, .st-latex-work.source { grid-template-columns: minmax(0, 1fr); }
  .st-latex-work.split { grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .st-latex-outline { display: none; }
  .st-latex-pdf { border-left: 0; border-top: 1px solid var(--st-line); }
}
.st-slides { display: flex; flex-direction: column; gap: 14px; }
.st-slides figure { margin: 0; }
.st-slide { position: relative; background: #fff; color: #111; border: 1px solid var(--st-line-2); overflow: hidden; max-width: 100%; }
.st-slide-text { position: absolute; overflow: hidden; }
.st-slide-text p { margin: 0 0 .2em; line-height: 1.2; }

/* Automatic run */
.st-stage-ok { color: var(--st-good, #0a7a55); }
.st-start { max-width: 760px; }
.st-autohead { max-width: 860px; }
.st-timeline { list-style: none; margin: 0 0 16px; padding: 0; max-width: 860px; }
.st-tl-item { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 6px 0; position: relative; }
.st-tl-item:not(:last-child)::before { content: ''; position: absolute; left: 12px; top: 30px; bottom: -6px; width: 2px; background: var(--st-line); }
.st-tl-dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--st-line-2); background: var(--st-surface); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; z-index: 1; }
.st-tl-item.done .st-tl-dot { background: var(--st-accent, #0a7a55); border-color: var(--st-accent, #0a7a55); color: #fff; }
.st-tl-item.now .st-tl-dot { border-color: var(--st-accent, #0a7a55); border-top-color: transparent; animation: st-spin 1s linear infinite; }
.st-tl-item.failed .st-tl-dot { border-color: #b3261e; color: #b3261e; }
.st-tl-item.wait { opacity: .72; }
.st-tl-body p { margin: 2px 0 0; }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .st-tl-item.now .st-tl-dot { animation: none; border-top-color: var(--st-accent, #0a7a55); } }
.st-verdict { background: var(--st-surface); border: 1px solid var(--st-line-2); border-radius: 12px; padding: 18px; margin: 0 0 14px; }
.st-verdict h3 { font-size: 1.5rem; margin: 2px 0 8px; }
.st-verdict-label { margin: 8px 0 0; color: var(--st-muted); font-size: 13px; }
.st-resultgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.st-resultgrid .st-panel { margin: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.st-timelinebox { max-width: 860px; } .st-timelinebox > summary { cursor: pointer; margin-bottom: 8px; }

.st-page { max-width: 1320px; margin: 0 auto; padding: 16px; color: var(--st-text); min-height: 60vh; }
.st-wire { display: flex; flex-direction: column; gap: 8px; }
.st-wire .st-rec p { margin: 4px 0 0; }
.st-chart { width: 100%; height: auto; display: block; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 8px; }
.st-chart text { fill: var(--st-muted); font-size: 11px; }

.st-pathlist { margin: 0; padding-left: 20px; }
.st-pathlist li { margin: 6px 0; }
.st-pdf { max-width: 100%; height: auto; display: block; margin-top: 8px; }
