/* Keep the existing task DOM and one analysis document alive in the same shell. */
#tmApp .tm-main.lucy-analysis-active,#exApp .ex-main.lucy-analysis-active{padding:0;max-width:none;overflow:hidden}
#tmApp .lucy-insights-pane,#exApp .lucy-insights-pane{height:100%;min-height:0;position:relative;animation:none}
.lucy-insights-frame{display:block;border:0;width:100%;height:100%;min-height:400px;background:#F5F7FB}
.lucy-insights-frame[hidden],.lucy-insights-preparing[hidden]{display:none!important}
.lucy-insights-heading{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%);white-space:nowrap}
.lucy-insights-preparing{padding:42px 32px;color:#5D6B82;font:13px/1.8 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif}
.lucy-insights-preparing h3{font-size:18px;color:#23304A;margin:14px 0 6px}
.lucy-insights-spinner{display:block;width:22px;height:22px;border:2px solid #DCE3EF;border-top-color:#6258E8;border-radius:50%;animation:lucy-insights-spin .8s linear infinite}
#tmApp .lucy-board-links a.lucy-insights-selected,#exApp .ex-insight-links a.lucy-insights-selected{color:#5145CD;background:#EFEDFF;border-color:#D9D5FF}
@keyframes lucy-insights-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.lucy-insights-spinner{animation:none}}
@media(max-width:640px){.lucy-insights-preparing{padding:28px 20px}.lucy-insights-frame{min-height:300px}}

/* Reference 01 palette. Existing markup, dimensions and interactions are retained. */
#tmApp,#exApp{--tm-card:#FFFFFF;--tm-accent-ink:#5145CD;--ex-accent-ink:#5145CD;background:#F5F7FB}
#tmApp .tm-header,#exApp .ex-header{background:#FFFFFF}
#tmApp .tm-stat:nth-child(1){background:#EFEDFF;border-color:#D9D5FF}
#tmApp .tm-stat:nth-child(2){background:#E8F5EE;border-color:#C4E5D3}
#tmApp .tm-stat:nth-child(3){background:#FFF3E5;border-color:#F0D8B9}
#tmApp .tm-stat:nth-child(4){background:#FFF3E5;border-color:#F0D8B9}
#tmApp .tm-stat:nth-child(1) .tm-v{color:#5145CD!important}
#tmApp .tm-stat:nth-child(2) .tm-v{color:#16865B!important}
#tmApp .tm-stat:nth-child(3) .tm-v{color:#C64255!important}
#tmApp .tm-stat:nth-child(4) .tm-v{color:#A96010!important}
#tmApp .td-stat[data-today-filter=decision]{background:#EAF2FF;color:#285FAC}
#tmApp .td-stat[data-today-filter=review]{background:#E8F5EE;color:#13764F}
#tmApp .td-stat[data-today-filter=risk]{background:#FFF3E5;color:#985510}
#tmApp .td-stat[data-today-filter=clarify]{background:#EFEDFF;color:#5145CD}
#tmApp .td-stat[aria-pressed=true]{box-shadow:inset 0 -3px currentColor}
#tmApp .td-risk{background:#FFF3E5}#tmApp .td-review,#tmApp .td-done{background:#E8F5EE}
#tmApp .td-decision{background:#EAF2FF}#tmApp .td-clarify{background:#EFEDFF}
#tmApp .tm-btn-primary,#exApp .ex-btn-primary{color:#FFFFFF;background:#6258E8;border-color:#6258E8}
#tmApp .tm-btn-primary:hover,#exApp .ex-btn-primary:hover{background:#5145CD;border-color:#5145CD}
