body.s2-shell { background: var(--s2-background); color: var(--s2-text); font-size: var(--s2-font); }
body.s2-shell .workspace-shell { width: 100%; max-width: 100%; margin: 0; padding: 0; box-sizing: border-box; }
body.s2-shell .workspace-header {
  position: static;
  min-height: var(--s2-header); height: var(--s2-header); padding: 6px 14px;
  display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--s2-border);
  border-radius: 0; background: var(--s2-surface); box-shadow: none;
}
body.s2-shell .title-block { flex: 0 0 auto; min-width: 0; }
body.s2-shell .title-row { gap: 10px; flex-wrap: nowrap; }
body.s2-shell .title-row h1 { font-size: 16px; margin: 0; white-space: nowrap; }
body.s2-shell .title-block > p { display: none; }
body.s2-shell .platform-scope { flex: 1; display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; }
body.s2-shell .platform-scope button { min-height: 30px; padding: 4px 9px; white-space: nowrap; font-size: 13px; }
body.s2-shell .realtime-badge { padding: 0; background: none; border: 0; font-size: 12px; }
body.s2-shell .workspace-layout { display: grid; grid-template-columns: var(--s2-nav) minmax(0, 1fr); gap: 0; width: 100%; min-width: 0; box-sizing: border-box; }
body.s2-shell .workspace-primary-nav {
  grid-column: 1; grid-row: 1 / span 2; width: var(--s2-nav); box-sizing: border-box;
  position: sticky; top: 12px; align-self: start; z-index: 4;
  padding: 12px 8px; border-right: 1px solid var(--s2-border);
}
body.s2-shell .workspace-primary-nav .tabs { display: flex; flex-direction: column; gap: 4px; }
body.s2-shell .workspace-primary-nav .tab { min-height: 36px; padding: 8px 12px; border-radius: 6px; font-size: 13px; }
body.s2-shell .workbench-stage { grid-column: 2; grid-row: 1; width: 100%; min-width: 0; box-sizing: border-box; padding: 12px 16px; overflow-x: auto; }
body.s2-shell aside.insight-rail {
  grid-column: 2; grid-row: 2; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 10px;
  position: static !important; inset: auto; z-index: auto; margin: 0 16px 12px;
}
body.s2-shell .panel, body.s2-shell .workflow-card { border-radius: var(--s2-radius); padding: 12px; box-shadow: none; }
body.s2-shell .panel .panel, body.s2-shell .panel .workflow-card { padding: 10px; }
body.s2-shell .page-heading { margin-bottom: 10px; gap: 8px; }
body.s2-shell h2 { font-size: 16px; margin: 0 0 10px; }
body.s2-shell h3 { font-size: 14px; margin: 0 0 8px; }
body.s2-shell .row, body.s2-shell .form-grid { gap: 8px; }
body.s2-shell input, body.s2-shell select, body.s2-shell textarea, body.s2-shell button { font-size: 13px; border-radius: var(--s2-control-radius); }
body.s2-shell input, body.s2-shell select { min-height: 32px; padding: 6px 8px; }
body.s2-shell input, body.s2-shell td, body.s2-shell .metric strong { font-variant-numeric: tabular-nums; }
body.s2-shell .metric { padding: 10px 12px; min-height: 0; }
body.s2-shell .metric strong { font-size: 18px; }
body.s2-shell .muted, body.s2-shell small, body.s2-shell label, body.s2-shell .metric span { font-size: 12px; }
body.s2-shell td, body.s2-shell th { font-size: 13px; padding: 8px 10px; }
body.s2-shell .s2-field-label { font-size: 12px; color: var(--s2-muted); display: block; margin: 2px 0; }
body.s2-shell :focus-visible { outline: 2px solid var(--s2-primary); outline-offset: 2px; }
body.s2-shell .subtabs { gap: 4px; margin-bottom: 12px; }
body.s2-shell .knowledge-grid, body.s2-shell .knowledge-panel { overflow: visible; }
body.s2-shell .selection-plan-items-wrap table { min-width: 1800px; }
body.s2-shell .selection-plan-items-wrap .selection-plan-actions { min-width: 190px; right: 0; position: sticky; }
body.s2-shell .tool-drawer { border-radius: 8px; }
body.s2-shell .tool-drawer > summary { font-size: 13px; padding: 8px; }
@media (max-width: 1000px) {
  body.s2-shell .workspace-header { height: auto; min-height: 52px; flex-wrap: wrap; }
  body.s2-shell .platform-scope { flex-basis: 100%; order: 3; }
  body.s2-shell .workspace-layout { grid-template-columns: minmax(0, 1fr); }
  body.s2-shell .workspace-primary-nav {
    grid-row: 1; position: static; inset: auto; z-index: auto;
    width: auto; padding: 6px 8px; border-right: 0;
  }
  body.s2-shell .workspace-primary-nav .tabs { flex-direction: row; flex-wrap: wrap; }
  body.s2-shell .workspace-primary-nav .tab { width: auto; flex: 1 0 auto; }
  body.s2-shell .row > input, body.s2-shell .row > select { flex: 0 0 auto; max-width: 100%; }
  body.s2-shell .workbench-stage { grid-column: 1; grid-row: 2; padding: 10px; }
  body.s2-shell aside.insight-rail { grid-column: 1; grid-row: 3; grid-template-columns: minmax(0, 1fr); margin-inline: 10px; }
  body.s2-shell .knowledge-grid { grid-template-columns: minmax(0, 1fr); }
}
