/* Round 2, items 13–18: objects keep their own character; the page stays white. */
:root{--component-accent:#375a4b;--component-quiet:#738078;--component-surface:#f4f6f4;--component-focus:#b1c3b7}

/* A companion beside the text, without a panel-sized background. */
.companion-pane,.focused .companion-pane{background:#fff;border:0;box-shadow:none;border-radius:0}
.companion-pane:before{display:none}
.companion-heading,.focused .companion-heading{background:#fff}
.companion-heading .secondary{color:#758078}
.identity-icon{background:#f0f4f0;border-radius:4px}
.identity-icon .tormie-mark i{background:var(--component-accent)}
.message.assistant p{color:var(--ink)}
.message .author{color:var(--component-accent);font-size:11px}
.message.user{background:var(--component-surface);border-radius:5px;padding:10px 13px;max-width:88%;margin-left:auto;width:fit-content;min-width:110px}
.message.user .author{font-size:11px;color:#7c8780;margin-bottom:5px}
.message.user p{color:var(--ink)}
.message-day{font-size:11px;color:#7f8982}

/* File identity is local to the attachment, never the whole record. */
.file-tile{background:#f5f7f5;border:0;border-radius:4px;padding:9px 11px;gap:9px;max-width:100%;width:fit-content;font-size:12px;line-height:1.6;margin-bottom:11px}
.file-tile>div{min-width:0;overflow-wrap:anywhere}
.file-tile svg{height:22px;width:19px;color:#718279}
.file-tile small{font-size:11px;line-height:1.55;color:#7a857e;margin-top:2px}
.record-extra{font-size:11px;color:#837b6f;gap:7px;align-items:baseline}
.record-extra button{font-size:11px;color:var(--component-accent);padding:3px 6px;border-radius:3px}
.record-extra button:hover{background:#eef3ef}
.record-extra .error-dot{background:#a3947f;align-self:center}
.record-origin{font-size:11px;color:#748178}
.audio-line{justify-content:flex-start;gap:12px;padding:2px 0 8px;align-items:center}
.audio-line>span{font-size:11px;color:#77847b;line-height:1.6;white-space:nowrap}
.audio-wave{height:20px;gap:2px;min-width:78px}
.audio-wave i{width:2px;background:#7f9589;border-radius:2px;transform:scaleY(.8)}

/* Capture is a quiet, local surface with one deliberate primary action. */
.capture-idle{background:#f5f7f5;border-radius:4px;padding:10px 12px;min-height:54px}
.voice-button{gap:10px;font-size:13px;border-radius:4px}
.voice-icon{background:var(--component-accent);width:33px;height:33px;border-radius:4px}
.voice-icon svg{height:19px;width:19px}
.voice-button:hover .voice-icon{background:#4c6d5c}
.voice-button.recording .voice-icon{background:#795f51}
.capture-options .quiet-button{color:#66796d;font-size:12px}
.capture-options .iconbutton{color:#567161}
.capture-note{font-size:11px;line-height:1.65;color:#79857d}
.capture-editor{background:#f5f7f5;border:0;border-radius:4px;box-shadow:none}
.capture-editor:focus-within{border:0;box-shadow:0 0 0 1px var(--component-focus)}
.capture-editor textarea{font-size:15px;line-height:1.85}
.editor-top{font-size:11px;color:#718076}
.editor-bottom>span{font-size:11px;line-height:1.7;color:#738075}
.solid-button{background:var(--component-accent);border-radius:4px}
.solid-button:hover{background:#4b6b58}

/* Material and input share an axis. A source receives one visual signal. */
.chat-input-wrap{margin-left:17px;margin-right:17px}
.chat-input{background:#f5f7f5;border:0;border-radius:4px;padding:12px 13px 10px;box-shadow:none}
.chat-input:focus-within,.chat-input-wrap:has(.context-tray:not([hidden])) .chat-input:focus-within{background:#fff;border:0;box-shadow:0 0 0 1px var(--component-focus)}
.chat-input textarea{font-size:14px;line-height:1.85;min-height:52px}
.chat-input textarea::placeholder{color:#939e96}
.chat-input-bottom>span{font-size:11px;color:#7c8880}
.send-button{background:var(--component-accent);width:29px;height:29px;border-radius:4px}
.send-button:hover{background:#4c6c59}
.send-button:disabled{background:#a3b1a7;opacity:.6}
.context-tray{background:transparent;border:0;border-radius:0;padding:0;margin-bottom:10px;max-height:min(32dvh,270px);overflow:auto}
.context-tray .tray-header{font-size:11px;color:#708074;margin:0 0 8px;gap:10px;align-items:baseline;line-height:1.65}
.context-tray .tray-header button{font-size:11px;color:var(--component-accent);padding:3px 0;white-space:normal;text-align:right;flex-shrink:0}
.context-item{background:var(--component-surface);border:0;border-radius:4px;padding:9px 31px 9px 11px;margin:0 0 6px;position:relative}
.context-item:last-child{margin-bottom:0}
.context-item p{font-size:12px;line-height:1.85;color:#4a6656;-webkit-line-clamp:3}
.context-item .context-source{font-size:11px;color:#718575;line-height:1.8;margin-top:5px;text-align:left;white-space:normal}
.context-item>.iconbutton{width:27px;height:27px;right:1px;top:4px;color:#7b8b80}
.context-item>.iconbutton:hover{background:#e7eee8}
.sent-source,.message.user .sent-source{display:block;width:100%;border:0;border-radius:0;background:transparent;padding:0;margin:0 0 9px;font-size:12px;line-height:1.85;color:#496a56;white-space:normal;text-align:left}
.sent-source span{font-size:11px;color:#748a7a;line-height:1.8}
.sent-source:hover,.message.user .sent-source:hover{background:transparent;color:#254d37;text-decoration:underline;text-underline-offset:3px;text-decoration-color:#b5c8b9}
.proposal{background:#f3f6f2;border:0;border-radius:4px;margin-top:13px;box-shadow:none}
.proposal-header{padding:12px 13px 0;background:transparent;color:#6c806e;font-size:11px;line-height:1.65}
.proposal-body{padding:11px 13px}
.proposal-body p{font-size:13px;line-height:1.9;color:var(--ink)}
.proposal-source{font-size:11px;color:#5b7962;line-height:1.8;text-align:left;white-space:normal}
.proposal-footer{padding:0 13px 12px;align-items:baseline;gap:10px}
.proposal-footer>span{font-size:11px;color:#778575;line-height:1.65}
.proposal-footer button{font-size:11px;background:#e6eee4;color:var(--component-accent);border-radius:3px;padding:5px 8px;white-space:nowrap}
.proposal-footer button:hover{background:#dce8d9}

/* Understanding is read as paragraphs. Metadata stays next to its source. */
.memory-intro{font-size:12px;color:#7b847e;line-height:1.9;margin-bottom:26px}
.memory-intro .quiet-button{font-size:11px;color:#567260;padding-left:0}
.memory-card{background:transparent;border:0;border-radius:0;padding:0 0 27px;margin:0 0 5px;max-width:100%;box-shadow:none}
.memory-card .memory-meta{font-size:11px;color:#828b84;line-height:1.7;margin-bottom:9px;gap:12px}
.memory-card .memory-meta>span:last-child{white-space:nowrap}
.memory-card p{font-size:14px;line-height:1.95;margin-bottom:11px;color:var(--ink)}
.memory-card .memory-source{font-size:11px;line-height:1.8;color:#617f69;padding:3px 0;white-space:normal;text-align:left}
.memory-card .memory-source:hover{color:#2d5b3d;text-decoration:underline;text-underline-offset:3px;text-decoration-color:#b7cbb9}
.memory-card .memory-source svg{width:12px;height:12px;margin-right:5px;color:#809983}
.memory-card .memory-actions{margin-top:12px;gap:17px}
.memory-card .memory-actions button{font-size:11px;color:var(--component-accent);padding:3px 0}
.memory-card .memory-actions button:hover{text-decoration:underline;text-underline-offset:3px}
.source-preview{border:0;background:#f3f6f2;border-radius:4px;padding:10px 12px;color:#5b7462;font-size:12px;line-height:1.85}
.source-preview .muted{font-size:11px;color:#7a897c}
.source-highlight{background:#e1ecdd}
@media(max-width:899px){
.focused .companion-pane{background:#fff;border:0;border-radius:0;box-shadow:0 0 0 15px #fff}
.companion-heading .secondary{font-size:11px}
.message.user{max-width:90%;margin-left:auto;padding:10px 12px;width:fit-content;min-width:100px}
.message{font-size:14px;line-height:1.9}
.message .author,.message.user .author,.message-day{font-size:11px}
.file-tile{padding:9px 10px;gap:8px;font-size:12px;line-height:1.65;max-width:100%;margin-bottom:10px}
.file-tile small{font-size:11px;line-height:1.6}
.file-tile svg{height:21px;width:18px}
.audio-line{gap:10px;flex-wrap:wrap;padding-bottom:9px;row-gap:3px}
.audio-line>span{font-size:11px;line-height:1.6}
.record-origin,.record-extra,.record-extra button{font-size:11px}
.record-extra{flex-wrap:wrap;gap:5px}
.capture-idle{padding:9px 11px;min-height:52px}
.voice-icon{height:32px;width:32px}
.voice-button{font-size:13px}
.capture-options .quiet-button{font-size:11px}
.capture-note{font-size:10px;line-height:1.6}
.capture-editor textarea{font-size:15px;min-height:70px}
.editor-top{font-size:11px}
.editor-bottom>span{font-size:11px;line-height:1.6;max-width:200px}
.chat-input-wrap{margin-left:12px;margin-right:12px}
.chat-input{padding:11px 12px 10px}
.chat-input textarea{font-size:14px;min-height:52px}
.chat-input-bottom>span{font-size:11px}
.context-tray{max-height:29dvh;padding:0;margin-bottom:10px}
.context-tray .tray-header{font-size:11px;gap:7px;line-height:1.65;align-items:baseline}
.context-tray .tray-header button{font-size:11px;max-width:120px;line-height:1.65}
.context-item{padding:9px 30px 9px 10px}
.context-item p{font-size:12px;line-height:1.8;-webkit-line-clamp:3}
.context-item .context-source{font-size:11px;line-height:1.8}
.sent-source,.message.user .sent-source{font-size:12px;line-height:1.85}
.sent-source span{font-size:11px}
.proposal-header{font-size:11px;gap:10px;line-height:1.7}
.proposal-header>span:last-child{white-space:nowrap}
.proposal-body p{font-size:13px}
.proposal-source,.proposal-footer>span,.proposal-footer button{font-size:11px}
.memory-intro{font-size:12px;margin-bottom:24px}
.memory-card{background:transparent;padding:0 0 25px;margin-bottom:4px;border-radius:0}
.memory-card .memory-meta,.memory-card .memory-source,.memory-card .memory-actions button{font-size:11px}
.memory-card p{font-size:14px;line-height:1.95}
}
@media(prefers-contrast:more){
.file-tile small,.record-extra,.audio-line>span,.capture-note,.context-item .context-source,.sent-source span,.memory-card .memory-meta{color:#4d6555}
.context-item p,.sent-source,.message.user .sent-source,.memory-card .memory-source{color:#2f563b}
}
/* Read the understanding first, then its review state, sources and actions. */
.memory-card{display:flex;flex-direction:column;align-items:stretch}
.memory-card>p{order:0;margin:0 0 9px}
.memory-card>.memory-meta{order:1;justify-content:flex-start;gap:12px;margin:0 0 10px;font-size:11px}
.memory-card>.memory-source{order:2;align-self:flex-start}
.memory-card>.memory-actions{order:3;margin-top:11px}
.identity-icon{background:transparent;width:27px;height:30px;border-radius:0}
.identity-icon .tormie-mark{transform:none;width:20px;height:22px;color:var(--component-accent)}
.identity-icon .tormie-mark svg{width:20px;height:22px}

.chat-original{display:grid;gap:10px;max-width:100%;min-width:0}.chat-original-image{display:block;width:100%;max-width:320px;max-height:280px;object-fit:contain;border-radius:12px}.chat-original audio{max-width:100%;width:280px}.chat-original details p{white-space:pre-wrap;overflow-wrap:anywhere}.message-sources>summary{cursor:pointer;font-size:12px;min-height:32px}
