/* Harness: Preview answer actions (how it answered, save as test) and the chat trace page. */
.msg-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 13px; }
.msg-actions a { text-decoration: none; }
.msg-actions a:hover { text-decoration: underline; }
.trace { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; max-width: 900px; }
.trace-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.trace-tool { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; margin: 8px 0; }
.trace-tool summary { cursor: pointer; font-weight: 600; }
.trace-tool pre, .trace-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; max-height: 320px;
  overflow: auto; background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin: 4px 0; }
/* Evaluate tab: score over time (no inline styles under the CSP, so widths are classes w0 … w100) */
.trend { list-style: none; padding: 0; margin: 8px 0 14px; display: grid; gap: 6px; }
.trend li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.trend-label { min-width: 150px; font-weight: 600; }
.trend-bar { width: 160px; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.trend-fill { display: block; height: 100%; border-radius: 999px; }
.trend-fill.ok { background: #16a34a; } .trend-fill.warn { background: #f59e0b; } .trend-fill.bad { background: #dc2626; }
.trend-score { min-width: 54px; font-variant-numeric: tabular-nums; }
.w0 { width: 2%; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
/* Analytics page */
.an-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 14px 0; }
.an-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; }
.an-tile strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.an-chart { width: 100%; height: auto; max-height: 220px; display: block; }
.an-use { fill: var(--accent); } .an-cost { fill: #f59e0b; }
.an-axis { stroke: var(--line); stroke-width: 1; }
.an-day { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.an-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: middle; }
span.an-key.an-use { background: var(--accent); } span.an-key.an-cost { background: #f59e0b; }
