:root {
  color-scheme: light;
  --ink: #1e2528;
  --muted: #637076;
  --line: #d8dedb;
  --panel: #f7f8f4;
  --surface: #ffffff;
  --rail: #26302d;
  --rail-active: #cce49a;
  --accent: #1f7a6b;
  --warn: #9a6200;
  --bad: #b33131;
  --ok: #237149;
  --source: #496678;
  --shadow: 0 12px 30px rgba(31, 42, 38, 0.12);
  --rail-width: 92px;
  --rail-collapsed-width: 44px;
  --session-sidebar-width: 330px;
  --right-sidebar-width: 620px;
  --right-sidebar-min-width: 420px;
  --right-sidebar-max-width: 680px;
  --right-sidebar-left-collapsed-width: min(var(--right-sidebar-width), 46vw);
  --right-collapsed-width: 46px;
  --resize-handle-width: 8px;
}

* { box-sizing: border-box; }
html, body, #root { width: 100%; height: 100%; margin: 0; overflow: hidden; }
body { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #edf1ec; letter-spacing: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }

.login-shell { min-height: 100%; display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #e7eee6 0%, #f7f8f4 62%, #dfe9e2 100%); }
.login-panel { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 8px; padding: 28px; }
.login-heading h1 { margin: 0 0 8px; font-size: 28px; }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.login-form { display: grid; gap: 14px; margin-top: 18px; }
.login-form label { display: grid; gap: 6px; font-weight: 700; }
.login-form input { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.login-submit, .logout-button, .command-button { border: 0; border-radius: 6px; padding: 10px 14px; color: #fff; background: var(--accent); font-weight: 800; }
.login-error { color: var(--bad); margin: 0; }

.workbench-shell { height: 100%; width: 100%; display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); overflow: hidden; background: var(--panel); }
.main-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: 36px minmax(0, 1fr); overflow: hidden; }
.workspace-topbar { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 8px; border-bottom: 1px solid var(--line); background: #fbfcf8; }
.workspace-topbar-button { min-height: 26px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 3px 8px; font-size: 12px; font-weight: 800; }
.workspace-topbar-button:disabled { opacity: 0.35; }
.workspace-topbar-status { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 800; overflow: hidden; }
.workspace-route-label { flex: 0 0 auto; white-space: nowrap; }
.workspace-topbar-pill { display: inline-flex; min-height: 22px; align-items: center; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; }
.topbar-status-tools { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.status-chip-button { max-width: min(38vw, 480px); min-height: 26px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 2px 7px; font-size: 12px; font-weight: 800; overflow: hidden; white-space: nowrap; }
.status-chip-button:hover, .status-chip-button:focus-visible { border-color: var(--accent); outline: 0; }
.status-chip-button .state-tag { min-height: 18px; padding: 1px 6px; font-size: 11px; white-space: nowrap; }
.status-chip-label { flex: 0 0 auto; }
.status-chip-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.workspace-body { min-width: 0; min-height: 0; display: grid; grid-template-columns: var(--session-sidebar-width) var(--resize-handle-width) minmax(420px, 1fr) var(--resize-handle-width) var(--right-sidebar-width); grid-template-rows: minmax(0, 1fr); overflow: hidden; }
.workbench-shell.is-left-sidebar-collapsed .workspace-body { grid-template-columns: 0 0 minmax(360px, 1fr) var(--resize-handle-width) minmax(min(var(--right-sidebar-min-width), 46vw), var(--right-sidebar-left-collapsed-width)); }
.workbench-shell.is-right-sidebar-collapsed .workspace-body { grid-template-columns: var(--session-sidebar-width) var(--resize-handle-width) minmax(420px, 1fr) 0 0; }
.workbench-shell.is-left-sidebar-collapsed.is-right-sidebar-collapsed .workspace-body { grid-template-columns: 0 0 minmax(0, 1fr) 0 0; }
.workspace-body.is-route-without-sidebars { grid-template-columns: minmax(0, 1fr); }
.session-sidebar { grid-column: 1; }
.session-sidebar-resize { grid-column: 2; }
.center-workspace { grid-column: 3; }
.right-sidebar-resize { grid-column: 4; }
.right-sidebar { grid-column: 5; }
.workspace-body.is-route-without-sidebars .center-workspace { grid-column: 1; }
.activity-rail { min-width: 0; display: grid; grid-template-rows: repeat(5, minmax(54px, auto)) 1fr minmax(54px, auto); gap: 6px; padding: 10px 8px; background: var(--rail); overflow-x: hidden; }
.rail-button { min-width: 0; min-height: 44px; border: 1px solid rgba(255,255,255,0.12); border-radius: 6px; padding: 8px 6px; background: transparent; color: #eef4ed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-button.active { color: #1d2b23; background: var(--rail-active); border-color: var(--rail-active); }
.rail-spacer { min-height: 8px; }
.is-left-sidebar-collapsed .session-sidebar { display: none; }

.session-sidebar { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; padding: 14px; border-right: 1px solid var(--line); background: #f9faf6; overflow: hidden; }
.session-sidebar-head, .panel-title-row, .right-sidebar-head, .gate-header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-title-row { flex-wrap: wrap; }
.panel-title-row > div { min-width: 0; }
.session-sidebar h2, .panel-title-row h2, .right-sidebar h2 { margin: 0; font-size: 18px; }
.conversation-panel .panel-title-row { min-height: 32px; }
.conversation-panel .panel-title-row .eyebrow { margin-bottom: 2px; }
.conversation-panel .panel-title-row h2 { font-size: 16px; line-height: 1.1; }
.conversation-panel-hint { display: none; }
.conversation-empty { margin: 12px 0; padding: 16px; border: 1px dashed var(--line); border-radius: 6px; color: var(--muted); font-size: 13px; text-align: center; }
.session-icon-button, .icon-button, .right-sidebar-toggle, .session-delete-button, .command-button.secondary, #hwpod-event-follow, #hwpod-event-jump { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 8px 10px; font-weight: 700; }
.session-tabs { min-height: 0; display: grid; align-content: start; gap: 8px; overflow-x: hidden; overflow-y: auto; }
.session-tab { display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); border-radius: 6px; padding: 9px; background: var(--surface); }
.session-tab[aria-selected="true"] { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.session-tab-label, .session-tab-subtitle { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.session-tab-subtitle, .session-tab-count, .session-status, .hwpod-node-meta, .message-meta { color: var(--muted); font-size: 12px; }
.session-sidebar-foot { display: grid; gap: 8px; }
.resize-handle { position: relative; width: var(--resize-handle-width); background: transparent; cursor: col-resize; touch-action: none; }
.resize-handle::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 50%; transform: translateX(-50%); width: 2px; border-radius: 2px; background: #d2dad5; }
.resize-handle:hover::before, .resize-handle:focus-visible::before, .workbench-shell.is-resizing .resize-handle::before { background: var(--accent); }
.resize-handle[aria-disabled="true"] { cursor: not-allowed; }
.resize-handle[aria-disabled="true"]::before { background: #e3e7e3; }

.center-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
.view { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px; }
.workspace-panel { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 0 rgba(0,0,0,0.03); }
.conversation-column { min-width: 0; min-height: 100%; overflow: visible; }
.conversation-panel { min-height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 10px; overflow: visible; }
.panel-title-actions { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.state-tag { display: inline-flex; min-height: 28px; align-items: center; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; white-space: normal; }
.tone-ok, .tone-dev-live { color: var(--ok); background: #e4f4ea; }
.tone-source { color: var(--source); background: #e7eef2; }
.tone-pending { color: var(--warn); background: #fff3d8; }
.tone-blocked, .tone-error { color: var(--bad); background: #fee9e9; }
.tone-warn { color: var(--warn); background: #fff3d8; }
.tone-border-ok, .tone-border-dev-live { border-color: #9bd3b1 !important; }
.tone-border-pending { border-color: #e4bd68 !important; }
.tone-border-blocked, .tone-border-error { border-color: #e7a1a1 !important; }

.code-agent-debug-summary { display: inline-flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; flex-wrap: wrap; }
.code-agent-debug-summary .code-agent-summary-label, .code-agent-debug-summary .code-agent-summary-capability { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.message-trace pre, .skill-preview, .help-content, #hwpod-detail-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.message-trace-count { color: var(--muted); font-size: 12px; }
.message-trace-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; padding: 8px 10px; }
.message-trace-row { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; }
.message-trace-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.message-trace-tone { color: var(--accent); }
.message-trace-label { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.message-trace-time { color: var(--muted); font-size: 12px; }
.message-trace-body { margin: 6px 0 0; max-height: calc(4 * 1.35em + 14px); overflow: auto; background: #f3f5f1; padding: 6px 8px; border-radius: 6px; font-size: 12px; line-height: 1.35; scrollbar-gutter: stable; }
.message-trace-markdown { display: block; font-family: inherit; white-space: normal; }
.message-trace-markdown p, .message-trace-markdown ul, .message-trace-markdown ol, .message-trace-markdown table { margin: 0 0 6px; }
.message-trace-markdown p:last-child, .message-trace-markdown ul:last-child, .message-trace-markdown ol:last-child, .message-trace-markdown table:last-child { margin-bottom: 0; }
.message-trace-markdown code { border-radius: 4px; background: #e7ece8; padding: 1px 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.94em; }
.message-trace-events { min-height: 0; max-height: min(312px, 32dvh); overflow: auto; width: 100%; }
.message-trace-empty { color: var(--muted); font-size: 12px; padding: 10px; }
.message-trace-last { color: var(--muted); font-size: 12px; font-weight: 800; }
.message-trace-update-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); opacity: 0; transform: scale(0.75); }
.message-trace[data-trace-update-key] .message-trace-update-dot { animation: trace-update-pulse 900ms ease-out; }
.message-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 8px; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.message-action { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.message-action:hover, .message-action:focus-visible { border-color: var(--accent); outline: 0; }
.message-action-cancel { color: var(--bad); border-color: var(--bad); }
.message-action-retry { color: var(--accent); border-color: var(--accent); }
.message-action-trace { color: var(--source); border-color: var(--source); }
.message-action-status { color: var(--muted); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.message-pending-context { display: grid; gap: 6px; margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: #fbfcf8; }
.message-pending-head { display: flex; align-items: center; gap: 8px; }
.message-pending-summary { color: var(--muted); font-size: 12px; }
.message-pending-grid, .message-session-grid, .message-runtime-grid { display: grid; gap: 4px 12px; grid-template-columns: minmax(120px, max-content) 1fr; align-items: baseline; }
.message-pending-row, .message-session-row, .message-runtime-row { display: contents; }
.message-pending-key, .message-session-key, .message-runtime-key { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.message-pending-value, .message-session-value, .message-runtime-value { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.message-pending-time, .message-session-time { color: var(--muted); font-size: 12px; grid-column: 1 / -1; }
.message-runtime-row-missing .message-runtime-value { color: var(--bad); }
.message-runtime-row-wide { grid-column: 1 / -1; }
.message-runtime-summary { color: var(--muted); font-size: 12px; }
.message-session-summary { color: var(--muted); font-size: 12px; }
.probe-card { display: grid; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #fbfcf8; }
.probe-card-compact { min-width: 0; display: block; padding: 0; border-radius: 0; background: transparent; }
.probe-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.probe-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.probe-list-dialog { max-height: min(56vh, 560px); overflow: auto; padding-right: 2px; }
.probe-row { display: grid; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.probe-row-head { display: flex; align-items: center; gap: 8px; }
.probe-tone { font-size: 12px; }
.probe-row-label { font-weight: 700; font-size: 13px; }
.probe-row-status { margin-left: auto; font-size: 12px; font-weight: 700; }
.probe-row-meta { display: flex; align-items: baseline; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.probe-row-method { font-weight: 800; color: var(--source); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.probe-row-path { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.probe-row-time { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.probe-row-detail { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.live-build-summary { display: grid; gap: 8px; padding: 10px 12px; border-radius: 8px; background: #fbfcf8; }
.live-build-summary-compact { min-width: 0; display: block; padding: 0; border-radius: 0; background: transparent; }
.live-build-details { min-width: 0; display: block; }
.live-build-details > summary { min-width: 0; display: block; list-style: none; }
.live-build-details > summary::-webkit-details-marker { display: none; }
.live-build-summary-line { cursor: default; }
.live-build-summary-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-build-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.live-build-list[hidden] { display: none; }
.live-build-list-dialog { max-height: min(58vh, 620px); overflow: auto; padding-right: 2px; }
.live-build-dialog-summary { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcf8; }
.live-build-dialog-summary p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.live-build-row { display: grid; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.live-build-row-head { display: flex; align-items: center; gap: 8px; }
.live-build-tone { font-size: 12px; }
.live-build-service { font-weight: 700; font-size: 13px; }
.live-build-time { margin-left: auto; color: var(--muted); font-size: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.live-build-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.live-build-reason { margin: 0; font-size: 12px; color: var(--bad); }
.workbench-dialog-layer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(15, 22, 20, 0.42); }
.workbench-dialog { width: min(760px, 94vw); max-height: min(86vh, 820px); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(15, 22, 20, 0.34); overflow: hidden; }
.workbench-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fbfcf8; }
.workbench-dialog-head h2 { margin: 0; font-size: 16px; }
.workbench-dialog-close { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 20px; line-height: 1; }
.workbench-dialog-content { min-height: 0; display: grid; gap: 10px; padding: 12px 14px; overflow: auto; }
.gate-raw { margin-top: 12px; }
.gate-raw pre { margin: 4px 0 0; max-height: 240px; overflow: auto; background: #f3f5f1; padding: 8px; border-radius: 6px; }
.gate-table tbody tr[data-status-key="blocked"] td:first-child { border-left: 3px solid var(--bad); padding-left: 5px; }
.gate-table tbody tr[data-status-key="pass"] td:first-child { border-left: 3px solid var(--ok); padding-left: 5px; }
.drafts-list { position: absolute; right: 92px; bottom: calc(100% + 6px); z-index: 30; width: min(620px, calc(100% - 20px)); display: grid; gap: 4px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.drafts-list-head { display: flex; align-items: center; justify-content: space-between; }
.drafts-list-head .command-button { padding: 2px 8px; min-height: 24px; }
.drafts-list-items { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.draft-chip { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 2px 8px; font-size: 12px; cursor: pointer; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-chip:hover, .draft-chip:focus-visible { border-color: var(--accent); outline: 0; }
.conversation-list { min-height: 0; display: grid; align-content: start; gap: 8px; overflow: visible; padding: 0 4px 2px 0; }
.message-card { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 8px; }
.message-card.message-user { justify-self: end; width: fit-content; max-width: min(74%, 720px); padding: 0; border-color: #c9d7d2; background: #f7fbf8; }
.message-card.message-agent { display: grid; gap: 6px; width: 100%; border-left-width: 4px; background: linear-gradient(90deg, #fbfffb 0%, #fff 42%); }
.message-card.message-agent .message-final-response { border: 1px solid #dce7df; border-radius: 6px; background: #fbfdf9; padding: 8px 10px; }
.message-head { display: none; }
.message-body { line-height: 1.45; overflow-wrap: anywhere; }
.message-body p { white-space: pre-wrap; }
.message-user .message-body { padding: 7px 10px; }
.message-body p, .message-body ul, .message-body ol, .message-body blockquote, .message-body table { margin: 0 0 8px; }
.message-body p:last-child, .message-body ul:last-child, .message-body ol:last-child, .message-body blockquote:last-child, .message-body table:last-child { margin-bottom: 0; }
.message-body ul, .message-body ol { padding-left: 22px; }
.message-body blockquote { border-left: 3px solid var(--line); padding-left: 10px; color: var(--muted); }
.message-body code { border-radius: 4px; background: #edf1ec; padding: 1px 4px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.94em; }
.message-body pre { overflow: auto; background: #f3f5f1; padding: 10px; border-radius: 6px; }
.message-body pre code { display: block; padding: 0; background: transparent; }
.message-body table { width: 100%; border-collapse: collapse; overflow: auto; display: block; }
.message-body th, .message-body td { border: 1px solid var(--line); padding: 5px 7px; text-align: left; }
.message-body a { color: var(--accent); font-weight: 700; }
.message-final-response { min-height: 0; }
.message-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.message-trace { margin-top: 0; border: 1px solid var(--line); border-radius: 6px; padding-top: 0; width: 100%; overflow: hidden; }
.message-trace[data-trace-status="running"] { animation: trace-working-border 1.8s ease-in-out infinite; }
.message-trace[data-trace-mode="all"], .message-trace[open] { width: 100%; }
.message-trace > summary, .message-trace-summary { margin: 0; padding: 4px 8px; background: #f7f8f4; cursor: pointer; }
.message-trace[data-trace-status="running"] > summary, .message-trace[data-trace-status="running"] .message-trace-summary { background: linear-gradient(90deg, #fff7df, #f7f8f4 42%, #fff7df); background-size: 180% 100%; animation: trace-working-summary 1.8s ease-in-out infinite; }
.message-trace-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; color: var(--muted); font-size: 12px; }
.message-trace-summary::-webkit-details-marker { display: none; }
.message-trace-events { max-height: min(312px, 32dvh); overflow: auto; display: grid; gap: 8px; width: 100%; }

.code-agent-summary-debug { flex: 0 0 auto; align-self: center; }
.debug-dialog-trigger { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.debug-dialog-trigger:hover, .debug-dialog-trigger:focus-visible { border-color: var(--accent); outline: 0; }
.debug-dialog-scrim { position: fixed; inset: 0; background: rgba(15, 22, 20, 0.45); display: grid; place-items: center; z-index: 60; padding: 16px; }
.debug-dialog { max-width: min(720px, 92vw); width: 100%; max-height: 86vh; border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(15, 22, 20, 0.4); overflow: hidden; }
.debug-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.debug-dialog-head h3 { margin: 0; font-size: 16px; }
.debug-dialog-close { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 4px 10px; font-size: 12px; font-weight: 700; cursor: pointer; }
.debug-dialog-body { display: grid; gap: 12px; padding: 12px 16px; overflow: auto; max-height: 70vh; }
.debug-dialog-section { display: grid; gap: 6px; }
.debug-dialog-section h4 { margin: 0; font-size: 13px; color: var(--muted); }
.debug-dialog-empty, .debug-dialog-section-empty { margin: 0; color: var(--muted); font-size: 12px; }
.debug-dialog-rows { display: grid; gap: 4px 12px; grid-template-columns: minmax(140px, max-content) 1fr; align-items: baseline; }
.debug-dialog-row { display: contents; }
.debug-dialog-key { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.debug-dialog-value { font-size: 12px; overflow-wrap: anywhere; }
.debug-dialog-raw { margin: 0; max-height: 240px; overflow: auto; background: #f3f5f1; padding: 8px; border-radius: 6px; font-size: 12px; }
.message-meta-compact { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 28px; margin-top: 0; padding-top: 4px; border-top: 1px solid var(--line); }
.message-user .message-meta-compact { border-top: 1px solid #e2e9e5; padding: 4px 6px; font-size: 11px; }
.message-meta-compact .debug-dialog-trigger { margin-left: auto; }
.message-pending-inline { display: flex; align-items: center; gap: 8px; margin: 0; padding: 3px 6px; background: #fbfcf8; border-radius: 6px; }
.message-pending-inline-text { color: var(--muted); font-size: 12px; }
.message-trace { width: 100%; }
.message-trace-events { width: 100%; }

@keyframes trace-update-pulse {
  0% { opacity: 0.95; transform: scale(1.35); box-shadow: 0 0 0 0 rgba(31, 122, 107, 0.36); }
  70% { opacity: 0.55; transform: scale(1); box-shadow: 0 0 0 8px rgba(31, 122, 107, 0); }
  100% { opacity: 0; transform: scale(0.75); box-shadow: 0 0 0 0 rgba(31, 122, 107, 0); }
}

@keyframes trace-working-border {
  0%, 100% { box-shadow: inset 0 0 0 0 rgba(154, 98, 0, 0); }
  50% { box-shadow: inset 0 0 0 1px rgba(154, 98, 0, 0.22), 0 0 0 3px rgba(228, 189, 104, 0.18); }
}

@keyframes trace-working-summary {
  0% { background-position: 0% 50%; }
  100% { background-position: 180% 50%; }
}

.command-bar { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; grid-template-areas: "profile drafts send clear" "input input input input"; gap: 6px; align-items: end; padding: 8px 10px; border-top: 1px solid var(--line); background: #f7f8f4; }
.command-bar .input-shell { grid-area: input; }
.command-bar #command-drafts-toggle { grid-area: drafts; }
.command-bar #command-send { grid-area: send; }
.command-bar #command-clear { grid-area: clear; }
.command-bar .agent-timeout-control[for="code-agent-provider-profile"] { grid-area: profile; }
.agent-timeout-control { display: grid; gap: 3px; min-width: 126px; font-size: 12px; font-weight: 700; }
.agent-timeout-control select { border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: var(--surface); }
.input-shell { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: #fff; }
.prompt-mark { color: var(--accent); font-weight: 900; }
#command-input { min-width: 0; width: 100%; min-height: 30px; max-height: calc(1.45em * 5 + 8px); line-height: 1.45; resize: none; border: 0; outline: none; overflow-y: hidden; }
#command-input.is-scrollable { overflow-y: auto; }

.command-bar .command-button { min-height: 32px; padding: 6px 10px; }
.command-drafts-toggle { white-space: nowrap; }

.right-sidebar { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr); gap: 0; padding: 0; background: #fbfcf8; border-left: 1px solid var(--line); overflow: hidden; }
.right-sidebar-content { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 10px; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.right-sidebar-content > * { flex: 0 0 auto; min-width: 0; }
.is-right-sidebar-collapsed .right-sidebar-content { display: none; }
.is-right-sidebar-collapsed .right-sidebar-resize { display: none; }
.is-right-sidebar-collapsed .right-sidebar { display: none; }
.hwpod-node-status { display: grid; gap: 6px; }
.hwpod-node-summary, .hwpod-node-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.summary-tile { min-width: 0; min-height: 52px; display: grid; gap: 2px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 7px 8px; }
.summary-tile span { color: var(--muted); font-size: 12px; }
.summary-tile strong { overflow-wrap: anywhere; font-size: 12px; line-height: 1.2; }
.hwpod-node-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin: 0; }
.hwpod-node-meta div { border: 1px solid var(--line); border-radius: 6px; padding: 6px; background: #fff; }
.hwpod-node-meta dt { font-weight: 800; }
.hwpod-node-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.hwpod-node-workspace { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; overflow: hidden; }
.hwpod-event-panel { min-height: 0; max-height: min(360px, 38dvh); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.hwpod-event-panel header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid var(--line); font-weight: 800; }
.hwpod-event-scroll { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 10px; background: #17201c; color: #e9f5e8; }
#hwpod-event-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.hwpod-detail-dialog { max-width: min(720px, 92vw); border: 1px solid var(--line); border-radius: 8px; padding: 0; }
.hwpod-detail-dialog form { display: grid; gap: 10px; padding: 16px; }

.skills-panel, .settings-panel, .help-panel, .access-panel, .management-panel { padding: 14px; }
.settings-content { display: grid; align-content: start; gap: 14px; }
.settings-group { display: grid; grid-template-columns: repeat(3, minmax(150px, 220px)); gap: 10px; align-items: end; }
.skills-layout { min-height: 0; display: grid; grid-template-columns: 280px minmax(220px, 1fr) minmax(260px, 1.2fr); gap: 12px; }
.skill-upload-panel, .skill-detail-panel, .skill-preview-panel { min-width: 0; display: grid; align-content: start; gap: 10px; }
.skill-upload-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.skill-upload-drop { border: 1px dashed var(--accent); border-radius: 8px; padding: 10px; background: #f4faf6; }
.skill-list, .skill-tree { display: grid; gap: 8px; max-height: 52vh; overflow: auto; }
.skill-item, .skill-tree button { text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 9px; }
.skill-item.active { border-color: var(--accent); }
.skill-assembly-body, .skill-prompt-assembly { display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fff; }
.skill-meta, .skill-prompt-list { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.skill-prompt-row { display: inline-flex; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px 8px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wrap { overflow-wrap: anywhere; }
.access-view { display: grid; gap: 12px; }
.access-panel { min-height: calc(100dvh - 72px); display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 12px; overflow: hidden; }
.access-error { margin: 0; border: 1px solid #e7a1a1; border-radius: 6px; padding: 8px 10px; background: #fff3f3; color: var(--bad); font-size: 13px; font-weight: 700; }
.access-layout { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(220px, 280px) minmax(520px, 1fr) minmax(240px, 320px); gap: 12px; overflow: hidden; }
.access-user-panel, .access-matrix-panel, .access-tool-panel, .access-status-panel, .access-tools { min-width: 0; display: grid; align-content: start; gap: 10px; }
.access-user-panel, .access-matrix-panel, .access-tool-panel { min-height: 0; overflow: hidden; }
.access-section-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.access-section-head h3 { margin: 0; font-size: 15px; }
.access-section-head span, .access-metrics, .access-tool-row span, .access-user-row span { color: var(--muted); font-size: 12px; }
.access-user-list, .access-tool-list { min-height: 0; display: grid; align-content: start; gap: 8px; overflow: auto; }
.access-user-list { max-height: calc(100dvh - 156px); }
.access-user-row { min-width: 0; display: grid; gap: 3px; text-align: left; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 9px; }
.access-user-row.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.access-user-row strong, .access-tool-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-user-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.access-user-controls label { display: grid; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
.access-user-controls select { min-width: 104px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 6px 8px; }
.access-metrics { display: flex; flex-wrap: wrap; gap: 10px; }
.access-metrics strong { color: var(--ink); }
.access-table-wrap { min-height: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.access-table { width: 100%; min-width: 720px; border-collapse: collapse; }
.access-table th, .access-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: middle; }
.access-table th:not(:first-child):not(:nth-child(2)), .access-table td:not(:first-child):not(:nth-child(2)) { text-align: center; width: 86px; }
.access-table td:first-child { display: grid; gap: 2px; }
.access-openfga-grid { display: grid; gap: 6px; margin: 0; }
.access-openfga-grid div { min-width: 0; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 7px 8px; }
.access-openfga-grid dt { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.access-openfga-grid dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.access-status-panel, .access-tools { border: 1px solid var(--line); border-radius: 8px; background: #fbfcf8; padding: 10px; }
.access-tool-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 8px; }
.access-tool-row > div { min-width: 0; display: grid; gap: 2px; }
.access-empty { margin: 0; color: var(--muted); font-size: 13px; }
.access-switch { width: 42px; height: 24px; display: inline-grid; align-items: center; justify-items: start; cursor: pointer; }
.access-switch input { position: absolute; opacity: 0; pointer-events: none; }
.access-switch span { width: 42px; height: 24px; border: 1px solid var(--line); border-radius: 999px; background: #dfe6e0; position: relative; transition: background 120ms ease, border-color 120ms ease; }
.access-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.24); transition: transform 120ms ease; }
.access-switch input:checked + span { border-color: var(--accent); background: #b9dfd4; }
.access-switch input:checked + span::after { transform: translateX(18px); }
.access-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.access-switch input:disabled + span { opacity: 0.55; }
.access-switch.busy span { background: #fff3d8; border-color: #e4bd68; }
.management-view { display: grid; gap: 12px; }
.management-panel { min-height: calc(100dvh - 72px); display: grid; grid-template-rows: auto auto auto minmax(0, 1fr); gap: 12px; overflow: hidden; }
.management-error, .management-notice { margin: 0; border-radius: 6px; padding: 8px 10px; font-size: 13px; font-weight: 800; }
.management-error { border: 1px solid #e7a1a1; background: #fff3f3; color: var(--bad); }
.management-notice { border: 1px solid #b8d6c4; background: #f1fbf5; color: #245a38; }
.management-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 12px; overflow: auto; align-items: start; }
.management-profile { min-width: 0; display: grid; align-content: start; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px; }
.management-profile-head, .management-section-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.management-profile-head h3, .management-section-head h4 { margin: 0; font-size: 16px; }
.management-profile-head > div { min-width: 0; }
.management-meta-grid, .management-validation-grid { display: grid; gap: 6px; margin: 0; }
.management-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.management-meta-grid div, .management-validation-grid div { min-width: 0; display: grid; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcf8; padding: 7px 8px; }
.management-meta-grid dt, .management-validation-grid dt, .management-key-row label span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.management-meta-grid dd, .management-validation-grid dd { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.management-bridge { min-width: 0; display: grid; gap: 4px; border: 1px solid #a8cfc1; border-radius: 8px; background: #eff8f4; padding: 9px 10px; }
.management-bridge strong { font-size: 13px; }
.management-bridge span { color: var(--muted); font-size: 12px; }
.management-key-row { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 8px; align-items: end; }
.management-key-row label { min-width: 0; display: grid; gap: 4px; }
.management-key-row input { min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 9px 10px; font: inherit; }
.management-key-row input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.management-validation { min-width: 0; display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.management-validation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.management-config-editor { min-width: 0; display: grid; gap: 10px; }
.management-config-label { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.management-config-editor textarea { min-width: 0; width: 100%; min-height: min(52vh, 520px); resize: vertical; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 10px; font-size: 12px; line-height: 1.45; }
.management-config-editor textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.management-config-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.management-config-error { margin: 0; border: 1px solid #e7a1a1; border-radius: 6px; background: #fff3f3; color: var(--bad); padding: 8px 10px; font-size: 13px; font-weight: 800; }
.performance-view { display: grid; gap: 12px; align-content: start; background: #eef3ef; }
.performance-header { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.performance-header h2, .performance-panel h3 { margin: 0; }
.performance-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.performance-error { margin: 0; border: 1px solid #e7a1a1; border-radius: 6px; background: #fff3f3; color: var(--bad); padding: 8px 10px; font-size: 13px; font-weight: 700; }
.performance-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; }
.performance-tile { min-width: 0; min-height: 104px; display: grid; align-content: start; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 12px; box-shadow: 0 1px 0 rgba(0,0,0,0.03); }
.performance-tile span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.performance-tile strong { font-size: 26px; line-height: 1; }
.performance-tile p { margin: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.performance-source-line { min-width: 0; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; color: var(--muted); font-size: 12px; }
.performance-source-line strong { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.performance-grid { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.performance-panel { min-width: 0; display: grid; gap: 10px; padding: 12px; }
.performance-panel-head { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.performance-empty { margin: 0; border: 1px dashed var(--line); border-radius: 6px; background: #fbfcf8; color: var(--muted); padding: 14px; font-size: 13px; text-align: center; }
.performance-table-wrap { min-width: 0; overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.performance-table { width: 100%; min-width: 680px; border-collapse: collapse; }
.performance-table th, .performance-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; font-size: 13px; }
.performance-table th { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.performance-table tbody tr[data-performance-tone="blocked"] td:first-child { border-left: 3px solid var(--bad); padding-left: 5px; }
.performance-table tbody tr[data-performance-tone="warn"] td:first-child { border-left: 3px solid var(--warn); padding-left: 5px; }
.performance-table tbody tr[data-performance-tone="ok"] td:first-child { border-left: 3px solid var(--ok); padding-left: 5px; }
.performance-metric-name { display: inline-block; font-weight: 800; }
.performance-method { display: inline-flex; margin-left: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; color: var(--source); font-size: 11px; font-weight: 900; }
.gate-view { display: grid; gap: 12px; }
.gate-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.gate-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.gate-table th, .gate-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; }

@media (max-width: 1240px) {
  .workbench-shell { grid-template-columns: 72px minmax(0, 1fr); }
  .workspace-body, .workbench-shell.is-left-sidebar-collapsed .workspace-body, .workbench-shell.is-right-sidebar-collapsed .workspace-body { grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(260px, 36vh); }
  .activity-rail { grid-column: 1; grid-row: 1; }
  .session-sidebar { grid-column: 1; grid-row: 1 / span 2; }
  .session-sidebar-resize, .right-sidebar-resize { display: none; }
  .center-workspace { grid-column: 2; grid-row: 1; }
  .right-sidebar { grid-column: 2; grid-row: 2; border-left: 0; border-top: 1px solid var(--line); }
  .workbench-shell.is-left-sidebar-collapsed .workspace-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(260px, 36vh); }
  .workbench-shell.is-left-sidebar-collapsed.is-right-sidebar-collapsed .workspace-body, .workspace-body.is-route-without-sidebars { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .workbench-shell.is-left-sidebar-collapsed .center-workspace, .workspace-body.is-route-without-sidebars .center-workspace { grid-column: 1; grid-row: 1; }
  .workbench-shell.is-left-sidebar-collapsed .right-sidebar { grid-column: 1; grid-row: 2; }
}

@media (max-width: 720px) {
  html, body, #root { overflow: hidden; }
  .workbench-shell { grid-template-columns: 56px minmax(0, 1fr); }
  .main-workspace { grid-template-rows: 34px minmax(0, 1fr); }
  .workspace-body, .workbench-shell.is-left-sidebar-collapsed .workspace-body, .workbench-shell.is-right-sidebar-collapsed .workspace-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(220px, 32vh); }
  .activity-rail { grid-column: 1; grid-row: 1; padding: 6px 4px; }
  .rail-button { font-size: 11px; min-height: 40px; }
  .session-sidebar { display: none; }
  .center-workspace { grid-column: 1; grid-row: 1; }
  .right-sidebar { grid-column: 1; grid-row: 2; padding: 0; }
  .view { padding: 8px; }
  .conversation-panel { padding: 10px; }
  .conversation-panel .panel-title-actions { width: 100%; justify-content: flex-start; }
  .code-agent-debug-summary .code-agent-summary-capability { display: none; }
  .workspace-route-label, .workspace-topbar-pill { display: none; }
  .topbar-status-tools { justify-content: flex-start; overflow-x: auto; }
  .status-chip-button { max-width: 44vw; }
  .status-chip-meta { display: none; }
  .workspace-topbar-button { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .command-bar { grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "profile drafts drafts" "input input input" "send send clear"; align-items: stretch; }
  .command-bar .agent-timeout-control { display: none; }
  .input-shell { grid-column: auto; }
  .command-drafts-toggle { grid-area: drafts; }
  .drafts-list { right: 8px; width: calc(100% - 16px); }
  .command-button { min-height: 40px; }
  .hwpod-node-summary, .hwpod-node-ops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hwpod-node-meta { display: none; }
  .settings-group { grid-template-columns: minmax(0, 1fr); }
  .skills-layout { grid-template-columns: minmax(0, 1fr); }
  .performance-header { align-items: flex-start; flex-direction: column; }
  .performance-kpi-grid, .performance-grid { grid-template-columns: minmax(0, 1fr); }
  .performance-table { min-width: 560px; }
  .management-panel { min-height: auto; overflow: visible; }
  .management-grid { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .management-key-row { grid-template-columns: minmax(0, 1fr); }
  .management-meta-grid, .management-validation-grid { grid-template-columns: minmax(0, 1fr); }
  .access-panel { min-height: auto; overflow: visible; }
  .access-layout { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .access-user-list { max-height: none; }
  .access-table { min-width: 640px; }
}
