/* RC139: use the site's type system throughout every Researcher form. */
.research-workspace :is(textarea,input:not([type=checkbox]):not([type=radio]),select),
.research-dialog :is(textarea,input:not([type=checkbox]):not([type=radio]),select){
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:1rem!important;font-weight:400!important;line-height:1.55!important;
  letter-spacing:normal!important;color:var(--ink,#173641)!important;
  width:100%;min-width:0;max-width:100%;box-sizing:border-box;
  border:1px solid #bfd0d6!important;border-radius:12px!important;
  padding:12px 14px!important;background:#f5e8e5!important;
  box-shadow:inset 0 1px 2px #15324f08!important;
}
.research-workspace textarea,.research-dialog textarea{resize:vertical}
.research-workspace :is(textarea,input,select):focus-visible,
.research-dialog :is(textarea,input,select):focus-visible{
  outline:3px solid #f5e8e5!important;outline-offset:2px!important;border-color:var(--teal,#8f505b)!important;background:#fff!important;
}
.research-workspace :is(input,textarea)::placeholder,.research-dialog :is(input,textarea)::placeholder{font:inherit;color:#627985;opacity:1}
.research-workspace .research-box textarea{margin-top:10px}
.research-workspace select,.research-dialog select{
  appearance:none;-webkit-appearance:none;cursor:pointer;padding-right:42px!important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23006d69' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")!important;
  background-repeat:no-repeat!important;background-position:right 14px center!important;
}
.research-reference-head{align-items:center;margin:18px 0}
.research-reference-sort{display:grid;gap:6px;min-width:190px;color:var(--teal,#8f505b);font-size:.85rem;font-weight:700}
@media(max-width:600px){.research-reference-sort{width:100%;min-width:0}}
#progressReportContent .report-row>div:first-child{min-width:0}
#progressReportContent .report-row .rc81-topic-copy{display:flex!important;flex-direction:column!important;gap:5px!important}
#progressReportContent .report-row .rc81-topic-copy>strong,
#progressReportContent .report-row .rc81-topic-copy>span{display:block!important;margin:0!important}

/* RC147: expanded source choices and project management. */
.research-source-options147{border:1px solid var(--line);border-radius:14px;padding:16px;margin:20px 0;min-width:0}
.research-source-options147 legend,.project-colors147 legend{font-weight:700}
.research-source-options147 .check-row{display:flex;gap:10px;align-items:center;margin:14px 0 6px}
.research-source-options147 input[type=checkbox]{width:18px;height:18px;flex:0 0 auto}
.project-edit147{max-height:90dvh;overflow-y:auto;max-width:650px;width:calc(100% - 32px);color:var(--ink);background:#fff}
.project-edit147 .field{display:grid;gap:8px;margin:16px 0}
.project-colors147{border:0;padding:0;margin:16px 0;min-width:0}
.project-delete147{border-top:1px solid var(--line);margin-top:24px;padding-top:12px}
.project-delete147 [hidden]{display:none!important}
.project-edit147 .dialog-actions{gap:12px;margin-top:20px}
.research-source-options147 summary{font-weight:700;cursor:pointer;color:var(--teal)}
.research-source-options147 fieldset{min-width:0;border:0;border-top:1px solid var(--line);margin:18px 0 0;padding:12px 0 0}
.research-journal-options147{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 18px}
.research-journal-options147 .check-row{margin:6px 0;align-items:flex-start;font-weight:400}
@media(max-width:700px){.research-journal-options147{grid-template-columns:1fr}}
.apa-review147{max-width:960px;width:calc(100% - 32px);max-height:90dvh;overflow:auto;background:white;color:var(--ink)}
.apa-review-entry147{padding:16px 0;border-top:1px solid var(--line);overflow-wrap:anywhere}
.apa-review-entry147 .apa-ref{font-size:12pt;line-height:2;margin:12px 0}
.apa-review-entry147 details{margin-bottom:12px}

/* RC148: Separate reference actions from both the citations and their instructions. */
.research-workspace .research-reference-actions148{margin-top:24px;gap:12px;align-items:center;flex-wrap:wrap}
.research-workspace .research-reference-help148{margin-top:18px!important;margin-bottom:0;line-height:1.65}
.research-ranking-notice148{padding:16px;margin:18px 0;background:#f5e8e5;border:1px solid #d7e1e5;border-radius:12px}
.research-ranking-notice148 p{margin:8px 0 12px;line-height:1.6}
.research-match-reasons148{margin:12px 0;line-height:1.6}

/* RC149: unobtrusive chat management and the shared navigation navy for Study Lab. */
.chat-card-header149{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:16px}
.chat-card-header149 .section-badge54{margin:0}
.chat-card-header149 .chat-clear149{margin-left:auto;min-height:40px;padding:8px 12px;font-size:.875rem;font-weight:600;background:#fff;color:var(--muted);border:1px solid var(--line);box-shadow:none;white-space:nowrap}
.chat-card-header149 .chat-clear149:hover{background:#f3f6f8;color:var(--ink);border-color:#b6c7cf}
#view .study-lab-card149{background:var(--navy);border-color:var(--navy);color:#f5fafb}
#view .study-lab-card149>h2{color:#fff}
#view .study-lab-card149>.muted,#view .study-lab-card149>#studyFileStatus,#view .study-lab-card149>#studyCount{color:#c9dce2!important}
#view .study-lab-card149 .study-drop{background:#f5e8e5;color:var(--ink)}
#view .study-lab-card149 #studyText{background:#fff;color:var(--ink)}
#view .study-lab-card149 #studyToolConfig{background:#f5e8e5;color:var(--ink)}
#view .study-lab-card149 #studyOutput{color:var(--ink)}
#view .study-lab-card149 #studyOutput:not(:empty){background:#fff;border-radius:16px;padding:20px;margin-top:20px}
#view .study-lab-card149 .study-tool-button{background:var(--mint);border-color:var(--mint);color:var(--navy);box-shadow:none}
#view .study-lab-card149 .study-tool-button:disabled{background:#adbdc0;border-color:#adbdc0;color:#455c65;opacity:1}
#view .study-lab-card149 :is(.study-lock61,.study-lock81){background:#fff;color:var(--ink)}

.chat-header-actions162{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:12px;margin-left:auto;max-width:100%}
.chat-header-actions162 #aiUsage{margin:0!important;text-align:right}
.chat-header-actions162 .chat-clear149{margin-left:0}
@media(max-width:600px){.chat-header-actions162{width:100%;justify-content:space-between}.chat-header-actions162 #aiUsage{text-align:left;flex:1;min-width:150px}}
