/* AXIA Commercial Shell v1: the final presentation layer over the legacy shell. */
:root {
  --commercial-bg: #0d1012;
  --commercial-surface: #15191d;
  --commercial-surface-raised: #1b2025;
  --commercial-border: rgba(220, 229, 236, 0.14);
  --commercial-text: #f1f4f6;
  --commercial-muted: #a5adb5;
  --commercial-green: #53c58a;
  --commercial-blue: #64a9f5;
  --commercial-amber: #d9ad56;
  --commercial-red: #e27670;
  --commercial-sidebar: 248px;
  --commercial-project-panel: 336px;
  --commercial-live-computer: 384px;
  --commercial-mobile-rail: 58px;
}

body.axia-commercial-shell-v1,
body.axia-commercial-shell-v1 .app,
body.axia-commercial-shell-v1 .app-wrapper {
  background: var(--commercial-bg) !important;
  color: var(--commercial-text) !important;
}

body.axia-commercial-shell-v1 .header {
  background: rgba(13, 16, 18, 0.97) !important;
  border-bottom-color: var(--commercial-border) !important;
  backdrop-filter: blur(14px) !important;
}

body.axia-commercial-shell-v1 #axiaMobileNav {
  display: none !important;
}

body.axia-commercial-shell-v1 #workspacePanel,
body.axia-commercial-shell-v1 #unifiedWorkspacePanel,
body.axia-commercial-shell-v1 #v3-live-feed,
body.axia-commercial-shell-v1 #axia-computer-panel,
body.axia-commercial-shell-v1 #axia-computer-mini,
body.axia-commercial-shell-v1 #workspaceMiniWidget,
body.axia-commercial-shell-v1 #uwOpenBtn {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  pointer-events: none !important;
}

body.axia-commercial-shell-v1 .v3-progress-card,
body.axia-commercial-shell-v1 .axia-progress-card {
  display: none !important;
}

body.axia-commercial-shell-v1 .chat-layout,
body.axia-commercial-shell-v1 .chat-layout.lc-open,
body.axia-commercial-shell-v1 .chat-layout.focus-mode {
  display: grid !important;
  grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) 0 !important;
  grid-template-rows: minmax(0, 1fr) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  background: var(--commercial-bg) !important;
}

html body.axia-commercial-shell-v1 #chatLayout,
html body.axia-commercial-shell-v1 #chatLayout.lc-open,
html body.axia-commercial-shell-v1 #chatLayout.focus-mode {
  display: grid !important;
  grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) 0 !important;
  grid-template-rows: minmax(0, 1fr) !important;
  column-gap: 0 !important;
}

body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) .chat-layout,
body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) .chat-layout.lc-open,
body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) .chat-layout.focus-mode {
  grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) var(--commercial-live-computer) !important;
}

html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout,
html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.lc-open,
html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.focus-mode {
  grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) var(--commercial-live-computer) !important;
}

body.axia-commercial-shell-v1.commercial-panel-open .chat-layout,
body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.lc-open,
body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.focus-mode {
  grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) var(--commercial-project-panel) !important;
}

html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout,
html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout.lc-open,
html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout.focus-mode {
  grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) var(--commercial-project-panel) !important;
}

body.axia-commercial-shell-v1 #threadSidebar,
body.axia-commercial-shell-v1 .thread-sidebar {
  grid-column: 1;
  grid-row: 1;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  width: var(--commercial-sidebar) !important;
  min-width: var(--commercial-sidebar) !important;
  max-width: var(--commercial-sidebar) !important;
  background: #111519 !important;
  border-right: 1px solid var(--commercial-border) !important;
}

body.axia-commercial-shell-v1 #threadList,
body.axia-commercial-shell-v1 #threadPinnedList {
  min-height: 0;
  overflow-y: auto;
}

body.axia-commercial-shell-v1 .thread-sidebar-header {
  min-height: 58px !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--commercial-border) !important;
}

body.axia-commercial-shell-v1 .thread-sidebar-title {
  color: var(--commercial-text) !important;
  font-size: 14px !important;
  letter-spacing: 0 !important;
}

body.axia-commercial-shell-v1 .new-thread-btn {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border: 1px solid rgba(83, 197, 138, 0.42) !important;
  border-radius: 6px !important;
  background: rgba(83, 197, 138, 0.12) !important;
  color: #86dfad !important;
}

body.axia-commercial-shell-v1 .thread-search-bar {
  padding: 6px 12px 8px !important;
  border-bottom: 1px solid var(--commercial-border) !important;
}

body.axia-commercial-shell-v1 .thread-search-input {
  min-height: 36px !important;
  border-radius: 6px !important;
  background: #101418 !important;
  border-color: var(--commercial-border) !important;
  color: var(--commercial-text) !important;
  letter-spacing: 0 !important;
}

.commercial-project-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px 12px 10px;
  border-bottom: 1px solid var(--commercial-border);
}

.commercial-project-registry {
  padding: 10px 12px;
  border-bottom: 1px solid var(--commercial-border);
}

.commercial-project-registry-heading {
  margin-bottom: 7px;
  color: #98a2ab;
  font-size: 10px;
  font-weight: 700;
}

.commercial-project-registry [data-commercial-project-registry-list] {
  display: grid;
  gap: 3px;
}

.commercial-project-registry button {
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 7px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--commercial-text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

.commercial-project-registry button:hover { background: #1c2227; }
.commercial-project-registry button small { color: #8d98a2; font-size: 10px; }
.commercial-project-registry [data-commercial-project-registry-status] {
  margin: 6px 0 0;
  color: var(--commercial-muted);
  font-size: 10px;
  line-height: 1.4;
}

.commercial-project-navigation button,
.commercial-panel-tabs button,
.commercial-mobile-navigation button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--commercial-muted);
  font: inherit;
  letter-spacing: 0;
  cursor: pointer;
}

.commercial-project-navigation button {
  min-height: 30px;
  padding: 6px;
  font-size: 12px;
  text-align: left;
}

.commercial-project-navigation button[aria-pressed="true"] {
  background: #232a30;
  color: var(--commercial-text);
}

body.axia-commercial-shell-v1 .thread-item {
  border-radius: 6px !important;
  margin-bottom: 3px !important;
}

body.axia-commercial-shell-v1 .thread-item:hover {
  background: #1c2227 !important;
}

body.axia-commercial-shell-v1 .thread-item.active {
  background: #242d33 !important;
  box-shadow: inset 3px 0 0 var(--commercial-green);
}

body.axia-commercial-shell-v1 .center-chat {
  grid-column: 2;
  grid-row: 1;
  min-width: 0 !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  background: var(--commercial-bg) !important;
  border: 0 !important;
}

body.axia-commercial-shell-v1 .chat-area {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  width: min(100%, 860px) !important;
  margin: 0 auto !important;
  padding-left: clamp(18px, 4vw, 52px) !important;
  padding-right: clamp(18px, 4vw, 52px) !important;
}

body.axia-commercial-shell-v1 .input-area {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 12 !important;
  flex: 0 0 auto !important;
  background: linear-gradient(to bottom, rgba(13, 16, 18, 0), var(--commercial-bg) 24%) !important;
}

body.axia-commercial-shell-v1 .input-inner {
  width: min(calc(100% - 28px), 820px) !important;
  margin: 0 auto !important;
  border: 1px solid var(--commercial-border) !important;
  border-radius: 8px !important;
  background: var(--commercial-surface-raised) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.28) !important;
}

body.axia-commercial-shell-v1 .message-input {
  color: var(--commercial-text) !important;
  letter-spacing: 0 !important;
}

/* Keep the deployed chat spine wider than its message content at every desktop width. */
body.axia-commercial-shell-v1 #chatLayout #chatArea,
body.axia-commercial-shell-v1 #chatLayout .input-area {
  width: min(100%, 920px) !important;
  max-width: 920px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  box-sizing: border-box !important;
}

body.axia-commercial-shell-v1 #chatLayout #chatArea {
  padding-bottom: 24px !important;
}

body.axia-commercial-shell-v1 #chatLayout .input-area {
  padding-top: 12px !important;
  padding-bottom: 24px !important;
}

body.axia-commercial-shell-v1 #chatLayout .input-inner,
body.axia-commercial-shell-v1 #chatLayout .suggestion-bar,
body.axia-commercial-shell-v1 #chatLayout .chat-legal-links {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.axia-commercial-shell-v1 #chatArea .message-row {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

body.axia-commercial-shell-v1 #chatArea .message-row:not(.user) > .message-bubble {
  flex: 0 1 80% !important;
  width: 80% !important;
  min-width: 0 !important;
}

body.axia-commercial-shell-v1 #chatArea .message-row > .message-bubble,
body.axia-commercial-shell-v1 #chatArea .message-row .message-text {
  min-width: 0 !important;
  font-size: 16px !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}

body.axia-commercial-shell-v1 #chatArea .message-row .message-text {
  white-space: pre-wrap !important;
}

body.axia-commercial-shell-v1 .send-btn {
  border-radius: 6px !important;
  background: var(--commercial-green) !important;
  color: #07130c !important;
}

.commercial-compact-status {
  display: none;
  width: 100%;
  min-height: 40px;
  padding: 8px 14px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid var(--commercial-border);
  background: #151a1e;
  color: var(--commercial-text);
  text-align: left;
  font: inherit;
  letter-spacing: 0;
}

.commercial-compact-status > span:nth-child(2) {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

[data-commercial-compact-marker] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7f8992;
  flex: 0 0 auto;
}

[data-commercial-compact-marker][data-state="running"] { background: var(--commercial-green); }
[data-commercial-compact-marker][data-state="terminal"] { background: var(--commercial-blue); }
[data-commercial-compact-marker][data-state="blocked"] { background: var(--commercial-red); }

.commercial-project-panel {
  grid-column: 3;
  grid-row: 1;
  width: var(--commercial-project-panel);
  min-width: var(--commercial-project-panel);
  max-width: var(--commercial-project-panel);
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--commercial-surface);
  border-left: 1px solid var(--commercial-border);
  color: var(--commercial-text);
  overflow: hidden;
  transition: width 160ms ease, min-width 160ms ease, opacity 120ms ease;
}

body:not(.commercial-panel-open) .commercial-project-panel {
  width: 0;
  min-width: 0;
  max-width: 0;
  border-left-width: 0;
  opacity: 0;
  pointer-events: none;
}

body.axia-commercial-shell-v1 #liveComputerPanel {
  grid-column: 3;
  grid-row: 1;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  min-height: 0 !important;
  display: none !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-left: 0 !important;
  background: #12171b !important;
  color: var(--commercial-text) !important;
  opacity: 0 !important;
  pointer-events: none !important;
  flex: 0 0 0 !important;
  box-sizing: border-box !important;
  transition: width 160ms ease, min-width 160ms ease, opacity 120ms ease !important;
}

body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #liveComputerPanel {
  width: var(--commercial-live-computer) !important;
  min-width: var(--commercial-live-computer) !important;
  max-width: var(--commercial-live-computer) !important;
  display: flex !important;
  border-left: 1px solid var(--commercial-border) !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  flex: 0 0 var(--commercial-live-computer) !important;
}

body.axia-commercial-shell-v1.commercial-panel-open #liveComputerPanel,
body.axia-commercial-shell-v1.commercial-computer-open .commercial-project-panel {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  border-left-width: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  flex-basis: 0 !important;
}

body.axia-commercial-shell-v1 #liveComputerPanel .lc-header {
  background: #151a1e !important;
  border-bottom-color: var(--commercial-border) !important;
}

body.axia-commercial-shell-v1 #liveComputerPanel .lc-current-work,
body.axia-commercial-shell-v1 #liveComputerPanel .lc-confidence,
body.axia-commercial-shell-v1 #liveComputerPanel .lc-tabs,
body.axia-commercial-shell-v1 #liveComputerPanel .lc-tab-content,
body.axia-commercial-shell-v1 #liveComputerPanel .lc-artifact-dock,
body.axia-commercial-shell-v1 #liveComputerPanel .lc-agent-presence,
body.axia-commercial-shell-v1 #liveComputerPanel [data-commercial-legacy-region="true"] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.axia-commercial-shell-v1 #liveComputerPanel .lc-pulse {
  display: none !important;
}

body.axia-commercial-shell-v1 #liveComputerPanel .lc-title {
  color: var(--commercial-text) !important;
}

.commercial-safe-live-computer {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 18px;
  padding: 20px 18px;
  overflow: auto;
  background: #12171b;
  color: var(--commercial-text);
}

.commercial-safe-computer-state {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--commercial-border);
  border-radius: 6px;
  background: #171c21;
}

.commercial-safe-computer-state strong {
  font-size: 14px;
  color: var(--commercial-text);
}

.commercial-safe-computer-state span {
  font-size: 12px;
  line-height: 1.6;
  color: var(--commercial-muted);
}

.commercial-safe-computer-state[data-commercial-computer-state="blocked"] {
  border-color: rgba(245, 184, 86, 0.58);
}

.commercial-safe-computer-state[data-commercial-computer-state="complete"] {
  border-color: rgba(93, 190, 137, 0.58);
}

.commercial-safe-computer-project {
  display: grid;
  gap: 12px;
}

.commercial-safe-computer-project[hidden] {
  display: none !important;
}

.commercial-safe-computer-phase {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 650;
}

.commercial-safe-computer-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: #252c32;
}

.commercial-safe-computer-progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--commercial-blue);
  transition: width 160ms ease;
}

.commercial-safe-computer-progress-value {
  font-size: 12px;
  color: var(--commercial-muted);
  text-align: right;
}

.commercial-safe-computer-summary {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--commercial-border);
}

.commercial-safe-computer-summary > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--commercial-border);
}

.commercial-safe-computer-summary dt,
.commercial-safe-computer-summary dd {
  margin: 0;
  font-size: 12px;
}

.commercial-safe-computer-summary dt {
  color: var(--commercial-muted);
}

.commercial-safe-computer-summary dd {
  color: var(--commercial-text);
  font-weight: 650;
}

.commercial-live-computer-toggle {
  min-width: 40px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--commercial-border);
  border-radius: 6px;
  background: #171c21;
  color: var(--commercial-text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.commercial-live-computer-toggle:hover,
.commercial-live-computer-toggle[aria-expanded="true"] {
  border-color: rgba(100, 169, 245, 0.55);
  background: #1d2730;
}

.commercial-live-computer-toggle:focus-visible,
body.axia-commercial-shell-v1 #liveComputerPanel .lc-close-btn:focus-visible {
  outline: 2px solid var(--commercial-blue);
  outline-offset: 2px;
}

.commercial-panel-header {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 32px;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 10px 16px;
  border-bottom: 1px solid var(--commercial-border);
}

.commercial-panel-header > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.commercial-panel-header strong {
  overflow: hidden;
  color: var(--commercial-text);
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-eyebrow,
.commercial-section-label {
  color: #98a2ab;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.commercial-project-state-badge {
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(120, 129, 121, 0.13);
  color: #a7b0a9;
  font-size: 11px;
  white-space: nowrap;
}

.commercial-project-state-badge[data-state="running"] { background: rgba(83, 197, 138, 0.14); color: #83dbab; }
.commercial-project-state-badge[data-state="terminal"] { background: rgba(100, 169, 245, 0.14); color: #94c2f7; }
.commercial-project-state-badge[data-state="blocked"] { background: rgba(226, 118, 112, 0.14); color: #f19c96; }

.commercial-icon-button,
.commercial-icon-command {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--commercial-muted);
  cursor: pointer;
  text-decoration: none;
  font-size: 20px;
}

.commercial-icon-button:hover,
.commercial-icon-command:hover { background: #252d27; color: var(--commercial-text); }

.commercial-panel-tabs {
  display: flex;
  min-height: 42px;
  padding: 5px 8px;
  gap: 2px;
  border-bottom: 1px solid var(--commercial-border);
  overflow-x: auto;
}

.commercial-panel-tabs button {
  flex: 1 1 0;
  min-width: 0;
  padding: 6px 4px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-panel-tabs button[aria-selected="true"] {
  background: #252d27;
  color: var(--commercial-text);
}

.commercial-panel-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.commercial-panel-scroll > section {
  padding: 0 16px 18px;
}

.commercial-panel-scroll h2 {
  margin: 18px 0 8px;
  color: var(--commercial-text);
  font-size: 14px;
  letter-spacing: 0;
}

.commercial-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--commercial-border);
}

.commercial-section p {
  margin: 7px 0 0;
  color: #dce4de;
  font-size: 13px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.commercial-progress-section > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--commercial-muted);
  font-size: 11px;
}

.commercial-progress-track {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 3px;
  background: #2a302b;
}

.commercial-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--commercial-green);
  transition: width 180ms ease;
}

.commercial-phase-list {
  margin: 0;
  padding: 10px 0 6px;
  list-style: none;
}

.commercial-phase {
  position: relative;
  min-height: 30px;
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  color: #747f77;
  font-size: 12px;
  line-height: 1.4;
}

.commercial-phase-marker {
  width: 8px;
  height: 8px;
  margin-top: 4px;
  border: 1px solid #576159;
  border-radius: 50%;
  background: var(--commercial-surface);
}

.commercial-phase-complete { color: #9eaaa1; }
.commercial-phase-complete .commercial-phase-marker { border-color: var(--commercial-green); background: var(--commercial-green); }
.commercial-phase-current { color: var(--commercial-text); font-weight: 600; }
.commercial-phase-current .commercial-phase-marker { border-color: var(--commercial-amber); background: var(--commercial-amber); box-shadow: 0 0 0 3px rgba(217, 173, 86, 0.12); }

.commercial-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--commercial-border);
}

.commercial-evidence-grid > div {
  min-width: 0;
  padding: 8px 4px 8px 0;
}

.commercial-evidence-grid dt { color: #7f8a82; font-size: 10px; }
.commercial-evidence-grid dd {
  margin: 3px 0 0;
  overflow: hidden;
  color: #d8e0da;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-technical {
  padding: 10px 0;
  border-top: 1px solid var(--commercial-border);
  color: var(--commercial-muted);
  font-size: 11px;
}

.commercial-technical summary { cursor: pointer; color: #9ca79f; }
.commercial-technical p { overflow-wrap: anywhere; line-height: 1.5; }

.commercial-artifact-list,
.commercial-approval-list,
.commercial-knowledge-list,
.commercial-tooling-list,
.commercial-capability-list,
.commercial-credit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.commercial-artifact-item,
.commercial-approval-item,
.commercial-knowledge-item,
.commercial-tooling-item,
.commercial-policy-item,
.commercial-capability-item,
.commercial-credit-item {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--commercial-border);
}

.commercial-artifact-item > span,
.commercial-approval-item > span,
.commercial-tooling-item > span,
.commercial-capability-item > span,
.commercial-credit-item > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.commercial-artifact-item strong,
.commercial-approval-item strong,
.commercial-tooling-item strong,
.commercial-capability-item strong,
.commercial-credit-item strong {
  overflow: hidden;
  color: var(--commercial-text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.commercial-artifact-item small,
.commercial-approval-item small,
.commercial-knowledge-item small,
.commercial-tooling-item small,
.commercial-policy-item small,
.commercial-capability-item small,
.commercial-credit-item small,
.commercial-artifact-state {
  color: #7f8a82;
  font-size: 10px;
}

.commercial-capability-item b {
  flex: 0 0 auto;
  color: var(--commercial-muted);
  font-size: 11px;
  font-weight: 600;
}

.commercial-tooling-item b {
  flex: 0 0 auto;
  color: var(--commercial-muted);
  font-size: 11px;
  font-weight: 600;
}

.commercial-tooling-item b[data-state="configured"] { color: var(--commercial-green); }

.commercial-policy-item span { color: #d8e0da; font-size: 12px; }
.commercial-policy-item small { text-align: right; }
.commercial-policy-heading,
.commercial-list-heading {
  padding: 14px 0 5px;
  color: #89958c;
  font-size: 10px;
  font-weight: 700;
  list-style: none;
}

.commercial-capability-item b[data-state="configured"] { color: var(--commercial-green); }

.commercial-credit-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--commercial-border);
  border-radius: 6px;
  background: var(--commercial-border);
}

.commercial-credit-summary > div {
  min-width: 0;
  padding: 10px;
  background: #181d19;
}

.commercial-credit-summary dt {
  color: #7f8a82;
  font-size: 10px;
}

.commercial-credit-summary dd {
  margin: 4px 0 0;
  color: var(--commercial-text);
  font-size: 14px;
  font-weight: 700;
}

.commercial-credit-item b {
  color: #b9dca6;
  font-size: 12px;
}

.commercial-command {
  min-height: 32px;
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(100, 169, 245, 0.38);
  border-radius: 5px;
  background: rgba(100, 169, 245, 0.1);
  color: #9ac8fa;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0;
}

.commercial-empty {
  margin: 0;
  padding: 18px 0;
  color: #7e8981;
  font-size: 12px;
}

.commercial-empty-detail {
  display: flex;
  flex-direction: column;
  gap: 5px;
  line-height: 1.45;
}

.commercial-empty-detail strong { color: #c9d2cb; font-size: 12px; }
.commercial-empty-detail span,
.commercial-empty-detail small { color: #7e8981; font-size: 10px; }

.commercial-mobile-navigation { display: none; }

@media (max-width: 1180px) {
  :root { --commercial-project-panel: 304px; }
  body.axia-commercial-shell-v1 #threadSidebar,
  body.axia-commercial-shell-v1 .thread-sidebar {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
  }
  body.axia-commercial-shell-v1 .chat-layout,
  body.axia-commercial-shell-v1 .chat-layout.lc-open,
  body.axia-commercial-shell-v1 .chat-layout.focus-mode {
    grid-template-columns: 220px minmax(0, 1fr) 0 !important;
  }
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.lc-open,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.focus-mode {
    grid-template-columns: 220px minmax(0, 1fr) var(--commercial-project-panel) !important;
  }
}

@media (max-width: 920px) {
  body.axia-commercial-shell-v1 .chat-layout,
  body.axia-commercial-shell-v1 .chat-layout.lc-open,
  body.axia-commercial-shell-v1 .chat-layout.focus-mode,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.lc-open,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.focus-mode {
    grid-template-columns: 220px minmax(0, 1fr) 0 !important;
  }
  .commercial-project-panel {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 80;
    width: min(88vw, 360px);
    min-width: min(88vw, 360px);
    max-width: min(88vw, 360px);
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.36);
  }
  body:not(.commercial-panel-open) .commercial-project-panel {
    width: 0;
    min-width: 0;
  }
  .commercial-compact-status { display: flex; }
}

@media (min-width: 768px) and (max-width: 920px) {
  body.axia-commercial-shell-v1 .chat-layout,
  body.axia-commercial-shell-v1 .chat-layout.lc-open,
  body.axia-commercial-shell-v1 .chat-layout.focus-mode,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.lc-open,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.focus-mode {
    grid-template-columns: minmax(184px, 220px) minmax(0, 1fr) 0 !important;
  }
  body.axia-commercial-shell-v1 #threadSidebar,
  body.axia-commercial-shell-v1 .thread-sidebar {
    position: relative !important;
    inset: auto !important;
    width: auto !important;
    min-width: 184px !important;
    max-width: 220px !important;
    transform: none !important;
    transition: none !important;
    z-index: auto !important;
    pointer-events: auto !important;
  }
}

@media (min-width: 921px) and (max-width: 1023px) {
  body.axia-commercial-shell-v1 #threadSidebar,
  body.axia-commercial-shell-v1 .thread-sidebar {
    pointer-events: auto !important;
  }
}

@media (max-width: 767px) {
  body.axia-commercial-shell-v1 .chat-layout,
  body.axia-commercial-shell-v1 .chat-layout.lc-open,
  body.axia-commercial-shell-v1 .chat-layout.focus-mode,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.lc-open,
  body.axia-commercial-shell-v1.commercial-panel-open .chat-layout.focus-mode {
    grid-template-columns: minmax(0, 1fr) 0 !important;
  }
  body.axia-commercial-shell-v1 .message-row.axia-mission-candidate-modal-v1030 {
    inset: 72px 12px calc(var(--commercial-mobile-rail) + 12px) 12px !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 16px !important;
  }
  body.axia-commercial-shell-v1 #threadSidebar,
  body.axia-commercial-shell-v1 .thread-sidebar {
    position: absolute !important;
    inset: 0 auto 0 0 !important;
    z-index: 85 !important;
    width: min(86vw, 310px) !important;
    min-width: min(86vw, 310px) !important;
    max-width: min(86vw, 310px) !important;
    transform: translateX(-100%);
    transition: transform 160ms ease;
  }
  body.axia-commercial-shell-v1 #threadSidebar.mobile-open,
  body.axia-commercial-shell-v1 .thread-sidebar.mobile-open { transform: translateX(0); }
  body.axia-commercial-shell-v1 .center-chat { padding-bottom: var(--commercial-mobile-rail) !important; }
  body.axia-commercial-shell-v1 .chat-area {
    width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  body.axia-commercial-shell-v1 #chatLayout #chatArea {
    width: 100% !important;
    max-width: none !important;
    margin-bottom: 6px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    padding-bottom: calc(
      var(--v3-mobile-input-h) +
      var(--v3-mobile-input-gap) +
      var(--v3-mobile-nav-h) +
      env(safe-area-inset-bottom) +
      32px
    ) !important;
  }
  body.axia-commercial-shell-v1 #chatLayout .input-area {
    width: calc(100% - 24px) !important;
    max-width: none !important;
    padding-top: 8px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
  }
  body.axia-commercial-shell-v1 .input-inner {
    width: calc(100% - 16px) !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    border-radius: 7px !important;
  }
  body.axia-commercial-shell-v1 #messageInput,
  body.axia-commercial-shell-v1 .message-input {
    width: 100% !important;
    min-width: 100% !important;
    flex: 1 0 100% !important;
    order: 1;
  }
  body.axia-commercial-shell-v1 .input-controls {
    order: 4;
    margin-left: auto;
  }
  .commercial-project-panel {
    inset: 0;
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    box-shadow: none;
  }
  .commercial-mobile-navigation {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 120;
    height: var(--commercial-mobile-rail);
    display: flex;
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--commercial-border);
    background: rgba(13, 16, 18, 0.98);
  }
  .commercial-mobile-navigation button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 5px 2px;
    font-size: 11px;
  }
  .commercial-mobile-navigation button:focus-visible,
  .commercial-panel-tabs button:focus-visible,
  .commercial-project-navigation button:focus-visible,
  .commercial-command:focus-visible,
  .commercial-icon-button:focus-visible,
  .commercial-icon-command:focus-visible {
    outline: 2px solid var(--commercial-blue);
    outline-offset: 1px;
  }
}

@media (min-width: 1181px) and (max-width: 1279px) {
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.lc-open,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.focus-mode {
    grid-template-columns: var(--commercial-sidebar) minmax(0, 1fr) 0 !important;
  }
}

@media (min-width: 921px) and (max-width: 1180px) {
  html body.axia-commercial-shell-v1 #chatLayout,
  html body.axia-commercial-shell-v1 #chatLayout.lc-open,
  html body.axia-commercial-shell-v1 #chatLayout.focus-mode {
    grid-template-columns: 220px minmax(0, 1fr) 0 !important;
  }
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.lc-open,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.focus-mode {
    grid-template-columns: 220px minmax(0, 1fr) 0 !important;
  }
}

@media (min-width: 768px) and (max-width: 920px) {
  html body.axia-commercial-shell-v1 #chatLayout,
  html body.axia-commercial-shell-v1 #chatLayout.lc-open,
  html body.axia-commercial-shell-v1 #chatLayout.focus-mode,
  html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout,
  html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout.lc-open,
  html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout.focus-mode {
    grid-template-columns: minmax(184px, 220px) minmax(0, 1fr) 0 !important;
  }
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.lc-open,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.focus-mode {
    grid-template-columns: minmax(184px, 220px) minmax(0, 1fr) 0 !important;
  }
}

@media (min-width: 768px) and (max-width: 1279px) {
  body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #liveComputerPanel {
    position: absolute !important;
    inset: 0 0 0 auto !important;
    z-index: 90 !important;
    width: min(88vw, var(--commercial-live-computer)) !important;
    min-width: min(88vw, var(--commercial-live-computer)) !important;
    max-width: min(88vw, var(--commercial-live-computer)) !important;
    height: 100% !important;
    box-shadow: -18px 0 42px rgba(0, 0, 0, 0.42) !important;
  }
}

@media (max-width: 767px) {
  body.axia-commercial-shell-v1 #chatLayout .center-chat,
  body.axia-commercial-shell-v1 #chatLayout .commercial-project-panel {
    grid-column: 1 !important;
  }
  html body.axia-commercial-shell-v1 #chatLayout,
  html body.axia-commercial-shell-v1 #chatLayout.lc-open,
  html body.axia-commercial-shell-v1 #chatLayout.focus-mode,
  html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout,
  html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout.lc-open,
  html body.axia-commercial-shell-v1.commercial-panel-open #chatLayout.focus-mode {
    grid-template-columns: minmax(0, 1fr) 0 !important;
  }
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.lc-open,
  html body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout.focus-mode {
    grid-template-columns: minmax(0, 1fr) 0 !important;
  }
  body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #liveComputerPanel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 140 !important;
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) #chatLayout .input-area,
  body.axia-commercial-shell-v1.commercial-computer-open:not(.commercial-panel-open) .commercial-mobile-navigation {
    display: none !important;
    pointer-events: none !important;
  }
  .commercial-live-computer-toggle {
    min-width: 38px;
    padding-inline: 8px;
  }
  .commercial-live-computer-toggle span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .commercial-project-panel,
  body.axia-commercial-shell-v1 #liveComputerPanel,
  .commercial-progress-track span { transition: none; }
}
