/* Scoped copy of @earendil-works/pi-coding-agent@1.4.0 dist/core/export-html/template.css (MIT): message, tool,
   markdown and code rules only, each under .pi-thread. Generated by the spike's scope step; do not edit by hand. */
.pi-thread * { margin: 0; padding: 0; box-sizing: border-box; }
.pi-thread .message-timestamp {
      font-size: 10px;
      color: var(--dim);
      opacity: 0.8;
    }
.pi-thread .user-message {
      background: var(--userMessageBg);
      color: var(--userMessageText);
      padding: var(--line-height);
      border-radius: 4px;
      position: relative;
    }
.pi-thread .assistant-message {
      padding: 0;
      position: relative;
    }
.pi-thread .user-message:hover .copy-link-btn, .pi-thread .assistant-message:hover .copy-link-btn, .pi-thread .skill-user-entry:hover .copy-link-btn {
      opacity: 1;
    }
.pi-thread .user-message.highlight, .pi-thread .assistant-message.highlight {
      animation: highlight-pulse 2s ease-out;
    }
@keyframes highlight-pulse {
      0% {
        box-shadow: 0 0 0 3px var(--accent);
      }
      100% {
        box-shadow: 0 0 0 0 transparent;
      }
    }
.pi-thread .assistant-message > .message-timestamp {
      padding-left: var(--line-height);
    }
.pi-thread .assistant-text {
      padding: var(--line-height);
      padding-bottom: 0;
    }
.pi-thread .message-timestamp + .assistant-text, .pi-thread .message-timestamp + .thinking-block {
      padding-top: 0;
    }
.pi-thread .thinking-block + .assistant-text {
      padding-top: 0;
    }
.pi-thread .thinking-text {
      padding: var(--line-height);
      color: var(--thinkingText);
      font-style: italic;
      white-space: pre-wrap;
    }
.pi-thread .message-timestamp + .thinking-block .thinking-text, .pi-thread .message-timestamp + .thinking-block .thinking-collapsed {
      padding-top: 0;
    }
.pi-thread .thinking-collapsed {
      display: none;
      padding: var(--line-height);
      color: var(--thinkingText);
      font-style: italic;
    }
.pi-thread .tool-execution {
      padding: var(--line-height);
      border-radius: 4px;
    }
.pi-thread .tool-execution + .tool-execution {
      margin-top: var(--line-height);
    }
.pi-thread .assistant-text + .tool-execution {
      margin-top: var(--line-height);
    }
.pi-thread .tool-execution.pending { background: var(--toolPendingBg); }
.pi-thread .tool-execution.success { background: var(--toolSuccessBg); }
.pi-thread .tool-execution.error { background: var(--toolErrorBg); }
.pi-thread .tool-header, .pi-thread .tool-name {
      font-weight: bold;
    }
.pi-thread .tool-path {
      color: var(--accent);
      word-break: break-all;
    }
.pi-thread .line-numbers {
      color: var(--warning);
    }
.pi-thread .line-count {
      color: var(--dim);
    }
.pi-thread .tool-command {
      font-weight: bold;
      white-space: pre-wrap;
      word-wrap: break-word;
      overflow-wrap: break-word;
      word-break: break-word;
    }
.pi-thread .tool-output {
      margin-top: var(--line-height);
      color: var(--toolOutput);
      word-wrap: break-word;
      overflow-wrap: break-word;
      word-break: break-word;
      font-family: inherit;
      overflow-x: auto;
    }
.pi-thread .tool-output > div, .pi-thread .output-preview > div, .pi-thread .output-full > div {
      margin: 0;
      padding: 0;
      line-height: var(--line-height);
    }
.pi-thread .tool-output > div:not(.output-preview):not(.output-full), .pi-thread .output-preview > div:not(.expand-hint), .pi-thread .output-full > div:not(.expand-hint) {
      white-space: pre-wrap;
    }
.pi-thread .tool-output pre {
      margin: 0;
      padding: 0;
      font-family: inherit;
      color: inherit;
      white-space: pre-wrap;
      word-wrap: break-word;
      overflow-wrap: break-word;
    }
.pi-thread .tool-output code {
      padding: 0;
      background: none;
      color: var(--text);
    }
.pi-thread .tool-output.expandable {
      cursor: pointer;
    }
.pi-thread .tool-output.expandable:hover {
      opacity: 0.9;
    }
.pi-thread .tool-output.expandable .output-full {
      display: none;
    }
.pi-thread .tool-output.expandable.expanded .output-preview {
      display: none;
    }
.pi-thread .tool-output.expandable.expanded .output-full {
      display: block;
    }
.pi-thread .ansi-line {
      white-space: pre;
    }
.pi-thread .tool-images {
    }
.pi-thread .tool-image {
      max-width: 100%;
      max-height: 500px;
      border-radius: 4px;
      margin: var(--line-height) 0;
    }
.pi-thread .expand-hint {
      color: var(--toolOutput);
    }
.pi-thread .tool-diff {
      font-size: 11px;
      overflow-x: auto;
      white-space: pre;
    }
.pi-thread .diff-added { color: var(--toolDiffAdded); }
.pi-thread .diff-removed { color: var(--toolDiffRemoved); }
.pi-thread .diff-context { color: var(--toolDiffContext); }
.pi-thread .model-change {
      padding: 0 var(--line-height);
      color: var(--dim);
      font-size: 11px;
    }
.pi-thread .model-name {
      color: var(--borderAccent);
      font-weight: bold;
    }
.pi-thread .compaction {
      background: var(--customMessageBg);
      border-radius: 4px;
      padding: var(--line-height);
      cursor: pointer;
    }
.pi-thread .compaction-label {
      color: var(--customMessageLabel);
      font-weight: bold;
    }
.pi-thread .compaction-collapsed {
      color: var(--customMessageText);
    }
.pi-thread .compaction-content {
      display: none;
      color: var(--customMessageText);
      white-space: pre-wrap;
      margin-top: var(--line-height);
    }
.pi-thread .compaction.expanded .compaction-collapsed {
      display: none;
    }
.pi-thread .compaction.expanded .compaction-content {
      display: block;
    }
.pi-thread .system-prompt {
      background: var(--customMessageBg);
      padding: var(--line-height);
      border-radius: 4px;
      margin-bottom: var(--line-height);
    }
.pi-thread .system-prompt.expandable {
      cursor: pointer;
    }
.pi-thread .system-prompt-header {
      font-weight: bold;
      color: var(--customMessageLabel);
    }
.pi-thread .system-prompt-preview {
      color: var(--customMessageText);
      white-space: pre-wrap;
      word-wrap: break-word;
      font-size: 11px;
      margin-top: var(--line-height);
    }
.pi-thread .system-prompt-expand-hint {
      color: var(--muted);
      font-style: italic;
      margin-top: 4px;
    }
.pi-thread .system-prompt-full {
      display: none;
      color: var(--customMessageText);
      white-space: pre-wrap;
      word-wrap: break-word;
      font-size: 11px;
      margin-top: var(--line-height);
    }
.pi-thread .system-prompt.expanded .system-prompt-preview, .pi-thread .system-prompt.expanded .system-prompt-expand-hint {
      display: none;
    }
.pi-thread .system-prompt.expanded .system-prompt-full {
      display: block;
    }
.pi-thread .system-prompt.provider-prompt {
      border-left: 3px solid var(--warning);
    }
.pi-thread .system-prompt-note {
      font-size: 10px;
      font-style: italic;
      color: var(--muted);
      margin-top: 4px;
    }
.pi-thread .tools-list {
      background: var(--customMessageBg);
      padding: var(--line-height);
      border-radius: 4px;
      margin-bottom: var(--line-height);
    }
.pi-thread .tools-header {
      font-weight: bold;
      color: var(--customMessageLabel);
      margin-bottom: var(--line-height);
    }
.pi-thread .tool-item {
      font-size: 11px;
    }
.pi-thread .tool-item-name {
      font-weight: bold;
      color: var(--text);
    }
.pi-thread .tool-item-desc {
      color: var(--dim);
    }
.pi-thread .tool-params-hint {
      color: var(--muted);
      font-style: italic;
    }
.pi-thread .tool-item:has(.tool-params-hint) {
      cursor: pointer;
    }
.pi-thread .tool-params-hint::after {
      content: '[click to show parameters]';
    }
.pi-thread .tool-item.params-expanded .tool-params-hint::after {
      content: '[hide parameters]';
    }
.pi-thread .tool-params-content {
      display: none;
      margin-top: 4px;
      margin-left: 12px;
      padding-left: 8px;
      border-left: 1px solid var(--dim);
    }
.pi-thread .tool-item.params-expanded .tool-params-content {
      display: block;
    }
.pi-thread .tool-param {
      margin-bottom: 4px;
      font-size: 11px;
    }
.pi-thread .tool-param-name {
      font-weight: bold;
      color: var(--text);
    }
.pi-thread .tool-param-type {
      color: var(--dim);
      font-style: italic;
    }
.pi-thread .tool-param-required {
      color: var(--warning, #e8a838);
      font-size: 10px;
    }
.pi-thread .tool-param-optional {
      color: var(--dim);
      font-size: 10px;
    }
.pi-thread .tool-param-desc {
      color: var(--dim);
      margin-left: 8px;
    }
.pi-thread .hook-message {
      background: var(--customMessageBg);
      color: var(--customMessageText);
      padding: var(--line-height);
      border-radius: 4px;
    }
.pi-thread .hook-type {
      color: var(--customMessageLabel);
      font-weight: bold;
    }
.pi-thread .skill-invocation {
      background: var(--customMessageBg);
      border-radius: 4px;
      padding: var(--line-height);
      cursor: pointer;
    }
.pi-thread .skill-invocation-label {
      color: var(--customMessageLabel);
      font-weight: bold;
    }
.pi-thread .skill-invocation-collapsed {
      color: var(--customMessageText);
    }
.pi-thread .skill-invocation-content {
      display: none;
      color: var(--customMessageText);
      margin-top: var(--line-height);
    }
.pi-thread .skill-invocation.expanded .skill-invocation-collapsed {
      display: none;
    }
.pi-thread .skill-invocation.expanded .skill-invocation-content {
      display: block;
    }
.pi-thread .skill-invocation + .user-message {
      margin-top: var(--line-height);
    }
.pi-thread .skill-user-entry {
      position: relative;
    }
.pi-thread .branch-summary {
      background: var(--customMessageBg);
      padding: var(--line-height);
      border-radius: 4px;
    }
.pi-thread .branch-summary-header {
      font-weight: bold;
      color: var(--borderAccent);
    }
.pi-thread .error-text {
      color: var(--error);
      padding: 0 var(--line-height);
    }
.pi-thread .tool-error {
      color: var(--error);
    }
.pi-thread .message-images {
      margin-bottom: 12px;
    }
.pi-thread .message-image {
      max-width: 100%;
      max-height: 400px;
      border-radius: 4px;
      margin: var(--line-height) 0;
    }
.pi-thread .markdown-content h1, .pi-thread .markdown-content h2, .pi-thread .markdown-content h3, .pi-thread .markdown-content h4, .pi-thread .markdown-content h5, .pi-thread .markdown-content h6 {
      color: var(--mdHeading);
      margin: var(--line-height) 0 0 0;
      font-weight: bold;
    }
.pi-thread .markdown-content h1 { font-size: 1em; }
.pi-thread .markdown-content h2 { font-size: 1em; }
.pi-thread .markdown-content h3 { font-size: 1em; }
.pi-thread .markdown-content h4 { font-size: 1em; }
.pi-thread .markdown-content h5 { font-size: 1em; }
.pi-thread .markdown-content h6 { font-size: 1em; }
.pi-thread .markdown-content p { margin: 0; }
.pi-thread .markdown-content p + p { margin-top: var(--line-height); }
.pi-thread .markdown-content a {
      color: var(--mdLink);
      text-decoration: underline;
    }
.pi-thread .markdown-content code {
      background: rgba(128, 128, 128, 0.2);
      color: var(--mdCode);
      padding: 0 4px;
      border-radius: 3px;
      font-family: inherit;
    }
.pi-thread .markdown-content pre {
      background: transparent;
      margin: var(--line-height) 0;
      overflow-x: auto;
    }
.pi-thread .markdown-content pre code {
      display: block;
      background: none;
      color: var(--text);
    }
.pi-thread .markdown-content blockquote {
      border-left: 3px solid var(--mdQuoteBorder);
      padding-left: var(--line-height);
      margin: var(--line-height) 0;
      color: var(--mdQuote);
      font-style: italic;
    }
.pi-thread .markdown-content ul, .pi-thread .markdown-content ol {
      margin: var(--line-height) 0;
      padding-left: calc(var(--line-height) * 2);
    }
.pi-thread .markdown-content li { margin: 0; }
.pi-thread .markdown-content li::marker { color: var(--mdListBullet); }
.pi-thread .markdown-content hr {
      border: none;
      border-top: 1px solid var(--mdHr);
      margin: var(--line-height) 0;
    }
.pi-thread .markdown-content table {
      border-collapse: collapse;
      margin: 0.5em 0;
      width: 100%;
    }
.pi-thread .markdown-content th, .pi-thread .markdown-content td {
      border: 1px solid var(--mdCodeBlockBorder);
      padding: 6px 10px;
      text-align: left;
    }
.pi-thread .markdown-content th {
      background: rgba(128, 128, 128, 0.1);
      font-weight: bold;
    }
.pi-thread .markdown-content img {
      max-width: 100%;
      border-radius: 4px;
    }
.pi-thread .hljs { background: transparent; color: var(--text); }
.pi-thread .hljs-comment, .pi-thread .hljs-quote { color: var(--syntaxComment); }
.pi-thread .hljs-keyword, .pi-thread .hljs-selector-tag { color: var(--syntaxKeyword); }
.pi-thread .hljs-number, .pi-thread .hljs-literal { color: var(--syntaxNumber); }
.pi-thread .hljs-string, .pi-thread .hljs-doctag { color: var(--syntaxString); }
.pi-thread .hljs-function, .pi-thread .hljs-title, .pi-thread .hljs-title.function_, .pi-thread .hljs-section, .pi-thread .hljs-name { color: var(--syntaxFunction); }
.pi-thread .hljs-type, .pi-thread .hljs-class, .pi-thread .hljs-title.class_, .pi-thread .hljs-built_in { color: var(--syntaxType); }
.pi-thread .hljs-attr, .pi-thread .hljs-variable, .pi-thread .hljs-variable.language_, .pi-thread .hljs-params, .pi-thread .hljs-property { color: var(--syntaxVariable); }
.pi-thread .hljs-meta, .pi-thread .hljs-meta .hljs-keyword, .pi-thread .hljs-meta .hljs-string { color: var(--syntaxKeyword); }
.pi-thread .hljs-operator { color: var(--syntaxOperator); }
.pi-thread .hljs-punctuation { color: var(--syntaxPunctuation); }
.pi-thread .hljs-subst { color: var(--text); }
