/* Research workspace: shared visual language with Class Series. */
.research-sidebar,.research-page-header,.research-menu,.research-shade {display:none;}
body.project-detail-view:has(.is-research-project) {--panel:#fff;--panel-soft:#f7f7f5;--ink:#252525;--ink-soft:#64645f;--muted:#858581;--line:#eaeae7;--line-strong:#deded9;--blue:#454540;background:var(--panel);}
body.project-detail-view:has(.is-research-project) .app-shell {padding:0 !important;}
body.project-detail-view .project-shell.is-research-project {display:grid !important;grid-template-columns:256px minmax(0,1fr) !important;grid-template-rows:65px minmax(0,1fr) !important;width:100% !important;max-width:none !important;height:100dvh;min-height:0 !important;margin:0 !important;border:0 !important;border-radius:0 !important;background:var(--panel);overflow:hidden;box-shadow:none;}
body.project-detail-view .project-shell.is-research-project > .session-header {grid-column:2;grid-row:1;min-height:0 !important;height:65px;padding:0 32px !important;gap:14px !important;flex-wrap:nowrap !important;background:var(--panel) !important;border-bottom:1px solid var(--line) !important;}
body.project-detail-view .is-research-project .session-header .eyebrow,body.project-detail-view .is-research-project #projectBackButton,body.project-detail-view .is-research-project .rename-row::before {display:none !important;}
body.project-detail-view .is-research-project #projectDetailTitle {font-size:15px !important;font-weight:500 !important;letter-spacing:0 !important;line-height:1.5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body.project-detail-view .is-research-project .rename-row {min-width:0;}
body.project-detail-view .is-research-project .session-header .session-meta {width:auto !important;margin:0 0 0 auto !important;gap:12px;}
body.project-detail-view .is-research-project #projectHeaderAdd {display:none !important;}
body.project-detail-view .is-research-project #projectAskButton {font-size:14px !important;font-weight:500;line-height:1.5;padding:7px 12px !important;min-height:32px;border:1px solid var(--line) !important;border-radius:7px !important;background:var(--panel) !important;color:var(--ink) !important;box-shadow:none !important;white-space:nowrap;}
body.project-detail-view .is-research-project #projectAskButton:hover {background:var(--panel-soft) !important;}
body.project-detail-view .is-research-project .weekly-members button {width:27px;height:27px;font-size:10px;color:var(--ink-soft);border-color:var(--line);}
body.project-detail-view .is-research-project .research-sidebar {display:flex;flex-direction:column;grid-column:1;grid-row:1 / -1;min-height:0;padding:18px 14px 12px;background:var(--panel-soft);border-right:1px solid var(--line);overflow:auto;}
.is-research-project .research-sidebar button {font-family:inherit;box-shadow:none;cursor:pointer;}
.is-research-project .research-back {display:flex;align-items:center;justify-content:flex-start;gap:12px;padding:8px 12px;margin:0 0 28px;border:0;border-radius:7px;background:transparent;color:var(--ink-soft);font-size:14px;font-weight:400;}
.is-research-project .research-back span {font-size:20px;line-height:16px;}
.is-research-project .research-identity {display:flex;align-items:flex-start;gap:12px;padding:0 12px 26px;}
.is-research-project .research-identity svg {width:18px;height:18px;flex-shrink:0;margin-top:4px;color:var(--ink-soft);}
.is-research-project .research-identity span {font-size:13px;color:var(--muted);}
.is-research-project .research-identity h2 {font-size:16px;font-weight:550;line-height:1.5;letter-spacing:-.2px;color:var(--ink);margin:3px 0 0;overflow-wrap:anywhere;}
.is-research-project .research-add {display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;padding:10px 12px;font-size:15px;font-weight:500;border:0;border-radius:8px;background:transparent;color:var(--ink);}
.is-research-project .research-add span {font-size:20px;line-height:18px;font-weight:300;}
.is-research-project .research-nav-label {font-size:13px;color:var(--muted);margin:26px 12px 12px;}
body.project-detail-view .is-research-project .research-sidebar .project-detail-tabs {display:flex !important;position:static !important;flex-direction:column !important;align-items:stretch !important;flex-shrink:0;padding:0 !important;margin:0 !important;gap:4px !important;overflow:visible !important;border:0 !important;background:transparent !important;}
body.project-detail-view .is-research-project .research-sidebar .project-detail-tab {display:flex !important;align-items:center !important;justify-content:flex-start !important;gap:12px !important;width:100% !important;min-height:43px !important;padding:10px 12px !important;font-size:15px !important;font-weight:400 !important;color:var(--ink-soft) !important;letter-spacing:0;border:0 !important;border-radius:7px !important;background:transparent !important;}
body.project-detail-view .is-research-project .research-sidebar .project-detail-tab.active {color:var(--ink) !important;background:#e9e9e5 !important;font-weight:500 !important;}
body.project-detail-view .is-research-project .research-sidebar button:hover {background:#eeeeeb !important;}
.is-research-project .project-nav-icon {width:17px;height:17px;flex-basis:17px;opacity:.85;}
.is-research-project .research-sidebar-footer {display:flex;align-items:center;justify-content:space-between;margin-top:auto;padding:28px 12px 0;gap:12px;}
.is-research-project .research-sidebar-footer button {padding:7px 0;color:var(--muted);background:transparent;border:0;font-size:13px;font-weight:400;}
.is-research-project .research-sidebar-footer #researchDetails {font-size:18px;min-width:28px;}
body.project-detail-view .is-research-project .project-detail-content {grid-column:2;grid-row:2;min-height:0;min-width:0;overflow:auto;overscroll-behavior:contain;padding:40px max(40px,calc((100% - 1160px)/2)) 44px !important;background:var(--panel);scroll-behavior:smooth;}
.is-research-project .research-page-header {display:block;margin:0 0 28px;}
.is-research-project .research-page-kicker {font-size:13px;color:var(--muted);}
.is-research-project .research-page-header h1 {font-size:36px;font-weight:550;letter-spacing:-1.15px;line-height:1.25;margin:14px 0 10px;color:var(--ink);overflow-wrap:anywhere;}
.is-research-project .research-page-header p {font-size:15px;line-height:1.7;color:var(--muted);margin:0;}
body.project-detail-view .is-research-project .project-detail-pane[data-project-detail-pane="brain"].active {gap:0 !important;}
body.project-detail-view .is-research-project .project-detail-pane:not([data-project-detail-pane="chat"]) > .insight-card {padding:0 !important;margin:0;border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}
body.project-detail-view .is-research-project .project-detail-pane h3 {font-size:19px !important;font-weight:550 !important;letter-spacing:-.2px;color:var(--ink) !important;}
body.project-detail-view .is-research-project .project-detail-pane h3::before {display:none !important;}
body.project-detail-view .is-research-project #projectCurrentSummary {font-size:18px;line-height:1.75;margin:12px 0 22px;color:var(--ink);}
.is-research-project .project-status-grid {padding:23px 0 0;gap:28px;border-color:var(--line);}
body.project-detail-view .is-research-project #projectWeeklyMilestone,body.project-detail-view .is-research-project #projectWeeklyBlocker {font-size:15px;line-height:1.8;}
.is-research-project .project-mini-label {font-size:13px;font-weight:400;letter-spacing:0;}
body.project-detail-view .is-research-project .weekly-status-meta {font-size:13px;margin-top:20px;gap:8px;color:var(--muted);}
body.project-detail-view .is-research-project .weekly-text-button {font-size:13px;font-weight:400;min-height:24px;text-underline-offset:3px;}
.is-research-project #projectSourcesButton {padding:2px 8px;border-radius:5px;background:var(--panel-soft);}
.is-research-project .project-stat-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:24px 0 28px;padding:18px 0;border-block:1px solid var(--line);}
body.project-detail-view .is-research-project .project-stat-grid > button {flex-direction:row;align-items:center;justify-content:center;gap:9px;padding:4px 20px !important;min-height:25px;border:0 !important;border-right:1px solid var(--line) !important;border-radius:0;background:transparent !important;color:var(--ink);}
body.project-detail-view .is-research-project .project-stat-grid > button:first-child {padding-left:0 !important;}
body.project-detail-view .is-research-project .project-stat-grid > button:last-child {border-right:0 !important;}
.is-research-project .project-stat-grid strong {order:-1;font-size:20px;font-weight:550;letter-spacing:0;}
.is-research-project .project-stat-grid > button > span {font-size:14px;font-weight:400;color:var(--ink-soft);}
.is-research-project .project-stat-grid small {display:none;}
body.project-detail-view .is-research-project .project-activity-card > .card-title-row {padding-bottom:16px;}
body.project-detail-view .is-research-project .weekly-section > summary {padding:20px 0;}
body.project-detail-view .is-research-project .weekly-section > summary strong {font-size:15px;font-weight:500;}
body.project-detail-view .is-research-project .weekly-section > summary span {font-size:13px;color:var(--muted);}
body.project-detail-view .is-research-project .weekly-empty {background:transparent;border-radius:0;padding:8px 0 18px;font-size:15px;line-height:1.75;color:var(--muted);}
body.project-detail-view .is-research-project .weekly-event {padding:12px 0 24px;gap:13px;}
body.project-detail-view .is-research-project .weekly-event p {font-size:15px;line-height:1.75;color:var(--ink-soft);}
body.project-detail-view .is-research-project .weekly-event-title > button,body.project-detail-view .is-research-project .weekly-event-title > strong {font-size:14px;font-weight:500;}
body.project-detail-view .is-research-project .weekly-event-icon svg {width:17px;height:17px;}
body.project-detail-view .is-research-project .project-section-description {font-size:15px;line-height:1.75;color:var(--muted);}
body.project-detail-view .is-research-project :is(.session-row,.member-task-row,.project-member-row,.project-timeline-item) {box-shadow:none !important;background:transparent !important;border:0 !important;border-bottom:1px solid var(--line) !important;border-radius:0 !important;padding:20px 0 !important;}
body.project-detail-view .is-research-project :is(.session-empty,.member-task-empty,.timeline-empty) {background:var(--panel-soft);border:0;border-radius:8px;font-size:13px;color:var(--muted);padding:22px;line-height:1.8;}
body.project-detail-view .is-research-project .card-title-row > button {border:1px solid var(--line);border-radius:7px;background:var(--panel);color:var(--ink-soft);box-shadow:none;font-size:14px;padding:7px 11px;min-height:30px;}
body.project-detail-view .is-research-project #projectStatusEdit {border:0;padding:0;min-height:24px;}
body.project-detail-view .is-research-project .member-task-group {border:0 !important;background:transparent !important;box-shadow:none !important;}
body.project-detail-view .is-research-project :is(button,a,input,summary):focus-visible {outline:2px solid #8b9d94;outline-offset:3px;}
body.project-detail-view .is-research-project [hidden] {display:none !important;}
body.project-detail-view:has(.is-research-project) .project-info-popover {background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 40px #0001;z-index:12;}
body.project-detail-view:has(.is-research-project) .weekly-dialog {background:var(--panel);color:var(--ink);border:1px solid var(--line);border-radius:14px;box-shadow:0 25px 100px #0002;}
body.project-detail-view:has(.is-research-project) .weekly-dialog::backdrop {background:#0003;backdrop-filter:blur(3px);}
@media(min-width:1500px){body.project-detail-view .is-research-project .project-detail-content{padding-top:44px !important;}}
@media(min-width:921px){body.project-detail-view:is(.project-ai-open,.project-ai-closing) .project-shell.is-research-project{width:calc(100% - min(440px,38vw)) !important;grid-template-columns:220px minmax(0,1fr) !important;}body.project-detail-view:has(.is-research-project) > [data-project-detail-pane="chat"]{width:min(440px,38vw) !important;max-width:none !important;}}
@media(max-width:1000px){body.project-detail-view .project-shell.is-research-project{grid-template-columns:225px minmax(0,1fr) !important;}.is-research-project .research-page-header h1{font-size:29px;}}
@media(max-width:760px){
 body.project-detail-view .project-shell.is-research-project{grid-template-columns:minmax(0,1fr) !important;grid-template-rows:58px minmax(0,1fr) !important;position:relative;}
 body.project-detail-view .is-research-project > .session-header{grid-column:1;height:58px;padding:0 20px !important;gap:12px !important;}
 body.project-detail-view .is-research-project .session-header .session-meta{gap:8px;}
 body.project-detail-view .is-research-project .weekly-members{display:none;}
 body.project-detail-view .is-research-project .research-menu{display:flex;align-items:center;justify-content:center;flex:0 0 22px;padding:0;border:0;background:transparent;color:var(--ink-soft);}
 .research-menu svg{width:19px;height:19px;}
 body.project-detail-view .is-research-project .research-sidebar{position:absolute;inset:0 auto 0 0;width:265px;z-index:30;visibility:hidden;transform:translateX(-100%);transition:transform .2s,visibility .2s;}
 body.project-detail-view .is-research-project.research-nav-open .research-sidebar{visibility:visible;transform:translateX(0);}
 .is-research-project.research-nav-open .research-shade{display:block;position:absolute;inset:0;z-index:29;background:#0003;border:0;border-radius:0;}
 body.project-detail-view .is-research-project .project-detail-content{grid-column:1;padding:35px 23px 40px !important;}
 .is-research-project .research-page-header{margin-bottom:34px;}.is-research-project .research-page-header h1{font-size:28px;margin-top:20px;}
 .is-research-project .project-status-grid{grid-template-columns:1fr;gap:20px;}
 .is-research-project .project-stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
 body.project-detail-view .is-research-project .project-stat-grid > button{padding:0 !important;justify-content:flex-start;border:0 !important;}
 body.project-detail-view .is-research-project .weekly-section > summary{flex-wrap:wrap;gap:8px;}
 body.project-detail-view .is-research-project .weekly-section > summary span{margin-left:22px;font-size:10px;}
 body.project-detail-view .is-research-project .project-activity-card > .card-title-row > span{display:none;}
 body.project-detail-view .is-research-project #mobileProjectChatLauncher{display:none !important;}
}
:root[data-theme="dark"] body.project-detail-view:has(.is-research-project){--panel:#212121;--panel-soft:#191919;--ink:#e9e9e6;--ink-soft:#b0b0a9;--muted:#90908c;--line:#343432;--line-strong:#42423e;--blue:#d0d0c9;}
:root[data-theme="dark"] body.project-detail-view .is-research-project .research-sidebar .project-detail-tab.active{background:#30302d !important;}
:root[data-theme="dark"] body.project-detail-view .is-research-project .research-sidebar button:hover{background:#2a2a28 !important;}
@media(prefers-reduced-motion:reduce){.is-research-project *{transition:none !important;scroll-behavior:auto !important;}}
/* Keep the document and assistant flush when the existing chat pane is detached. */
body.project-detail-view:has(.is-research-project) .workspace {display:block !important;}
body.project-detail-view .is-research-project #projectDetailTitle::before {display:none !important;}
body.project-detail-view .is-research-project #memberTaskSuggestionList > .session-empty {display:none;}
body.project-detail-view .is-research-project :is(#memberTaskList,#projectMemberList) {border:0 !important;border-radius:0 !important;box-shadow:none !important;background:transparent !important;}
body.project-detail-view .is-research-project #projectFileList {padding-left:0 !important;}
body.project-detail-view .is-research-project .project-member-row small {font-size:12px;line-height:1.8;color:var(--muted);}
body.project-detail-view .is-research-project :is(#addMemberTaskButton,#projectAddMemberButton)::before {display:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) > [data-project-detail-pane="chat"] {top:0 !important;right:0 !important;bottom:0 !important;height:100dvh !important;padding:0 !important;transform:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) > [data-project-detail-pane="chat"] .project-chat-card {height:100% !important;max-height:none !important;min-height:0 !important;display:flex !important;flex-direction:column !important;gap:0 !important;background:var(--panel) !important;border:0 !important;border-left:1px solid var(--line) !important;border-radius:0 !important;box-shadow:none !important;padding:0 20px 18px !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) .project-ai-sheet-header {order:0;flex-shrink:0;min-height:65px !important;display:flex !important;gap:10px;border-bottom:1px solid var(--line);margin:0 -20px;padding:0 20px !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) .project-ai-sheet-header strong {font-size:13px !important;font-weight:500;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) .project-ai-sheet-header strong::before {display:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatCloseButton {display:inline-flex !important;align-items:center;justify-content:center;width:24px !important;min-width:24px !important;height:30px !important;padding:0 !important;border:0 !important;background:transparent !important;font-size:22px !important;border-radius:5px;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatClearButton {font-size:11px !important;border:0 !important;background:transparent !important;margin-left:auto;padding:5px !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) .project-chat-top {order:1;padding:14px 0 0 !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatScope {border:0 !important;border-radius:0 !important;background:transparent !important;font-size:11px !important;color:var(--muted) !important;padding:0 !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatScope::before {display:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectAnswer {order:2;flex:1;min-height:0 !important;margin:0 !important;padding:28px 0 !important;overflow:auto;border:0 !important;box-shadow:none !important;border-radius:0 !important;background:transparent !important;font-size:14px;line-height:1.8;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectSuggestionRow {order:3;display:flex !important;flex-wrap:wrap;gap:6px !important;padding:12px 0 !important;margin:0 !important;overflow:visible;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectSuggestionRow button {padding:6px 9px !important;font-size:11px !important;font-weight:400;background:var(--panel-soft) !important;border:0 !important;border-radius:6px !important;color:var(--ink-soft);}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectSuggestionRow button::before {display:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatForm {order:4;flex-shrink:0;display:flex !important;align-items:center;gap:8px !important;padding:8px !important;margin:0 !important;border:1px solid var(--line) !important;border-radius:14px !important;background:var(--panel-soft) !important;box-shadow:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatInput {flex:1;min-width:0 !important;padding:8px 0 !important;border:0 !important;background:transparent !important;box-shadow:none !important;font-size:12px;color:var(--ink) !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatButton {width:36px !important;height:36px !important;min-width:36px !important;min-height:36px !important;border:0 !important;border-radius:50% !important;background:var(--ink) !important;color:var(--panel) !important;font-size:11px;padding:0 !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) .project-chat-form .chat-file-button {width:28px !important;min-width:28px !important;height:32px !important;border:0 !important;background:transparent !important;font-size:23px !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectChatAttachmentList {order:5;}
@media(max-width:920px){body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) > [data-project-detail-pane="chat"] {width:100% !important;max-width:none !important;left:0 !important;z-index:50;}}

body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectAnswer .chat-message.assistant {display:block !important;padding:0 !important;margin:0 0 24px !important;border:0 !important;background:transparent !important;border-radius:0 !important;box-shadow:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectAnswer .chat-message.assistant::before {display:none !important;}
body.project-detail-view:is(.project-ai-open,.project-ai-closing):has(.project-shell.is-research-project) #projectAnswer .chat-content {padding:0 !important;border:0 !important;background:transparent !important;box-shadow:none !important;font-size:14px;line-height:1.8;}
@media(max-width:760px){
 body.project-detail-view .is-research-project #projectDetailSessionsList .session-open{display:grid !important;grid-template-columns:minmax(0,1fr) 16px !important;gap:8px 12px !important;text-align:left;padding:8px 0 !important;}
 body.project-detail-view .is-research-project #projectDetailSessionsList .session-row-title{grid-column:1;white-space:normal !important;overflow:visible !important;text-overflow:clip !important;line-height:1.6;font-size:14px !important;}
 body.project-detail-view .is-research-project #projectDetailSessionsList .session-row-date{grid-column:1;grid-row:2;font-size:11px !important;}
 body.project-detail-view .is-research-project #projectDetailSessionsList .session-row-chevron{grid-column:2;grid-row:1 / 3;align-self:center;}
}

body.project-detail-view .is-research-project .research-capture-actions {display:flex;flex-wrap:wrap;gap:10px;margin-top:22px;}
body.project-detail-view .is-research-project .research-capture-actions button {display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 14px;min-height:42px;border:1px solid var(--line);border-radius:8px;background:var(--panel);color:var(--ink);font:inherit;font-size:15px;font-weight:500;box-shadow:none;cursor:pointer;}
body.project-detail-view .is-research-project .research-capture-actions button:hover {background:var(--panel-soft);border-color:var(--ink-soft);}
body.project-detail-view .is-research-project .research-capture-actions button:focus-visible {outline:2px solid var(--ink-soft);outline-offset:3px;}
body.project-detail-view .is-research-project .research-capture-actions button:disabled {opacity:.5;cursor:not-allowed;}
.research-capture-actions svg {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;}
body.project-detail-view .is-research-project .research-page-header [hidden] {display:none;}
body.project-detail-view .is-research-project .research-overview-header .research-capture-actions {margin-top:0;}
@media(max-width:620px){body.project-detail-view .is-research-project .research-capture-actions button {flex:1 1 145px;}}

body.project-detail-view .is-research-project .research-capture-actions[hidden] {display:none;}

body.project-detail-view .is-research-project .research-overview-header {display:none;}
