/* AI Overflow exploration inherits Rune Øverland's frame, grid, type and accent. */
:root {
  --paper: #fff;
  --ground: #000;
  --ink: #fff;
  --muted: #8e8e8e;
  --line: #303030;
  --light-line: #dedede;
  --accent: #3d6fc4;
  --pad: 10px;
  --cell: 20px;
  --font: ui-sans-serif, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'SFMono-Regular', Consolas, monospace;
  --small: 12px;
  --meta: 15px;
  --body: 18px;
  --title: clamp(56px, 6.8vw, 108px);
  --sub: clamp(30px, 3vw, 45px);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: var(--pad);
  background: var(--paper);
  font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  color: var(--ink);
}
button,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button {
  border: 0;
  border-radius: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
button:hover,
a:hover {
  color: var(--accent);
}
[hidden] {
  display: none !important;
}
.page {
  background: var(--ground);
  min-height: calc(100vh - 20px);
}
.grid-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  position: relative;
  border-bottom: 1px solid var(--line);
}
.cell {
  padding: var(--cell);
  position: relative;
  min-width: 0;
}
.grid-row > .cell + .cell {
  border-left: 1px solid var(--line);
}
.nodes {
  position: absolute;
  inset: auto 0 -3px;
  pointer-events: none;
  z-index: 4;
  height: 6px;
}
.nodes i {
  position: absolute;
  left: 25%;
  width: 6px;
  height: 6px;
  background: var(--ink);
  transform: translateX(-3px);
}
.nodes i:nth-child(2) {
  left: 50%;
}
.nodes i:nth-child(3) {
  left: 75%;
}
.nav {
  min-height: 108px;
}
.nav .cell {
  font-size: var(--meta);
  line-height: 1.3;
}
.nav-brand {
  font-size: var(--body) !important;
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.nav-section {
  display: flex;
  gap: 15px;
}
.nav-section span:first-child {
  color: var(--muted);
}
.nav-end {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.logout {
  color: var(--ink);
  padding: 0;
  background: none;
  text-align: left;
}
.arrow {
  font-size: 21px;
  line-height: 1;
}
.masthead > .cell:first-child {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 30px;
  padding-bottom: 30px;
}
.eyebrow {
  font-size: var(--small);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
h1 {
  font-size: var(--title);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 1;
  margin: 25px 0 0;
}
h1 .period {
  color: var(--accent);
}
.masthead .cell:nth-child(2),
.masthead .cell:nth-child(3) {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 35px;
  padding-top: 30px;
  padding-bottom: 30px;
}
.mode-title {
  font-size: 21px;
  letter-spacing: -0.6px;
  line-height: 1.15;
}
.meta-bottom {
  font-size: var(--small);
  color: var(--muted);
  margin-top: 10px;
}
.context-button {
  background: none;
  color: var(--ink);
  padding: 0;
  text-align: left;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  font-size: 21px;
  letter-spacing: -0.6px;
  width: 100%;
}
.context {
  background: #111;
  padding: var(--cell);
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 20px;
  font-size: var(--meta);
}
.context p {
  margin: 0;
  color: #bcbcbc;
  max-width: 790px;
}
.context strong {
  font-weight: 400;
  color: var(--ink);
}
.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 490px;
}
.editor {
  background: var(--paper);
  color: var(--ground);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pane-head {
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 0 var(--cell);
  border-bottom: 1px solid var(--light-line);
  font-size: var(--small);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.pane-head .count {
  color: #777;
  text-transform: none;
  letter-spacing: 0;
}
.editor label {
  display: block;
}
.editor-body {
  padding: 28px var(--cell) 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.editor textarea {
  width: 100%;
  flex: 1;
  min-height: 240px;
  background: transparent;
  border: 0;
  color: var(--ground);
  resize: vertical;
  font: 400 16px/1.6 var(--font);
  border-radius: 0;
  outline-offset: 8px;
}
.editor textarea::placeholder {
  color: #8c8c8c;
  font-family: var(--font);
  font-size: clamp(22px, 2.6vw, 36px);
  letter-spacing: -1px;
  line-height: 1.25;
}
.editor textarea:focus {
  outline: 1px solid #aaa;
}
.editor-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--cell) 18px;
  font-size: var(--small);
  color: #777;
}
.text-button {
  padding: 0;
  background: none;
  color: inherit;
  text-align: left;
}
.editor-note button {
  color: var(--ground);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--light-line);
}
.editor-actions button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  min-height: 69px;
  background: var(--paper);
  color: var(--ground);
  font-size: var(--meta);
}
.editor-actions button:hover {
  background: #eee;
}
.editor-actions button.primary {
  background: var(--accent);
  color: var(--paper);
}
.editor-actions button.primary:hover {
  background: #315caa;
}
.response {
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.response .pane-head {
  border-color: var(--line);
}
.response .pane-head .label {
  color: #bcbcbc;
}
.ready-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  margin-right: 9px;
  vertical-align: middle;
}
.empty {
  padding: 60px 40px 45px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.empty .symbol {
  color: var(--accent);
  font: 400 34px/1 var(--mono);
  margin-bottom: 30px;
}
.empty h2 {
  font-size: var(--sub);
  line-height: 1.1;
  letter-spacing: -1.8px;
  font-weight: 400;
  margin: 0 0 25px;
  max-width: 420px;
}
.empty p {
  font-size: var(--meta);
  color: var(--muted);
  max-width: 310px;
  margin: 0;
}
.response-bottom {
  margin-top: auto;
  padding: 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--small);
  display: flex;
  gap: 22px;
}
.response-bottom span {
  display: inline-flex;
  gap: 8px;
}
.response-bottom b {
  font-weight: 400;
  color: #ddd;
}
.answer {
  padding: 28px var(--cell) 20px;
}
.answer h2 {
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1.1px;
  margin: 0 0 16px;
}
.answer p {
  font-size: var(--meta);
  color: #bbb;
  margin: 0 0 20px;
  max-width: 590px;
}
.example-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 16px;
}
.code-head {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: var(--small);
  color: var(--muted);
}
.code-head button {
  background: var(--paper);
  color: var(--ground);
  padding: 8px 12px;
  flex-shrink: 0;
}
.answer pre {
  font: 400 13px/1.75 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0;
  padding: 20px 0;
  color: #d9e6ff;
}
.test-step {
  border-top: 1px solid var(--line);
  padding-top: 15px;
}
.test-step span {
  font-size: var(--small);
  color: var(--muted);
  display: block;
  margin-bottom: 5px;
}
.test-step p {
  color: #ddd;
  font-size: 14px;
}
.followup {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.followup button {
  color: var(--ink);
  font-size: var(--small);
  background: none;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.answer .follow-answer {
  margin-top: 18px;
}
.notice {
  font-size: var(--small);
  padding: 10px 20px;
  color: #ad3c24;
  background: #fff0eb;
}
.footer {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: var(--small);
  color: var(--muted);
}
.footer > div {
  padding: 18px var(--cell);
  display: flex;
  justify-content: space-between;
  gap: 15px;
}
.footer > div + div {
  border-left: 1px solid var(--line);
}
.footer .short-label {
  color: #bbb;
}
.login {
  padding: 80px 20px;
  max-width: 700px;
}
.login h2 {
  font-size: var(--sub);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -1px;
}
.login p {
  color: var(--muted);
}
.login button {
  padding: 18px 24px;
  background: var(--accent);
  color: var(--ink);
}
.copy-status {
  font-size: var(--small);
  color: var(--muted);
  margin-top: 12px;
}
.status {
  font-size: var(--small);
  color: var(--muted);
}
@media (min-width: 1500px) and (min-height: 950px) {
  .workspace {
    min-height: 580px;
  }
  .editor textarea {
    min-height: 330px;
  }
  .empty {
    padding: 60px;
  }
  .response-bottom {
    padding-left: 60px;
  }
}
@media (min-width: 601px) and (max-height: 950px) {
  .nav {
    min-height: 88px;
  }
  .nav .cell {
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .masthead > .cell:first-child,
  .masthead .cell:nth-child(2),
  .masthead .cell:nth-child(3) {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .masthead .cell:nth-child(2),
  .masthead .cell:nth-child(3) {
    gap: 20px;
  }
  h1 {
    font-size: clamp(56px, 6vw, 88px);
    margin-top: 16px;
  }
  .workspace {
    min-height: 385px;
  }
  .pane-head {
    height: 52px;
  }
  .editor-body {
    padding-top: 20px;
    padding-bottom: 15px;
  }
  .editor textarea {
    min-height: 205px;
  }
  .editor-actions button {
    min-height: 58px;
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .empty {
    padding-top: 30px;
    padding-bottom: 30px;
  }
  .empty .symbol {
    margin-bottom: 22px;
  }
  .empty h2 {
    font-size: clamp(30px, 3vw, 42px);
  }
  .footer > div {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}
@media (max-width: 850px) {
  :root {
    --cell: 16px;
  }
  .nav {
    min-height: 94px;
  }
  .nav-links {
    font-size: 12px !important;
  }
  .nav-end {
    flex-direction: column;
  }
  .masthead .cell:nth-child(2),
  .masthead .cell:nth-child(3) {
    gap: 20px;
  }
  .mode-title,
  .context-button {
    font-size: 17px;
  }
  .empty {
    padding: 35px 25px;
  }
  .response-bottom {
    padding: 20px 25px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .footer > div {
    flex-wrap: wrap;
  }
}
@media (max-width: 600px) {
  :root {
    --pad: 6px;
    --title: 61px;
  }
  .page {
    min-height: calc(100vh - 12px);
  }
  .nav {
    grid-template-columns: 1fr 1fr;
    min-height: 76px;
  }
  .nav-links,
  .nav-section {
    display: none;
  }
  .nav-end {
    border-left: 1px solid var(--line) !important;
    flex-direction: row;
    font-size: 12px !important;
  }
  .nav-brand {
    font-size: 16px !important;
  }
  .nav .nodes {
    display: none;
  }
  .masthead {
    grid-template-columns: 1fr 1fr;
  }
  .masthead > .cell:first-child {
    grid-column: span 2;
    padding-top: 25px;
    padding-bottom: 30px;
  }
  .masthead .cell:nth-child(2) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .masthead .cell:nth-child(3) {
    border-top: 1px solid var(--line);
  }
  .masthead .cell:nth-child(2),
  .masthead .cell:nth-child(3) {
    padding-top: 18px;
    padding-bottom: 18px;
    gap: 15px;
  }
  .masthead .nodes i:first-child,
  .masthead .nodes i:last-child {
    display: none;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
  .response {
    border-left: 0;
    min-height: 370px;
  }
  .editor textarea {
    min-height: 225px;
  }
  .editor textarea::placeholder {
    font-size: 30px;
  }
  .pane-head {
    height: 53px;
  }
  .empty {
    padding: 35px 25px;
  }
  .empty h2 {
    font-size: 37px;
  }
  .context {
    grid-template-columns: 1fr;
  }
  .footer {
    grid-template-columns: 1fr;
  }
  .footer > div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .editor-note {
    gap: 12px;
    flex-wrap: wrap;
  }
  .answer h2 {
    font-size: 29px;
  }
  button {
    min-height: 38px;
  }
  .editor-note button {
    min-height: 30px;
  }
}

.attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.attachment {
  display: flex;
  border: 1px solid var(--light-line);
  background: #f7f7f7;
  max-width: 100%;
  font-size: 12px;
}
.attachment button {
  background: none;
  color: #111;
  padding: 9px 12px;
  min-height: 38px;
}
.attachment .attachment-open {
  overflow-wrap: anywhere;
  text-align: left;
}
.attachment .attachment-remove {
  border-left: 1px solid var(--light-line);
  flex-shrink: 0;
}
.attachment button:hover {
  background: #e8e8e8;
}
.attachment-status {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}
.editor-note {
  flex-wrap: wrap;
  gap: 8px 16px;
}
.editor-note #input-note {
  flex-basis: 100%;
}
.file-dialog {
  width: min(820px, calc(100vw - 32px));
  max-height: 85vh;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: #000;
}
.file-dialog::backdrop {
  background: #0009;
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border-bottom: 1px solid var(--light-line);
}
.dialog-header h2 {
  font-size: 18px;
  font-weight: 400;
  margin: 0;
}
.dialog-header button {
  background: #000;
  color: #fff;
  padding: 8px 14px;
}
.file-dialog pre {
  font: 13px/1.7 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 20px;
  margin: 0;
  max-height: 58vh;
  overflow: auto;
}
.dialog-footer {
  padding: 15px 20px;
  border-top: 1px solid var(--light-line);
  font-size: 12px;
  color: #666;
}
.attachments:not(:empty) + textarea {
  min-height: 140px;
}
.editor-actions {
  grid-template-columns: 1fr 64px;
}
.editor-actions button.primary {
  justify-content: center;
}
.editor-actions .primary .arrow {
  font-size: 26px;
}
.attachment-status:empty {
  display: none;
}
.answer .submitted-question {
  font-size: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 20px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

/* Composer hierarchy: one send control, quiet supporting actions. */
.editor-note {
  justify-content: flex-start;
  gap: 12px 24px;
  padding-bottom: 14px;
}
.editor-note button {
  text-decoration: none;
  min-height: 32px;
  font-size: 12px;
}
.editor-note #paste-file {
  color: #333;
}
.editor-note #load-example {
  color: #777;
  margin-left: auto;
}
.editor-note button:hover {
  color: var(--accent);
}
.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px var(--cell);
  gap: 20px;
}
.editor-actions button {
  min-height: 42px;
  padding: 8px 0;
  font-size: 13px;
}
.editor-actions button:not(.primary) {
  color: #333;
  background: none;
}
.editor-actions button:not(.primary):hover {
  color: var(--accent);
  background: none;
}
.editor-actions button.primary {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  flex-shrink: 0;
}
.editor-actions button:disabled {
  cursor: default;
  color: #aaa;
}
.editor-actions button.primary:disabled {
  background: #e6e6e6;
  color: #aaa;
  filter: none;
}
.editor textarea {
  line-height: 1.6;
}
.editor textarea::placeholder {
  font-size: clamp(22px, 2.2vw, 30px);
  letter-spacing: -0.7px;
}

/* Compact site-native header reserves space for the working surface. */
.nav {
  min-height: 76px;
}
.nav .cell {
  padding-top: 10px;
  padding-bottom: 10px;
}
.nav-links {
  font-size: 12px !important;
}
.masthead > .cell:first-child,
.masthead .cell:nth-child(2),
.masthead .cell:nth-child(3) {
  padding-top: 16px;
  padding-bottom: 16px;
}
.masthead .cell:nth-child(2),
.masthead .cell:nth-child(3) {
  gap: 12px;
}
h1 {
  font-size: clamp(48px, 5.2vw, 76px);
  margin-top: 12px;
}
.masthead .eyebrow {
  font-size: 11px;
}
.mode-title,
.context-button {
  font-size: 18px;
}
.meta-bottom {
  margin-top: 7px;
}
.rename-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-bottom: 1px solid var(--light-line);
  font-size: 13px;
}
.rename-form input {
  font: inherit;
  padding: 8px;
  border: 1px solid var(--light-line);
  min-width: 0;
  flex: 1;
}
.rename-form button {
  padding: 8px 12px;
  background: #000;
  color: #fff;
}
.rename-form span {
  flex-basis: 100%;
  font-size: 12px;
  color: #555;
}
.rename-form span:empty {
  display: none;
}
.answer h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  font-weight: 400;
  margin: 0 0 8px;
}
.context #context-files {
  grid-column: 2;
}
.editor-actions #review-suggestion {
  color: #666;
}
@media (max-width: 600px) {
  .context #context-files {
    grid-column: 1;
  }
  .nav {
    min-height: 64px;
  }
  .masthead > .cell:first-child {
    padding-top: 20px;
    padding-bottom: 22px;
  }
  h1 {
    font-size: 55px;
  }
  .rename-form label {
    flex-basis: 100%;
  }
}

/* Keep the composer usable while the independent answer column grows. */
@media (min-width: 601px) {
  .editor {
    align-self: start;
    position: sticky;
    top: 10px;
    height: 400px;
  }
  .editor-body {
    min-height: 0;
  }
  .editor textarea {
    min-height: 80px;
    resize: none;
  }
  .attachments {
    max-height: 96px;
    overflow-y: auto;
    flex-shrink: 0;
  }
  .editor-note,
  .editor-actions,
  .editor .pane-head {
    flex-shrink: 0;
  }
}
@media (max-width: 600px) {
  .editor {
    position: static;
    height: auto;
    align-self: stretch;
  }
}

/* Product additions retain the approved prototype frame and composer hierarchy. */
select,
input {
  font: inherit;
  border-radius: 0;
}
select {
  width: 100%;
  padding: 8px 0;
  background: #000;
  color: #fff;
  border: 0;
  border-bottom: 1px solid #444;
}
.source-button {
  display: block;
  text-align: left;
  overflow-wrap: anywhere;
  max-width: 100%;
  background: none;
  color: #bcbcbc;
  font: 11px/1.6 var(--mono);
  padding: 8px 0;
}
.source-button:hover {
  color: #fff;
}
.send-disclosure {
  margin: 0;
  padding: 10px var(--cell);
  border-top: 1px solid var(--light-line);
  font-size: 11px;
  line-height: 1.4;
  color: #666;
}
.turn + .turn {
  margin-top: 30px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.plain-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.login form {
  display: flex;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}
.login label {
  flex-basis: 100%;
}
.login input {
  padding: 14px;
  min-width: 0;
  background: #fff;
  color: #000;
}
.login button:disabled {
  opacity: 0.5;
}
.answer:empty {
  display: none;
}
.nav-end {
  flex-wrap: wrap;
}
.nav-end .logout {
  font-size: 11px;
}
.editor-actions #retry {
  color: #ad3c24;
}
.editor-actions #cancel {
  color: #ad3c24;
}
.editor-body {
  overflow: auto;
}
.context div {
  min-width: 0;
}

/* Conversation and composer share the left panel; code never displaces the chat. */
.source-note {
  margin: 0;
  padding: 9px var(--cell);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.masthead > .cell:first-child,
.masthead .cell:nth-child(2),
.masthead .cell:nth-child(3) {
  padding-top: 12px;
  padding-bottom: 12px;
}
h1 {
  font-size: clamp(40px, 4vw, 60px);
  margin-top: 8px;
}
.chat-panel {
  background: var(--paper);
  color: #111;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: clamp(540px, calc(100dvh - 260px), 950px);
}
.chat-panel > .pane-head {
  flex-shrink: 0;
}
.chat-panel > .status {
  margin: 0;
  padding: 0 var(--cell);
  color: #555;
}
.chat-panel > .status:empty {
  display: none;
}
.chat-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 160px;
  overscroll-behavior: contain;
}
.chat-panel .editor {
  position: static;
  height: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--light-line);
  align-self: stretch;
}
.chat-panel .editor > .pane-head {
  height: 32px;
  border: 0;
  font-size: 10px;
}
.chat-panel .editor-body {
  padding: 8px var(--cell);
}
.chat-panel .editor textarea {
  min-height: 64px;
  max-height: 140px;
  resize: vertical;
}
.chat-panel .editor textarea::placeholder {
  font-size: 20px;
  letter-spacing: -0.4px;
}
.chat-panel .editor-note {
  padding-bottom: 4px;
}
.chat-panel .editor-actions {
  padding-top: 8px;
  padding-bottom: 8px;
  border-top: 0;
}
.chat-panel .send-disclosure {
  padding-top: 6px;
  padding-bottom: 6px;
}
.chat-panel .attachments {
  margin-bottom: 8px;
  max-height: 84px;
}
.chat-panel .attachments:empty {
  display: none;
}
.chat-panel .answer {
  padding-top: 20px;
}
.chat-panel .answer p {
  color: #222;
  font-size: 16px;
}
.chat-panel .answer .status {
  color: #777;
  font-size: 11px;
}
.chat-panel .answer .submitted-question {
  color: #555;
  background: #f3f3f3;
  border: 0;
  padding: 12px 14px;
}
.chat-panel .turn + .turn {
  border-color: var(--light-line);
}
.chat-panel .empty {
  min-height: 170px;
  padding: 24px var(--cell);
}
.chat-panel .empty h2 {
  font-size: 30px;
  margin-bottom: 12px;
}
.response {
  height: clamp(540px, calc(100dvh - 260px), 950px);
}
.response > .pane-head,
.response-bottom {
  flex-shrink: 0;
}
#artifacts {
  overflow: auto;
  flex: 1;
}
#artifacts pre {
  white-space: pre;
  overflow-x: auto;
  overflow-wrap: normal;
}
#artifacts .code-head {
  position: sticky;
  top: -28px;
  background: #000;
}
@media (max-width: 700px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .chat-panel {
    height: 680px;
    max-height: none;
  }
  .response {
    height: auto;
    min-height: 260px;
    max-height: 700px;
  }
  .source-note {
    font-size: 11px;
  }
  .chat-panel .editor textarea {
    min-height: 64px;
  }
}

.copy-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  max-width: 60%;
}
.answer .copy-feedback {
  margin: 0;
  font-size: 12px;
  color: #ddd;
  text-align: right;
}
.manual-copy {
  width: 100%;
  min-height: 130px;
  padding: 12px;
  background: #fff;
  color: #111;
  border: 2px solid var(--accent);
  font: 13px/1.5 var(--mono);
}

/* Blue keeps the explicit repo label distinct at readable contrast on the white chat. */
.chat-panel .answer .repo-pointer {
  color: var(--accent);
}
.chat-panel .plain-text code {
  font-family: var(--mono);
  font-size: 0.92em;
}
