/* Code as VS Code shows it, in the chat: a command, a build's script, an answer's fenced code - each on a code surface
   of its own, coloured by VS Code's own tokenizers (monaco.js colorize: Dark+ on #1e1e1e, Light+ on a soft white),
   with what a command printed below it as a terminal shows it. The owner, 2026-10-03: "code in vs code ... ours is
   like black and white textbook". Loaded last: these rules are the word on code. */

:root {
  --code-surface: #fbfbfa;
  --code-edge: #e4e4df;
  --code-ink: #1f2328;
  --code-faint: #6e7781;
  --out-surface: #f4f4f1;
  --out-good: #1a7f37;
  --out-bad: #cf222e;
}
:root[data-theme="dark"], :root[data-theme="obsidian"] {
  --code-surface: #1e1e1e;
  --code-edge: #2e2e2e;
  --code-ink: #d4d4d4;
  --code-faint: #8b949e;
  --out-surface: #151515;
  --out-good: #3fb950;
  --out-bad: #f85149;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --code-surface: #1e1e1e;
    --code-edge: #2e2e2e;
    --code-ink: #d4d4d4;
    --code-faint: #8b949e;
    --out-surface: #151515;
    --out-good: #3fb950;
    --out-bad: #f85149;
  }
}

/* an opened step: no box around the boxes - the code and its output are the shapes */
.w-chip-body { border: none; background: transparent; padding: 2px 0 8px 22px; }

/* a command or a script: one block of code, a gutter mark before it ($ for a shell, PS for Windows) */
.w-cmd { display: flex; align-items: flex-start; gap: 8px; white-space: normal; }
.w-cmd .sigil { flex: none; min-width: 16px; padding-top: 11px; font-family: var(--mono); font-size: 11px; color: var(--code-faint); }
.w-cmd .folded, .w-cmd > .w-codeblock { flex: 1; min-width: 0; display: block; }
.w-chip-body code.w-codeblock, .w-script code.w-codeblock, code.w-codeblock {
  display: block; margin: 0; padding: 10px 14px; border: 1px solid var(--code-edge); border-radius: 8px;
  background: var(--code-surface); color: var(--code-ink); font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  white-space: pre; overflow-x: auto; tab-size: 4; box-shadow: none;
}
.w-cmd .folded .fold-btn, .w-script .fold-btn { margin-top: 6px; }
.w-script { display: block; }
.w-script-head { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.w-script-head .lang { flex: none; padding: 1px 7px; border-radius: 5px; font-family: var(--mono); font-size: 11px; background: var(--signal-soft); color: var(--signal-ink); }
.w-script-head .on { flex: none; color: var(--code-faint); }
.w-script-head .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-weight: 500; }

/* what it printed: a terminal's well, a build's verdict and a failure in their colours */
.w-out-label { margin: 10px 0 4px; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--code-faint); }
.w-chip-body pre.w-out, pre.w-out {
  margin: 0; padding: 9px 14px; border: 1px solid var(--code-edge); border-radius: 8px; background: var(--out-surface);
  color: var(--code-ink); opacity: .94; font-family: var(--mono); font-size: 12px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto;
}
pre.w-out .ln.good { color: var(--out-good); }
pre.w-out .ln.bad { color: var(--out-bad); }

/* an answer's fenced code: the same surface and colours */
.answer pre, .says pre, .md pre {
  margin: 10px 0; padding: 10px 14px; border: 1px solid var(--code-edge); border-radius: 8px;
  background: var(--code-surface); overflow-x: auto;
}
.answer pre code, .says pre code, .md pre code {
  display: block; padding: 0; border: none; background: none; color: var(--code-ink);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6; white-space: pre;
}
