/* app.css — plain, readable, no framework. Colours carry state: green ok, yellow caution, red problem or unknown, grey none. */
body { font: 15px/1.45 system-ui, sans-serif; margin: 0; color: #1d1d1f; background: #fafafa; }
nav { display: flex; gap: 1em; align-items: center; padding: .6em 1.2em; background: #23272e; color: #eee; }
nav a { color: #9cf; text-decoration: none; }
nav .who { color: #aaa; }
/* The header stays at the top of the window while the page scrolls. */
nav { position: sticky; top: 0; z-index: 10; }
/* My tasks (pages/my-tasks.ts): a coloured count; the dropdown lists the cards. */
nav .my-tasks { margin-left: auto; position: relative; }
nav .my-tasks summary { list-style: none; cursor: pointer; padding: .15em .6em; border-radius: 1em; font-weight: bold; color: #111; background: #888; }
nav .my-tasks summary::-webkit-details-marker { display: none; }
nav .my-tasks.green summary { background: #4caf50; }
nav .my-tasks.yellow summary { background: #fbc02d; }
nav .my-tasks.red summary { background: #e53935; color: #fff; }
nav .my-tasks .menu { position: absolute; right: 0; top: 2em; min-width: 22em; max-height: 60vh; overflow-y: auto; background: #fff; color: #1d1d1f; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,.2); padding: .4em 0; }
nav .my-tasks .menu a { display: block; padding: .3em .8em; color: #1565c0; }
nav .my-tasks .menu a:hover { background: #f0f4ff; }
nav .my-tasks .menu .state { color: #888; font-size: .85em; margin-right: .4em; }
nav .my-tasks .menu p { margin: .3em .8em; color: #888; }
nav .project-switch { font: inherit; font-weight: bold; background: #23272e; color: #eee; border: 1px solid #555; border-radius: 3px; padding: .1em .3em; }
main { padding: 1em 1.4em; max-width: 1200px; }
h1 { font-size: 1.4em; }
h2 { font-size: 1.1em; margin-top: 1.6em; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { text-align: left; vertical-align: top; padding: .35em .6em; border-bottom: 1px solid #e3e3e3; }
th { font-weight: 600; color: #555; }
.muted { color: #777; font-size: .9em; }
.err { color: #b00020; }
.body { white-space: pre-wrap; word-break: break-word; }
.flash { padding: .5em .8em; border-radius: 4px; }
.flash.ok { background: #e6f4ea; }
.flash.err { background: #fde7e9; color: #8a0012; }
.badge, .state { display: inline-block; padding: 0 .5em; border-radius: 3px; font-size: .85em; background: #ddd; }
.green, .state.idle { background: #c8e6c9; }
.state.busy, .state.talk { background: #bbdefb; }
.yellow, .state.sleeping { background: #fff3c4; }
.red, .unknown, .state.error, .state.halted { background: #ffcdd2; }
.grey, .state.stopped { background: #e0e0e0; }
.log { list-style: none; padding: 0; }
.log li { background: #fff; margin: .4em 0; padding: .5em .8em; border-left: 3px solid #ccc; }
.log .origin-operator { border-color: #1976d2; }
.log .origin-tg { border-color: #43a047; }
.log .origin-machine { border-color: #8e24aa; }
.composer textarea, input { font: inherit; padding: .3em; }
.composer textarea { width: 100%; box-sizing: border-box; }
form.inline, td.actions form { display: inline; }
td.actions form { margin-right: .3em; }
.transcript { background: #fff; min-height: 12em; padding: .6em; margin-bottom: .6em; }
.transcript .line { white-space: pre-wrap; margin: .3em 0; }
.line.operator { color: #1565c0; }
.line.error { color: #b00020; }
/* A member's reply rendered as markdown (reply-markdown.ts): normal wrapping, compact blocks. */
.line .md { white-space: normal; }
.line .md > :first-child { margin-top: 0; }
.line .md > :last-child { margin-bottom: 0; }
.line .md p, .line .md ul, .line .md ol, .line .md pre, .line .md table, .line .md blockquote { margin: .4em 0; }
.line .md pre { background: #f4f4f4; padding: .5em; overflow-x: auto; white-space: pre; }
.line .md code { background: #f4f4f4; padding: 0 .2em; }
.line .md pre code { background: none; padding: 0; }
.line .md table { border-collapse: collapse; }
.line .md th, .line .md td { border: 1px solid #ccc; padding: .2em .5em; }
.line .md blockquote { border-left: 3px solid #ccc; margin-left: 0; padding-left: .7em; color: #555; }
.progress { background: #111; color: #ddd; padding: .6em; min-height: 3em; white-space: pre-wrap; }
pre.persona { white-space: pre-wrap; background: #fff; padding: .8em; }
.login label { display: block; margin: .5em 0; }
tr.problem td { background: #fff0f0; }
/* files view (pages/files.ts) */
a.button { display: inline-block; padding: 0 .5em; border: 1px solid #bbb; border-radius: 3px; background: #fff; text-decoration: none; font-size: .9em; }
.file-view { background: #fff; padding: .8em; }
pre.file-text { white-space: pre-wrap; word-break: break-word; margin: .3em 0; }
pre.jsonl-bad { background: #fff0f0; }
img.file-image { max-width: 100%; }
.notice { padding: .5em .8em; background: #fff3c4; border-radius: 4px; }
.thinking { color: #1565c0; font-size: .85em; }
.thinking::before { content: "● "; animation: thinking-pulse 1.2s ease-in-out infinite; }
@keyframes thinking-pulse { 50% { opacity: .2; } }
.dot-image { max-width: 100%; height: auto; background: #fff; border-radius: 4px; }
.file-audio { width: 100%; max-width: 40rem; }

.my-tasks .menu .group { margin: .4em 0 .1em; font-size: .8em; text-transform: uppercase; opacity: .7; }
.card-body { margin: .6em 0; padding: .4em .8em; border-left: 3px solid #ddd; }
/* the tree (pages/tree.ts, #0359) */
ul.tree { list-style: none; padding-left: 1.2em; border-left: 1px dotted #bbb; margin: .3em 0; }
ul.tree > li.node, ul.tree > li.node.gone { margin: .35em 0; }
li.node.gone > div:first-child { opacity: .75; }
ul.locks { margin: .2em 0 .2em 1em; padding: 0; list-style: square; font-size: .9em; }
