/* Shared reading scale for the Agent sidebar, history and inline reviews. */
:root { --agent-panel: clamp(520px, 32vw, 600px); }

html:root #sog-agent-panel { font-size: 16px; line-height: 1.65; }
html:root #sog-agent-panel .agent-panel-title strong { font-size: 18px; font-weight: 650; }
html:root #sog-agent-panel .agent-panel-title small { font-size: 13px; line-height: 1.4; }
html:root #sog-agent-panel .agent-panel-tools button { width: 32px; height: 32px; }
html:root #sog-agent-panel .agent-thread { padding: 28px 24px; }
html:root #sog-agent-panel .agent-message-body,
html:root #sog-agent-panel .agent-message-body > p { font-size: 16px; line-height: 1.75; }
html:root #sog-agent-panel .agent-message-body :is(pre, code, table) { font-size: 14px; line-height: 1.65; }
html:root #sog-agent-panel .agent-answer-meta { font-size: 12px; line-height: 1.5; }
html:root #sog-agent-panel .agent-source-list span { font-size: 12px; line-height: 1.5; }
html:root #sog-agent-panel .agent-answer-action { font-size: 14px; min-height: 36px; }

/* Keep the history easy to scan without turning metadata into headings. */
html:root #sog-agent-panel .agent-history-head { padding: 12px 16px 10px; }
html:root #sog-agent-panel .agent-history-tabs button { font-size: 14px; min-height: 34px; }
html:root #sog-agent-panel .agent-history-tabs b { font-size: 12px; }
html:root #sog-agent-panel .agent-history-search { height: 40px; margin: 0 16px 12px; }
html:root #sog-agent-panel .agent-history-search input { font-size: 15px; }
html:root #sog-agent-panel .agent-history-list { padding: 0 12px 18px; }
html:root #sog-agent-panel .agent-history-list h4 { font-size: 11px; margin: 16px 0 8px; }
html:root #sog-agent-panel .agent-history-open { padding: 11px 10px; gap: 4px; }
html:root #sog-agent-panel .agent-history-open strong { font-size: 15px; font-weight: 600; line-height: 1.5; }
html:root #sog-agent-panel .agent-history-open small { font-size: 12px; line-height: 1.5; }
html:root #sog-agent-panel .agent-history-actions button { width: 28px; height: 28px; }
html:root #sog-agent-panel .agent-history-example summary { padding: 14px; }
html:root #sog-agent-panel .agent-history-example summary strong { font-size: 17px; font-weight: 650; line-height: 1.4; }
html:root #sog-agent-panel .agent-history-example summary small { font-size: 13px; line-height: 1.5; }
html:root #sog-agent-panel .agent-history-example-body { padding: 0 16px 16px; font-size: 15px; line-height: 1.7; }
html:root #sog-agent-panel .agent-history-example-body .agent-history-example-limit,
html:root #sog-agent-panel .agent-history-note,
html:root #sog-agent-panel .agent-archive-clear { font-size: 13px; }
html:root #sog-agent-panel .agent-history-row.is-renaming input { height: 36px; font-size: 15px; }
html:root #sog-agent-panel .agent-history-row.is-confirming :is(p, button) { font-size: 14px; }

/* One primary comment field, with readable secondary details. */
html:root #sog-agent-panel .kr-inline { padding: 20px; font-size: 15px; line-height: 1.65; }
html:root #sog-agent-panel .kr-inline h2 { font-size: 24px; }
html:root #sog-agent-panel .kr-inline blockquote { font-size: 14px; line-height: 1.65; }
html:root #sog-agent-panel .kr-inline label > span { font-size: 14px; }
html:root #sog-agent-panel .kr-inline :is(textarea, input:not([type=checkbox]), select),
html:root #sog-agent-panel .kr-inline #kr-comment { font-size: 16px; line-height: 1.65; }
html:root #sog-agent-panel .kr-inline textarea { min-height: 120px; }
html:root #sog-agent-panel .kr-inline textarea::placeholder { font-size: 15px; }
html:root #sog-agent-panel .kr-inline :is(details, .kr-muted, .kr-check),
html:root #sog-agent-panel .kr-inline .kr-inline-options > summary { font-size: 13px; line-height: 1.65; }
html:root #sog-agent-panel .kr-inline .kr-inline-footer > .kr-primary { font-size: 14px; min-height: 40px; }
html:root #sog-agent-panel .kr-receipt { font-size: 14px; }
html:root #sog-agent-panel .kr-receipt :is(.kr-muted, button) { font-size: 13px; }
html:root #sog-agent-panel .kr-example-steps { font-size: 15px; line-height: 1.8; }
html:root #sog-agent-panel .kr-example-question,
html:root #sog-agent-panel .kr-example-answer > p { font-size: 16px; line-height: 1.7; }
html:root #sog-agent-panel :is(.kr-example-language, .kr-example-language button, .kr-example-step, .kr-example-answer small) { font-size: 12px; }
html:root #sog-agent-panel :is(.kr-example-answer > button, .kr-example-actions button) { font-size: 14px; min-height: 36px; }
html:root #sog-agent-panel .kr-pinned-example .kr-inline-footer small { font-size: 12px !important; }

/* Input and shortcuts share the same scale as the conversation. */
html:root #sog-agent-panel .agent-composer { display: flex; flex-wrap: wrap; align-items: center; }
html:root #sog-agent-panel .agent-composer > :is(.sog-attach-row, .sog-voice-row, .compose-row, footer, .sog-attach-tray) { flex: 1 0 100%; box-sizing: border-box; min-width: 0; }
html:root #sog-agent-panel .agent-composer > .sog-attach-tray[hidden] { display: none; }
html:root #sog-agent-panel .agent-composer > :is(.recipe-agent-bar, .agent-project-document-row, .kr-composer-tip) { flex: 0 1 auto; max-width: 100%; padding: 4px 8px; }
/* Align icons with the text block, including when the message grows to multiple lines. */
html:root #sog-agent-panel .agent-composer > div:has(> textarea) { align-items: center; }
html:root #sog-agent-panel .agent-composer :is(.agent-context-button, .sog-attach-button, .sog-voice-mic, .agent-send) { padding: 0; }
html:root #sog-agent-panel .agent-composer textarea { box-sizing: border-box; font-size: 16px; line-height: 24px; min-height: 44px; max-height: 160px; padding: 10px 3px; }
html:root #sog-agent-panel .agent-composer footer { font-size: 12px; line-height: 1.5; flex-wrap: wrap; }
html:root #sog-agent-panel :is(.recipe-agent-bar, .agent-project-document-row) > button { font-size: 13px; line-height: 1.5; }
html:root #sog-agent-panel .kr-composer-tip button { font-size: 13px !important; line-height: 1.5; }
html:root #sog-agent-panel #agent-modeling-link { font-size: 13px !important; }
html:root #sog-agent-panel .agent-starters > button strong { font-size: 15px; }
html:root #sog-agent-panel .agent-starters > button small { font-size: 13px; }

@media (max-width: 760px) {
  html:root #sog-agent-panel { width: 100vw; max-width: 100vw; }
  html:root #sog-agent-panel .agent-thread { padding: 22px 16px; }
  html:root #sog-agent-panel .kr-inline { padding: 16px; }
  html:root #sog-agent-panel .agent-history-example-body { padding-inline: 12px; }
}
