.bubble.assistant.formatted-response:not(.image-result):not(.trejj-progress-bubble) {
  width: min(880px, 100%);
  max-width: 100%;
}

.assistant .bubble-content.response-content {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.72;
}

.response-content > :first-child {
  margin-top: 0;
}

.response-content > :last-child {
  margin-bottom: 0;
}

.response-content p {
  margin: 0 0 .9em;
}

.response-content h2,
.response-content h3,
.response-content h4 {
  margin: 1.35em 0 .55em;
  color: var(--text);
  line-height: 1.28;
  letter-spacing: -.018em;
}

.response-content h2 {
  font-size: 1.35em;
}

.response-content h3 {
  font-size: 1.18em;
}

.response-content h4 {
  font-size: 1.06em;
}

.response-content ul,
.response-content ol {
  margin: .3em 0 1em;
  padding-left: 1.45em;
}

.response-content li {
  margin: .32em 0;
  padding-left: .16em;
}

.response-content blockquote {
  margin: 1em 0;
  padding: .65em .9em;
  border-left: 3px solid var(--violet);
  border-radius: 0 9px 9px 0;
  background: color-mix(in srgb, var(--violet) 8%, var(--panel2));
  color: var(--muted);
}

.response-content hr {
  margin: 1.35em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.response-inline-code {
  padding: .14em .38em;
  border: 1px solid color-mix(in srgb, var(--violet) 28%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--violet) 8%, var(--panel2));
  color: color-mix(in srgb, var(--pink) 78%, var(--text));
  font: .9em/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-wrap: break-word;
}

.response-code {
  max-width: 100%;
  margin: 1em 0 1.15em;
  overflow: hidden;
  border: 1px solid;
  border-radius: 13px;
  box-shadow: 0 12px 30px #0003;
  color-scheme: dark;
}

.response-code figcaption {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 8px 7px 14px;
  border-bottom: 1px solid;
}

.response-code-label {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.response-code pre {
  max-width: 100%;
  margin: 0;
  padding: 17px 18px;
  overflow-x: auto;
  white-space: pre;
  overscroll-behavior-x: contain;
  tab-size: 2;
}

.response-code code {
  display: block;
  width: max-content;
  min-width: 100%;
  color: inherit;
  font: 13.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.response-code-snippet {
  border-color: #44547d;
  background: #0f1423;
  color: #edf1ff;
}

.response-code-snippet figcaption {
  border-color: #344263;
  background: #171e33;
}

.response-code-snippet .response-code-label {
  color: #becbff;
}

.response-command {
  border-color: #2f7d63;
  background: #071511;
  color: #dffbed;
}

.response-command figcaption {
  border-color: #245f4d;
  background: #0d211a;
}

.response-command .response-code-label {
  color: #75ddb2;
}

.copy-code {
  flex: 0 0 auto;
  min-width: 66px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #7183b055;
  border-radius: 8px;
  background: #263352;
  color: #f5f7ff;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}

.response-command .copy-code {
  border-color: #61c99a55;
  background: #174b3a;
  color: #eafff5;
}

.copy-code:hover {
  border-color: currentColor;
  transform: translateY(-1px);
}

.copy-code:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--violet) 55%, transparent);
  outline-offset: 2px;
}

.copy-code[data-copying=true] {
  cursor: default;
  opacity: .9;
  transform: none;
}

.copy-code.copied {
  border-color: #64d69f;
  background: #175a40;
}

.copy-code.copy-failed {
  border-color: #ff8f9a;
  background: #642c36;
}

.response-table-wrap {
  max-width: 100%;
  margin: 1em 0 1.15em;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.response-table-wrap table {
  width: 100%;
  min-width: 440px;
  border-collapse: collapse;
  background: var(--panel2);
  font-size: .92em;
}

.response-table-wrap th,
.response-table-wrap td {
  padding: 10px 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.response-table-wrap th {
  background: color-mix(in srgb, var(--violet) 9%, var(--panel2));
  font-weight: 800;
}

.response-table-wrap tr:last-child td {
  border-bottom: 0;
}

.response-table-wrap th:last-child,
.response-table-wrap td:last-child {
  border-right: 0;
}

.response-table-wrap:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--violet) 50%, transparent);
  outline-offset: 2px;
}

html[data-theme=light] .response-code {
  box-shadow: 0 10px 24px #27133320;
}

html[data-theme=light] .response-inline-code {
  background: #f1e7f6;
  color: #692080;
}

@media (max-width: 760px) {
  .bubble.assistant.formatted-response:not(.image-result):not(.trejj-progress-bubble) {
    width: 100%;
    max-width: 100% !important;
    padding-bottom: 48px !important;
  }

  .response-content h2 {
    font-size: 1.25em;
  }

  .response-code {
    margin: .85em 0 1em;
    border-radius: 11px;
  }

  .response-code figcaption {
    min-height: 48px;
    padding-left: 12px;
  }

  .response-code pre {
    padding: 14px;
  }

  .response-code code {
    font-size: 13px;
  }

  .copy-code {
    min-width: 72px;
    min-height: 44px;
  }
}

@media (forced-colors: active) {
  .response-code,
  .response-inline-code,
  .copy-code,
  .response-table-wrap {
    border: 1px solid CanvasText;
  }

  .copy-code:focus-visible,
  .response-table-wrap:focus-visible {
    outline: 2px solid Highlight;
  }
}
