:root {
  color-scheme: light;
  --titlebar: #f8faf7;
  --activity: #f4f6f0;
  --activity-active: #175c6b;
  --explorer: #f7f8f5;
  --editor: #ffffff;
  --panel: #fbfbf8;
  --panel-strong: #ffffff;
  --border: #d8ded6;
  --border-strong: #b8c5bd;
  --text: #243034;
  --muted: #69736f;
  --subtle: #eef2ec;
  --accent: #175c6b;
  --accent-strong: #0f4652;
  --accent-soft: #dcebee;
  --selection: #e8f3ef;
  --code-keyword: #0000ff;
  --code-string: #a31515;
  --code-comment: #008000;
  --code-literal: #098658;
  --radius: 6px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-width: 320px;
  background: var(--editor);
  color: var(--text);
  font-family: var(--sans);
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.ide-shell {
  display: grid;
  grid-template-rows: 40px 3px minmax(0, 1fr) 26px;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.titlebar {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--titlebar);
  color: #333;
  font-size: 0.82rem;
  user-select: none;
}

.window-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.window-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.window-dot--red {
  background: #ff5f57;
}

.window-dot--yellow {
  background: #ffbd2e;
}

.window-dot--green {
  background: #28c840;
}

.titlebar__center,
.titlebar__meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.titlebar__center {
  justify-content: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
}

.titlebar__project,
.titlebar__task {
  overflow: hidden;
  text-overflow: ellipsis;
}

.titlebar__project {
  font-weight: 600;
}

.titlebar__separator {
  color: #777;
}

.titlebar__meta {
  justify-content: flex-end;
  gap: 16px;
  color: #555;
}

.progress-track {
  width: 100%;
  height: 3px;
  background: #d6d6d6;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width 160ms ease;
}

.ide-workbench {
  grid-row: 3;
  display: grid;
  grid-template-columns: 78px 288px minmax(520px, 1fr) minmax(330px, 370px);
  min-height: 0;
  overflow: hidden;
  background: var(--editor);
  transition: grid-template-columns 160ms ease;
}

.instruction-view {
  grid-row: 3;
  min-height: 0;
  overflow: auto;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(247, 248, 245, 0.94), rgba(255, 255, 255, 0.96)),
    var(--editor);
}

.instruction-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 18px 46px rgba(31, 35, 40, 0.1);
}

.instruction-card h1 {
  margin: 8px 0 10px;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1.15;
}

.instruction-card p {
  margin: 0;
  color: #30363d;
  font-size: 0.95rem;
  line-height: 1.58;
}

.instruction-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0;
}

.instruction-section,
.instruction-policy,
.instruction-footer {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.instruction-section {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  padding: 14px;
}

.instruction-step {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

.instruction-section h2,
.instruction-policy h2 {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.25;
}

.instruction-section p,
.instruction-policy p,
.instruction-footer p {
  color: var(--muted);
  font-size: 0.84rem;
}

.instruction-policy {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 14px;
}

.instruction-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding: 14px;
}

.instruction-footer strong {
  display: block;
  margin-bottom: 3px;
}

.start-work-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}

.start-work-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.start-work-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ide-workbench.is-workspace-panel-collapsed {
  grid-template-columns: 78px 0 minmax(520px, 1fr) minmax(330px, 370px);
}

.activity-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  background: var(--activity);
  border-right: 1px solid var(--border);
}

.activity-button {
  width: 62px;
  min-height: 42px;
  border: 1px solid transparent;
  border-left: 3px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #64706b;
  font-size: 0.7rem;
  font-weight: 700;
}

.activity-button:hover,
.activity-button.is-active {
  color: var(--activity-active);
  background: #fff;
}

.activity-button.is-active {
  border-left-color: var(--activity-active);
  border-color: var(--border);
}

.activity-button.is-panel-collapsed {
  border-color: transparent;
  border-left-color: var(--activity-active);
  background: transparent;
}

.explorer-panel {
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--border);
  background: var(--explorer);
  transition:
    opacity 120ms ease,
    border-color 120ms ease;
}

.ide-workbench.is-workspace-panel-collapsed .explorer-panel {
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  border-right-color: transparent;
}

.explorer-panel__header,
.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.explorer-panel__header {
  height: 34px;
  padding: 0 10px 0 14px;
}

.panel-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.icon-button {
  width: 24px;
  height: 24px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.icon-button:hover {
  border-color: var(--border);
  background: #fff;
}

.workspace-root {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  color: #333;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.disclosure {
  color: #777;
  font-size: 0.72rem;
}

.file-tree {
  padding: 2px 0 12px;
}

.ticket-queue {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.ticket-queue-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.ticket-queue-item__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.ticket-queue-item:hover,
.ticket-queue-item.is-active {
  border-color: var(--accent);
  background: #f5fbf9;
}

.ticket-queue-item.is-done {
  opacity: 0.58;
}

.ticket-queue-item__code {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ticket-queue-item__state {
  flex: 0 0 auto;
  padding: 2px 6px;
  border: 1px solid #b7c9c1;
  border-radius: 4px;
  background: #eef7f3;
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ticket-queue-item strong {
  font-size: 0.84rem;
  line-height: 1.28;
}

.ticket-queue-item em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
}

.file-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 24px;
  padding: 0 8px 0 calc(10px + var(--depth) * 14px);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #3f454b;
  font-size: 0.84rem;
  text-align: left;
  white-space: nowrap;
}

.file-row--file:hover,
.file-row--file.is-active {
  background: var(--selection);
}

.file-row--file.is-active {
  color: #0b4f7a;
}

.file-row--folder {
  color: #505860;
  font-weight: 600;
}

.file-row--folder.is-drop-target {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.file-row--file[draggable="true"] {
  cursor: grab;
}

.file-row--file.is-dragging {
  cursor: grabbing;
  opacity: 0.48;
}

.file-row__icon {
  width: 24px;
  flex: 0 0 24px;
  color: #69737d;
  font-family: var(--mono);
  font-size: 0.68rem;
  text-align: center;
}

.file-row span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-panel-body {
  display: grid;
  gap: 10px;
  padding: 10px;
}

.workspace-search-input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 7px 9px;
  background: #fff;
  color: var(--text);
}

.workspace-search-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.workspace-search-results,
.source-panel,
.run-panel {
  min-width: 0;
}

.search-result,
.scm-file {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.search-result:hover,
.scm-file:hover {
  border-color: var(--border);
  background: #fff;
}

.search-result strong,
.scm-file strong {
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result span,
.scm-file span,
.empty-tool-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.scm-branch {
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: #0b4f7a;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 700;
}

.tool-section-title {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.commit-list {
  display: grid;
  gap: 5px;
  color: #3f454b;
  font-family: var(--mono);
  font-size: 0.74rem;
}

.diff-stat {
  max-height: 170px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: #30363d;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

.editor-area {
  display: grid;
  grid-template-rows: auto 36px 28px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  background: var(--editor);
}

.editor-tabs {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: 1px solid var(--border);
  background: #f2f4ef;
}

.editor-tab {
  min-width: 132px;
  max-width: 220px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--border);
  background: #eef1ea;
  color: #444;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-tab:hover {
  background: #f2f2f2;
}

.editor-tab.is-active {
  background: var(--editor);
  color: #111;
}

.editor-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 16px;
  border-bottom: 1px solid #eeeeee;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.editor-breadcrumb span:first-child {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dirty-marker {
  color: #9a6700;
  font-size: 0.72rem;
  font-weight: 700;
}

.editor-toolbar-button {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 600;
}

.editor-toolbar-button--primary {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: #fff;
}

.editor-toolbar-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.code-view {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 10px 0 24px;
  background: #fff;
  font-family: var(--sans);
  font-size: 0.9rem;
  line-height: 1.58;
}

.code-line {
  display: grid;
  grid-template-columns: 56px minmax(max-content, 1fr);
  min-height: 22px;
}

.line-number {
  padding-right: 14px;
  color: #9a9a9a;
  text-align: right;
  user-select: none;
}

.code-line code {
  display: block;
  min-width: 0;
  padding-right: 24px;
  white-space: pre;
  color: #1f2328;
}

.code-editor-input {
  display: block;
  width: 100%;
  min-height: 100%;
  border: 0;
  outline: none;
  resize: none;
  padding: 10px 18px 24px;
  background: #fff;
  color: #1f2328;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.58;
  white-space: pre;
  tab-size: 2;
}

.workspace-document {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.document-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.document-preview-header strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 1rem;
}

.document-preview-header > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.sheet-preview {
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}

.sheet-preview table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.sheet-preview th,
.sheet-preview td {
  max-width: 220px;
  padding: 7px 9px;
  border-bottom: 1px solid #edf0ec;
  border-right: 1px solid #edf0ec;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sheet-preview th {
  position: sticky;
  top: 0;
  background: #f4f7f3;
  color: #4f5b57;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.markdown-preview {
  max-width: 780px;
  padding: 4px 2px 2px;
  color: var(--text);
}

.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4 {
  margin: 16px 0 8px;
  line-height: 1.28;
}

.markdown-preview h2:first-child,
.markdown-preview h3:first-child,
.markdown-preview h4:first-child {
  margin-top: 0;
}

.markdown-preview p,
.markdown-preview li {
  font-size: 0.92rem;
  line-height: 1.58;
}

.markdown-preview ul {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.source-editor-details {
  display: grid;
  gap: 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f8faf7;
}

.source-editor-details summary {
  cursor: pointer;
  padding: 9px 11px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.source-editor-details .code-editor-input {
  min-height: 240px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.image-preview-frame {
  display: grid;
  place-items: center;
  min-height: 320px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background:
    linear-gradient(45deg, #f4f6f2 25%, transparent 25%),
    linear-gradient(-45deg, #f4f6f2 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f4f6f2 75%),
    linear-gradient(-45deg, transparent 75%, #f4f6f2 75%);
  background-color: #fff;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.image-preview-frame img {
  display: block;
  max-width: min(100%, 620px);
  max-height: 68vh;
  border: 1px solid rgba(36, 48, 52, 0.16);
  border-radius: 4px;
  box-shadow: 0 12px 34px rgba(31, 35, 40, 0.16);
  object-fit: contain;
}

.syntax-keyword {
  color: var(--code-keyword);
}

.syntax-string {
  color: var(--code-string);
}

.syntax-comment {
  color: var(--code-comment);
}

.syntax-literal {
  color: var(--code-literal);
}

.empty-editor {
  padding: 24px;
  color: var(--muted);
}

.side-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  background: var(--panel);
}

.ticket-panel,
.approval-panel {
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.ticket-panel {
  max-height: 40vh;
  overflow: auto;
  border-right: 0;
  background: #fbfcfb;
}

.ticket-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ticket-workflow {
  margin-top: 10px;
}

.manager-thread {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.manager-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #9eb5aa;
  border-radius: 50%;
  background: #eaf2ee;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.manager-message {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.manager-message__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.manager-message__meta strong {
  color: var(--text);
  font-size: 0.82rem;
}

.manager-message__meta span {
  color: var(--muted);
  font-size: 0.7rem;
}

.manager-message p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #30363d;
  font-size: 0.86rem;
  line-height: 1.58;
}

.review-files-button {
  min-height: 34px;
  margin-top: 10px;
  padding: 6px 11px;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
}

.review-files-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.review-files-button:disabled {
  border-color: var(--border);
  background: #eef2ef;
  color: var(--muted);
}

.files-locked-note {
  display: grid;
  gap: 5px;
  margin: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}

.files-locked-note strong {
  font-size: 0.8rem;
}

.files-locked-note span {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.ticket-workflow__section {
  display: grid;
  gap: 7px;
}

.ticket-status-card {
  display: grid;
  gap: 4px;
  padding: 9px;
  border: 1px solid #b7c9c1;
  border-radius: 5px;
  background: #f2f8f5;
}

.ticket-status-card strong {
  color: var(--accent-strong);
  font-size: 0.78rem;
}

.ticket-status-card span {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.task-tool-workspace {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.task-tool-workspace__header,
.task-tool-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-tool-workspace__header strong {
  font-size: 0.8rem;
}

.task-tool-workspace__header span,
.task-tool-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.task-tool-actions p {
  color: #a12222;
}

.task-tool-controls {
  display: grid;
  grid-template-columns: minmax(170px, 1.4fr) repeat(2, minmax(110px, 0.8fr));
  gap: 8px;
}

.task-tool-controls--mail {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-tool-controls label,
.action-revision-composer label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.task-tool-controls label > span,
.action-revision-composer label > span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.task-tool-controls input,
.task-tool-controls select,
.action-revision-composer textarea {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-size: 0.76rem;
}

.business-drop-zone {
  display: grid;
  min-height: 48px;
  place-items: center;
  padding: 7px;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  background: #f8faf8;
}

.business-drop-zone.is-drop-target {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.business-drop-zone__empty {
  color: var(--muted);
  font-size: 0.74rem;
}

.staged-file-list {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  gap: 5px;
}

.staged-file {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.staged-file strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font: 0.7rem var(--mono);
}

.staged-file button {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.review-tool-action {
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.review-tool-action:disabled {
  opacity: 0.5;
}

.reference-file-list,
.local-tool-list {
  display: grid;
  gap: 6px;
}

.ticket-checklist {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  grid-column: 1 / -1;
  gap: 7px;
}

.ticket-checklist__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}

.ticket-checklist__item > span {
  min-width: 36px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #eef2ec;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.ticket-checklist__item.is-done > span {
  background: #e7f5ed;
  color: #176f53;
}

.ticket-checklist__item strong,
.ticket-checklist__item em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-checklist__item strong {
  font-size: 0.74rem;
}

.ticket-checklist__item em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
}

.reference-file {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.reference-file:hover {
  border-color: var(--accent);
  background: #f5fbf9;
}

.reference-file strong,
.deliverable-card strong,
.local-tool-pill strong {
  font-size: 0.78rem;
}

.reference-file span {
  overflow-wrap: anywhere;
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.72rem;
}

.reference-file em,
.deliverable-card p,
.deliverable-card dd,
.local-tool-pill span {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
  line-height: 1.35;
}

.deliverable-card,
.local-tool-pill {
  display: grid;
  gap: 5px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
}

.deliverable-card p {
  margin: 0;
}

.deliverable-card dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.deliverable-card div {
  display: grid;
  gap: 2px;
}

.deliverable-card dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.deliverable-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.approval-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin: 12px 0;
  overflow-y: auto;
  padding-right: 2px;
}

.chat-message {
  display: grid;
  gap: 7px;
  max-width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.chat-message--user {
  margin-left: 26px;
  border-color: #b8d7ee;
  background: #f5fbff;
}

.chat-message--assistant {
  margin-right: 18px;
}

.chat-message--system {
  border-color: #e0c097;
  background: #fff8eb;
}

.chat-message__meta {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.chat-message__body {
  margin: 0;
  color: #30363d;
  font-size: 0.86rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-action-card {
  display: grid;
  gap: 9px;
  margin-top: 2px;
  padding: 11px;
  border: 1px solid #c9d1d9;
  border-radius: var(--radius);
  background: #f6f8fa;
}

.chat-action-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-action-card__header > div:first-child {
  min-width: 0;
}

.chat-action-card__badges {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.action-card-ticket-note,
.action-card-state {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.action-card-state {
  color: var(--accent-strong);
}

.chat-action-card.is-inactive-ticket {
  opacity: 0.7;
}

.chat-action-card.is-completed-action .decision-choice-list,
.chat-action-card.is-inactive-ticket .decision-choice-list {
  opacity: 0.62;
}

.chat-action-card.is-superseded-action {
  border-style: dashed;
  background: #f8f9f7;
}

.chat-action-card h2 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.35;
}

.chat-action-card__tool {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
}

.action-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 0;
}

.action-detail-grid div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.action-detail-grid dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.action-detail-grid dd {
  min-width: 0;
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
}

.agent-run-card {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid #b8d7ee;
  border-radius: var(--radius);
  background: #f5fbff;
}

.agent-run-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.agent-run-card__status {
  color: #0b4f7a;
  font-size: 0.75rem;
  font-weight: 700;
}

.agent-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcecf8;
}

.agent-progress__bar {
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  animation: agent-progress-move 1.1s ease-in-out infinite;
}

.agent-progress__bar.is-complete {
  width: 100%;
  animation: none;
  background: #2da44e;
}

.agent-progress__bar.is-failed {
  width: 100%;
  animation: none;
  background: #cf222e;
}

.thinking-card {
  border-color: #c9d1d9;
  background: #f6f8fa;
}

@keyframes agent-progress-move {
  0% {
    transform: translateX(-105%);
  }
  100% {
    transform: translateX(245%);
  }
}

.agent-step-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.agent-step-list li.is-active {
  color: var(--accent);
  font-weight: 700;
}

.agent-step-list li.is-complete {
  color: #2f6f3e;
}

.changed-file-list {
  display: grid;
  gap: 7px;
}

.result-section-label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.changed-file {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 8px;
  width: 100%;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.changed-file:hover {
  border-color: var(--accent);
  background: #f5fbff;
}

.changed-file span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.changed-file strong {
  min-width: 0;
  overflow: hidden;
  color: #0b4f7a;
  font-family: var(--mono);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.changed-file em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
  line-height: 1.35;
}

.unchanged-repo-note {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f6f8fa;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.terminal-details {
  display: grid;
  gap: 7px;
}

.terminal-details summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.workspace-details summary {
  color: var(--accent-strong);
}

.terminal-details pre {
  max-height: 220px;
  margin: 7px 0 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #0f1720;
  color: #dbe7f3;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.45;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.chat-form.is-busy {
  opacity: 0.72;
}

.chat-input {
  width: 100%;
  min-height: 42px;
  max-height: 140px;
  resize: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  line-height: 1.45;
}

.chat-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.chat-send-button {
  min-width: 72px;
  min-height: 42px;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.chat-send-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.chat-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.ticket-panel h1 {
  margin: 10px 0 10px;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1.25;
  font-weight: 650;
}

.ticket-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.subtle-chip,
.tool-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--subtle);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.task-timer {
  min-width: 108px;
  text-align: center;
}

.task-timer.is-urgent {
  border-color: #c98700;
  background: #fff7df;
  color: #7a4b00;
}

.task-timer.is-expired {
  border-color: #c0392b;
  background: #fff0ed;
  color: #9f2f23;
}

.tool-badge {
  border-radius: 4px;
  background: #fff;
  font-family: var(--mono);
}

.ticket-brief {
  margin: 0 0 14px;
  color: #30363d;
  font-size: 0.9rem;
  line-height: 1.55;
}

.task-note {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-strong);
}

.task-note pre {
  max-width: 100%;
  margin: 10px 0 0;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #30363d;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.55;
}

.status-stream {
  display: grid;
  gap: 6px;
  margin: 12px 0;
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(14, 99, 156, 0.28);
  animation: status-pulse 1.6s infinite;
}

.status-line.is-complete .status-dot {
  background: #6a9955;
  box-shadow: none;
  animation: none;
}

@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(14, 99, 156, 0.28);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(14, 99, 156, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(14, 99, 156, 0);
  }
}

.approval-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.approval-card__eyebrow,
.decision-question,
.own-approach-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.approval-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.command-preview {
  width: 100%;
  max-width: 100%;
  min-height: 74px;
  max-height: 150px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 10px 11px;
  border: 1px solid #c9d1d9;
  border-radius: 4px;
  background: #f6f8fa;
  color: #24292f;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.5;
  resize: vertical;
}

.command-preview:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
  background: #fff;
}

.command-editor[readonly] {
  resize: none;
}

.command-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0;
}

.link-button:disabled {
  cursor: default;
  color: var(--muted);
}

.action-revision-composer {
  display: grid;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.action-revision-composer textarea {
  min-height: 72px;
  resize: vertical;
}

.action-revision-error {
  min-height: 17px;
  margin: 0;
  color: #a12222;
  font-size: 0.74rem;
}

.action-revision-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.approval-rationale {
  margin: 0;
  color: #3f454b;
  font-size: 0.86rem;
  line-height: 1.5;
}

.decision-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.decision-choice {
  min-height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  font-weight: 650;
  text-align: center;
}

.decision-choice:hover {
  border-color: var(--accent);
  background: #f5fbff;
}

.decision-choice:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.decision-choice.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #053f65;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.own-approach-input {
  width: 100%;
  min-height: 54px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
  line-height: 1.45;
}

.own-approach-input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.decision-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #f0f0f0;
}

.decision-footer span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ticket-close-button,
.continue-button {
  min-width: 116px;
  min-height: 36px;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.ticket-close-button:hover:not(:disabled),
.continue-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.ticket-close-button:disabled,
.continue-button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.ticket-close-button.is-closed {
  border-color: #a9b8b2;
  background: #fff;
  color: var(--accent-strong);
}

.ticket-close-button.is-closed:hover:not(:disabled) {
  background: #f2f8f5;
}

.statusbar {
  grid-row: 4;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  height: 24px;
  padding: 0 10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
}

.primary-button,
.secondary-button {
  min-width: 76px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 700;
}

.primary-button {
  border: 1px solid var(--accent-strong);
  background: var(--accent);
  color: #fff;
}

.secondary-button {
  border: 1px solid var(--border-strong);
  background: #fff;
  color: var(--text);
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.secondary-button:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--selection);
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.statusbar span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statusbar span:nth-child(3) {
  flex: 1;
}

.completion-view {
  grid-row: 3;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 24px;
  overflow: auto;
  background: var(--editor);
}

.completion-card {
  width: min(760px, 100%);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 16px 44px rgba(31, 35, 40, 0.12);
}

.completion-card h2 {
  margin: 8px 0 10px;
  font-size: 1.35rem;
}

.completion-card p {
  color: #30363d;
  line-height: 1.55;
}

.completion-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.stat-box {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.stat-box span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-box strong {
  color: var(--text);
  font-size: 1.45rem;
}

.completion-submit-button {
  min-width: 132px;
  min-height: 38px;
  border: 1px solid var(--accent-strong);
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
}

.completion-submit-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.completion-submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.completion-note {
  margin-bottom: 0;
}

.completion-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.security-expert-launcher {
  display: none;
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid #587066;
  border-radius: 4px;
  background: #445b52;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.security-expert-launcher.is-visible {
  display: inline-flex;
  align-items: center;
}

.assistant-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.security-expert-window {
  position: fixed;
  z-index: 79;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 320px;
  min-height: 260px;
  overflow: hidden;
  border: 1px solid #b6c2bb;
  border-radius: 6px;
  background: #fbfcfb;
  box-shadow: 0 16px 48px rgba(31, 35, 40, 0.22);
}

.security-expert-window.is-minimized {
  height: 46px !important;
  min-height: 46px;
}

.security-expert-window.is-minimized .security-expert-messages,
.security-expert-window.is-minimized .security-expert-form,
.security-expert-window.is-minimized .security-expert-resize-handle {
  display: none;
}

.security-expert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 46px;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid #d7ded9;
  background: #f1f5f2;
  user-select: none;
  cursor: move;
}

.security-expert-header strong {
  display: block;
  color: #243934;
  font-size: 0.9rem;
}

.security-expert-kicker {
  display: block;
  color: #587066;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.security-expert-actions {
  display: inline-flex;
  gap: 6px;
}

.security-expert-icon-button {
  width: 24px;
  height: 24px;
  border: 1px solid #c7d1ca;
  border-radius: 4px;
  background: #fff;
  color: #355246;
  font-weight: 800;
  line-height: 1;
}

.security-expert-icon-button:hover {
  border-color: #1f7a5a;
}

.security-expert-messages {
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 0;
  overflow: auto;
  padding: 10px;
}

.security-message,
.security-thinking-card {
  display: grid;
  gap: 7px;
  padding: 9px 10px;
  border: 1px solid #d7ded9;
  border-radius: 5px;
  background: #fff;
}

.security-message--user {
  margin-left: 24px;
  border-color: #bad6ca;
  background: #f2faf6;
}

.security-message__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #587066;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.security-message__body {
  margin: 0;
  color: #263c33;
  font-size: 0.82rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.security-concern {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: #edf2ef;
  color: #4f665d;
  font-family: var(--mono);
  letter-spacing: 0;
  text-transform: uppercase;
}

.security-concern--medium {
  background: #fff5d6;
  color: #7a5a00;
}

.security-concern--high {
  background: #ffebe9;
  color: #9a1c1c;
}

.security-concern--low {
  background: #e7f5ed;
  color: #176f53;
}

.security-policy-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.security-policy-chips span {
  max-width: 100%;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid #d7ded9;
  border-radius: 4px;
  background: #f6f8f6;
  color: #587066;
  font-size: 0.68rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.security-expert-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 10px 10px;
  border-top: 1px solid #d7ded9;
  background: #f6f8f6;
}

.security-expert-form.is-busy {
  opacity: 0.7;
}

.security-expert-input {
  width: 100%;
  min-height: 42px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #c7d1ca;
  border-radius: 4px;
  padding: 8px 9px;
  background: #fff;
  color: #263c33;
  line-height: 1.42;
}

.security-expert-input:focus {
  outline: 2px solid #dcefe5;
  border-color: #1f7a5a;
}

.security-expert-send-button {
  min-width: 62px;
  min-height: 42px;
  border: 1px solid #176f53;
  border-radius: 4px;
  background: #1f7a5a;
  color: #fff;
  font-weight: 700;
}

.security-expert-send-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.security-expert-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
}

.security-expert-resize-handle::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8fa39a;
  border-bottom: 2px solid #8fa39a;
}

.hidden {
  display: none !important;
}

/* Keep the assistant alongside documents at desktop and laptop widths. */
@media (min-width: 761px) {
  .ide-shell {height:100dvh;min-height:0;max-height:100dvh;overflow:hidden;}
  .ide-workbench {grid-template-columns:48px clamp(150px,17vw,240px) minmax(0,1fr) minmax(280px,34%);grid-template-rows:minmax(0,1fr);}
  .ide-workbench.is-workspace-panel-collapsed {grid-template-columns:48px 0 minmax(0,1fr) minmax(280px,34%);}
  .side-panel {grid-column:4;grid-row:1;min-height:0;}
  .activity-bar {padding:6px 2px;}
  .activity-button {max-width:44px;}
  .ticket-header {flex-wrap:wrap;gap:6px;}
  .ticket-panel {padding:10px;max-height:42vh;}
  .decision-footer {padding:8px;}
  .titlebar {grid-template-columns:56px minmax(0,1fr) auto;gap:8px;}
}
@media (max-width:1180px) {
  .instruction-grid {grid-template-columns:1fr;}
  .instruction-footer {align-items:stretch;flex-direction:column;}
}

@media (max-width: 760px) {
  .ide-shell {
    grid-template-rows: auto 3px auto 24px;
  }

  .titlebar {
    grid-template-columns: 1fr;
    gap: 4px;
    height: auto;
    padding: 8px 10px;
  }

  .window-controls {
    display: none;
  }

  .titlebar__center,
  .titlebar__meta {
    justify-content: flex-start;
  }

  .titlebar__meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  .ide-workbench {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(420px, auto) auto;
  }

  .activity-bar {
    display: none;
  }

  .explorer-panel {
    grid-row: 2;
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .editor-area {
    grid-row: 1;
    min-height: 420px;
  }

  .side-panel {
    grid-column: 1;
    grid-row: 3;
    min-height: auto;
  }

  .ticket-panel {
    max-height: none;
  }

  .decision-footer,
  .decision-choice-list,
  .completion-stats {
    grid-template-columns: 1fr;
  }

  .completion-actions {
    grid-template-columns: 1fr;
  }

  .completion-submit-button {
    width: 100%;
  }

  .decision-footer span {
    white-space: normal;
  }

  .continue-button {
    width: 100%;
  }
}
