/* Tool interiors only. Framing is presentational; chart colours/data stay owned
   by their builders, and all existing inner grids and callback IDs are retained. */
.tw-tool-workspace.tw-terminal-ui {
  --terminal-panel:#11171d; --terminal-line:#303942; --terminal-text:#dee6ec;
  --terminal-muted:#a0acb6; --terminal-accent:#a7cfb8;
  --tw-tool-action-bg:#17221e; --tw-tool-action-ink:#c1dfcb; --tw-tool-action-line:#536d5e;
  font-size:14px; line-height:1.5;
}
.tw-tool-workspace.tw-terminal-ui .tw-terminal-header { animation:none; padding:4px 0 20px; margin-bottom:22px !important; border-bottom:1px solid var(--terminal-line); }
.tw-tool-workspace.tw-terminal-ui .tw-page-header-kicker { padding-left:56px; margin-bottom:10px; }
.tw-tool-workspace.tw-terminal-ui .tw-page-header-kicker > div { color:var(--terminal-muted) !important; font-size:10px !important; font-weight:600 !important; letter-spacing:1.2px !important; }
.tw-tool-workspace.tw-terminal-ui .tw-page-header-ornament { display:none !important; }
.tw-tool-workspace.tw-terminal-ui .tw-guided-title { gap:12px; margin:14px 0 0; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-header .tw-guided-title { margin-top:0; }
.tw-tool-workspace.tw-terminal-ui .tw-guided-title > h1 { flex:1; min-width:0; margin:0 !important; font-family:var(--tw-font-display,'Inter',sans-serif); font-size:30px !important; font-weight:650 !important; letter-spacing:-.7px !important; line-height:1.18 !important; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-title-icon { display:grid; place-items:center; flex:none; width:42px; height:42px; border:1px solid var(--terminal-line); border-radius:8px; background:var(--terminal-panel); }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-title-icon img { width:23px; height:23px; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-header > p,
.tw-tool-workspace.tw-terminal-ui .tw-guided-title + p { padding-left:56px; color:var(--terminal-muted) !important; font-size:13px !important; line-height:1.5 !important; margin:10px 0 0 !important; }
.tw-tool-workspace.tw-terminal-ui .tw-guided-title + p { padding-bottom:20px; margin-bottom:20px !important; border-bottom:1px solid var(--terminal-line); }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-header > p { padding-bottom:0; margin-bottom:0 !important; border:0; }
.tw-tool-workspace.tw-terminal-ui .tw-chart-help-button { width:28px; height:28px; border-radius:5px; background:transparent; border-color:var(--terminal-line); color:var(--terminal-muted); font-size:14px; }
.tw-tool-workspace.tw-terminal-ui .tw-chart-help-button:hover,
.tw-tool-workspace.tw-terminal-ui .tw-chart-help[open] > summary { color:var(--terminal-accent); border-color:var(--tw-tool-action-line); background:var(--tw-tool-action-bg); }
.tw-tool-workspace.tw-terminal-ui .tw-chart-help-card { left:auto; right:0; }
.tw-tool-workspace.tw-terminal-ui .tw-compact-link { font-size:11px !important; font-weight:550; padding:7px 10px; background:transparent; box-shadow:none; }
.tw-tool-workspace.tw-terminal-ui .tw-page-card { background:#0b0f13 !important; border-color:var(--terminal-line) !important; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-panel { box-sizing:border-box; min-width:0; margin:0 0 16px; border:1px solid var(--terminal-line); border-radius:9px; background:#0b0f13; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-panel-heading { display:flex; align-items:center; gap:9px; min-height:43px; padding:0 16px; background:var(--terminal-panel); border-bottom:1px solid var(--terminal-line); border-radius:8px 8px 0 0; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-panel-heading h2 { margin:0; color:var(--terminal-text); font-size:11px !important; font-weight:600 !important; letter-spacing:.85px; line-height:1.4 !important; text-transform:uppercase; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-panel-rule { width:3px; height:13px; border-radius:1px; background:var(--terminal-accent); opacity:.65; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-panel > .tw-page-card { border:0 !important; border-radius:0 0 9px 9px !important; background:transparent !important; margin:0 !important; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-panel > .tw-surface-output { padding:14px; box-sizing:border-box; }
/* Market selectors size to their content role, not the chart's width. */
.tw-tool-workspace.tw-terminal-ui .tw-market-toolbar { display:flex !important; flex-wrap:wrap; align-items:flex-end; gap:10px; }
.tw-tool-workspace.tw-terminal-ui .tw-market-toolbar > .tw-pro-field { box-sizing:border-box; flex:0 1 190px; width:190px; max-width:100%; min-width:0; }
.tw-tool-workspace.tw-terminal-ui .tw-market-toolbar > .tw-pro-field:nth-child(2) { flex-basis:180px; width:180px; }
.tw-tool-workspace.tw-terminal-ui .tw-surface-market-toolbar > .tw-pro-field:nth-child(2) { flex:0 0 88px; width:88px; }
.tw-tool-workspace.tw-terminal-ui .tw-market-toolbar :is(.dash-dropdown-trigger,.Select-control,.Select__control) { min-height:34px !important; height:34px; }
.tw-tool-workspace.tw-terminal-ui .tw-market-toolbar > button { min-height:34px !important; height:34px !important; padding:0 12px !important; font-size:12px !important; flex:none; }
.tw-tool-workspace.tw-terminal-ui .tw-surface-market-toolbar > button { width:200px; white-space:nowrap; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-controls:has(> .tw-market-toolbar) { width:fit-content; max-width:100%; }
.tw-tool-workspace.tw-terminal-ui .tw-pro-filter-grid { display:flex !important; flex-wrap:wrap; gap:10px; align-items:flex-start; }
.tw-tool-workspace.tw-terminal-ui .tw-pro-filter-grid > .tw-pro-field { flex:0 1 190px; width:190px; max-width:100%; min-width:0; }
.tw-tool-workspace.tw-terminal-ui .tw-pro-filter-grid > .tw-pro-field > .tw-profile-label { display:flex; align-items:flex-end; min-height:30px; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-empty { display:flex; flex-direction:column; justify-content:center; align-items:center; gap:14px; box-sizing:border-box; grid-column:1 / -1; min-height:270px; padding:30px; text-align:center; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-results > .tw-page-card:has(> .tw-terminal-empty) { display:grid; place-items:center; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-empty-icon { display:grid; place-items:center; width:54px; height:54px; border:1px solid var(--terminal-line); border-radius:10px; background:var(--terminal-panel); }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-empty p { max-width:340px; color:var(--terminal-muted); font-size:13px; line-height:1.6; margin:0; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-empty-icon img { opacity:.7; }
.tw-tool-workspace.tw-terminal-ui :is(.tw-primary-action,.tw-research-toolbar > button,.tw-pro-toolbar > button) { border:1px solid var(--terminal-line) !important; box-shadow:none !important; font-weight:600 !important; }
.tw-tool-workspace.tw-terminal-ui :is(.tw-research-toolbar > button,.tw-pro-toolbar > button) { background:#151c22 !important; color:var(--terminal-text) !important; }
.tw-tool-workspace.tw-terminal-ui .tw-primary-action,
.tw-tool-workspace.tw-terminal-ui :is(#strategy-desk-analyse,#research-refresh,#positioning-matrix-refresh,#research-archive-load) { background:var(--tw-tool-action-bg) !important; color:var(--tw-tool-action-ink) !important; border:1px solid var(--tw-tool-action-line) !important; font-weight:600 !important; }
.tw-tool-workspace.tw-terminal-ui .tw-primary-action:hover:not(:disabled) { background:#25382e !important; border-color:#829e8d !important; }
.tw-tool-workspace.tw-terminal-ui .tw-profile-label { font-weight:600 !important; color:var(--terminal-muted) !important; }
.tw-tool-workspace.tw-terminal-ui .dash-dropdown-trigger { font-weight:500 !important; }
.tw-tool-workspace.tw-terminal-ui .tw-tool-metric-strip { padding:4px 0 16px !important; margin:0 0 14px; border-bottom:1px solid var(--terminal-line); }
.tw-tool-workspace.tw-terminal-ui :is(.tw-tool-metric-card,.tw-research-metric) { border:0 !important; border-left:1px solid var(--terminal-line) !important; border-radius:0 !important; background:transparent !important; padding:8px 14px !important; }
.tw-tool-workspace.tw-terminal-ui :is(.tw-tool-metric-card,.tw-research-metric):first-child { border-left:0 !important; }
.tw-tool-workspace.tw-terminal-ui :is(.tw-tool-metric-label,.tw-research-metric-label) { font-size:10px !important; font-weight:500 !important; letter-spacing:.65px !important; }
.tw-tool-workspace.tw-terminal-ui :is(.tw-tool-metric-card,.tw-research-metric) > :last-child { font-size:22px !important; font-weight:600 !important; margin-top:7px !important; }
.tw-tool-workspace.tw-terminal-ui .tw-possible-read { background:transparent; border:0; border-top:1px solid var(--terminal-line); border-bottom:1px solid var(--terminal-line); border-radius:0 !important; padding:14px 2px; }
.tw-tool-workspace.tw-terminal-ui .tw-possible-read-heading strong { font-size:11px; text-transform:uppercase; letter-spacing:.75px; font-weight:600; }
.tw-tool-workspace.tw-terminal-ui .tw-possible-read p { font-size:12px; line-height:1.6; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-calculator-heading { padding-bottom:16px; margin-bottom:16px; border-bottom:1px solid var(--terminal-line); }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-calculator-heading > span { font-size:10px; font-weight:600; letter-spacing:1px; text-transform:uppercase; }
.tw-tool-workspace.tw-terminal-ui .tw-terminal-calculator-heading h2 { font-size:20px !important; font-weight:600 !important; margin:7px 0 0; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-card { padding:20px !important; min-height:200px !important; background:#0b0f13 !important; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-top { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-glyph { display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--terminal-line); border-radius:6px; background:var(--terminal-panel); }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-glyph img { width:20px; height:20px; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-count { color:var(--terminal-muted); font-family:var(--tw-font-mono); font-size:10px; font-weight:500; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-name { color:var(--terminal-text); font-size:18px; font-weight:600; letter-spacing:-.25px; margin-top:18px; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-description { color:var(--terminal-muted); font-size:12px; font-weight:400; line-height:1.6; margin-top:6px; }
.tw-tool-workspace.tw-terminal-ui .tw-screener-category-action { font-size:11px; font-weight:550; margin-top:18px; padding-top:12px; border-top:1px solid var(--terminal-line); }
@media (max-width:760px) {
  .tw-tool-workspace.tw-terminal-ui .tw-guided-title > h1 { font-size:24px !important; letter-spacing:-.55px !important; }
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-title-icon { width:34px; height:34px; border-radius:6px; }
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-title-icon img { width:20px; height:20px; }
  .tw-tool-workspace.tw-terminal-ui .tw-page-header-kicker,
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-header > p,
  .tw-tool-workspace.tw-terminal-ui .tw-guided-title + p { padding-left:0; }
  .tw-tool-workspace.tw-terminal-ui .tw-chart-help-button { width:36px; height:36px; }
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-panel-heading { padding:0 12px; min-height:42px; }
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-panel > .tw-surface-output { padding:10px; }
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-empty { padding:24px 16px; min-height:220px; }
  .tw-tool-workspace.tw-terminal-ui :is(.tw-tool-metric-card,.tw-research-metric) > :last-child { font-size:19px !important; }
}
@media (max-width:600px) {
  .tw-tool-workspace.tw-terminal-ui .tw-terminal-controls:has(> .tw-market-toolbar) { width:100%; }
  .tw-tool-workspace.tw-terminal-ui .tw-market-toolbar > .tw-pro-field,
  .tw-tool-workspace.tw-terminal-ui .tw-pro-filter-grid > .tw-pro-field { flex:1 1 140px; width:auto; }
  .tw-tool-workspace.tw-terminal-ui .tw-surface-market-toolbar > .tw-pro-field:nth-child(2) { flex:0 0 88px; width:88px; }
  .tw-tool-workspace.tw-terminal-ui .tw-market-toolbar > button { flex:1 0 100%; width:100%; }
  .tw-tool-workspace.tw-terminal-ui .tw-market-toolbar :is(.dash-dropdown-trigger,.Select-control,.Select__control),
  .tw-tool-workspace.tw-terminal-ui .tw-market-toolbar > button { height:44px !important; min-height:44px !important; }
}
