.contextual-analyst {
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  border-color: var(--line);
  background: var(--panel);
  color: var(--ink);
}

.analyst-rail-heading {
  border-color: var(--line);
  background: var(--panel-soft);
}

.analyst-rail-heading > div:first-child strong { color: var(--ink); }
.analyst-rail-heading > div:first-child span,
.analyst-section-label { color: var(--muted); }

.analyst-rail-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

.analyst-context {
  flex: 0 0 auto;
  padding: 9px;
  border-color: var(--line);
  background: var(--panel-soft);
  box-shadow: none;
}

.analyst-context-chips span {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.analyst-context p { color: var(--muted); }

.analyst-conversation {
  display: flex;
  flex-direction: column;
  min-height: 130px;
  min-width: 0;
  gap: 8px;
}

/* Keep the rail conversation and its inline review intact; let the rail body scroll. */
.contextual-analyst .analyst-rail-body > .analyst-conversation { flex: 0 0 auto; }

.analyst-conversation-list {
  display: flex;
  flex-direction: column;
  min-height: 90px;
  max-height: 38vh;
  overflow: auto;
  gap: 8px;
  padding: 2px;
  overscroll-behavior: contain;
}

.analyst-conversation-empty {
  display: grid;
  min-height: 76px;
  place-items: center;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.analyst-message {
  max-width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  overflow-wrap: anywhere;
}

.analyst-message.is-user {
  align-self: flex-end;
  max-width: 92%;
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  background: var(--brand-soft);
}

.analyst-message-author {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.analyst-message-content { color: var(--ink); font-size: 13px; line-height: 1.5; }
.analyst-import-receipt { margin-top: 6px; color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.analyst-message-content > :first-child { margin-top: 0; }
.analyst-message-content > :last-child { margin-bottom: 0; }
.analyst-message-content p { margin: 4px 0; }
.analyst-message-content :is(h1, h2, h3, h4) { margin: 9px 0 5px; color: var(--ink); font-size: 1.08em; }
.analyst-message-content pre,
.analyst-proposal-patch pre {
  max-width: 100%;
  overflow: auto;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  color: var(--ink);
  font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.analyst-message-content :not(pre) > code {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--panel-soft);
  color: var(--ink);
  font: .95em ui-monospace, SFMono-Regular, Consolas, monospace;
}

.analyst-message-content a { color: var(--brand-strong); text-decoration: underline; }
.analyst-message-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.analyst-message-content th, .analyst-message-content td { padding: 4px 7px; border: 1px solid var(--line); }
.analyst-message-content th { background: var(--panel-soft); }

.analyst-activity {
  flex: 0 0 auto;
  margin: 0;
}

.analyst-activity > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 28px;
  padding: 4px 2px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
  list-style-position: inside;
}

.analyst-activity-clear {
  display: block;
  margin: 0 0 6px auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}

.analyst-activity-list { max-height: 180px; overflow: auto; padding: 2px; }
.analyst-activity-item { border-color: var(--line); background: var(--panel-soft); }
.analyst-activity-copy strong { color: var(--ink); }
.analyst-activity-copy span, .analyst-activity-status { color: var(--muted); }
.analyst-empty { border-color: var(--line-strong); color: var(--muted); }
.analyst-empty strong { color: var(--ink); }

.analyst-suggestions { border-color: var(--line); background: var(--panel-soft); }
.analyst-suggestions button { border-color: var(--line-strong); background: var(--panel); color: var(--ink); }
.analyst-suggestions button:hover { border-color: var(--brand); color: var(--brand-strong); }
.analyst-composer { border-color: var(--line); background: var(--panel); }
.analyst-composer textarea,
.analyst-full-composer textarea {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--ink);
}
.analyst-composer textarea::placeholder,
.analyst-full-composer textarea::placeholder { color: var(--muted); }
.analyst-composer > div span { color: var(--muted); }

.analyst-request-settings {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end !important;
  justify-content: stretch !important;
  gap: 7px !important;
  min-width: 0;
  margin-top: 7px !important;
}
.analyst-request-settings label {
  display: grid;
  min-width: 0;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.analyst-request-settings select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
  line-height: 1.25;
}
.analyst-request-settings select:disabled { cursor: not-allowed; opacity: .7; }
.analyst-request-settings > span {
  grid-column: 1 / -1;
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.analyst-composer > .analyst-request-settings,
.analyst-composer > .analyst-image-tools,
.analyst-composer > .analyst-image-queue {
  justify-content: flex-start;
}
.analyst-image-tools {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 7px;
}
.analyst-image-tools input[type="file"] { display: none; }
.analyst-image-tools .button { min-height: 28px; padding: 4px 8px; font-size: 9px; }
.analyst-image-tools > span {
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.analyst-image-tools button:disabled { cursor: not-allowed; opacity: .6; }
.analyst-image-queue {
  display: flex;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
  overflow: hidden;
}
.analyst-image-queue[hidden] { display: none !important; }
.analyst-image-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 24px;
  min-width: 0;
  max-width: 100%;
  flex: 1 1 170px;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--ink);
}
.analyst-image-item img { display: block; width: 36px; height: 32px; border-radius: 4px; object-fit: cover; background: var(--panel-soft); }
.analyst-image-item > span { min-width: 0; overflow: hidden; color: var(--ink); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.analyst-image-item > button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--panel-soft);
  color: var(--ink);
  cursor: pointer;
}
.analyst-image-item > button:hover { border-color: var(--danger); color: var(--danger); }
.analyst-composer > .analyst-composer-footer { justify-content: space-between; }

.analyst-context-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.analyst-context-heading .analyst-section-label { min-width: 0; }
.analyst-context-heading [data-analyst-context-scope] {
  color: var(--brand-strong);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: capitalize;
}
.analyst-context-chips { gap: 4px; margin-top: 6px; }
.analyst-context-chips .analyst-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 100%;
  padding: 2px 3px 2px 7px;
  border: 1px solid color-mix(in srgb, var(--brand-strong) 22%, var(--line));
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  white-space: normal;
}
.analyst-context-chips .analyst-context-chip > span {
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
  color: inherit;
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analyst-context-chip > button {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.analyst-context-chip > button:hover,
.analyst-context-chip > button:focus-visible { background: var(--panel); color: var(--ink); }
.analyst-context-chips .analyst-context-empty {
  padding: 3px 0;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
}
.analyst-context-add { position: relative; flex: 0 0 auto; }
.analyst-context-add > summary,
.analyst-suggestion-overflow > summary {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  list-style: none;
}
.analyst-context-add > summary::-webkit-details-marker,
.analyst-suggestion-overflow > summary::-webkit-details-marker { display: none; }
.analyst-context-add > summary:hover,
.analyst-suggestion-overflow > summary:hover { border-color: var(--brand); color: var(--brand-strong); }
.analyst-context-add > summary:focus-visible,
.analyst-suggestion-overflow > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-context-add [data-analyst-context-restore] {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 5;
  display: grid;
  width: min(270px, calc(100vw - 56px));
  max-height: 34vh;
  gap: 4px;
  overflow: auto;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.analyst-context-add [data-analyst-context-restore] > button {
  display: grid;
  grid-template-columns: minmax(48px, auto) minmax(0, 1fr);
  align-items: baseline;
  gap: 7px;
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  text-align: left;
}
.analyst-context-add [data-analyst-context-restore] > button:hover { border-color: var(--line); background: var(--panel-soft); }
.analyst-context-add [data-analyst-context-restore] > button span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.analyst-context-no-omitted { padding: 5px 6px; color: var(--muted); font-size: 9px; }

.analyst-settings-disclosure {
  min-width: 0;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}
.analyst-settings-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 29px;
  padding: 4px 7px;
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  list-style: none;
}
.analyst-settings-disclosure > summary::-webkit-details-marker { display: none; }
.analyst-settings-disclosure > summary::after {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  content: "";
  transform: rotate(45deg);
  transition: transform .14s ease;
}
.analyst-settings-disclosure[open] > summary::after { transform: rotate(225deg); }
.analyst-settings-disclosure > summary span:first-child { flex: 0 0 auto; font-size: 11px; }
.analyst-settings-disclosure > summary span:last-child {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.analyst-settings-disclosure > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-settings-disclosure:not([open]) > .analyst-request-settings { display: none !important; }
.analyst-settings-disclosure[open] > .analyst-request-settings { padding: 0 7px 7px; }
.analyst-suggestion-overflow {
  position: relative;
  justify-self: end;
  margin: 0 8px 4px;
}
.analyst-suggestion-overflow > summary { width: 26px; height: 26px; font-size: 15px; }
.analyst-suggestion-overflow > .analyst-suggestions {
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  z-index: 5;
  display: grid;
  width: max-content;
  min-width: 172px;
  gap: 4px;
  padding: 6px;
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.analyst-suggestion-overflow > .analyst-suggestions button {
  width: 100%;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 9px;
  text-align: left;
}
.analyst-image-tools .button.icon-only {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  place-items: center;
  padding: 6px;
  border-color: var(--line-strong);
  background: var(--panel-soft);
  color: var(--ink);
}
.analyst-image-tools .button.icon-only svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.analyst-image-tools .button.icon-only:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-strong); }
.analyst-image-tools .button.icon-only:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-image-tools .button.icon-only:disabled { opacity: .5; }
.analyst-composer { padding: 7px 8px 8px; }
.analyst-composer textarea { min-height: 56px; padding: 7px; }
.analyst-composer .analyst-image-tools,
.analyst-composer .analyst-image-queue { margin-top: 5px; }
.analyst-composer .analyst-composer-footer { margin-top: 5px; }
.analyst-full-composer { padding: 8px 12px 10px; }
.analyst-full-composer textarea { min-height: 64px; }
.analyst-full-composer .analyst-request-settings,
.analyst-full-composer .analyst-settings-disclosure,
.analyst-full-composer .analyst-image-tools,
.analyst-full-composer .analyst-image-queue { margin-top: 5px; }
.analyst-full-composer .analyst-composer-footer { margin-top: 5px; }

.analyst-inline-review { display: grid; gap: 8px; }
.analyst-proposal-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--ink);
}

.analyst-proposal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.analyst-proposal-heading > div { display: grid; gap: 3px; min-width: 0; }
.analyst-proposal-heading strong { color: var(--ink); font-size: 13px; }
.analyst-proposal-heading > div > span { color: var(--muted); font-size: 11px; line-height: 1.4; }
.analyst-proposal-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-strong); font-size: 10px; font-weight: 750; text-transform: capitalize; }
.analyst-proposal-status.is-stale { background: color-mix(in srgb, var(--warning) 18%, var(--panel)); color: var(--warning); }
.analyst-proposal-target { margin: 7px 0; color: var(--ink); font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
.analyst-proposal-patch { margin-top: 6px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.analyst-proposal-patch > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 6px 9px; color: var(--ink); cursor: pointer; font-size: 11px; list-style: none; }
.analyst-proposal-patch > summary::-webkit-details-marker { display: none; }
.analyst-proposal-patch > summary::before { content: "›"; flex: 0 0 auto; color: var(--muted); font-size: 17px; line-height: 1; transition: transform .14s ease; }
.analyst-proposal-patch[open] > summary::before { transform: rotate(90deg); }
.analyst-proposal-patch > summary span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.analyst-proposal-patch > summary span:last-child { flex: 0 0 auto; color: var(--muted); }
.analyst-proposal-patch > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-proposal-patch pre { margin: 0 7px 7px; max-height: min(34vh, 300px); overflow: auto; white-space: pre; overflow-wrap: normal; }
.analyst-proposal-validation { margin: 7px 0 0; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.analyst-proposal-validation .is-error { color: var(--danger); }
.analyst-proposal-validation .is-warning { color: var(--warning); }
.analyst-proposal-empty, .analyst-stale-note { margin: 7px 0 0; color: var(--warning); font-size: 11px; line-height: 1.5; }
.analyst-proposal-result { margin: 7px 0 0; color: var(--success); font-size: 11px; line-height: 1.4; }
.analyst-proposal-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.analyst-proposal-actions .button,
.analyst-result-link .button { min-height: 34px; padding: 7px 10px; font-size: 12px; line-height: 1.25; }
.analyst-proposal-card .button.secondary,
.analyst-result-link .button.secondary { border-color: var(--line-strong); background: var(--panel); color: var(--ink); }
.analyst-proposal-card .button.secondary:hover,
.analyst-result-link .button.secondary:hover { border-color: var(--brand); background: var(--panel-soft); color: var(--ink); }
.analyst-proposal-card .button:focus-visible,
.analyst-result-link .button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-result-link { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; margin-top: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); color: var(--ink); }
.analyst-result-link > span { min-width: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.analyst-result-link .button { flex: 0 0 auto; max-width: 100%; white-space: normal; }
.analyst-result-actions { display: flex; justify-content: flex-start; flex-wrap: wrap; gap: 6px; min-width: 0; }
.analyst-refinement { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.analyst-refinement > summary { cursor: pointer; color: var(--brand-strong); font-weight: 700; }
.analyst-refinement form { display: grid; gap: 10px; margin-top: 10px; }
.analyst-refinement p, .analyst-refinement small { margin: 0; color: var(--muted); font-size: 12px; }
.analyst-refinement label { display: grid; gap: 4px; min-width: 0; font-size: 12px; font-weight: 700; }
.analyst-refinement input, .analyst-refinement textarea { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--panel); color: var(--ink); font: inherit; font-weight: 400; }
.analyst-refinement input:focus-visible, .analyst-refinement textarea:focus-visible, .analyst-refinement summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-refinement button { justify-self: start; }
.analyst-workflow-steps { display: grid; gap: 6px; margin: 10px 0 0; padding-left: 20px; color: var(--ink); font-size: 10px; }
.analyst-workflow-steps li span { display: block; color: var(--muted); }
.analyst-step-impact { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 5px 0; }
.analyst-step-impact span, .analyst-step-destination { color: var(--ink) !important; font-size: 9px; }
.analyst-step-impact code, .analyst-step-destination code { color: var(--brand-strong); font: 9px ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.analyst-workflow-steps details { margin-top: 5px; color: var(--muted); }
.analyst-workflow-steps details > summary { cursor: pointer; }
.analyst-workflow-steps dl { display: grid; grid-template-columns: minmax(72px, .35fr) minmax(0, 1fr); gap: 4px 8px; margin: 5px 0; }
.analyst-workflow-steps dl > div { display: contents; }
.analyst-workflow-steps dt { color: var(--muted); }
.analyst-workflow-steps dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

.analyst-full-ask-dialog {
  width: min(1020px, calc(100vw - 32px));
  height: min(880px, calc(100dvh - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.analyst-full-ask-dialog::backdrop { background: rgba(7, 12, 20, .62); backdrop-filter: blur(2px); }
.analyst-full-ask-shell { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; min-width: 0; height: 100%; }
.analyst-full-ask-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: var(--panel-soft); }
.analyst-full-ask-header-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.analyst-clear-conversation { display: inline-grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; padding: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); color: var(--muted); cursor: pointer; }
.analyst-clear-conversation svg { display: block; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.analyst-clear-conversation:hover:not(:disabled) { border-color: var(--brand); color: var(--brand-strong); }
.analyst-clear-conversation:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.analyst-clear-conversation:disabled { cursor: wait; opacity: .5; }
.analyst-eyebrow { color: var(--brand-strong); font-size: 9px; font-weight: 850; letter-spacing: .13em; }
.analyst-full-ask-header h1 { margin: 4px 0 0; color: var(--ink); font-size: 19px; }
.analyst-full-ask-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.analyst-full-context { margin: 12px 16px 0; }
.analyst-full-ask-main { display: grid; grid-template-columns: minmax(0, 1fr) 225px; min-height: 0; gap: 14px; padding: 12px 16px; }
.analyst-full-ask-main > .analyst-conversation { min-height: 0; overflow: hidden; }
.analyst-full-ask-main .analyst-conversation-list { max-height: none; flex: 1 1 auto; min-height: 0; padding-right: 5px; }
.analyst-full-activity { align-self: start; max-height: 100%; overflow: auto; padding: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel-soft); }
.analyst-full-activity .analyst-activity-list { max-height: 45vh; }
.analyst-full-composer { padding: 11px 16px 15px; border-top: 1px solid var(--line); background: var(--panel-soft); }
.analyst-full-composer > label { display: block; margin-bottom: 6px; color: var(--ink); font-size: 10px; font-weight: 750; }
.analyst-full-composer textarea { display: block; width: 100%; min-height: 76px; resize: vertical; padding: 9px 10px; border: 1px solid var(--line-strong); border-radius: 8px; outline: 0; font-size: 12px; line-height: 1.5; }
.analyst-full-composer textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.analyst-full-composer .analyst-request-settings,
.analyst-full-composer .analyst-image-tools,
.analyst-full-composer .analyst-image-queue { margin-top: 8px; }
.analyst-composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.analyst-composer-footer span { color: var(--muted); font-size: 10px; }

@media (max-width: 720px) {
  .analyst-full-ask-dialog { width: calc(100vw - 12px); height: calc(100dvh - 12px); border-radius: 10px; }
  .analyst-full-ask-header { padding: 12px; }
  .analyst-full-context { margin: 8px 10px 0; }
  .analyst-full-ask-main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
  .analyst-full-activity { max-height: 130px; }
  .analyst-full-activity .analyst-activity-list { max-height: 78px; }
  .analyst-full-composer { padding: 8px 10px 10px; }
}

@media (max-width: 430px) {
  .analyst-request-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analyst-request-settings > span { grid-column: 1 / -1; }
  .analyst-request-settings label:last-of-type { grid-column: 1 / -1; }
  .analyst-image-item { flex-basis: 100%; }
}

/* Keep the full Ask composer compact after its base dialog styles. */
.analyst-full-composer { padding: 8px 12px 10px; }
.analyst-full-composer textarea { min-height: 64px; }
.analyst-full-composer .analyst-request-settings,
.analyst-full-composer .analyst-image-tools,
.analyst-full-composer .analyst-image-queue { margin-top: 5px; }
.analyst-full-composer .analyst-settings-disclosure { margin-top: 5px; }
.analyst-full-composer .analyst-composer-footer { margin-top: 5px; }

@media (max-width: 720px) {
  .analyst-full-composer { padding: 8px 10px 10px; }
}
