body:has(> .betty-workspace) { height:100dvh; display:flex; flex-direction:column; }
body:has(> .betty-workspace) > header { flex-shrink:0; }
.betty-workspace { --betty-line:#cfd6df; color:#17251f; background:#fff; display:grid; grid-template-rows:auto minmax(0,1fr); flex:1; min-height:0; margin:12px; border:1px solid var(--betty-line); }
.betty-workspace *, .betty-capture-editor * { box-sizing:border-box; letter-spacing:0; }
.betty-workspace button, .betty-capture-editor button { cursor:pointer; }
.betty-workspace [hidden], .betty-capture-editor [hidden] { display:none!important; }
.betty-workspace-header { display:flex; align-items:center; gap:12px; padding:9px 12px; border-bottom:1px solid var(--betty-line); }
.betty-workspace-header h1 { margin:0; font-size:20px; }
.betty-scope { display:grid; min-width:0; margin-right:auto; font-size:13px; }
.betty-scope strong, .betty-scope span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.betty-columns { --history-width:210px; --tray-width:290px; display:grid; grid-template-columns:var(--history-width) minmax(0,1fr) var(--tray-width); grid-template-areas:"history thread tray"; min-height:0; }
.betty-columns:has(.betty-conversations[hidden]) { --history-width:0px; }
.betty-columns:has(.betty-tray[hidden]) { --tray-width:0px; }
.betty-conversations, .betty-tray { min-width:0; overflow:auto; padding:10px; }
.betty-conversations { grid-area:history; border-right:1px solid var(--betty-line); }
.betty-tray { grid-area:tray; border-left:1px solid var(--betty-line); background:#f7f9f8; }
.betty-section-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:9px; }
.betty-section-heading h2 { font-size:15px; margin:0; }
.betty-conversation-list { display:grid; gap:4px; }
.betty-conversation-list button { border:1px solid transparent; border-radius:0; background:none; text-align:left; padding:8px; min-height:40px; font:inherit; width:100%; overflow-wrap:anywhere; }
.betty-conversation-list button[aria-current="true"] { border-color:var(--green); background:#eff7f2; }
.betty-thread { grid-area:thread; min-width:0; min-height:0; display:grid; grid-template-rows:auto minmax(0,1fr) auto auto auto; }
.betty-context { font-size:13px; padding:8px 12px; background:#f7f9f8; border-bottom:1px solid var(--betty-line); overflow-wrap:anywhere; }
.betty-messages { overflow:auto; padding:12px 18px; }
.betty-message { border-bottom:1px solid #e7ece9; padding:12px 0; overflow-wrap:anywhere; }
.betty-message header { display:flex; gap:10px; align-items:center; font-size:12px; margin-bottom:5px; }
.betty-message p { font-size:16px; line-height:1.5; margin:0; white-space:pre-wrap; }
.betty-message img { max-width:100%; max-height:300px; object-fit:contain; display:block; margin-top:8px; }
.betty-composer { border-top:1px solid var(--betty-line); background:#eceff2; padding:10px 12px; }
.betty-composer textarea { width:100%; min-height:76px; resize:vertical; max-height:220px; border:1px solid #b8c1cc; padding:8px; background:#fff; font:inherit; font-size:16px; }
.betty-composer-footer { display:flex; align-items:center; gap:8px; margin-top:6px; }
.betty-composer-footer .betty-send { margin-left:auto; }
.betty-status { padding:6px 12px; min-height:30px; font-size:13px; border-top:1px solid var(--betty-line); }
.betty-status[data-error="true"] { color:#9d1616; }
.betty-icon-button { display:inline-flex; align-items:center; justify-content:center; flex:none; width:34px; height:34px; border:1px solid #b8c1cc; border-radius:0; background:#fff; color:#124e32; }
.betty-icon-button svg { width:18px; height:18px; }
.betty-icon-button[aria-pressed="true"] { background:#0e5630; color:#fff; border-color:#0e5630; }
.betty-workspace :focus-visible, .betty-capture-editor :focus-visible { outline:2px solid #0e5630; outline-offset:2px; }
.betty-workspace button:disabled, .betty-capture-editor button:disabled { opacity:.5; cursor:default; }
.betty-workspace input[type="checkbox"], .betty-capture-editor input[type="checkbox"] { width:16px; height:16px; min-height:0; margin:2px 4px 0 0; flex-shrink:0; }
.betty-proposal small { overflow-wrap:anywhere; }
.betty-capture-item { border:1px solid var(--betty-line); border-radius:3px; margin-bottom:10px; background:#fff; overflow:hidden; }
.betty-capture-item img { display:block; width:100%; height:120px; object-fit:contain; background:#eef1f2; }
.betty-capture-item .betty-capture-meta { padding:7px; font-size:12px; overflow-wrap:anywhere; }
.betty-capture-actions { display:flex; gap:5px; padding:0 7px 7px; flex-wrap:wrap; }
.betty-expiring { color:#9b2525; font-weight:700; }
.betty-storage { font-size:12px; margin:8px 0; }
.betty-attachments { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:6px; }
.betty-attachment { display:inline-flex; align-items:center; gap:6px; font-size:13px; background:#fff; border:1px solid var(--betty-line); padding:3px 6px; }
.betty-proposal { border-top:1px solid var(--betty-line); padding:10px 12px; max-height:45dvh; overflow:auto; }
.betty-proposal h2 { font-size:16px; margin:0 0 6px; }
.betty-proposal h3 { font-size:14px; margin:10px 0 6px; }
.betty-proposal p { margin:4px 0 8px; white-space:pre-wrap; }
.betty-proposal table { border-collapse:collapse; table-layout:fixed; width:100%; font-size:14px; }
.betty-proposal th, .betty-proposal td { border:1px solid var(--betty-line); padding:5px; text-align:left; vertical-align:top; }
.betty-proposal pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
.betty-proposal p { overflow-wrap:anywhere; }
.betty-proposal-toolbar { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.betty-preview-image { width:100%; max-height:280px; object-fit:contain; background:#f7f9f8; }
.betty-confirm-line { display:flex; gap:8px; align-items:flex-start; margin:10px 0; font-size:14px; }
.betty-capture-editor { width:min(1100px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); padding:0; border:1px solid #9aa4b2; }
.betty-capture-editor::backdrop { background:rgb(0 0 0 / 40%); }
.betty-editor-header, .betty-editor-footer, .betty-editor-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; border-bottom:1px solid var(--betty-line,#cfd6df); }
.betty-editor-header h2 { font-size:17px; margin:0 auto 0 0; }
.betty-editor-surface { overflow:auto; max-height:55dvh; padding:8px; background:#eceff2; }
.betty-editor-surface canvas { display:block; width:100%; height:auto; touch-action:none; background:#fff; }
.betty-editor-footer { border-bottom:0; border-top:1px solid #cfd6df; justify-content:flex-end; }
.betty-annotation-fields { padding:8px 12px; display:flex; align-items:end; gap:8px; flex-wrap:wrap; background:#eceff2; }
.betty-annotation-fields label { display:grid; gap:3px; font-size:12px; }
.betty-annotation-fields input { width:70px; min-height:30px; }
.betty-annotation-fields input[type="text"] { width:240px; max-width:100%; }
.betty-capture-source { display:flex; gap:6px; flex-wrap:wrap; margin:7px 0; }
.betty-docked-frame { position:fixed; inset:68px 8px 8px auto; width:min(1100px,calc(100vw - 16px)); z-index:4000; background:#fff; border:1px solid #9aa4b2; }
.betty-navigation-link { display:block; margin:8px 0; overflow-wrap:anywhere; }
.betty-embedded body > header { display:none; }
.betty-embedded .betty-workspace { height:100dvh; margin:0; }
@media(max-width:1100px) { .betty-columns { --history-width:170px; overflow:auto; grid-template-columns:var(--history-width) minmax(0,1fr); grid-template-areas:"history thread" "tray tray"; grid-template-rows:minmax(420px,1fr) auto; } .betty-tray { max-height:38dvh; border-left:0; border-top:1px solid var(--betty-line); } }
@media(max-width:700px) { .betty-workspace { margin:0; border-left:0; border-right:0; } .betty-workspace-header { gap:7px; flex-wrap:wrap; } .betty-scope { max-width:calc(100% - 125px); } .betty-columns { display:flex; flex-direction:column; } .betty-conversations { flex:none; border-right:0; border-bottom:1px solid var(--betty-line); max-height:170px; } .betty-thread { display:flex; flex:1 0 auto; flex-direction:column; } .betty-context, .betty-composer, .betty-status { flex:none; } .betty-messages { flex:1 0 80px; max-height:35dvh; padding:6px 12px; } .betty-proposal { flex:none; max-height:45dvh; } .betty-tray { flex:none; } .betty-capture-editor { width:calc(100vw - 12px); } }
