/* BioStudio AI — Stat Studio.
   One visual system with Clarity's AI tab (clarity/app/chat-workspace.css
   --gpt-*): ChatGPT greys and spacing on White and Black windows, the window
   theme's own colours on tinted ones.

   OS window-colour traps (css/app-color-themes.css), all avoided on purpose:
   - class names never end in -card / -tile / -stat / -panel / -pane / -pill /
     -chip / -btn / -button / -box / -note / -meta / -hint / -sub / -empty /
     -caption, and never contain -tab / -plot / -chart / -figure / -legend /
     sidebar / toolbar / dialog / dropdown / popover / modal;
   - the two forced-text rules skip `.stx *`, and `.stx` is authored colour
     content (js/platform/app-color-theme.js);
   - fields carry .stx-field / .stx-plain and win back below. */

.stx-host { position: relative; width: 100%; height: 100%; overflow: hidden; }

.stx {
  --stx-bg: #ffffff;
  --stx-side: #f9f9f9;
  --stx-text: #0d0d0d;
  --stx-text-2: #5d5d5d;
  --stx-text-3: #8f8f8f;
  --stx-hover: rgba(0, 0, 0, 0.05);
  --stx-active: rgba(0, 0, 0, 0.07);
  --stx-line: rgba(0, 0, 0, 0.1);
  --stx-line-2: rgba(0, 0, 0, 0.15);
  --stx-bubble: #f4f4f4;
  --stx-composer: #ffffff;
  --stx-menu: #ffffff;
  --stx-raised: #ffffff;
  --stx-soft: #f7f7f8;
  --stx-accent: #2a78d6;
  --stx-accent-ink: #1c5cab;
  --stx-good: #0ca30c;
  --stx-good-ink: #006300;
  --stx-warn: #c98500;
  --stx-bad: #d03b3b;
  --stx-neg: #2a78d6;
  --stx-pos: #e34948;
  --stx-send-off: #d7d7d7;
  --stx-chart-bg: #ffffff;
  --stx-grid: #ececec;
  --stx-axis: #c9c9c9;
  --stx-dark: 0;
  --stx-shadow: 0 4px 4px rgba(0, 0, 0, 0.04), 0 0 1px rgba(0, 0, 0, 0.62);
  --stx-shadow-menu: 0 10px 32px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
  --stx-font: ui-sans-serif, -apple-system, system-ui, "Segoe UI", Helvetica, "Apple Color Emoji", Arial, sans-serif, "Segoe UI Emoji";
  --stx-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --stx-rail-w: 260px;

  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--stx-bg);
  color: var(--stx-text);
  font-family: var(--stx-font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

/* Dark windows — the dark half of Clarity's AI tab. */
.window[data-app-color-tone="dark"] .stx,
.stx.is-dark {
  --stx-bg: #212121;
  --stx-side: #181818;
  --stx-text: #ffffff;
  --stx-text-2: #afafaf;
  --stx-text-3: #8f8f8f;
  --stx-hover: rgba(255, 255, 255, 0.07);
  --stx-active: rgba(255, 255, 255, 0.1);
  --stx-line: rgba(255, 255, 255, 0.1);
  --stx-line-2: rgba(255, 255, 255, 0.16);
  --stx-bubble: #303030;
  --stx-composer: #303030;
  --stx-menu: #353535;
  --stx-raised: #262626;
  --stx-soft: #2a2a2a;
  --stx-accent: #3987e5;
  --stx-accent-ink: #9ec5f4;
  --stx-good: #0ca30c;
  --stx-good-ink: #3ccf91;
  --stx-warn: #fab219;
  --stx-bad: #e66767;
  --stx-neg: #3987e5;
  --stx-pos: #e66767;
  --stx-send-off: #676767;
  --stx-chart-bg: #212121;
  --stx-grid: #303030;
  --stx-axis: #4a4a4a;
  --stx-dark: 1;
  --stx-shadow: 0 4px 4px transparent, 0 0 1px rgba(255, 255, 255, 0.35);
  --stx-shadow-menu: 0 10px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
  color-scheme: dark;
}

/* Tinted window themes: take the theme's own colours, like Clarity. */
.window[data-app-color-theme]:not([data-app-color-theme="white"]):not([data-app-color-theme="black"]) .stx {
  --stx-bg: var(--bg);
  --stx-side: var(--surface-2);
  --stx-text: var(--text, var(--ink));
  --stx-text-2: var(--muted, var(--ink-soft));
  --stx-text-3: var(--faint, var(--muted));
  --stx-hover: color-mix(in srgb, var(--text, var(--ink)) 7%, transparent);
  --stx-active: color-mix(in srgb, var(--text, var(--ink)) 11%, transparent);
  --stx-line: color-mix(in srgb, var(--line) 85%, transparent);
  --stx-line-2: var(--line);
  --stx-bubble: var(--surface-2);
  --stx-composer: var(--surface);
  --stx-menu: var(--surface);
  --stx-raised: var(--surface);
  --stx-soft: var(--surface-2);
  --stx-chart-bg: var(--surface);
  --stx-grid: color-mix(in srgb, var(--line) 70%, transparent);
  --stx-axis: var(--line);
  --stx-send-off: var(--surface-3);
}

.stx *, .stx *::before, .stx *::after { box-sizing: border-box; }
.stx [hidden] { display: none !important; }
:where(.stx) button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; cursor: pointer; }
:where(.stx) button:disabled { cursor: default; opacity: 0.5; }
.stx h1, .stx h2, .stx h3, .stx h4, .stx p { margin: 0; }
.stx-ico { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; }
.stx-ico svg { display: block; width: 100%; height: 100%; }
.stx-grow { flex: 1; min-width: 0; }
.stx-small { color: var(--stx-text-3); font-size: 12.5px; line-height: 1.45; }
.stx-err { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--stx-bad) 10%, transparent); color: var(--stx-text); font-size: 14px; }
.stx-err .stx-ico { color: var(--stx-bad); margin-top: 1px; }
.stx-pulse { animation: stx-pulse 1.4s ease-in-out infinite; }
@keyframes stx-pulse { 50% { opacity: 0.45; } }

/* Fields: the window theme repaints every input; these are ours. */
#os .window[data-app-color-theme] .stx :is(input, select, textarea).stx-field,
.stx :is(input, select, textarea).stx-field {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--stx-line-2) !important;
  border-radius: 10px;
  background: var(--stx-composer) !important;
  color: var(--stx-text) !important;
  font: inherit;
  font-size: 14px;
  outline: none;
  box-shadow: none;
}
#os .window[data-app-color-theme] .stx :is(input, select, textarea).stx-field:focus,
.stx :is(input, select, textarea).stx-field:focus { border-color: color-mix(in srgb, var(--stx-accent) 60%, var(--stx-line-2)) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--stx-accent) 18%, transparent); }
#os .window[data-app-color-theme] .stx :is(textarea, input).stx-plain,
.stx :is(textarea, input).stx-plain {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  max-height: 26vh;
  margin: 0;
  padding: 6px 4px;
  border: 0 !important;
  resize: none;
  background: transparent !important;
  color: var(--stx-text) !important;
  font: inherit;
  font-size: 16px;
  line-height: 24px;
  outline: none;
  box-shadow: none;
}
#os .window[data-app-color-theme] .stx :is(input, textarea)::placeholder,
.stx :is(input, textarea)::placeholder { color: var(--stx-text-3) !important; opacity: 1; }

/* ---------- Rail ---------- */
.stx-rail { display: flex; flex-direction: column; width: var(--stx-rail-w); flex: 0 0 var(--stx-rail-w); min-height: 0; background: var(--stx-side); border-right: 1px solid var(--stx-line); transition: width 0.2s ease, flex-basis 0.2s ease; overflow: hidden; }
.stx-rail.is-collapsed { width: 56px; flex-basis: 56px; }
.stx-rail-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; height: 52px; padding: 0 8px; flex: none; }
.stx-rail.is-collapsed .stx-rail-top { justify-content: center; }
.stx-brand { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-weight: 600; font-size: 15px; white-space: nowrap; }
.stx-brand:hover { background: var(--stx-hover); }
.stx-brand .stx-ico { width: 20px; height: 20px; color: var(--stx-accent); }
.stx-rail-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 6px 12px; scrollbar-width: thin; scrollbar-color: var(--stx-line-2) transparent; }
.stx-navgroup { display: flex; flex-direction: column; margin-bottom: 14px; }
.stx-nav, .stx-item-main { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 10px; background: transparent; font-size: 14px; line-height: 20px; text-align: left; white-space: nowrap; }
.stx-nav:hover, .stx-item:hover .stx-item-main { background: var(--stx-hover); }
.stx-nav[aria-current="true"], .stx-item[aria-current="true"] .stx-item-main { background: var(--stx-active); font-weight: 500; }
.stx-nav-label, .stx-item-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stx-nav-count, .stx-item-count { color: var(--stx-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.stx-nav-keys { display: none; color: var(--stx-text-3); font-size: 12px; }
.stx-nav:hover .stx-nav-keys { display: inline; }
.stx-rail.is-collapsed .stx-nav { justify-content: center; width: 40px; padding: 8px; }
.stx-rail.is-collapsed :is(.stx-nav-label, .stx-nav-keys, .stx-nav-count, .stx-account-text) { display: none; }
.stx-grouplabel { display: flex; align-items: center; justify-content: space-between; height: 30px; padding: 0 4px 0 10px; color: var(--stx-text-3); font-size: 12.5px; font-weight: 500; }
.stx-add { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--stx-text-3); }
.stx-add:hover, .stx-add[aria-expanded="true"] { background: var(--stx-hover); color: var(--stx-text); }
.stx-add .stx-ico { width: 16px; height: 16px; }
.stx-railnote { padding: 4px 10px 6px; color: var(--stx-text-3); font-size: 12.5px; }
.stx-railnote.is-bucket { padding-top: 8px; font-size: 11.5px; font-weight: 500; }
.stx-item { position: relative; }
.stx-item-main { padding-right: 34px; }
.stx-item-more { position: absolute; top: 50%; right: 4px; display: grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--stx-text-2); opacity: 0; transform: translateY(-50%); }
.stx-item:hover .stx-item-more, .stx-item[aria-current="true"] .stx-item-more, .stx-item-more[aria-expanded="true"] { opacity: 1; }
.stx-item:hover .stx-item-count { visibility: hidden; }
.stx-rail-foot { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-top: 1px solid var(--stx-line); }
.stx-switchrow { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 4px 10px; border: 0; border-radius: 10px; background: transparent; font-size: 13.5px; text-align: left; }
.stx-switchrow:hover { background: var(--stx-hover); }
.stx-switch { position: relative; width: 30px; height: 18px; flex: none; border-radius: 999px; background: var(--stx-send-off); transition: background 0.15s ease; }
.stx-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.stx-switchrow[aria-checked="true"] .stx-switch { background: #0f766e; }
.stx-switchrow[aria-checked="true"] .stx-switch::after { transform: translateX(12px); }
.stx-rail.is-collapsed .stx-switchrow { justify-content: center; padding: 4px; }
.stx-account { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 6px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.stx-account:hover { background: var(--stx-hover); }
.stx-avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #10a37f; color: #fff; }
.stx-avatar .stx-ico { width: 16px; height: 16px; }
.stx-account-text { display: grid; min-width: 0; line-height: 1.25; }
.stx-account-name { overflow: hidden; font-size: 13.5px; white-space: nowrap; text-overflow: ellipsis; }
.stx-rail.is-collapsed .stx-account { justify-content: center; padding: 4px; }

/* ---------- Main ---------- */
.stx-main { position: relative; display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; background: var(--stx-bg); }
.stx-top { display: flex; align-items: center; gap: 8px; height: 52px; flex: none; padding: 0 12px 0 16px; border-bottom: 1px solid transparent; }
.stx-crumb { display: flex; align-items: center; gap: 10px; min-width: 0; }
.stx-crumb-sec { font-size: 18px; font-weight: 500; white-space: nowrap; }
.stx-dspick { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 420px; height: 32px; padding: 0 8px 0 10px; border: 1px solid var(--stx-line-2); border-radius: 999px; background: var(--stx-bg); font-size: 13.5px; }
.stx-dspick:hover, .stx-dspick[aria-expanded="true"] { background: var(--stx-hover); }
.stx-dspick > span:nth-child(2) { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stx-dspick .stx-ico { width: 16px; height: 16px; color: var(--stx-text-2); }
.stx-body { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--stx-line-2) transparent; }
.stx-body-inner { width: min(1120px, 100%); margin: 0 auto; padding: 8px 28px 64px; }
.stx.is-dropping::after { content: "Drop a CSV, Excel or JSON file to analyze it"; position: absolute; inset: 12px; z-index: 50; display: grid; place-items: center; border: 2px dashed var(--stx-accent); border-radius: 18px; background: color-mix(in srgb, var(--stx-accent) 8%, var(--stx-bg)); color: var(--stx-text); font-size: 17px; font-weight: 500; pointer-events: none; }

/* Buttons */
.stx-go { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--stx-text); color: var(--stx-bg) !important; font-size: 14px; font-weight: 500; white-space: nowrap; }
.stx-go:hover:not(:disabled) { opacity: 0.86; }
.stx-go .stx-ico { width: 16px; height: 16px; }
.stx-go.is-soft { background: transparent; color: var(--stx-text) !important; box-shadow: inset 0 0 0 1px var(--stx-line-2); }
.stx-go.is-soft:hover:not(:disabled) { background: var(--stx-hover); opacity: 1; }
.stx-go.is-soft .stx-ico { color: var(--stx-accent); }
.stx-ghost { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--stx-text-2); font-size: 13.5px; white-space: nowrap; }
.stx-ghost:hover:not(:disabled), .stx-ghost[aria-expanded="true"] { background: var(--stx-hover); color: var(--stx-text); }
.stx-ghost .stx-ico { width: 16px; height: 16px; }
.stx-iconbtn { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--stx-text-2); }
.stx-iconbtn:hover:not(:disabled), .stx-iconbtn[aria-expanded="true"] { background: var(--stx-hover); color: var(--stx-text); }
.stx-iconbtn[aria-pressed="true"] { color: var(--stx-accent); }
.stx-linkbtn { border: 0; padding: 0 4px; background: none; color: var(--stx-accent-ink); font-size: 13px; }
.stx-linkbtn:hover { text-decoration: underline; }
.stx-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--stx-hover); }
.stx-seg-item { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--stx-text-2); font-size: 13px; white-space: nowrap; }
.stx-seg-item[aria-checked="true"] { background: var(--stx-bg); color: var(--stx-text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--stx-line); }

/* Section heads */
.stx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px 0 14px; }
.stx-head-main { display: grid; gap: 2px; min-width: 0; }
.stx-headline-info { color: var(--stx-text-3); font-size: 13px; }
.stx-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stx-h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
#os .window[data-app-color-theme] .stx .stx-title-input.stx-field,
.stx .stx-title-input.stx-field { min-width: min(520px, 100%); padding: 2px 6px; border-color: transparent !important; background: transparent !important; font-size: 22px !important; font-weight: 600; letter-spacing: -0.01em; }
#os .window[data-app-color-theme] .stx .stx-title-input.stx-field:hover,
.stx .stx-title-input.stx-field:hover { border-color: var(--stx-line) !important; }
.stx-blank { display: grid; justify-items: center; gap: 12px; padding: 64px 20px; color: var(--stx-text-2); text-align: center; }
.stx-blank > .stx-ico { width: 34px; height: 34px; color: var(--stx-text-3); }
.stx-runbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ---------- Menus & tooltips ---------- */
.stx-menu { position: absolute; z-index: 60; min-width: 220px; max-width: min(360px, calc(100% - 16px)); max-height: min(70vh, 560px); overflow-y: auto; padding: 6px; border-radius: 16px; background: var(--stx-menu); box-shadow: var(--stx-shadow-menu); color: var(--stx-text); font-size: 14px; }
.stx-menu-title { padding: 8px 10px 4px; color: var(--stx-text-3); font-size: 12px; font-weight: 500; }
.stx-menu-sep { height: 1px; margin: 5px 6px; background: var(--stx-line); }
.stx-menu-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 7px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.stx-menu-row:hover:not(:disabled), .stx-menu-row:focus-visible { background: var(--stx-hover); outline: none; }
.stx-menu-row.is-danger { color: var(--stx-bad); }
.stx-menu-row .stx-ico { color: var(--stx-text-2); }
.stx-menu-gap { width: 18px; flex: none; }
.stx-menu-text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.stx-menu-label { overflow: hidden; text-overflow: ellipsis; }
.stx-menu-desc { color: var(--stx-text-3); font-size: 12.5px; white-space: normal; }
.stx-menu-keys { color: var(--stx-text-3); font-size: 12px; white-space: nowrap; }
.stx-menu-check { color: var(--stx-text); }
.stx-tip { position: absolute; z-index: 70; display: grid; gap: 1px; max-width: 280px; padding: 7px 10px; border-radius: 10px; background: var(--stx-menu); box-shadow: var(--stx-shadow-menu); color: var(--stx-text-2); font-size: 12px; line-height: 1.4; pointer-events: none; }
.stx-tip strong { color: var(--stx-text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Home ---------- */
.stx-home-hello { display: grid; justify-items: center; gap: 14px; padding: 9vh 0 28px; text-align: center; }
.stx-hello { font-size: 28px; font-weight: 500; letter-spacing: -0.02em; }
.stx-hello-text { max-width: 640px; color: var(--stx-text-2); font-size: 15px; }
.stx-composer { display: flex; align-items: flex-end; gap: 4px; width: min(48rem, 100%); padding: 10px; border-radius: 28px; background: var(--stx-composer); box-shadow: var(--stx-shadow); text-align: left; cursor: text; }
.stx-composer.is-big { margin-top: 6px; }
.stx-composer-main { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 6px; }
.stx-composer .stx-iconbtn { width: 36px; height: 36px; border-radius: 50%; color: var(--stx-text); }
.stx-sendbtn { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 0; border-radius: 50%; background: var(--stx-text); color: var(--stx-bg) !important; }
.stx-sendbtn:hover { opacity: 0.85; }
.stx-ctxchip { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; margin: 2px 0 0 4px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--stx-hover); color: var(--stx-text-2); font-size: 12.5px; }
.stx-ctxchip .stx-ico { width: 14px; height: 14px; }
.stx-modechips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.stx-modechip { display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border: 1px solid var(--stx-line-2); border-radius: 999px; background: var(--stx-bg); color: var(--stx-text-2); font-size: 14px; }
.stx-modechip:hover { background: var(--stx-hover); color: var(--stx-text); }
.stx-modechip .stx-ico { width: 17px; height: 17px; }
.stx-home-part { margin-top: 30px; }
.stx-part-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; font-size: 15px; font-weight: 600; }
.stx-flow { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.stx-dsitem, .stx-demo { display: grid; align-content: start; gap: 4px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--stx-line); border-radius: 16px; background: var(--stx-raised); text-align: left; transition: background 0.12s ease, border-color 0.12s ease; }
.stx-dsitem:hover, .stx-demo:hover { border-color: var(--stx-line-2); background: var(--stx-soft); }
.stx-dsitem[aria-current="true"] { border-color: color-mix(in srgb, var(--stx-accent) 50%, var(--stx-line)); }
.stx-dsitem-name { display: flex; align-items: center; gap: 8px; overflow: hidden; font-size: 14px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.stx-dsitem-name .stx-ico { width: 16px; height: 16px; color: var(--stx-text-2); }
.stx-demo-kind { color: var(--stx-accent-ink); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; }
.stx-demo-name { font-size: 14px; font-weight: 500; line-height: 1.35; }

/* ---------- Data ---------- */
.stx-design { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--stx-accent) 8%, transparent); color: var(--stx-text-2); font-size: 14px; }
.stx-design .stx-ico { margin-top: 2px; color: var(--stx-accent); }
.stx-design strong { color: var(--stx-text); }
.stx-colprofs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px; scrollbar-width: thin; }
.stx-colprof { display: grid; align-content: start; gap: 6px; width: 190px; flex: none; padding: 10px 12px; border: 1px solid var(--stx-line); border-radius: 14px; background: var(--stx-raised); text-align: left; }
.stx-colprof:hover, .stx-colprof[aria-expanded="true"] { border-color: var(--stx-line-2); background: var(--stx-soft); }
.stx-colprof-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stx-colprof-name { overflow: hidden; font-size: 13.5px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.stx-kind { display: inline-grid; place-items: center; min-width: 26px; height: 18px; flex: none; padding: 0 4px; border-radius: 5px; background: var(--stx-hover); color: var(--stx-text-2); font-family: var(--stx-mono); font-size: 10.5px; font-weight: 600; }
.stx-kind.is-numeric { background: color-mix(in srgb, #2a78d6 16%, transparent); color: var(--stx-accent-ink); }
.stx-kind.is-categorical { background: color-mix(in srgb, #eb6834 16%, transparent); color: color-mix(in srgb, #eb6834 70%, var(--stx-text)); }
.stx-kind.is-binary { background: color-mix(in srgb, #1baf7a 16%, transparent); color: color-mix(in srgb, #1baf7a 60%, var(--stx-text)); }
.stx-spark { display: flex; align-items: flex-end; gap: 2px; height: 30px; }
.stx-spark span { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: color-mix(in srgb, var(--stx-accent) 65%, transparent); }
.stx-colprof-range { display: flex; justify-content: space-between; gap: 8px; color: var(--stx-text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.stx-colprof-foot { display: flex; justify-content: space-between; color: var(--stx-text-3); font-size: 11.5px; }
.stx-colprof-foot .is-miss { color: var(--stx-warn); }
.stx-levels { display: grid; gap: 3px; }
.stx-level { display: grid; grid-template-columns: minmax(0, 1fr) 46px 24px; align-items: center; gap: 6px; font-size: 11.5px; }
.stx-level-name { overflow: hidden; color: var(--stx-text-2); white-space: nowrap; text-overflow: ellipsis; }
.stx-level-bar { height: 6px; border-radius: 3px; background: var(--stx-hover); overflow: hidden; }
.stx-level-bar span { display: block; height: 100%; border-radius: 3px; background: color-mix(in srgb, #eb6834 70%, transparent); }
.stx-level-n { color: var(--stx-text-3); text-align: right; font-variant-numeric: tabular-nums; }
.stx-gridwrap { max-height: 62vh; overflow: auto; border: 1px solid var(--stx-line); border-radius: 14px; scrollbar-width: thin; }
.stx-sheet { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.stx .stx-sheet th { position: sticky; top: 0; z-index: 1; padding: 8px 12px; border-bottom: 1px solid var(--stx-line-2) !important; background: var(--stx-side) !important; color: var(--stx-text) !important; font-weight: 600; text-align: left; white-space: nowrap; }
.stx-th { display: inline-flex; align-items: center; gap: 7px; }
.stx-role { padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--stx-accent) 14%, transparent); color: var(--stx-accent-ink); font-size: 11px; font-weight: 500; }
.stx-sheet td { padding: 6px 12px; border-bottom: 1px solid var(--stx-line); white-space: nowrap; outline: none; }
.stx-sheet td.is-num { text-align: right; font-variant-numeric: tabular-nums; }
.stx-sheet td.is-blankcell { background: color-mix(in srgb, var(--stx-warn) 8%, transparent); }
.stx-sheet td:focus { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--stx-accent) 55%, transparent); }
.stx-sheet tbody tr:hover td { background: var(--stx-hover); }
.stx-rownum { width: 44px; color: var(--stx-text-3) !important; font-size: 12px; text-align: right !important; font-variant-numeric: tabular-nums; }
.stx .stx-sheet th.stx-rownum { left: 0; z-index: 2; }
#os .window[data-app-color-theme] .stx .stx-cellinput.stx-field,
.stx .stx-cellinput.stx-field { width: 100%; min-width: 80px; min-height: 26px !important; padding: 2px 6px !important; border-radius: 6px !important; font-size: 13.5px !important; }
.stx-more { margin-top: 8px; }

/* ---------- Tests ---------- */
.stx-lib { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 28px; padding-top: 16px; }
.stx-lib-list { position: sticky; top: 8px; align-self: start; display: grid; gap: 10px; max-height: calc(100vh - 170px); min-height: 300px; }
#os .window[data-app-color-theme] .stx .stx-search.stx-field,
.stx .stx-search.stx-field { width: 100%; border-radius: 999px !important; padding-left: 14px !important; }
.stx-lib-rows { overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.stx-lib-group { display: grid; gap: 2px; margin-bottom: 12px; }
.stx-lib-group.is-recs { padding: 8px; border-radius: 16px; background: color-mix(in srgb, var(--stx-accent) 7%, transparent); }
.stx-lib-label { display: flex; align-items: center; gap: 6px; padding: 4px 8px; color: var(--stx-text-2); font-size: 12.5px; font-weight: 600; }
.stx-lib-label .stx-ico { width: 15px; height: 15px; color: var(--stx-accent); }
.stx-lib-row { display: grid; gap: 1px; width: 100%; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.stx-lib-row:hover { background: var(--stx-hover); }
.stx-lib-row[aria-current="true"] { background: var(--stx-active); }
.stx-lib-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.stx-lib-desc { display: -webkit-box; overflow: hidden; color: var(--stx-text-3); font-size: 12.5px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.stx-lib-desc strong { color: var(--stx-text-2); }
.stx-lvl { padding: 1px 7px; border-radius: 999px; background: var(--stx-hover); color: var(--stx-text-3); font-size: 11px; font-weight: 500; }
.stx-lib-fam { margin-bottom: 2px; }
.stx-lib-fam > summary, .stx-tbl > summary, .stx-optbox > summary, .stx-thought > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.stx-lib-fam > summary::-webkit-details-marker, .stx-tbl > summary::-webkit-details-marker, .stx-optbox > summary::-webkit-details-marker, .stx-thought > summary::-webkit-details-marker { display: none; }
.stx-lib-fam > summary { padding: 7px 8px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.stx-lib-fam > summary:hover { background: var(--stx-hover); }
.stx-caret { width: 15px; height: 15px; color: var(--stx-text-3); transform: rotate(-90deg); transition: transform 0.15s ease; }
details[open] > summary .stx-caret { transform: none; }
.stx-count { margin-left: auto; color: var(--stx-text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.stx-lib-setup { min-width: 0; }
.stx-eyebrow { color: var(--stx-accent-ink); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.stx-lead { margin-top: 6px !important; color: var(--stx-text-2); font-size: 15px; }
.stx-when-text { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px !important; padding: 10px 12px; border-radius: 12px; background: var(--stx-soft); color: var(--stx-text-2); font-size: 13.5px; }
.stx-when-text .stx-ico { margin-top: 1px; color: var(--stx-text-3); }
.stx-form { display: grid; gap: 12px; margin-top: 18px; }
.stx-formrow { display: grid; grid-template-columns: 200px minmax(0, 1fr); align-items: start; gap: 14px; }
.stx-formrow > .stx-field { width: min(420px, 100%); }
.stx-flabel { padding-top: 7px; color: var(--stx-text); font-size: 14px; font-weight: 500; }
.stx-opt { color: var(--stx-text-3); font-weight: 400; }
.stx-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stx-pick { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 6px; border: 1px solid var(--stx-line-2); border-radius: 999px; background: transparent; color: var(--stx-text-2); font-size: 13px; }
.stx-pick:hover { background: var(--stx-hover); }
.stx-pick[aria-pressed="true"] { border-color: color-mix(in srgb, var(--stx-accent) 60%, transparent); background: color-mix(in srgb, var(--stx-accent) 12%, transparent); color: var(--stx-text); }
.stx-pick.is-all { padding: 0 12px; }
.stx-order { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--stx-accent); color: #fff; font-size: 11px; font-weight: 600; }
.stx-optbox { margin-top: 4px; border-top: 1px solid var(--stx-line); padding-top: 10px; }
.stx-optbox > summary { color: var(--stx-text-2); font-size: 14px; }
.stx-optbox > summary .stx-ico { width: 16px; height: 16px; }
.stx-form.is-opts { margin-top: 12px; }
.stx-lib-setup > .stx-res { margin-top: 24px; }

/* ---------- Results ---------- */
.stx-results { display: grid; gap: 18px; }
.stx-res { position: relative; display: grid; gap: 12px; padding: 18px 20px 14px; border: 1px solid var(--stx-line); border-radius: 20px; background: var(--stx-raised); }
.stx-res.is-focused { border-color: color-mix(in srgb, var(--stx-accent) 45%, var(--stx-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--stx-accent) 10%, transparent); }
.stx-res.is-compact { padding: 14px 16px 10px; border-radius: 16px; }
.stx-res-top { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.stx-res-kind { overflow: hidden; color: var(--stx-text-3); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.stx-when { color: var(--stx-text-3); font-size: 12px; }
.stx-by { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--stx-hover); color: var(--stx-text-2); font-size: 11.5px; }
.stx-by .stx-ico { width: 13px; height: 13px; color: var(--stx-accent); }
.stx-verdict { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.stx-verdict .stx-ico { width: 14px; height: 14px; }
.stx-verdict.is-sig { background: color-mix(in srgb, var(--stx-accent) 16%, transparent); color: var(--stx-accent-ink); }
.stx-verdict.is-ns { background: var(--stx-hover); color: var(--stx-text-2); }
.stx-verdict.is-info { background: var(--stx-hover); color: var(--stx-text-2); }
.stx-verdict.is-warn { background: color-mix(in srgb, var(--stx-warn) 18%, transparent); color: color-mix(in srgb, var(--stx-warn) 55%, var(--stx-text)); }
.stx-res-head { font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.stx-res.is-compact .stx-res-head { font-size: 16px; }
.stx-res-text { color: var(--stx-text-2); font-size: 14.5px; line-height: 1.6; }
.stx-why { display: flex; align-items: flex-start; gap: 6px; color: var(--stx-text-3); font-size: 13px; }
.stx-why .stx-ico { width: 15px; height: 15px; margin-top: 2px; color: var(--stx-accent); }
.stx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.stx-kpi { display: grid; align-content: start; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--stx-soft); }
.stx-kpi-label { color: var(--stx-text-3); font-size: 12px; }
.stx-kpi-value { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.stx-kpi-foot { color: var(--stx-text-2); font-size: 12px; }
.stx-kpi.is-p3, .stx-kpi.is-p2 { background: color-mix(in srgb, var(--stx-accent) 14%, transparent); }
.stx-kpi.is-p1 { background: color-mix(in srgb, var(--stx-accent) 8%, transparent); }
.stx-figwrap { display: grid; gap: 8px; }
.stx-figseg { display: flex; gap: 4px; flex-wrap: wrap; }
.stx-segpick { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--stx-text-2); font-size: 13px; }
.stx-segpick:hover { background: var(--stx-hover); }
.stx-segpick[aria-selected="true"] { background: var(--stx-active); color: var(--stx-text); font-weight: 500; }
.stx-figstage { min-width: 0; max-width: 780px; }
.stx-res.is-compact .stx-figstage { max-width: 640px; }
.stx-fig { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--stx-line); background: var(--stx-chart-bg); }
.stx-fig svg { display: block; width: 100%; height: auto; max-height: 520px; }
.stx-fig [data-tip] { transition: opacity 0.1s ease; }
.stx-fig .is-hot { stroke: var(--stx-text) !important; stroke-width: 2px; }
.stx-checks { display: grid; gap: 6px; }
.stx-check { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--stx-soft); font-size: 13.5px; }
.stx-check > .stx-ico { width: 17px; height: 17px; margin-top: 1px; }
.stx-check > div { display: grid; gap: 1px; min-width: 0; }
.stx-check strong { font-weight: 600; }
.stx-check span { color: var(--stx-text-2); }
.stx-check.is-pass > .stx-ico { color: var(--stx-good); }
.stx-check.is-warn { background: color-mix(in srgb, var(--stx-warn) 10%, transparent); }
.stx-check.is-warn > .stx-ico { color: var(--stx-warn); }
.stx-check.is-fail { background: color-mix(in srgb, var(--stx-bad) 10%, transparent); }
.stx-check.is-fail > .stx-ico { color: var(--stx-bad); }
.stx-check.is-info > .stx-ico { color: var(--stx-text-3); }
.stx-tbl { border-top: 1px solid var(--stx-line); padding-top: 10px; }
.stx-tbl > summary { padding: 2px 0 8px; font-size: 14px; font-weight: 600; }
.stx-tbl > summary .stx-small { font-weight: 400; }
.stx-tablewrap { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.stx-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.stx .stx-table th { padding: 6px 10px; border-bottom: 1px solid var(--stx-line-2) !important; background: transparent !important; color: var(--stx-text-3) !important; font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; }
.stx .stx-table th.is-num { text-align: right; }
.stx-table td { padding: 7px 10px; border-bottom: 1px solid var(--stx-line); vertical-align: top; }
.stx-table td.is-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stx-table tr.is-total td { font-weight: 600; border-top: 1px solid var(--stx-line-2); }
.stx-table tbody tr:hover td { background: var(--stx-hover); }
.stx-nil { color: var(--stx-text-3); }
.stx-pcell span { display: inline-block; min-width: 56px; padding: 1px 7px; border-radius: 6px; }
.stx-pcell.is-p3 span { background: color-mix(in srgb, var(--stx-accent) 30%, transparent); color: var(--stx-text); font-weight: 600; }
.stx-pcell.is-p2 span { background: color-mix(in srgb, var(--stx-accent) 20%, transparent); color: var(--stx-text); font-weight: 600; }
.stx-pcell.is-p1 span { background: color-mix(in srgb, var(--stx-accent) 11%, transparent); color: var(--stx-text); }
.stx-pcell.is-pns span { color: var(--stx-text-3); }
.stx-stars { color: var(--stx-accent-ink); font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.stx-stars.is-pns { color: var(--stx-text-3); font-weight: 400; }
.stx-mag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px; font-size: 10.5px; font-weight: 600; vertical-align: 1px; }
.stx-mag.is-negligible { background: var(--stx-hover); color: var(--stx-text-3); }
.stx-mag.is-small { background: color-mix(in srgb, var(--stx-accent) 10%, transparent); color: var(--stx-accent-ink); }
.stx-mag.is-medium { background: color-mix(in srgb, var(--stx-accent) 20%, transparent); color: var(--stx-accent-ink); }
.stx-mag.is-large { background: color-mix(in srgb, var(--stx-accent) 32%, transparent); color: var(--stx-text); }
.stx-ci { color: var(--stx-text-2); }
.stx-flag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.stx-flag.is-good { background: color-mix(in srgb, var(--stx-good) 14%, transparent); color: var(--stx-good-ink); }
.stx-flag.is-warn { background: color-mix(in srgb, var(--stx-warn) 18%, transparent); color: color-mix(in srgb, var(--stx-warn) 55%, var(--stx-text)); }
.stx-flag.is-bad { background: color-mix(in srgb, var(--stx-bad) 14%, transparent); color: var(--stx-bad); }
.stx-flag.is-plain { background: var(--stx-hover); color: var(--stx-text-2); }
.stx-barcell { width: 120px; }
.stx-bar { display: block; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--stx-hover); overflow: hidden; }
.stx-bar-fill { display: block; height: 100%; border-radius: 4px; background: var(--stx-accent); }
.stx-methods .stx-res-text { font-size: 13.5px; }
.stx-res-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--stx-line); }
.stx-res-foot .stx-go { height: 30px; font-size: 13px; }
.stx-next { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px 0 6px; border: 0; border-radius: 999px; background: transparent; color: var(--stx-text-2); font-size: 13px; }
.stx-next:hover { background: var(--stx-hover); color: var(--stx-text); }
.stx-next .stx-ico { width: 15px; height: 15px; }
.stx-explain { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--stx-accent) 6%, var(--stx-soft)); }

/* Markdown (AI text) */
.stx-md { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.stx-md > * + * { margin-top: 10px !important; }
.stx-md h3, .stx-md h4, .stx-md h5 { margin-top: 18px !important; font-size: 16px; font-weight: 600; }
.stx-md ul, .stx-md ol { margin: 8px 0; padding-left: 22px; }
.stx-md li + li { margin-top: 4px; }
.stx-md code { padding: 1px 5px; border-radius: 5px; background: var(--stx-hover); font-family: var(--stx-mono); font-size: 0.88em; }
.stx-md pre { padding: 12px; border-radius: 12px; background: var(--stx-soft); overflow-x: auto; font-size: 13px; }
.stx-md blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--stx-line-2); color: var(--stx-text-2); }
.stx-md a { color: var(--stx-accent-ink); }
.stx-md hr { border: 0; border-top: 1px solid var(--stx-line); }

/* ---------- Report ---------- */
.stx-report { display: grid; gap: 16px; }
.stx-narr { padding: 16px 20px; border: 1px solid var(--stx-line); border-radius: 18px; background: var(--stx-raised); }
.stx-narr-edit.stx-field { width: 100%; min-height: 280px; font-family: var(--stx-font); font-size: 14px !important; line-height: 1.55; }
.stx-repitem { display: grid; gap: 10px; padding: 18px 20px; border: 1px solid var(--stx-line); border-radius: 18px; background: var(--stx-raised); }
.stx-repnum { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--stx-text); color: var(--stx-bg); font-size: 12px; font-weight: 600; }
.stx-reptable { display: grid; gap: 4px; }

/* ---------- BioAI section ---------- */
.stx-ai { position: relative; display: flex; flex: 1; flex-direction: column; min-height: 0; background: var(--stx-bg); }
.stx-ai-top { display: flex; align-items: center; gap: 6px; height: 52px; flex: none; padding: 0 10px 0 12px; }
.stx-mode { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 6px 0 8px; border: 0; border-radius: 8px; background: transparent; font-size: 18px; }
.stx-mode-brand { font-weight: 500; }
.stx-mode-name { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px 0 12px; border: 1px solid var(--stx-line-2); border-radius: 999px; color: var(--stx-text); font-size: 14px; }
.stx-mode:hover .stx-mode-name, .stx-mode[aria-expanded="true"] .stx-mode-name { background: var(--stx-hover); }
.stx-mode-name .stx-ico { width: 16px; height: 16px; color: var(--stx-text-2); }
.stx-modelpick { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 8px 0 12px; border: 0; border-radius: 10px; background: transparent; font-size: 14px; font-weight: 500; }
.stx-modelpick:hover, .stx-modelpick[aria-expanded="true"] { background: var(--stx-hover); }
.stx-modelpick .stx-ico { width: 16px; height: 16px; color: var(--stx-text-3); }
.stx-tier { color: #10a37f; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; }
.stx-costchip { height: 30px; padding: 0 12px; border: 1px solid var(--stx-line-2); border-radius: 999px; background: transparent; color: var(--stx-text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.stx-costchip:hover, .stx-costchip[aria-expanded="true"] { background: var(--stx-hover); color: var(--stx-text); }
.stx-costbox { display: grid; gap: 6px; padding: 8px 8px 4px; }
.stx-costbox-title { font-size: 15px; font-weight: 600; }
.stx-costrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; padding: 6px 0; border-bottom: 1px solid var(--stx-line); font-size: 13.5px; }
.stx-costrow strong { text-align: right; font-variant-numeric: tabular-nums; }
.stx-costrow .stx-small { grid-column: 1 / -1; }
.stx-ai-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--stx-line-2) transparent; }
.stx-ai-col { display: flex; flex-direction: column; width: 100%; min-height: 100%; margin: 0 auto; padding: 8px 24px 0; }
.stx-ai.is-fresh .stx-ai-col { justify-content: center; }
.stx-ai-hello { display: grid; justify-items: center; gap: 14px; width: min(48rem, 100%); margin: 0 auto; padding-bottom: 12vh; text-align: center; }
.stx-suggest { display: grid; gap: 2px; width: min(40rem, 100%); margin-top: 6px; }
.stx-suggest-item { padding: 9px 14px; border: 0; border-radius: 12px; background: transparent; color: var(--stx-text-2); font-size: 14px; text-align: left; }
.stx-suggest-item:hover { background: var(--stx-hover); color: var(--stx-text); }
.stx-msgs { display: flex; flex-direction: column; width: min(52rem, 100%); margin: 0 auto; padding-bottom: 12px; }
.stx-msg { display: flex; flex-direction: column; gap: 10px; padding: 12px 0; }
.stx-msg.is-me { align-items: flex-end; padding-top: 24px; }
.stx-bubble { max-width: 75%; padding: 9px 18px; border-radius: 20px; background: var(--stx-bubble); font-size: 15.5px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.stx-thought { color: var(--stx-text-2); font-size: 14px; }
.stx-thought > summary { gap: 6px; width: max-content; padding: 2px 0; color: var(--stx-text-3); }
.stx-thought > summary:hover { color: var(--stx-text); }
.stx-thought > summary .stx-ico { width: 15px; height: 15px; }
.stx-thought-body { margin-top: 6px; padding: 2px 0 2px 14px; border-left: 2px solid var(--stx-line-2); color: var(--stx-text-2); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; }
.stx-steps { display: grid; gap: 4px; }
.stx-step { display: flex; align-items: center; gap: 8px; min-height: 30px; padding: 4px 10px; border-radius: 10px; background: var(--stx-soft); font-size: 13.5px; }
.stx-step > .stx-ico { width: 15px; height: 15px; }
.stx-step.is-done > .stx-ico { color: var(--stx-good); }
.stx-step.is-failed > .stx-ico { color: var(--stx-bad); }
.stx-step.is-running > .stx-ico { color: var(--stx-accent); animation: stx-pulse 1.2s ease-in-out infinite; }
.stx-step-text { flex: 1; min-width: 0; overflow: hidden; color: var(--stx-text-2); white-space: nowrap; text-overflow: ellipsis; }
.stx-step-text strong { color: var(--stx-text); font-weight: 500; }
.stx-msg-results { display: grid; gap: 10px; }
.stx-msg-foot { display: flex; align-items: center; gap: 2px; }
.stx-msg-foot .stx-iconbtn { width: 30px; height: 30px; }
.stx-msg-foot .stx-small { margin-left: 6px; }
.stx-ask { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--stx-accent) 35%, var(--stx-line)); border-radius: 16px; background: color-mix(in srgb, var(--stx-accent) 5%, var(--stx-bg)); }
.stx-ask-q { display: flex; align-items: flex-start; gap: 8px; font-size: 15px; }
.stx-ask-q .stx-ico { margin-top: 2px; color: var(--stx-accent); }
.stx-ask-choices { display: grid; gap: 6px; }
.stx-ask-choice { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--stx-line-2); border-radius: 12px; background: var(--stx-bg); text-align: left; font-size: 14px; }
.stx-ask-choice:hover { border-color: color-mix(in srgb, var(--stx-accent) 55%, var(--stx-line-2)); background: var(--stx-hover); }
.stx-ask-choice span { color: var(--stx-text-2); font-size: 13px; }
.stx-ask-other.stx-field { width: 100%; }
.stx-ai-bottom { position: sticky; bottom: 0; display: grid; justify-items: center; gap: 6px; width: min(52rem, 100%); margin: auto auto 0; padding: 10px 0 14px; background: linear-gradient(to bottom, transparent, var(--stx-bg) 26%); }
.stx-ai-bottom .stx-composer { width: 100%; }
.stx-disclaim { text-align: center; }

/* Narrow windows */
@media (max-width: 980px) {
  .stx-lib { grid-template-columns: 1fr; }
  .stx-lib-list { position: static; max-height: 360px; }
  .stx-formrow { grid-template-columns: 1fr; gap: 6px; }
  .stx-flabel { padding-top: 0; }
}
@container (max-width: 820px) {
  .stx-body-inner { padding: 8px 16px 48px; }
}
