/* ================= OBJECTIVE — AI CHAT + CANVAS (side-by-side co-editing) ================= */
.obj-split {
  flex: 1;
  display: flex;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.obj-chat {
  width: 440px;
  min-width: 340px;
  max-width: 720px;
  background: var(--md-surface);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}
.obj-pane-head {
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  flex-shrink: 0;
}
.obj-chat-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.obj-chat-title .t { font-size: 13px; font-weight: 600; color: var(--md-on-surface); }
.obj-chat-title .s {
  font-size: 11px;
  color: var(--md-on-surface-variant);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.obj-avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
}
.obj-avatar img, .obj-avatar svg { width: 26px; height: 26px; display: block; }
.obj-avatar.user {
  background: var(--md-primary-container);
  color: var(--md-primary);
  font-size: 10.5px;
  font-weight: 700;
}
.obj-ghost-btn {
  background: transparent;
  border: 1px solid var(--md-outline);
  color: var(--md-on-surface-variant);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--md-radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s var(--md-ease);
}
.obj-ghost-btn:hover { color: var(--md-on-surface); border-color: var(--md-primary); background: var(--md-primary-tint-weak); }

/* Messages */
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }
.msg-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.msg.user .msg-body { align-items: flex-end; }
.msg-role { font-size: 11px; font-weight: 600; color: var(--md-on-surface-variant); }
.msg-text { font-size: 13px; line-height: 1.6; color: var(--md-on-surface); overflow-wrap: anywhere; }
.msg.user .msg-text {
  background: var(--md-surface-high);
  border: 1px solid var(--md-user-bubble-border);
  padding: 9px 13px;
  border-radius: 16px 16px 4px 16px;
  max-width: 92%;
}
.msg-text code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  background: var(--md-surface-container);
  padding: 1px 5px;
  border-radius: 4px;
}
.msg-text ul { margin: 6px 0 0 18px; }
.msg-text li { margin: 2px 0; }
.msg-quote {
  border-left: 2px solid var(--md-primary);
  padding: 5px 10px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--md-on-surface-variant);
  background: var(--md-primary-tint-weak);
  border-radius: 0 8px 8px 0;
  max-width: 92%;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', monospace;
}
.msg-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.msg-artifact {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--md-outline);
  border-radius: 12px;
  background: var(--md-surface-container);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--md-on-surface);
  width: 100%;
  transition: all 0.15s var(--md-ease);
}
.msg-artifact:hover { border-color: var(--md-primary); background: var(--md-surface-high); }
.msg-artifact .ic {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--md-primary-tint);
  color: var(--md-primary);
  font-size: 13px;
  flex-shrink: 0;
}
.msg-artifact .tt { font-size: 12px; font-weight: 600; }
.msg-artifact .ss { font-size: 10.5px; color: var(--md-on-surface-variant); margin-top: 1px; }
.msg-artifact .go { margin-left: auto; font-size: 11px; color: var(--md-primary); font-weight: 500; white-space: nowrap; }
.msg-sources-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--md-on-surface-variant); }
.msg-sources { display: flex; flex-wrap: wrap; gap: 6px; }
.src-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 230px;
  padding: 3px 10px 3px 3px;
  border-radius: var(--md-radius-pill);
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
  font-size: 11px;
  color: var(--md-on-surface);
  text-decoration: none;
  transition: border-color 0.15s var(--md-ease);
}
.src-chip:hover { border-color: var(--md-secondary); }
.src-chip .n {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--md-secondary-container);
  color: var(--md-secondary);
  font-size: 9.5px;
  font-weight: 700;
  flex-shrink: 0;
}
.src-chip .l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 0.15s var(--md-ease); }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.msg-action {
  background: transparent;
  border: none;
  color: var(--md-on-surface-variant);
  font-family: inherit;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.msg-action:hover { background: var(--md-hover-overlay); color: var(--md-on-surface); }
.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--md-on-surface-variant);
  animation: typingDot 1.2s infinite ease-in-out;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* Composer & prompt controls */
.obj-composer-wrap { padding: 8px 14px 14px; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.obj-suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.obj-suggest:empty { display: none; }
.suggest-chip {
  background: transparent;
  border: 1px solid var(--md-outline);
  color: var(--md-on-surface);
  border-radius: var(--md-radius-pill);
  padding: 5px 11px;
  font-size: 11.5px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s var(--md-ease);
}
.suggest-chip:hover { border-color: var(--md-primary); background: var(--md-primary-tint-weak); color: var(--md-primary); }
.obj-composer {
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline);
  border-radius: 18px;
  padding: 8px 8px 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.16s var(--md-ease), box-shadow 0.16s var(--md-ease);
}
.obj-composer:focus-within { border-color: var(--md-primary); box-shadow: 0 0 0 3px var(--md-focus-ring); }
.obj-composer textarea,
.obj-composer textarea:focus {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 8px 2px;
  min-height: 96px;
  max-height: 280px;
  resize: none;
  font-size: 13px;
  line-height: 1.55;
}
#btnAttachMenu { width: 30px; padding: 0; justify-content: center; font-size: 15px; }
.obj-attach-row { display: flex; flex-direction: column; gap: 4px; max-height: 136px; overflow-x: hidden; overflow-y: auto; }
.obj-attach-row .context-pill { display: flex; min-width: 0; border-radius: 8px; }
.obj-attach-row .context-pill .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.obj-attach-row:empty { display: none; }
.obj-quote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px 6px 10px;
  border-left: 2px solid var(--md-primary);
  background: var(--md-primary-tint-weak);
  border-radius: 0 8px 8px 0;
  font-size: 11.5px;
  color: var(--md-on-surface-variant);
}
.obj-quote[hidden] { display: none; }
.obj-quote span { flex: 1; font-family: 'JetBrains Mono', monospace; white-space: pre-wrap; max-height: 64px; overflow: hidden; }
.obj-composer-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.obj-composer-bar .grp { display: flex; align-items: center; gap: 6px; }
.obj-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--md-radius-pill);
  background: transparent;
  border: 1px solid var(--md-outline);
  color: var(--md-on-surface-variant);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s var(--md-ease);
}
.obj-tool:hover { color: var(--md-on-surface); background: var(--md-hover-overlay); }
.obj-tool[aria-pressed="true"] { color: var(--md-primary); border-color: var(--md-primary); background: var(--md-primary-tint-weak); }
.obj-send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--md-primary);
  color: var(--md-on-primary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.15s var(--md-ease), opacity 0.15s var(--md-ease);
}
.obj-send:hover { background: var(--md-primary-hover); }
.obj-send:disabled { opacity: 0.35; cursor: default; }
.obj-hint { font-size: 10.5px; color: var(--md-on-surface-variant); }
.obj-menu-wrap { position: relative; }
.obj-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  width: 280px;
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: 14px;
  box-shadow: var(--md-elevation-3);
  padding: 6px;
  display: none;
  z-index: 60;
}
.obj-menu.open { display: block; }
.obj-menu-label { font-size: 10.5px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--md-on-surface-variant); padding: 6px 10px 4px; }
.obj-menu button {
  width: 100%;
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 6px;
  align-items: center;
  text-align: left;
  background: transparent;
  border: none;
  padding: 7px 10px;
  border-radius: 9px;
  color: var(--md-on-surface);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.obj-menu button:hover, .obj-menu button:focus-visible { background: var(--md-hover-overlay); outline: none; }
.obj-menu button .ic { grid-row: span 2; font-size: 15px; text-align: center; }
.obj-menu button small { grid-column: 2; font-size: 10.5px; color: var(--md-on-surface-variant); }

/* Canvas */
.obj-canvas {
  flex: 1;
  min-width: 0;
  background: var(--md-bg);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}
.obj-canvas.ctx-dropping::after {
  content: "Drop files to add them as context";
  position: absolute;
  inset: 10px;
  z-index: 20;
  display: grid;
  place-items: center;
  border: 2px dashed var(--md-primary);
  border-radius: 16px;
  background: color-mix(in srgb, var(--md-bg) 82%, var(--md-primary) 18%);
  color: var(--md-primary);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}

/* Context preview (Objective → Context) */
.ctx-preview { display: flex; flex-direction: column; gap: 12px; }
.ctx-empty {
  padding: 22px;
  border: 1px dashed var(--md-outline);
  border-radius: 12px;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--md-on-surface-variant);
}
.ctx-media {
  margin: 0;
  display: flex;
  justify-content: center;
  overflow: hidden;
  border-radius: 12px;
  background: #06080d;
  border: 1px solid var(--md-outline-variant);
}
.ctx-media img { display: block; max-width: 100%; max-height: 480px; object-fit: contain; }
.ctx-media video { display: block; width: 100%; max-height: 480px; background: #000; }
.ctx-pdf { width: 100%; height: 560px; border: 1px solid var(--md-outline-variant); border-radius: 12px; background: #fff; }
.ctx-caption { font-size: 12.5px; line-height: 1.55; color: var(--md-on-surface-variant); }
.ctx-text {
  margin: 0;
  max-height: 520px;
  overflow: auto;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--md-surface-low);
  border: 1px solid var(--md-outline-variant);
  font: 12px/1.6 'JetBrains Mono', monospace;
  color: var(--md-on-surface);
  white-space: pre;
  tab-size: 4;
}
.ctx-md {
  max-height: 560px;
  overflow: auto;
  padding: 20px 24px;
  border-radius: 12px;
  background: var(--md-surface-low);
  border: 1px solid var(--md-outline-variant);
  font-size: 13px;
  line-height: 1.65;
  color: var(--md-on-surface);
}
.ctx-md > :first-child { margin-top: 0; }
.ctx-md h1 { font-size: 19px; letter-spacing: -0.015em; margin: 18px 0 10px; }
.ctx-md h2 { font-size: 14.5px; margin: 18px 0 6px; }
.ctx-md h3, .ctx-md h4 { font-size: 13px; margin: 14px 0 4px; }
.ctx-md p { margin: 0 0 9px; }
.ctx-md ul, .ctx-md ol { margin: 0 0 9px; padding-left: 22px; }
.ctx-md li { margin: 3px 0; }
.ctx-md hr { border: none; border-top: 1px solid var(--md-outline); margin: 14px 0; }
.ctx-md blockquote {
  margin: 0 0 12px;
  padding: 7px 12px;
  border-left: 3px solid var(--md-primary);
  border-radius: 0 8px 8px 0;
  background: var(--md-primary-tint-weak);
  color: var(--md-on-surface-variant);
}
.ctx-md code { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; padding: 1px 5px; border-radius: 4px; background: var(--md-surface-container); }
.ctx-md pre { margin: 0 0 10px; padding: 10px 12px; border-radius: 8px; background: var(--md-surface-container); overflow: auto; }
.ctx-md pre code { padding: 0; background: none; }
.ctx-md table { width: 100%; margin: 4px 0 12px; border-collapse: collapse; font-size: 12.5px; }
.ctx-md th, .ctx-md td { padding: 6px 10px; border: 1px solid var(--md-outline); text-align: left; vertical-align: top; }
.ctx-md th { background: var(--md-surface-container); font-weight: 600; }
.ctx-md a { color: var(--md-primary); }
.ctx-web {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--md-surface-low);
  border: 1px solid var(--md-outline-variant);
}
.ctx-web .host { font: 11px 'JetBrains Mono', monospace; color: var(--md-secondary); word-break: break-all; }
.ctx-web .sum { font-size: 13px; line-height: 1.65; color: var(--md-on-surface); }
.ctx-meta summary { font-size: 11.5px; color: var(--md-on-surface-variant); cursor: pointer; }
.ctx-meta .code-box { margin-top: 8px; max-height: 240px; overflow: auto; }

/* Dropped file card inside the add-context dialog */
.ctx-drop-file {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  padding: 10px;
  border-radius: 12px;
  background: var(--md-surface-container);
  border: 1px solid var(--md-outline-variant);
}
.ctx-drop-file[hidden] { display: none; }
.ctx-drop-file .th {
  width: 76px;
  height: 56px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #06080d;
  font-size: 22px;
}
.ctx-drop-file .th img, .ctx-drop-file .th video { width: 100%; height: 100%; object-fit: cover; }
.ctx-drop-file .nm { font-size: 12.5px; font-weight: 600; word-break: break-all; }
.ctx-drop-file .sz { margin-top: 2px; font: 11px 'JetBrains Mono', monospace; color: var(--md-on-surface-variant); }
.ctx-drop-file .q { margin-left: auto; font-size: 11px; white-space: nowrap; color: var(--md-on-surface-variant); }
.obj-doc-title { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.obj-doc-title input,
.obj-doc-title input:focus {
  background: transparent;
  border: 1px solid transparent;
  box-shadow: none;
  font-size: 14px;
  font-weight: 600;
  padding: 2px 6px;
  margin-left: -6px;
  width: 100%;
  max-width: 460px;
}
.obj-doc-title input:hover, .obj-doc-title input:focus { border-color: var(--md-outline); }
.obj-doc-meta { font-size: 11px; color: var(--md-on-surface-variant); }
.obj-canvas-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.obj-canvas-actions select { width: auto; height: 30px; padding: 4px 10px; font-size: 12px; border-radius: var(--md-radius-pill); }
.obj-ghost-btn[aria-pressed="true"] { color: var(--md-primary); border-color: var(--md-primary); background: var(--md-primary-tint-weak); }
.obj-split.canvas-max .obj-chat,
.obj-split.canvas-max #resizerAiCanvas { display: none; }
.obj-paper { width: 100%; display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
/* Editor tabs: the document card grows to fill the remaining canvas height */
.obj-paper.fill { flex: 1 0 auto; }
.obj-paper.fill > .obj-doc-card { flex: 1 1 auto; min-height: 340px; }
.obj-brief { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
@container (max-width: 860px) { .obj-brief { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (max-width: 480px) { .obj-brief { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.obj-brief .f {
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: 12px;
  padding: 8px 12px;
  transition: border-color 0.15s var(--md-ease);
}
.obj-brief .f:focus-within { border-color: var(--md-primary); }
.obj-brief .f label {
  display: block;
  font-size: 10px;
  color: var(--md-on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.obj-brief .f input, .obj-brief .f select,
.obj-brief .f input:focus, .obj-brief .f select:focus {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2px 0;
  font-size: 13.5px;
  font-weight: 600;
}
.obj-doc-card {
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-lg);
  box-shadow: var(--md-elevation-1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.obj-doc-card.flash { animation: objFlash 1.4s var(--md-ease); }
@keyframes objFlash {
  0% { box-shadow: 0 0 0 3px var(--md-primary-tint-strong); border-color: var(--md-primary); }
  100% { box-shadow: var(--md-elevation-1); }
}
.obj-doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--md-outline-variant);
  flex-wrap: wrap;
}
.obj-shortcuts { display: flex; gap: 2px; flex-wrap: wrap; align-items: center; }
.obj-shortcuts .lbl { font-size: 11px; color: var(--md-on-surface-variant); margin-right: 4px; }
.shortcut-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--md-on-surface-variant);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 9px;
  border-radius: var(--md-radius-pill);
  cursor: pointer;
  transition: all 0.15s var(--md-ease);
}
.shortcut-btn:hover { border-color: var(--md-outline); color: var(--md-on-surface); background: var(--md-hover-overlay); }
.obj-selection { display: none; align-items: center; gap: 6px; font-size: 11px; color: var(--md-on-surface-variant); }
.obj-selection.show { display: flex; }
.obj-selection .md-btn { padding: 4px 10px; font-size: 11px; }
.obj-doc,
.obj-doc:focus {
  flex: 1 1 auto;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 280px;
  padding: 20px clamp(16px, 3vw, 40px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.75;
  resize: none;
  user-select: text;
}
.obj-sources { flex-shrink: 0; }
.obj-sources > summary { cursor: pointer; list-style: none; padding: 4px 0; }
.obj-sources > summary::-webkit-details-marker { display: none; }
.obj-sources > summary > span:first-child::before { content: "▸ "; }
.obj-sources[open] > summary > span:first-child::before { content: "▾ "; }

/* Python code editor: transparent textarea over a syntax-highlighted <pre> */
.code-editor { position: relative; flex: 1 1 auto; min-height: 300px; background: var(--md-code-bg); overflow: hidden; }
.code-editor .code-gutter,
.code-editor .code-hl,
.code-editor .code-input {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  tab-size: 4;
  letter-spacing: 0;
}
.code-editor .code-gutter {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 52px;
  padding: 18px 12px 18px 0;
  text-align: right;
  color: var(--md-on-surface-variant);
  opacity: 0.55;
  white-space: pre;
  overflow: hidden;
  border-right: 1px solid var(--md-outline-variant);
  user-select: none;
}
.code-editor .code-hl,
.code-editor .code-input,
.code-editor .code-input:focus {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 52px;
  width: auto;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 18px 22px;
  border: none;
  border-radius: 0;
  white-space: pre;
  box-shadow: none;
}
.code-editor .code-hl { overflow: hidden; pointer-events: none; color: var(--md-code-fg); }
.code-editor .code-hl code { font: inherit; }
.code-editor .code-input,
.code-editor .code-input:focus {
  overflow: auto;
  resize: none;
  background: transparent;
  color: transparent;
  caret-color: var(--md-on-surface);
  outline: none;
  user-select: text;
}
.code-editor .code-input::selection { background: var(--md-primary-tint-strong); color: transparent; }
.code-editor:focus-within { box-shadow: inset 0 0 0 1px var(--md-primary); }
.tk-kw { color: #c586c0; }
.tk-def { color: #569cd6; }
.tk-str { color: #ce9178; }
.tk-com { color: #6a9955; font-style: italic; }
.tk-num { color: #b5cea8; }
.tk-fn { color: #dcdcaa; }
.tk-cls { color: #4ec9b0; }
.tk-self { color: #9cdcfe; }
.tk-const { color: #569cd6; }
.tk-dec { color: #dcdcaa; }
.tk-kwarg { color: #9cdcfe; }
:root[data-theme="light"] .tk-kw { color: #af00db; }
:root[data-theme="light"] .tk-def { color: #0000ff; }
:root[data-theme="light"] .tk-str { color: #a31515; }
:root[data-theme="light"] .tk-com { color: #008000; }
:root[data-theme="light"] .tk-num { color: #098658; }
:root[data-theme="light"] .tk-fn { color: #795e26; }
:root[data-theme="light"] .tk-cls { color: #267f99; }
:root[data-theme="light"] .tk-self { color: #001080; }
:root[data-theme="light"] .tk-const { color: #0000ff; }
:root[data-theme="light"] .tk-dec { color: #795e26; }
:root[data-theme="light"] .tk-kwarg { color: #001080; }
.obj-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--md-on-surface-variant);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.obj-label .aside { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ctx-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.ctx-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--md-radius-pill);
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  font-size: 11.5px;
  color: var(--md-on-surface-variant);
}
.ctx-stat b { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--md-on-surface); }

/* Objective tab — responsive layout */
@media (max-width: 1100px) {
  .obj-split { flex-direction: column; }
  .obj-chat { width: 100% !important; max-width: none; min-width: 0; height: 44%; border-bottom: 1px solid var(--md-outline-variant); }
  #resizerAiCanvas { display: none; }
  .obj-canvas { min-height: 0; }
}
@media (max-width: 760px) {
  .obj-pane-head { height: auto; min-height: 54px; padding: 8px 14px; flex-wrap: wrap; }
  .obj-canvas-actions { flex-wrap: wrap; }
  .canvas-editor-area { padding: 12px; }
  .obj-doc-toolbar .obj-shortcuts .lbl { display: none; }
}

/* Blank-line spacer emitted by the inline markdown renderer */
.md-spacer { height: 6px; }
.ctx-section { display: flex; flex-direction: column; gap: 10px; }
.code-box.grounding-graph { min-height: 340px; }
