.topbar { border-bottom: 1px solid var(--border); margin-bottom: var(--space-6); }
.topbar nav { padding-block: var(--space-3); }
.brand { font-weight: 600; text-decoration: none; color: var(--foreground); }
.muted { color: var(--muted-foreground); }
.narrow { max-width: 28rem; margin-inline: auto; }
.wrap { flex-wrap: wrap; }
.items-end { align-items: flex-end; }
.push-right { margin-left: auto; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.budget { width: 6rem; }
.budget.small { width: 4.5rem; padding-block: 0; }
form.inline { display: inline; }
.mono { font-family: ui-monospace, monospace; font-size: 0.9em; }
section.card, article.card { margin-bottom: var(--space-6); }
.title { margin: 0; overflow-wrap: anywhere; }
.meta { color: var(--muted-foreground); font-size: 0.9em; margin-block: var(--space-2); }
.prs { margin-block: var(--space-2); }

.log { display: flex; flex-direction: column; gap: var(--space-3); margin-block: var(--space-6); }
.ev { overflow-wrap: anywhere; }
.ev-user .who { font-size: 0.85em; color: var(--muted-foreground); margin-bottom: var(--space-1); }
.ev-assistant { padding-inline: var(--space-2); }
.ev-tool { font-size: 0.85em; color: var(--muted-foreground); padding-inline: var(--space-2); }
.ev-tool .tool { font-weight: 600; }
.ev-tool pre { max-height: 24rem; overflow: auto; font-size: 0.9em; }
.ev-error summary { color: var(--danger); }
.ev-system { font-size: 0.85em; color: var(--muted-foreground); padding-inline: var(--space-2); }
.ev-result { border-top: 1px dashed var(--border); padding-top: var(--space-2); }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md pre { overflow-x: auto; }
.composer { position: sticky; bottom: var(--space-4); }

/* Compact tool lines instead of oat's accordion look. */
details.ev-tool { border: 0; border-radius: 0; margin: 0; }
details.ev-tool + details.ev-tool { margin-top: calc(-1 * var(--space-2)); }
details.ev-tool[open] summary { border-bottom: 0; }
details.ev-tool summary {
  display: block; padding: var(--space-1) var(--space-2); font-weight: normal;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: var(--radius-small);
}
details.ev-tool summary::after { display: none; }
details.ev-tool summary code { background: none; padding: 0; }
.log .card { margin: 0; }
