/* Research entries share the asset sidebar's compact image-and-title rhythm. */
#editorView #projectResearchList .research-note-item{display:flex;flex-direction:row;align-items:center;gap:10px;box-sizing:border-box;min-height:64px;width:100%;margin:0 0 8px;padding:10px;border:1px solid #e4e4e4;border-radius:12px;background:#fafafa;color:#303030;box-shadow:none;text-align:left;}
#editorView #projectResearchList .research-note-item:hover{background:#f3f3f3;border-color:#ccc;}
#editorView #projectResearchList .research-note-info{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1;-webkit-line-clamp:unset;}
#editorView #projectResearchList .research-note-info strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:inherit;font:500 13px/19px system-ui;}
#editorView #projectResearchList .research-note-preview{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:#818181;font:400 11px/16px system-ui;overflow-wrap:anywhere;}
html.dark-mode #editorView #projectResearchList .research-note-item{background:#212121;border-color:#323232;color:#e1e1e1;}
html.dark-mode #editorView #projectResearchList .research-note-item:hover{background:#282828;border-color:#484848;}
html.dark-mode #editorView #projectResearchList .research-note-preview{color:#aaa;}
/* Reference-inspired composer, retaining the existing functional controls. */
:root{--app-page-bg:#f7f8f8;}
html.dark-mode{--app-page-bg:#1b1d20;}
html .app>.content,html .app>.content>.view{background-color:var(--app-page-bg);}
html .app>.content:has(#pricingView.active),html.dark-mode .app>.content:has(#pricingView.active),#pricingView[open],html.dark-mode #pricingView[open]{background:var(--app-page-bg);}
#homeView{--home-paper:var(--app-page-bg);}
.home-greeting{display:flex;justify-content:center;align-items:center;gap:16px;margin:6px 0 30px;}
.home-greeting img{flex:none;width:30px;height:30px;}
.home-greeting h1{margin:0;font:400 34px/1.4 system-ui;letter-spacing:-.5px;overflow-wrap:anywhere;}
.home-ai-composer{padding:20px 20px 14px;border:1px solid #d5d9da;border-radius:24px;background:#fff;box-shadow:0 8px 20px #161e2410;}
#homeAIInput{height:3.6em;min-height:3.6em;max-height:3.6em;background:transparent;font-size:15px;line-height:1.8;resize:none;overflow-y:auto;}
#homeAIInput::placeholder{color:#989f9f;font-weight:400;}
.home-ai-composer-footer{margin-top:10px;}
.home-ai-composer-footer>span{padding:5px 10px;border:1px solid #e2e5e5;border-radius:9px;background:#fafbfb;color:#69716e;font:400 12px/20px system-ui;}
#homeAISend{width:36px;height:36px;padding:9px;background:var(--brand);color:#fff;}
.home-ai-suggestions{justify-content:center;gap:10px;margin-top:16px;}
.home-ai-suggestions button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 14px;border:1px solid #d5d9da;border-radius:18px;background:transparent;color:#424946;font-size:12px;}
.home-ai-suggestions button:hover{background:#ecefef;}
html.dark-mode #homeView{--home-paper:#1b1d20;}
html.dark-mode .home-ai-composer{background:#25282a;border-color:#454a4c;box-shadow:0 8px 20px #0002;}
html.dark-mode .home-ai-composer-footer>span{background:#2b2f30;border-color:#454a4c;color:#b6bdba;}
html.dark-mode .home-ai-suggestions button{border-color:#454a4c;color:#ccd2cf;}
html.dark-mode .home-ai-suggestions button:hover{background:#303635;}
html.dark-mode #homeAISend{background:var(--brand);color:#fff;}
@media(max-width:520px){.home-greeting{gap:10px;margin-bottom:22px;}.home-greeting h1{font-size:25px;}.home-greeting img{width:25px;height:25px;}.home-ai-composer{padding:16px;border-radius:20px;}#homeAIInput{font-size:16px;}.home-ai-suggestions{gap:6px;}.home-ai-suggestions button{padding-inline:10px;}}

.home-ai-suggestions button svg{width:15px;height:15px;flex:none;}

/* Paint the complete page canvas, including viewport gutters and scroll areas. */
html body,html.dark-mode body{background-color:var(--app-page-bg);}
html:not(.dark-mode) .app>.content:has(.view.active),html.dark-mode .app>.content:has(.view.active){background-color:var(--app-page-bg);background-image:none;}
/* The project editor keeps its original paper-colored workspace. */
html:not(.dark-mode) .app>.content:has(#editorView.active){--app-page-bg:#fff;}
html.dark-mode .app>.content:has(#editorView.active){--app-page-bg:#181818;}
html:not(.dark-mode) body:has(#editorView.active){background-color:#fff;}
html.dark-mode body:has(#editorView.active){background-color:#181818;}

/* A quiet, legible balance beside the account name. */
#sidebar .sidebar-footer .ai-badge{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex:none;box-sizing:border-box;height:28px;max-width:130px;padding:4px 8px;border:1px solid #dce2df;border-radius:7px;background:#fafcfb;color:#3e4943;font:500 11px/18px system-ui;white-space:nowrap;cursor:pointer;}
#sidebar .sidebar-footer .ai-badge svg{width:13px;height:13px;flex:none;color:#668575;}
#sidebar .sidebar-footer #aiLeft{min-width:0;max-width:74px;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;}
#sidebar .sidebar-footer .sidebar-credit-label{color:#8a938d;font-size:10px;font-weight:400;}
#sidebar .sidebar-footer .ai-badge:hover{background:#edf0ee;border-color:#c7d0ca;}
#sidebar .sidebar-footer .ai-badge:focus-visible{outline:2px solid #84978b;outline-offset:2px;}
html.dark-mode #sidebar .sidebar-footer .ai-badge{background:#282d2a;border-color:#424b45;color:#dfe7e1;}
html.dark-mode #sidebar .sidebar-footer .ai-badge svg{color:#9bb3a3;}
html.dark-mode #sidebar .sidebar-footer .sidebar-credit-label{color:#a0ada4;}
html.dark-mode #sidebar .sidebar-footer .ai-badge:hover{background:#343c36;border-color:#5b685f;}
#sidebar.collapsed .sidebar-footer .ai-badge{display:none;}
@media(max-width:820px){#sidebar .sidebar-footer .ai-badge{display:none;}}
