/* Scoped styles for DIG admin > 유학자료 수집현황. */
#studyCollection .study-metric{display:flex;flex-direction:column;gap:8px;min-width:120px;padding:18px;border-radius:12px;background:var(--surface,#f8f9fb);border:1px solid var(--line,#e4e7eb)}
#studyCollection .study-metric small{font-size:13px;opacity:.72}
#studyCollection .study-metric strong{font-size:26px;font-variant-numeric:tabular-nums}
#studyCollection #studyLoadStatus{font-size:13px;opacity:.75}
#studyCollection .table-wrap{overflow-x:auto}
#studyCollection table{min-width:850px}
#studyCollection #studyDetail{margin-top:16px}
#studyCollection .study-open{text-align:left}
@media(max-width:720px){#studyCollection .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

#studyCollection .study-status-inline{display:inline-flex;align-items:center;gap:12px;white-space:nowrap}
#studyCollection .study-status-inline select{width:180px;min-width:155px;margin:0}

/* Summary: five equal cards in one row on desktop; scroll instead of wrapping on narrow screens. */
#studyCollection #studyMetrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px;align-items:stretch}
#studyCollection #studyMetrics .study-metric{min-width:0}
#studyCollection #studyMetrics .study-metric:last-child{background:#fff5e9;border-color:#efd5ae}
#studyCollection #studyMetrics .study-metric:last-child strong{color:#a45a13}
@media(max-width:900px){#studyCollection #studyMetrics{gap:8px}#studyCollection #studyMetrics .study-metric{padding:12px}}
@media(max-width:600px){#studyCollection #studyMetrics{grid-template-columns:repeat(5,minmax(115px,1fr));overflow-x:auto;padding-bottom:5px}}

/* Study collection visual refinement — scoped only to this view. */
#studyCollection #studyMetrics .study-metric:first-child{background:#F0F8EC;border-color:#C9E2C1}
#studyCollection #studyMetrics .study-metric:first-child small{color:#536D50;opacity:1}
#studyCollection #studyMetrics .study-metric:first-child strong{color:#183D2B}
#studyCollection .study-filter-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:center;column-gap:28px;padding:18px 24px;margin:0}
#studyCollection .study-filter-toolbar .study-search-box{width:100%;min-width:0;margin:0;box-sizing:border-box;height:48px;display:flex;align-items:center}
#studyCollection .study-filter-toolbar .study-search-box input{height:100%;min-width:0;width:100%;box-sizing:border-box}
#studyCollection .study-filter-toolbar .study-status-inline{display:flex;align-items:center;justify-content:flex-end;gap:14px;height:48px;margin:0;white-space:nowrap}
#studyCollection .study-filter-toolbar .study-status-inline>span{font-weight:600;white-space:nowrap}
#studyCollection .study-filter-toolbar .study-status-inline select{height:48px;min-height:48px;width:190px;min-width:0;margin:0;box-sizing:border-box}
#studyCollection .table-wrap{margin:0 24px 20px;border:1px solid #e6ebf2;border-radius:12px;overflow-x:auto}
#studyCollection .table-wrap table{min-width:880px;width:100%;border-collapse:collapse}
#studyCollection .table-wrap th,#studyCollection .table-wrap td{padding:15px 17px;vertical-align:middle}
#studyCollection .table-wrap th:first-child,#studyCollection .table-wrap td:first-child{padding-left:22px;width:75px}
#studyCollection .table-wrap th:last-child,#studyCollection .table-wrap td:last-child{padding-right:22px}
#studyCollection .table-wrap thead th{background:#f7f9fc}
#studyCollection .table-wrap tbody tr:hover{background:#f9fbff}
@media(max-width:850px){#studyCollection .study-filter-toolbar{grid-template-columns:minmax(0,1fr);gap:14px;padding:16px}#studyCollection .study-filter-toolbar .study-status-inline{justify-content:flex-start}#studyCollection .table-wrap{margin:0 16px 16px}}

/* Precisely align "처리 상태" label with the selected "전체" baseline. */
#studyCollection .study-filter-toolbar .study-status-inline{
  display:flex;flex-direction:row;align-items:center;justify-content:flex-end;
  gap:14px;height:48px;min-height:48px;padding:0;margin:0;
}
#studyCollection .study-filter-toolbar .study-status-inline>span{
  display:flex;align-items:center;align-self:center;height:48px;
  line-height:24px;margin:0;padding:0;font-size:16px;
}
#studyCollection .study-filter-toolbar .study-status-inline>select{
  align-self:center;height:48px;line-height:24px;
  padding-top:0;padding-bottom:0;font-size:16px;vertical-align:middle;
}

/* Align university detail body with the panel heading. */
#studyCollection #studyDetailContent{padding:0 24px 24px;box-sizing:border-box}
@media(max-width:850px){#studyCollection #studyDetailContent{padding:0 16px 20px}}

/* University detail v2 — all styles scoped; list and summary cards unchanged. */
#studyCollection #studyDetailContent{padding:0 24px 28px}
#studyCollection .study-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap;padding:4px 0 18px}
#studyCollection .study-detail-head h3{margin:0 0 8px;font-size:20px}
#studyCollection .study-detail-muted{color:#65758b;font-size:13px;line-height:1.55;margin:8px 0}
#studyCollection .study-detail-pill{border-radius:18px;padding:6px 12px;background:#eef2f8;color:#364a66;font-size:12px;font-weight:700}
#studyCollection .study-detail-block{border-top:1px solid #e7ebf1;padding:20px 0 8px}
#studyCollection .study-detail-block h4{font-size:16px;margin:0 0 8px;color:#203853}
#studyCollection .study-detail-table-scroll{overflow-x:auto;border:1px solid #e6ebf2;border-radius:10px;margin-top:14px}
#studyCollection .study-detail-table{width:100%;min-width:720px;border-collapse:collapse}
#studyCollection .study-detail-table th,#studyCollection .study-detail-table td{padding:11px 13px;border-bottom:1px solid #edf0f5;text-align:left;font-size:13px}
#studyCollection .study-detail-table th{background:#f5f8fc;color:#58708b;font-weight:700}
#studyCollection .study-detail-table td:first-child{white-space:nowrap;color:#1b4474}
#studyCollection .study-detail-table tbody tr:last-child td{border-bottom:0}
#studyCollection .study-rank-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
#studyCollection .study-rank-facts>div{background:#f6f8fc;border:1px solid #e8edf4;border-radius:10px;padding:14px;min-width:0}
#studyCollection .study-rank-facts small{display:block;color:#718096;margin-bottom:8px;font-size:12px}
#studyCollection .study-rank-facts strong{font-size:15px;overflow-wrap:anywhere}
#studyCollection .study-detail-workhead{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
#studyCollection .study-work-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:14px 0;border-top:1px solid #edf0f5}
#studyCollection .study-work-row>div{min-width:0;flex:1}
#studyCollection .study-work-row p{font-size:13px;margin:6px 0 0;overflow-wrap:anywhere}
@media(max-width:850px){#studyCollection #studyDetailContent{padding:0 16px 20px}#studyCollection .study-rank-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}

#studyCollection .study-source-note{display:block;color:#7a889d;font-size:11px;margin-top:5px;line-height:1.45;overflow-wrap:anywhere}

/* Phase 1: management queue and manual-review submission buttons (detail only). */
#studyCollection .study-manage-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0 16px}
#studyCollection .study-manage-actions button{min-height:38px}
#studyCollection #studyManagementList{border-top:1px solid #eef2f7;padding-top:12px}
#studyCollection #studyManagementList p{margin:5px 0;padding:4px 0;overflow-wrap:anywhere}

/* Persistent stage review/recheck form: no browser prompts; responsive and accessible. */
#studyEntryDialog{width:min(720px,calc(100vw - 32px));max-height:min(88vh,920px);padding:0;border:1px solid #dce5f0;border-radius:16px;box-shadow:0 24px 75px #17284155;color:#203853;overflow:auto}
#studyEntryDialog::backdrop{background:#10244199}
#studyEntryDialog .study-entry-form{padding:24px}
#studyEntryDialog .study-entry-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
#studyEntryDialog .study-entry-head h3{margin:0;font-size:20px}
#studyEntryDialog #studyEntryClose{border:0;background:transparent;font-size:26px;cursor:pointer;padding:4px 9px}
#studyEntryDialog .study-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:18px 0}
#studyEntryDialog .study-entry-grid label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600}
#studyEntryDialog .study-form-wide{grid-column:1/-1}
#studyEntryDialog input,#studyEntryDialog select,#studyEntryDialog textarea{width:100%;min-width:0;box-sizing:border-box;border:1px solid #d3ddea;border-radius:8px;padding:10px;font:inherit;background:#fff;color:#243952}
#studyEntryDialog textarea{min-height:74px;resize:vertical}
#studyEntryDialog input:focus,#studyEntryDialog select:focus,#studyEntryDialog textarea:focus{outline:2px solid #91b3e5;outline-offset:1px}
#studyEntryDialog .study-entry-error{display:block;padding:12px;border:1px solid #f1c7c5;background:#fff3f2;color:#a32828;border-radius:8px;font-size:13px}
#studyEntryDialog .study-entry-error[hidden]{display:none}
#studyEntryDialog .study-entry-actions{display:flex;justify-content:flex-end;gap:10px;position:sticky;bottom:0;background:#fff;padding-top:12px;border-top:1px solid #edf0f4}
@media(max-width:600px){#studyEntryDialog .study-entry-grid{grid-template-columns:1fr}#studyEntryDialog .study-entry-form{padding:16px}}

#studyEntryDialog input[readonly]{background:#f3f6fb;color:#51627b;cursor:default}
#studyEntryDialog #studyFieldNotice{margin:0;font-weight:400}

/* Phase1: explicit proposal preview. Never claim an unprovided effective current value. */
#studyEntryDialog .study-entry-compare{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:14px;border:1px solid #dfe8f3;background:#f8fbff;border-radius:10px;margin-bottom:14px}
#studyEntryDialog .study-entry-compare[hidden]{display:none}
#studyEntryDialog .study-entry-compare>div{display:flex;flex-direction:column;gap:5px;min-width:0}
#studyEntryDialog .study-entry-compare small{color:#65758b}
#studyEntryDialog .study-entry-compare strong{overflow-wrap:anywhere}
#studyEntryDialog .study-entry-compare p{grid-column:1/-1;margin:0}
@media(max-width:600px){#studyEntryDialog .study-entry-compare{grid-template-columns:1fr}}

/* Phase 2 Excel QA modal — local browser file inspection only. */
#studyExcelDialog{width:min(1100px,calc(100vw - 32px));height:min(86vh,920px);max-width:none;max-height:none;padding:0;border:1px solid #d8e2ee;border-radius:14px;box-shadow:0 20px 75px #10284044;overflow:hidden}
#studyExcelDialog::backdrop{background:#10244099}
#studyExcelDialog .study-excel-dialog-head{height:54px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 18px;border-bottom:1px solid #e2e8f2;color:#203853}
#studyExcelDialog .study-excel-dialog-head button{border:0;background:transparent;font-size:27px;cursor:pointer}
#studyExcelDialog iframe{width:100%;height:calc(100% - 54px);border:0;background:white}

/* Phase 2 review order is independent from the Ranking column and source collection status. */
#studyCollection .study-filter-toolbar{grid-template-columns:minmax(0,1fr) 300px auto;gap:14px}
#studyCollection #studyPhase2Order{min-height:48px;white-space:nowrap}
#studyCollection #studyPhase2Order[aria-pressed="true"]{background:#e7f1fb;border-color:#7baad7;color:#174677;font-weight:700}
#studyCollection .table-wrap table{min-width:980px}
#studyCollection .table-wrap th:first-child,#studyCollection .table-wrap td:first-child{width:100px;white-space:nowrap}
#studyCollection .study-phase2-detail-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
@media(max-width:1050px){#studyCollection .study-filter-toolbar{grid-template-columns:minmax(0,1fr) auto}#studyCollection #studyPhase2Order{grid-column:1/-1;justify-self:start}}
@media(max-width:850px){#studyCollection .study-filter-toolbar{grid-template-columns:1fr}#studyCollection #studyPhase2Order{grid-column:auto}}
#studyCollection .study-phase2-note{margin:0 24px 12px;color:#596c82;font-size:13px;line-height:1.5}
@media(max-width:850px){#studyCollection .study-phase2-note{margin:0 16px 12px}}

/* Phase 2 is a focused task dialog. It uses Admin's shared palette and form roles. */
#studyPhase2Dialog{width:calc(100vw - 24px);max-width:1760px;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--line);border-radius:12px;background:var(--white);color:var(--ink);overflow:auto}
#studyPhase2Dialog .study-phase2-modal-head{position:sticky;top:0;z-index:2;display:flex;justify-content:space-between;align-items:center;gap:20px;min-height:72px;padding:16px 24px;background:var(--white);border-bottom:1px solid var(--line)}
#studyPhase2Dialog .study-phase2-modal-head h2{margin:0;color:var(--navy);font-size:20px;line-height:1.3}
#studyPhase2Dialog .study-phase2-modal-head button{flex:0 0 auto}
#studyPhase2Dialog .study-phase2-modal-body{padding:20px 24px 28px;font-size:15px;line-height:1.55}
#studyPhase2Dialog .phase2-task-tabs{position:sticky;top:72px;z-index:2;display:flex;gap:6px;overflow-x:auto;padding:8px 0;background:var(--white);border-bottom:1px solid var(--line)}
#studyPhase2Dialog .phase2-task-tabs button{flex:1 0 auto;min-height:44px;padding:9px 14px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--navy2);font-weight:700;cursor:pointer}
#studyPhase2Dialog .phase2-task-tabs button[aria-selected="true"]{background:var(--navy);border-color:var(--navy);color:var(--white);box-shadow:inset 0 -3px 0 var(--gold)}
#studyPhase2Dialog .phase2-node-status{margin:14px 0;padding:11px 14px;border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:8px;background:var(--bg);color:var(--navy2);font-size:13px;line-height:1.5}
#studyPhase2Dialog .phase2-known-guidance{padding:10px 12px;border:1px solid var(--gold);border-radius:8px;background:#fffaf0;color:var(--navy2);font-size:13px}
#studyPhase2Dialog .phase2-stage1-fact{padding:14px 18px;border:1px solid var(--gold);border-radius:10px;background:#fffaf0}
#studyPhase2Dialog .phase2-stage1-fact ul{margin:8px 0;padding-left:22px}
#studyPhase2Dialog .phase2-task-pane[hidden]{display:none}
#studyPhase2Dialog .study-detail-muted{color:var(--muted);font-size:13px;line-height:1.55}
#studyPhase2Dialog .study-detail-block{border-top:1px solid var(--line);padding:18px 0 10px;margin-top:12px}
#studyPhase2Dialog .study-detail-block h4{color:var(--navy);font-size:17px;margin:0 0 10px}
#studyPhase2Dialog #phase2Year{display:inline-block;width:auto;min-width:110px;height:43px;margin-left:8px}
#studyPhase2Dialog .phase2Form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;max-width:880px;margin:14px 0}
#studyPhase2Dialog .phase2Form>p,#studyPhase2Dialog .phase2-field-wide,#studyPhase2Dialog .phase2-form-actions{grid-column:1/-1}
#studyPhase2Dialog .phase2-field{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700;color:var(--navy2)}
#studyPhase2Dialog .phase2-field input,#studyPhase2Dialog .phase2-field select{height:43px;min-width:0}
#studyPhase2Dialog .phase2-field input,#studyPhase2Dialog .phase2-field select,#studyPhase2Dialog .phase2-field textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:var(--white);color:var(--ink)}
#studyPhase2Dialog .phase2-field textarea{min-height:72px;resize:vertical}
#studyPhase2Dialog .phase2-form-actions{display:flex;justify-content:flex-end}
#studyPhase2Dialog .phase2-form-actions .primary{min-width:120px}
#studyPhase2Dialog details.study-detail-block>summary,#studyPhase2Dialog .phase2-fact>summary{color:var(--navy2);font-weight:700;cursor:pointer}
#studyPhase2Dialog .phase2-documents{padding-top:12px;padding-bottom:12px}
#studyPhase2Dialog .phase2-fact{border-top:1px solid var(--line);padding:12px 0}
#studyPhase2Dialog .study-detail-table-scroll{overflow-x:auto;border:1px solid var(--line);border-radius:10px;margin-top:12px}
#studyPhase2Dialog .study-detail-table{width:100%;min-width:680px;border-collapse:collapse}
#studyPhase2Dialog .study-detail-table :is(th,td){padding:10px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:13px}
#studyPhase2Dialog .study-detail-table th{background:var(--bg);color:var(--navy2)}
#studyPhase2Dialog .study-phase2-source-gap{border:1px solid var(--gold);border-radius:12px;background:#fffaf0;padding:18px 20px;margin:16px 0}
#studyPhase2Dialog .study-phase2-source-gap h4{margin:0 0 8px;color:var(--navy);font-size:17px}
#studyPhase2Dialog .study-phase2-source-gap p{margin:8px 0;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-workflow{border:1px solid var(--line);border-radius:12px;background:var(--bg);padding:18px 20px;margin:18px 0}
#studyPhase2Dialog .phase2-scope-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
#studyPhase2Dialog .phase2-scope-grid>div{display:flex;flex-direction:column;gap:4px;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--white)}
#studyPhase2Dialog .phase2-scope-grid strong{color:var(--navy);font-size:13px}
#studyPhase2Dialog .phase2-scope-grid span{overflow-wrap:anywhere;font-size:13px}
#studyPhase2Dialog .phase2-diagnosis{background:var(--white);border:1px solid var(--line);border-left:4px solid var(--gold);border-radius:10px;padding:16px 18px;margin:14px 0}
#studyPhase2Dialog .phase2-diagnosis>strong{color:var(--navy);font-size:16px}
#studyPhase2Dialog .phase2-diagnosis p{margin:8px 0;line-height:1.5}
#studyPhase2Dialog .phase2-diagnosis ul{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:12px 0 0}
#studyPhase2Dialog .phase2-diagnosis li{background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:7px 10px;font-size:13px}
#studyPhase2Dialog .phase2-plan{display:grid;gap:8px;list-style:none;padding:0;margin:14px 0}
#studyPhase2Dialog .phase2-plan li{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;background:var(--white);border:1px solid var(--line);border-radius:8px;line-height:1.5}
#studyPhase2Dialog .phase2-plan li span{display:inline-flex;align-items:center;justify-content:center;flex:none;width:24px;height:24px;background:var(--navy);color:var(--white);border-radius:50%;font-weight:700;font-size:12px}
#studyPhase2Dialog .phase2-stage1-evidence{margin:12px 0;color:var(--navy)}
#studyPhase2Dialog .phase2-stage1-evidence summary{cursor:pointer;font-weight:600}
#studyPhase2Dialog .phase2-known-urls{margin:14px 0;padding:16px 18px;border:1px solid var(--line);border-radius:10px;background:var(--white)}
#studyPhase2Dialog .phase2-known-urls h5{margin:0 0 7px;color:var(--navy);font-size:15px}
#studyPhase2Dialog .phase2-known-urls p{margin:8px 0;line-height:1.5}
#studyPhase2Dialog .phase2-known-urls ul{margin:8px 0 12px;padding-left:20px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-known-urls a{overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-confirm{display:flex;flex-direction:row;align-items:center;gap:8px;font-weight:600;color:var(--navy2)}
#studyPhase2Dialog .phase2-confirm input[type="checkbox"]{width:18px;height:18px;flex:0 0 18px;margin:0;padding:0}
#studyPhase2Dialog .phase2-steps{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px;padding:0;list-style:none}
#studyPhase2Dialog .phase2-steps li{display:flex;flex-direction:column;gap:6px;padding:10px;border:1px solid var(--line);border-top:3px solid var(--gold);border-radius:8px;background:var(--white);font-size:12px}
#studyPhase2Dialog .phase2-steps strong{color:var(--navy);font-size:13px}
#studyPhase2Dialog .phase2-workflow-form{margin:12px 0;border-top:1px solid var(--line);padding-top:12px}
#studyPhase2Dialog .phase2-workflow-form>summary{color:var(--navy2);font-weight:700;cursor:pointer}
#studyPhase2Dialog .phase2-source-list{display:grid;gap:8px;list-style:none;padding:0;margin:12px 0}
#studyPhase2Dialog .phase2-source-list li{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:8px;background:var(--white);padding:10px 12px}
#studyPhase2Dialog .phase2-source-list li>div{display:flex;flex-direction:column;gap:4px;min-width:0}
#studyPhase2Dialog .phase2-source-list span{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-source-list li>.phase2-source-actions{display:flex;flex-direction:column;align-items:flex-start;gap:8px;flex-shrink:0}
#studyPhase2Dialog .phase2-resume-source{display:flex;align-items:end;flex-wrap:wrap;gap:8px}
#studyPhase2Dialog .phase2-resume-source label{display:grid;gap:4px;font-size:12px;color:var(--navy2)}
#studyPhase2Dialog .phase2-resume-source input{max-width:240px;font-size:12px}
@media(max-width:720px){#studyPhase2Dialog .phase2-source-list li{align-items:stretch;flex-direction:column}}
#studyPhase2Dialog .phase2-source-files{border:1px solid var(--line);border-radius:12px;padding:18px 20px;margin:18px 0}
#studyPhase2Dialog .phase2-draft{border:1px solid var(--line);border-radius:12px;padding:18px 20px;margin:18px 0}
#studyPhase2Dialog .phase2-manual{border:1px solid var(--line);border-top:3px solid var(--gold);border-radius:12px;background:var(--white);padding:18px 20px;margin:18px 0}
#studyPhase2Dialog .phase2-manual>details>summary{color:var(--navy2);font-weight:700;cursor:pointer}
#studyPhase2Dialog .phase2-manual-path{color:var(--muted);font-weight:400;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-manual-list{list-style:none;margin:12px 0;padding:0;display:grid;gap:10px}
#studyPhase2Dialog .phase2-manual-list li{padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-manual-list p{margin:6px 0;white-space:pre-wrap}
#studyPhase2Dialog .phase2-manual-list small{color:var(--muted)}
#studyPhase2Dialog .phase2-manual-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:18px;align-items:start;margin-top:14px}
#studyPhase2Dialog .phase2-manual-editor,#studyPhase2Dialog .phase2-manual-viewer{min-width:0}
#studyPhase2Dialog .phase2-manual-editor .phase2Form{grid-template-columns:1fr;max-width:none;margin:0}
#studyPhase2Dialog .phase2-manual-editor .phase2Form>*{grid-column:1/-1}
#studyPhase2Dialog .phase2-manual-viewer{position:sticky;top:132px;border:1px solid var(--line);border-radius:8px;padding:10px;background:var(--bg)}
#studyPhase2Dialog .phase2-manual-viewer-head,#studyPhase2Dialog .phase2-manual-viewer-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
#studyPhase2Dialog .phase2-manual-viewer-head strong{color:var(--navy)}
#studyPhase2Dialog .phase2-manual-viewer-head span{font-size:13px;color:var(--muted)}
#studyPhase2Dialog .phase2-manual-viewer iframe{display:block;width:100%;height:min(65vh,700px);min-height:420px;margin:8px 0;border:1px solid var(--line);background:var(--white)}
#studyPhase2Dialog .phase2-manual-viewer-actions{justify-content:flex-start}
#studyPhase2Dialog .phase2-decision-panel{margin:22px 0 6px;padding:16px;border:1px solid var(--gold);border-radius:10px;background:#fffaf0;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-decision-panel h5{margin:0 0 8px;color:var(--navy);font-size:15px}
#studyPhase2Dialog .phase2-decision-candidate{padding:10px 0;border-top:1px solid var(--line)}
#studyPhase2Dialog .phase2-decision-candidate p{margin:5px 0;white-space:pre-wrap;font-size:13px}
#studyPhase2Dialog .phase2-decision-candidate small{color:var(--muted)}
#studyPhase2Dialog .phase2-decision-panel .phase2Form{grid-template-columns:1fr;max-width:none}
#studyPhase2Dialog .phase2-decision-panel .phase2Form>*{grid-column:1/-1}
#studyPhase2Dialog .phase2-packet{margin:20px 0 6px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--bg);overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-packet h5{margin:0 0 8px;color:var(--navy);font-size:15px}
#studyPhase2Dialog .phase2-packet>button{margin:8px 0}
#studyPhase2Dialog .phase2-packet-groups{display:grid;gap:10px;margin:10px 0}
#studyPhase2Dialog .phase2-packet-group{padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--white)}
#studyPhase2Dialog .phase2-packet-group strong{display:block;margin-bottom:8px;color:var(--navy2)}
#studyPhase2Dialog .phase2-packet-group textarea{width:100%;min-height:60px;border:1px solid var(--line);border-radius:8px;padding:10px}
#studyPhase2Dialog .phase2-packet-group .phase2-manual-viewer-actions{margin-top:8px}
#studyPhase2Dialog .phase2-approval{margin-top:18px;padding:14px;border:1px solid var(--line);border-radius:8px;background:var(--white)}
#studyPhase2Dialog .phase2-approval textarea{width:100%;min-height:72px;border:1px solid var(--line);border-radius:8px;padding:10px}
#studyPhase2Dialog .phase2-approval button{margin:10px 0}
#studyPhase2Dialog .phase2-approval-status{margin:8px 0 12px;padding:12px 14px;border:1px solid #c9d8ed;border-radius:8px;background:#f0f6ff;color:#173c70}
#studyPhase2Dialog .phase2-approval-status[hidden]{display:none}
#studyPhase2Dialog .phase2-approval-status p{margin:0;font-weight:600;line-height:1.6}
#studyPhase2Dialog .phase2-approval-status small{display:block;margin-top:5px}
#studyPhase2Dialog .phase2-approval-status small[hidden]{display:none}
#studyPhase2Dialog .phase2-approval-status.is-active p:before{content:'';display:inline-block;vertical-align:-2px;width:14px;height:14px;margin-right:9px;border:2px solid #abc2e2;border-top-color:#173c70;border-radius:50%;animation:phase2-save-spin 1s linear infinite}
#studyPhase2Dialog .phase2-approval-status[data-state="UNCONFIRMED"]{background:#fff8e8;border-color:#e4c582;color:#765511}
#studyPhase2Dialog .phase2-approval-status[data-state="SAVED"],#studyPhase2Dialog .phase2-approval-status[data-state="DONE"],#studyPhase2Dialog .phase2-approval-status[data-state="SAVED_REFRESH_REQUIRED"]{background:#edf8f0;border-color:#afd4b9;color:#216344}
@keyframes phase2-save-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#studyPhase2Dialog .phase2-approval-status.is-active p:before{animation:none}}
#studyPhase2Dialog .phase2-score{margin-top:18px}
#studyPhase2Dialog .phase2-score-compare{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:16px;margin:16px 0}
#studyPhase2Dialog .phase2-score-compare h5{color:var(--navy);font-size:15px;margin:0 0 8px}
#studyPhase2Dialog .phase2-score-compare .phase2-field{display:block;max-width:650px}
#studyPhase2Dialog .phase2-score-compare select{width:100%;min-height:43px;margin-top:6px}
#studyPhase2Dialog .phase2-score-compare-result{margin-top:12px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-score-compare .study-rank-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
#studyPhase2Dialog .phase2-score-compare .study-rank-facts>div{min-width:0;padding:14px;background:var(--white);border:1px solid var(--line);border-radius:10px}
#studyPhase2Dialog .phase2-score-compare .study-rank-facts small{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
#studyPhase2Dialog .phase2-score-compare .study-rank-facts strong{display:block;color:var(--navy);font-size:15px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-score-check{display:flex;align-items:flex-start;gap:8px}
#studyPhase2Dialog .phase2-score-check input{width:auto;margin-top:3px}
#studyPhase2Dialog #phase2ScoreInputResult{margin-top:10px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-score-review{margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
#studyPhase2Dialog .phase2-score-review .phase2-score-check{display:flex;align-items:flex-start;gap:8px;margin:7px 0}
#studyPhase2Dialog .phase2-score-review .phase2-score-check input{width:auto;margin-top:3px}
#studyPhase2Dialog .phase2-score-review textarea{width:100%;border:1px solid var(--line);border-radius:8px;padding:10px}
#studyPhase2Dialog .phase2-score-approve{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
#studyPhase2Dialog .phase2-score-approve button{margin-top:8px}
/* Score uses the same 15px base as the other review pages. */
#studyPhase2Dialog .phase2-score{font-size:15px;line-height:1.6}
#studyPhase2Dialog .phase2-score h4{font-size:18px;margin-bottom:8px}
#studyPhase2Dialog .phase2-score .study-detail-muted{font-size:14px;line-height:1.65}
#studyPhase2Dialog .phase2-score-setup{margin:20px 0 16px;padding:22px 24px;border:1px solid var(--line);border-top:3px solid var(--gold,#d0aa5d);border-radius:12px;background:var(--white)}
#studyPhase2Dialog .phase2-score-setup h5{margin:0 0 6px;color:var(--navy);font-size:17px}
#studyPhase2Dialog .phase2-score-setup>p{margin:0 0 18px}
#studyPhase2Dialog .phase2-score .phase2Form{max-width:1100px;margin:16px 0 0;gap:18px}
#studyPhase2Dialog .phase2-score .phase2-field{min-width:0;font-size:15px;font-weight:600;gap:8px}
#studyPhase2Dialog .phase2-score .phase2-field :is(select,input,textarea){font:inherit;font-weight:400;border-radius:8px}
#studyPhase2Dialog .phase2-score .phase2-field :is(select,input:not([type=checkbox])){min-height:46px}
#studyPhase2Dialog .phase2-score .phase2-form-actions{justify-content:flex-start;gap:10px;margin-top:0}
#studyPhase2Dialog .phase2-score .phase2-form-actions button{font-size:15px;min-height:46px;padding:11px 22px}
#studyPhase2Dialog .phase2-score .phase2-score-check{display:flex;flex-direction:row;align-items:flex-start;gap:10px;max-width:none;font-size:15px;font-weight:500;color:var(--ink);line-height:1.6;cursor:pointer}
#studyPhase2Dialog .phase2-score .phase2-score-check input[type=checkbox]{appearance:auto;width:18px;min-width:18px;height:18px;min-height:18px;flex:0 0 18px;margin:3px 0 0;padding:0;accent-color:var(--navy);box-shadow:none}
#studyPhase2Dialog .phase2-score .phase2-score-check span{min-width:0}
#studyPhase2Dialog .phase2-score-setup .phase2-score-check{padding:14px 16px;border:1px solid var(--line);border-radius:8px;background:var(--bg)}
#studyPhase2Dialog .phase2-score :is(.phase2-score-input-summary,.phase2-score-model,.phase2-score-manual,.phase2-score-history){margin:12px 0;border:1px solid var(--line);border-radius:10px;padding:14px 18px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-score summary{font-size:15px;font-weight:600;color:var(--navy2);cursor:pointer}
#studyPhase2Dialog .phase2-score details[open]>summary{margin-bottom:12px}
#studyPhase2Dialog .phase2-score-compare{padding:20px 24px;margin:20px 0}
#studyPhase2Dialog .phase2-score-compare h5{font-size:17px}
#studyPhase2Dialog .phase2-score-compare .study-rank-facts small{font-size:14px}
#studyPhase2Dialog .phase2-score-compare-result p:last-child{margin-bottom:0}
@media(max-width:650px){#studyPhase2Dialog .phase2-score-setup,#studyPhase2Dialog .phase2-score-compare{padding:16px}#studyPhase2Dialog .phase2-score-setup .phase2-score-check{padding:12px}#studyPhase2Dialog .phase2-score .phase2-form-actions button{width:100%}}
#studyPhase2Dialog .phase2-score .phase2-score-run-status{grid-column:1/-1;margin:0;padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:14px;line-height:1.6;color:var(--muted)}
#studyPhase2Dialog .phase2-score .phase2-score-run-status[data-state="COMPLETE"]{background:#edf8f0;border-color:#afd4b9;color:#216344}
#studyPhase2Dialog .phase2-score .phase2-score-run-status[data-state="UNAVAILABLE"],#studyPhase2Dialog .phase2-score .phase2-score-run-status[data-state="BLOCKED"]{background:#fff8e8;border-color:#e4c582;color:#765511}
#studyPhase2Dialog .phase2-score-setup .phase2-form-actions{flex-wrap:wrap}
#studyPhase2Dialog .phase2-score-setup .phase2-form-actions button[hidden]{display:none}
#studyPhase2Dialog .phase2-score-setup button[type=submit]:disabled{opacity:.6;cursor:not-allowed;box-shadow:none}
/* Keep Score decisions and feedback together inside the review dialog. */
#studyPhase2Dialog .phase2-score .phase2-score-review{margin-top:20px;padding-top:18px}
#studyPhase2Dialog .phase2-score .phase2-score-review .phase2-score-check{margin:10px 0}
#studyPhase2Dialog .phase2-score .phase2-score-note{margin-top:20px}
#studyPhase2Dialog .phase2-score .phase2-score-review small{font-size:14px;font-weight:400;color:var(--muted);line-height:1.6}
#studyPhase2Dialog .phase2-score .phase2-score-review textarea{min-height:96px;resize:vertical}
#studyPhase2Dialog .phase2-score .phase2-score-review .phase2-form-actions{margin-top:18px;gap:12px;flex-wrap:wrap}
#studyPhase2Dialog .phase2-score .phase2-score-approve{margin-top:24px;padding:20px}
#studyPhase2Dialog .phase2-score .phase2-score-scope-saved{display:flex;flex-direction:column;gap:4px;margin:0 0 16px;padding:12px 14px;border:1px solid #afd4b9;border-radius:8px;background:#edf8f0;color:#216344;font-size:15px;line-height:1.6}
#studyPhase2Dialog .phase2-score .phase2-score-scope-saved span{font-size:14px}
#studyPhase2Dialog .phase2-score .phase2-score-approve>button{margin-top:18px;min-height:46px;padding:11px 22px;font-size:15px}
#studyPhase2Dialog .phase2-score .phase2-score-feedback{margin:16px 0 0;padding:12px 14px;border:1px solid #c8d8eb;border-radius:8px;background:#f1f6fc;color:var(--navy);font-size:15px;line-height:1.6;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-score .phase2-score-feedback[hidden]{display:none}
#studyPhase2Dialog .phase2-score .phase2-score-feedback[data-state="INVALID"],#studyPhase2Dialog .phase2-score .phase2-score-feedback[data-state="UNCONFIRMED"]{background:#fff8e8;border-color:#e4c582;color:#765511}
#studyPhase2Dialog .phase2-score .phase2-score-feedback[data-state="SAVED"],#studyPhase2Dialog .phase2-score .phase2-score-feedback[data-state="SAVED_REFRESH_REQUIRED"]{background:#edf8f0;border-color:#afd4b9;color:#216344}
#studyPhase2Dialog .phase2-score .phase2-score-feedback[data-state="SAVING"]:before{content:'';display:inline-block;vertical-align:-2px;width:14px;height:14px;margin-right:9px;border:2px solid #abc2e2;border-top-color:var(--navy);border-radius:50%;animation:phase2-save-spin 1s linear infinite}
#studyPhase2Dialog .phase2-score [aria-invalid="true"]{outline:2px solid #c58b2a;outline-offset:2px}
@media(prefers-reduced-motion:reduce){#studyPhase2Dialog .phase2-score .phase2-score-feedback[data-state="SAVING"]:before{animation:none}}
#studyPhase2Dialog .phase2-draft>details>summary{color:var(--navy2);font-weight:700;cursor:pointer}
#studyPhase2Dialog a{color:var(--navy2);overflow-wrap:anywhere}
#studyPhase2Dialog :is(button,input,select,textarea,summary,a):focus-visible{outline:2px solid var(--blue);outline-offset:2px}
@media(max-width:850px){#studyPhase2Dialog .phase2-steps{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){#studyPhase2Dialog .phase2-manual-split{grid-template-columns:1fr}#studyPhase2Dialog .phase2-manual-viewer{position:static}}
@media(max-width:650px){#studyPhase2Dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px)}#studyPhase2Dialog .study-phase2-modal-head{padding:12px 16px;min-height:62px}#studyPhase2Dialog .study-phase2-modal-body{padding:16px}#studyPhase2Dialog .phase2-task-tabs{top:62px}#studyPhase2Dialog .phase2-task-tabs button{font-size:12px;padding:8px}#studyPhase2Dialog .phase2Form,#studyPhase2Dialog .phase2-scope-grid,#studyPhase2Dialog .phase2-steps{grid-template-columns:1fr}#studyPhase2Dialog .phase2Form>*{grid-column:1/-1}}
@media(max-width:650px){#studyPhase2Dialog .phase2-score-compare .study-rank-facts{grid-template-columns:1fr}}


/* Phase 2 university result view: scoped to Admin navy and gold tokens. */
#studyCollection .study-node0{border:1px solid var(--line,#e4e7eb);border-top:3px solid var(--gold,#d0aa5d);border-radius:12px;background:var(--white,#fff);padding:18px 20px;margin-bottom:16px}
#studyCollection .study-detail-eyebrow{color:var(--gold,#d0aa5d);font-size:12px;font-weight:800;letter-spacing:.08em;margin:0 0 4px}
#studyCollection .study-year-select{display:flex;align-items:center;gap:10px;flex:0 0 auto;white-space:nowrap;font-size:13px;color:var(--navy,#102f63)}
#studyCollection .study-year-select select{width:132px;min-width:100px;flex:0 0 132px;margin:0}
#studyCollection .study-node0-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:14px 0}
#studyCollection .study-node0-grid>div{display:flex;flex-direction:column;gap:6px;background:var(--bg,#f3f6fa);border:1px solid var(--line,#e4e7eb);border-radius:12px;padding:16px;min-width:0}
#studyCollection .study-node0-grid small,#studyCollection .study-node0-grid span{color:var(--muted,#65758b);font-size:13px}
#studyCollection .study-node0-grid strong{color:var(--navy,#102f63);font-size:17px}
#studyCollection .study-detail-tabs{display:flex;gap:8px;flex-wrap:wrap;border-bottom:1px solid var(--line,#e4e7eb);margin:14px 0}
#studyCollection .study-detail-tabs button{border:0;border-bottom:3px solid transparent;background:transparent;color:var(--navy,#102f63);padding:12px 14px;cursor:pointer;font-weight:600}
#studyCollection .study-detail-tabs button[aria-selected="true"]{border-bottom-color:var(--gold,#d0aa5d);font-weight:800}
#studyCollection .study-detail-callout{background:var(--bg,#f3f6fa);border-left:3px solid var(--gold,#d0aa5d);padding:12px 14px;border-radius:4px;color:var(--navy,#102f63)}
#studyCollection .study-legacy-details>summary,#studyCollection [data-study-panel] summary{cursor:pointer;color:var(--navy,#102f63);font-weight:700;padding:10px 0}
#studyCollection .study-history-row{border-top:1px solid var(--line,#e4e7eb);padding:10px 0}
#studyCollection #studyDetailContent :is(button,select,summary):focus-visible{outline:2px solid var(--navy,#102f63);outline-offset:2px}
@media(max-width:650px){#studyCollection .study-node0-grid{grid-template-columns:1fr}#studyCollection .study-detail-tabs button{flex:1 1 auto}}

/* Node 1: reserve a separate status row so saving never shifts the button. */
#studyPhase2Dialog #phase2SearchForm .phase2-form-actions{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  grid-template-rows:auto minmax(1.5em,auto);
  justify-items:end;
  row-gap:6px;
}
#studyPhase2Dialog #phase2SearchForm .phase2-form-actions>button{
  grid-column:1;
  grid-row:1;
}
#studyPhase2Dialog #phase2SearchForm .phase2-search-save-status{
  grid-column:1;
  grid-row:2;
  max-width:100%;
  line-height:1.5;
  text-align:right;
  overflow-wrap:anywhere;
}

/* Statistics sort toolbar and single-line university overview. */
#studyCollection .study-filter-toolbar{grid-template-columns:minmax(200px,1fr) auto auto;gap:16px}
#studyCollection .study-university-scroll{max-width:calc(100% - 48px);overflow-x:auto}
#studyCollection .study-university-table{width:max-content;min-width:100%;table-layout:auto}
#studyCollection .study-university-table th,#studyCollection .study-university-table td,#studyCollection .study-university-table .study-open{white-space:nowrap;word-break:normal;overflow-wrap:normal}
#studyCollection .study-university-table .study-open{width:auto;max-width:none}
@media(max-width:900px){#studyCollection .study-filter-toolbar{grid-template-columns:1fr}#studyCollection .study-filter-toolbar .study-status-inline{justify-content:flex-start}}

/* University overview: numeric columns right, other columns left. */
#studyCollection .study-university-table :is(th,td){text-align:left}
#studyCollection .study-university-table :is(th,td):is(:nth-child(1),:nth-child(3),:nth-child(4),:nth-child(5),:nth-child(7)){text-align:right;font-variant-numeric:tabular-nums}

/* Fact extraction: visible progress, separate setup, plain-language source checks. */
#studyPhase2Dialog .phase2-auto-guide{background:#f4f7fb;border:1px solid var(--line);border-radius:12px;padding:16px 20px;margin:16px 0;color:var(--navy)}
#studyPhase2Dialog .phase2-auto-guide ol{margin:8px 0 0;padding-left:23px;line-height:1.8}
#studyPhase2Dialog .phase2-auto-source{border:1px solid var(--line);border-radius:12px;padding:18px 20px;margin:14px 0;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-auto-source>strong{display:block;margin-bottom:12px}
#studyPhase2Dialog .phase2-auto-worker{color:#805b1c;background:#fff7e6;border-radius:8px;padding:10px 12px}
#studyPhase2Dialog .phase2-auto-worker[data-online="true"]{color:#245c4c;background:#edf7f2}
#studyPhase2Dialog .phase2-auto-status{font-weight:600;color:var(--navy);margin:14px 0}
#studyPhase2Dialog .phase2-auto-result-actions[hidden]{display:none}
#studyPhase2Dialog .phase2-auto-setup{border-top:1px solid var(--line);margin-top:20px;padding-top:14px}
#studyPhase2Dialog .phase2-auto-setup summary{cursor:pointer;font-weight:600}
#studyPhase2Dialog .phase2-auto-existing{background:var(--bg);padding:16px;border-radius:10px;margin:12px 0}
#studyPhase2Dialog .phase2-auto-existing label{display:block;margin-bottom:12px}
#studyPhase2Dialog .phase2-auto-existing select{display:block;max-width:100%;width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;margin-top:8px;background:var(--white);color:var(--navy)}
#studyPhase2Dialog .phase2-draft article+article{margin-top:22px;border-top:1px solid var(--line);padding-top:18px}
#studyPhase2Dialog .phase2-draft-preview{margin-top:16px;scroll-margin-top:150px}
#studyPhase2Dialog .phase2-draft-preview>summary{color:var(--navy2);font-weight:700;cursor:pointer}
#studyPhase2Dialog .phase2-draft-meta{font-size:13px;margin-top:10px;color:var(--muted);overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-manual-import{margin-top:22px;border-top:1px solid var(--line);padding-top:14px}
#studyPhase2Dialog .phase2-extract-warning{background:#fff8e9;border:1px solid #edd6a1;border-left:4px solid var(--gold,#c4a35f);border-radius:10px;padding:18px 20px;margin:20px 0;color:#5d491e;line-height:1.7}
#studyPhase2Dialog .phase2-extract-warning p{margin:8px 0}
#studyPhase2Dialog .phase2-extract-warning ul{padding-left:23px;margin:8px 0}
#studyPhase2Dialog .phase2-extract-warning details{margin-top:12px;font-size:12px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-auto-source .phase2-source-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
/* Review values first; detailed data entry remains an exception. */
#studyPhase2Dialog .phase2-review-first [hidden]{display:none!important}
#studyPhase2Dialog .phase2-review-first label{display:grid;gap:7px;color:var(--navy);font-weight:600;margin:0 0 14px}
#studyPhase2Dialog .phase2-review-first input:not([type=checkbox]):not([type=radio]),#studyPhase2Dialog .phase2-review-first select,#studyPhase2Dialog .phase2-review-first textarea{box-sizing:border-box;width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:9px;background:var(--white);font:inherit;color:var(--navy)}
#studyPhase2Dialog .phase2-review-first textarea{resize:vertical;min-height:80px;font-weight:400}
#studyPhase2Dialog .phase2-review-first small{font-size:13px;font-weight:400;color:var(--muted);line-height:1.6}
#studyPhase2Dialog .phase2-review-pickers{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
#studyPhase2Dialog .review-progress{font-size:13px;color:var(--muted);line-height:1.7;margin:4px 0 14px}
#studyPhase2Dialog .phase2-review-value{padding:18px;border:1px solid #cbd8eb;background:#f5f8fd;border-radius:12px;margin-bottom:16px}
#studyPhase2Dialog .phase2-review-value h5,#studyPhase2Dialog .phase2-review-evidence h5{font-size:17px;color:var(--navy);margin:0 0 10px}
#studyPhase2Dialog .phase2-review-value>p{font-size:22px;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 12px;font-weight:700}
#studyPhase2Dialog .phase2-review-value .review-last{font-size:14px;font-weight:500;color:var(--navy2)}
#studyPhase2Dialog .phase2-review-evidence{padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--white);margin-bottom:18px}
#studyPhase2Dialog .review-evidence-kind{font-size:13px;line-height:1.6;color:var(--muted)}
#studyPhase2Dialog .review-quote{border-left:3px solid var(--gold);padding:8px 12px;margin:8px 0 12px;white-space:pre-wrap;line-height:1.7;color:var(--navy);background:#fffaf0}
#studyPhase2Dialog .review-quote:empty{display:none}
#studyPhase2Dialog .review-evidence-edit summary,#studyPhase2Dialog .phase2-review-advanced summary,#studyPhase2Dialog .review-technical summary{cursor:pointer;font-weight:600;color:var(--navy2)}
#studyPhase2Dialog .review-evidence-edit[open]>label:first-of-type{margin-top:14px}
#studyPhase2Dialog .phase2-review-modes{border:0;padding:0;margin:0 0 16px;display:flex;gap:8px;flex-wrap:wrap}
#studyPhase2Dialog .phase2-review-modes legend{font-size:14px;font-weight:600;margin-bottom:9px;color:var(--navy)}
#studyPhase2Dialog .phase2-review-modes label{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;padding:11px 14px;flex:1;justify-content:center;margin:0;cursor:pointer;white-space:nowrap}
#studyPhase2Dialog .phase2-review-modes label:has(input:checked){background:var(--navy);color:white;border-color:var(--navy)}
#studyPhase2Dialog .review-check{display:flex;align-items:flex-start;gap:9px;font-weight:500;line-height:1.7;font-size:14px}
#studyPhase2Dialog .review-check input{flex:none;margin-top:5px}
#studyPhase2Dialog .review-save-status{color:var(--navy2);font-size:14px;line-height:1.6}
#studyPhase2Dialog .phase2-review-form>button{min-height:44px;width:100%}
#studyPhase2Dialog .review-technical{margin-top:18px;font-size:12px;color:var(--muted)}
#studyPhase2Dialog .review-technical code{display:block;margin-top:8px;overflow-wrap:anywhere}
#studyPhase2Dialog .phase2-review-advanced{margin-top:22px;border-top:1px solid var(--line);padding-top:16px}
#studyPhase2Dialog .phase2-review-advanced>p,#studyPhase2Dialog .phase2-review-empty{font-size:14px;line-height:1.7;color:var(--muted)}
/* Keep confirmation controls compact, before the first line of their label. */
#studyPhase2Dialog .phase2-review-first label.review-check{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:start;gap:10px}
#studyPhase2Dialog .phase2-review-first .review-check input[type="checkbox"]{width:18px;height:18px;min-width:18px;max-width:18px;min-height:18px;margin:3px 0 0;padding:0;box-sizing:border-box;justify-self:start;align-self:start}
#studyPhase2Dialog .phase2-review-first .review-check>span{display:block;min-width:0;margin:0;line-height:1.7}
#studyPhase2Dialog .phase2-review-first .phase2-review-modes label{display:flex;align-items:center}
#studyPhase2Dialog .phase2-review-first .phase2-review-modes input[type="radio"]{width:16px;height:16px;min-width:16px;min-height:16px;flex:0 0 16px;margin:0;padding:0;box-sizing:border-box}
/* Human-readable source context and saved review feedback. */
#studyPhase2Dialog .review-source-progress{border:1px solid #d8e3ef;border-radius:10px;background:#f5f9fe;padding:12px 14px;margin:0 0 18px;font-size:14px;line-height:1.7;color:var(--navy)}
#studyPhase2Dialog .review-source-progress p{margin:0 0 6px}
#studyPhase2Dialog .review-source-progress details summary{cursor:pointer;font-weight:600}
#studyPhase2Dialog .review-source-progress ul{padding:0;list-style:none;max-height:300px;overflow:auto}
#studyPhase2Dialog .review-source-progress li{border-top:1px solid var(--line);padding:12px 0;overflow-wrap:anywhere}
#studyPhase2Dialog .review-source-progress li>strong{display:block}
#studyPhase2Dialog .review-source-progress li>p{white-space:pre-wrap;margin:6px 0}
#studyPhase2Dialog .review-source-progress small{font-size:12px;color:var(--muted)}
#studyPhase2Dialog .phase2-review-first .review-badge{display:inline-block;border-radius:6px;padding:3px 8px;font-size:13px;font-weight:600;line-height:1.5;background:#eef2f7;color:#46566b;margin:4px 5px 4px 0}
#studyPhase2Dialog .phase2-review-first .review-status-matched{background:#e2f3eb;color:#175c43}
#studyPhase2Dialog .phase2-review-first .review-status-corrected{background:#e4eefb;color:#244c88}
#studyPhase2Dialog .phase2-review-first :is(.review-status-held,.review-status-stale){background:#fff0cf;color:#795a17}
#studyPhase2Dialog .review-context-table{border:1px solid var(--line);border-radius:10px;padding:14px;margin:0 0 18px;overflow:auto;background:var(--white)}
#studyPhase2Dialog .review-context-table h5{font-size:16px;margin:0 0 10px;color:var(--navy)}
#studyPhase2Dialog .review-context-table table{table-layout:auto;width:100%;border-collapse:collapse;font-size:14px}
#studyPhase2Dialog .review-context-table :is(th,td){padding:9px 10px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere}
#studyPhase2Dialog .review-context-table th{font-weight:600;color:var(--navy);min-width:110px}
#studyPhase2Dialog .review-context-table :is(tr.is-reviewing,td.is-reviewing){background:#fff2d5}
#studyPhase2Dialog .review-context-table .is-reviewing small{display:block;color:#74511b;font-weight:600}
#studyPhase2Dialog .review-context-note{font-size:13px;line-height:1.7;color:#74511b;margin:12px 0 0}
/* Structured schedule corrections, with candidate exclusions visible before confirmation. */
#studyPhase2Dialog .review-schedule{border:1px solid var(--line);border-radius:12px;background:#fff;padding:16px}
#studyPhase2Dialog .review-schedule h5{font-size:18px;color:var(--navy);margin:0 0 12px}
#studyPhase2Dialog .review-schedule p{font-size:14px;line-height:1.7;color:var(--muted)}
#studyPhase2Dialog .review-schedule-rows fieldset{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;border:1px solid var(--line);border-radius:10px;padding:14px;margin:14px 0}
#studyPhase2Dialog .review-schedule-rows legend{font-weight:700;color:var(--navy);padding:0 5px}
#studyPhase2Dialog .review-schedule-rows label{margin:0}
#studyPhase2Dialog .review-schedule-rows input[type="date"]{min-width:0}
#studyPhase2Dialog .review-schedule-rows button{justify-self:start;grid-column:1/-1}
#studyPhase2Dialog .schedule-candidates{margin:18px 0;padding:14px;background:#fffaf0;border:1px solid #ead9b2;border-radius:9px}
#studyPhase2Dialog .schedule-candidates summary{cursor:pointer;font-weight:600;color:var(--navy)}
#studyPhase2Dialog .schedule-candidates div>p{display:flex;justify-content:space-between;gap:12px;border-top:1px solid #e9dfca;padding:8px 0;margin:0;flex-wrap:wrap}
#studyPhase2Dialog .schedule-candidates strong{color:#71531b;font-size:13px}
#studyPhase2Dialog .schedule-evidence{padding:14px;border:1px solid var(--line);border-radius:9px;margin:16px 0}
#studyPhase2Dialog .schedule-evidence legend{font-weight:600;color:var(--navy)}
#studyPhase2Dialog .schedule-actions{display:flex;flex-wrap:wrap;gap:10px}
#studyPhase2Dialog .schedule-actions button{min-height:44px}
#studyPhase2Dialog .schedule-technical{margin:16px 0;font-size:13px}
#studyPhase2Dialog .schedule-technical pre{white-space:pre-wrap;overflow-wrap:anywhere;max-height:280px;overflow:auto;font-size:12px}
@media(max-width:600px){#studyPhase2Dialog .review-schedule-rows fieldset{grid-template-columns:minmax(0,1fr)}}
/* Common Fact editing: values and conditions share one human-readable form. */
#studyPhase2Dialog .review-common {margin-top:24px;padding-top:20px;border-top:1px solid #dbe4f1;}
#studyPhase2Dialog .common-panel {margin-top:18px;padding:20px;background:#f7f9fd;border:1px solid #dbe4f1;border-radius:14px;min-width:0;}
#studyPhase2Dialog .common-panel[hidden] {display:none;}
#studyPhase2Dialog .common-node {min-width:0;}
#studyPhase2Dialog .common-node h6 {font-size:1rem;margin:16px 0 10px;}
#studyPhase2Dialog .common-row {margin:12px 0;padding:14px;background:#fff;border:1px solid #dbe4f1;border-radius:10px;}
#studyPhase2Dialog .common-row summary {cursor:pointer;font-weight:700;margin-bottom:12px;}
#studyPhase2Dialog .common-row.is-excluded {background:#fff3e1;border-style:dashed;}
#studyPhase2Dialog .common-node label {display:grid;gap:8px;margin:14px 0;}
#studyPhase2Dialog .common-node textarea {width:100%;min-height:64px;box-sizing:border-box;resize:vertical;}
#studyPhase2Dialog .common-node pre {white-space:pre-wrap;overflow-wrap:anywhere;max-height:180px;overflow:auto;font-size:12px;}
#studyPhase2Dialog .common-diff {margin:16px 0;overflow-wrap:anywhere;}
#studyPhase2Dialog .common-before-after {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
#studyPhase2Dialog .common-before-after article {padding:12px;background:white;border:1px solid #dbe4f1;border-radius:10px;}
#studyPhase2Dialog .common-before-after article:last-child {background:#edf7f1;}
#studyPhase2Dialog .common-before-after dl {display:grid;grid-template-columns:minmax(70px,1fr) 2fr;gap:6px;}
#studyPhase2Dialog .common-before-after dd {margin:0;}
#studyPhase2Dialog .common-status {font-weight:600;}
@media(max-width:700px){#studyPhase2Dialog .common-before-after {grid-template-columns:1fr;}}
#studyPhase2Dialog .common-scope-form {padding:16px;background:#fff8e7;border-radius:10px;}
#studyPhase2Dialog .common-scope-form [hidden] {display:none;}
#studyPhase2Dialog .common-schedule-scroll {overflow-x:auto;margin:16px 0;}
#studyPhase2Dialog .common-schedule table {min-width:360px;width:100%;table-layout:fixed;border-collapse:collapse;}
#studyPhase2Dialog .common-schedule th,#studyPhase2Dialog .common-schedule td {padding:10px 8px;text-align:left;vertical-align:middle;border-bottom:1px solid #dbe4f1;white-space:nowrap;}
#studyPhase2Dialog .common-schedule input,#studyPhase2Dialog .common-schedule select {display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box;}
#studyPhase2Dialog .common-schedule input[type=date] {min-width:0;font-size:14px;padding:9px 5px;}
#studyPhase2Dialog .common-schedule th:first-child {min-width:100px;}
#studyPhase2Dialog .common-before-after table {width:100%;font-size:14px;border-collapse:collapse;}
#studyPhase2Dialog .common-before-after th,#studyPhase2Dialog .common-before-after td {padding:8px;text-align:left;border-bottom:1px solid #dbe4f1;}

#studyPhase2Dialog .common-schedule td:first-child select {margin-top:8px;}

#studyPhase2Dialog .common-schedule.has-date-range table {min-width:500px;}
#studyPhase2Dialog .common-schedule th:first-child {width:29%;}
#studyPhase2Dialog .common-schedule th:last-child {width:22%;}
#studyPhase2Dialog .common-schedule.has-date-range th:first-child {width:25%;}
#studyPhase2Dialog .common-schedule.has-date-range th:last-child {width:18%;}
#studyPhase2Dialog .common-schedule td>button {padding:8px;white-space:normal;font-size:13px;}
/* Review cards stay compact; source comparison remains alongside the PDF. */
#studyPhase2Dialog .phase2-review-evidence {padding:16px;margin:20px 0;}
#studyPhase2Dialog .review-evidence-edit>summary,#studyPhase2Dialog .common-card>summary {cursor:pointer;font-size:16px;font-weight:700;color:var(--navy);line-height:1.6;}
#studyPhase2Dialog .review-evidence-summary {display:block;font-size:13px;font-weight:400;color:var(--muted);margin:5px 0 0 18px;}
#studyPhase2Dialog .review-evidence-edit>p,#studyPhase2Dialog .common-card-help {font-size:14px;line-height:1.7;color:var(--muted);}
#studyPhase2Dialog .review-source-link {margin-top:12px;min-height:42px;}
#studyPhase2Dialog .review-common {border:1px solid var(--line);border-radius:12px;padding:16px;margin:20px 0;}
#studyPhase2Dialog .common-panel {padding:14px;margin-top:12px;}
#studyPhase2Dialog .common-panel>h5,#studyPhase2Dialog .common-panel>h5+p {display:none;}
#studyPhase2Dialog .common-evidence {border:1px solid var(--line);border-radius:10px;padding:14px;margin:18px 0;background:white;}
#studyPhase2Dialog .review-context-table {overflow-x:auto;}
#studyPhase2Dialog .review-context-table table {width:100%;}
#studyPhase2Dialog .review-context-table td,#studyPhase2Dialog .review-context-table th {vertical-align:top;}
#studyPhase2Dialog .review-context-table .review-select-col {width:38px;padding:16px 8px;text-align:center;background:#fff;}
#studyPhase2Dialog input.review-row-check {width:19px;height:19px;min-height:0;margin:2px 0;accent-color:#153569;cursor:pointer;}
#studyPhase2Dialog input.review-row-check:disabled {opacity:.4;cursor:default;}
#studyPhase2Dialog .review-batch {border-top:1px solid var(--line);margin-top:16px;padding-top:12px;}
#studyPhase2Dialog .review-batch>p {font-size:14px;line-height:1.7;}
#studyPhase2Dialog .review-batch-count {font-weight:700;color:var(--navy);}
#studyPhase2Dialog .review-batch-selected {font-size:13px;margin:10px 0;}
#studyPhase2Dialog .review-batch-selected ul {max-height:180px;overflow:auto;line-height:1.7;padding-left:22px;}
#studyPhase2Dialog .review-batch-save {width:100%;margin:8px 0;min-height:46px;}
#studyPhase2Dialog .review-batch-status {color:var(--navy);font-weight:600;}
#studyPhase2Dialog .review-legacy-decision {margin-top:18px;border-top:1px solid var(--line);padding-top:16px;}
#studyPhase2Dialog .review-context-table .review-badge {white-space:normal;}
#studyPhase2Dialog .common-open[hidden] {display:none;}

/* Compact checkbox column; reserve the remaining space for source values. */
#studyPhase2Dialog .review-context-table table.review-selectable-table {table-layout:fixed;min-width:480px;}
#studyPhase2Dialog .review-selectable-table col.review-select-column {width:40px;}
#studyPhase2Dialog .review-selectable-table col.review-status-column {width:96px;}
#studyPhase2Dialog .review-context-table .review-select-col {width:40px;min-width:0;max-width:40px;padding:10px 6px;box-sizing:border-box;white-space:nowrap;}
#studyPhase2Dialog .review-selectable-table th:not(.review-select-col) {min-width:0;}
#studyPhase2Dialog .review-selectable-table td:nth-child(3) {white-space:normal;overflow-wrap:normal;word-break:keep-all;}
#studyPhase2Dialog .common-card-caption {display:block;font-size:13px;font-weight:400;color:var(--muted);line-height:1.65;margin:5px 0 0 18px;}

#studyPhase2Dialog .review-scope-restored {padding:10px 12px;border:1px solid #bdd9cb;background:#eef8f2;color:#23523e;border-radius:9px;font-size:13px;line-height:1.6;}
#studyPhase2Dialog .review-scope-notice {border:1px solid #ead4a3;background:#fff8e8;padding:14px;border-radius:10px;margin:0 0 16px;color:#614a1e;}
#studyPhase2Dialog .review-scope-notice p {margin:0 0 10px;font-size:14px;line-height:1.6;}
#studyPhase2Dialog .review-status-scopeRequired {background:#fff3d6;color:#765112;}
#studyPhase2Dialog .review-status-notStated {background:#e7eff8;color:#315673;white-space:nowrap;}
#studyPhase2Dialog .review-missing-actions {display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;max-width:100%;}
#studyPhase2Dialog .review-missing-actions > button {font-size:12px;padding:5px 8px;white-space:normal;}
#studyPhase2Dialog .review-not-stated-form {flex-basis:100%;padding:12px;background:#f4f7fb;border:1px solid var(--line);border-radius:8px;min-width:0;}
#studyPhase2Dialog .review-not-stated-form label {display:block;margin:8px 0;white-space:normal;}
#studyPhase2Dialog .review-not-stated-form :is(input[type=number],textarea) {width:100%;min-width:0;box-sizing:border-box;}
#studyPhase2Dialog .review-not-stated-form .review-check {display:flex;align-items:flex-start;gap:8px;}
#studyPhase2Dialog .review-not-stated-form .review-check input {flex-shrink:0;}
#studyPhase2Dialog .review-selectable-table td:nth-child(3) {overflow-wrap:anywhere;word-break:normal;}

/* Initial lookup/error message is compact; loaded review keeps its wide workspace. */
#studyPhase2Dialog.phase2-compact {width:calc(50vw - 12px);max-width:880px;min-width:min(480px,calc(100vw - 32px));}
@media(max-width:720px){#studyPhase2Dialog.phase2-compact {width:calc(100vw - 32px);min-width:0;}}

/* Scroll long Fact tables; allow the dialog to continue scrolling at table boundaries. */
#studyPhase2Dialog .review-context-scroll {max-height:50vh;max-height:min(440px,50dvh);overflow-y:auto;overflow-x:auto;overscroll-behavior:auto;scrollbar-gutter:stable;scrollbar-width:auto;scrollbar-color:#8a99ad #eef2f7;}
#studyPhase2Dialog .review-context-scroll::-webkit-scrollbar {width:12px;height:12px;}
#studyPhase2Dialog .review-context-scroll::-webkit-scrollbar-track {background:#eef2f7;}
#studyPhase2Dialog .review-context-scroll::-webkit-scrollbar-thumb {background:#8a99ad;border:3px solid #eef2f7;border-radius:8px;}
#studyPhase2Dialog .review-context-scroll thead th {position:sticky;top:0;z-index:1;background:#f7f9fc;}
#studyPhase2Dialog .review-context-scroll:focus-visible {outline:2px solid var(--navy);outline-offset:2px;}

/* Standard candidate fields retain nested meaning while keeping controls readable. */
#studyPhase2Dialog .standard-value-input{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:8px;margin:8px 0;min-width:0}
#studyPhase2Dialog .standard-value-input>.standard-value-input{margin:0 0 0 12px}
#studyPhase2Dialog .standard-value-input>label{display:flex;gap:6px;align-items:center;font-size:13px}
#studyPhase2Dialog .standard-value-input input[type=checkbox]{width:18px;height:18px;flex:0 0 auto}
#studyPhase2Dialog .standard-value-input>input,#studyPhase2Dialog .standard-value-input>select{box-sizing:border-box;max-width:100%;min-width:0}
#studyPhase2Dialog .standard-correction{border:1px solid var(--line);border-radius:10px;padding:14px}
#studyPhase2Dialog .review-context-table .review-status-notStated{word-break:keep-all;overflow-wrap:normal}

/* Review detail card inherits the same font scale as the item selector. */
#studyPhase2Dialog .phase2-review-value{font-size:inherit;}
#studyPhase2Dialog .phase2-review-value :is(h5,p,small,summary){font-size:inherit;line-height:1.6;}

/* Clicking either the heading text or its checkbox selects the whole table. */
#studyPhase2Dialog .phase2-review-first label.review-select-all-label{display:flex;flex-direction:column;align-items:center;gap:4px;margin:0;cursor:pointer;font-size:inherit;}
#studyPhase2Dialog input.review-select-all{width:19px;height:19px;min-height:0;margin:0;accent-color:#153569;cursor:pointer;}
#studyPhase2Dialog .phase2-review-first label.review-row-evidence{display:flex;flex-direction:column;gap:6px;margin:10px 0 0;font-size:13px;line-height:1.5;white-space:normal;}
#studyPhase2Dialog .phase2-review-first .review-row-evidence select{max-width:100%;min-width:0;font-size:13px;}

.standard-shared-policies{margin:12px 0;padding:14px;border:1px solid #d8e1ef;border-radius:12px}
.standard-shared-policies .standard-policy-entry{display:block;margin-top:16px}
.standard-shared-policies .standard-policy-entry p{margin:8px 0}
.standard-shared-policies .standard-policy-entry small{display:block;color:#66758d}
#studyPhase2Dialog .eligibility-summary{border:1px solid var(--line);border-top:3px solid #d1ac58;border-radius:12px;padding:16px;margin-bottom:18px;background:#fff;font-size:14px;line-height:1.7}
#studyPhase2Dialog .eligibility-summary h5{font-size:16px;color:var(--navy);margin:0 0 8px}
#studyPhase2Dialog .eligibility-summary .eligibility-help{font-size:13px;color:#65758b;margin:8px 0 12px}
#studyPhase2Dialog .eligibility-summary-card{border:1px solid var(--line);border-radius:10px;margin:12px 0;padding:14px;background:#fff}
#studyPhase2Dialog .eligibility-summary-card header{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:0;border:0;background:none}
#studyPhase2Dialog .eligibility-summary-card h6{font-size:15px;color:var(--navy);margin:0}
#studyPhase2Dialog .eligibility-summary-card small{font-size:12px;color:#65758b}
#studyPhase2Dialog .eligibility-summary-card ul{list-style:none;padding:0;margin:12px 0}
#studyPhase2Dialog .eligibility-summary-card li{display:grid;gap:2px;margin:10px 0}
#studyPhase2Dialog .eligibility-summary-card li strong{font-size:13px;color:var(--navy)}
#studyPhase2Dialog .eligibility-summary-card li span{white-space:pre-line;overflow-wrap:anywhere}
#studyPhase2Dialog .eligibility-summary-card .eligibility-logic{padding:10px 12px;margin:12px 0 0;border-radius:8px;background:#f3f6fb;color:var(--navy);font-size:13px}
#studyPhase2Dialog .eligibility-summary-card details{margin-top:12px;font-size:13px;color:#65758b}
#studyPhase2Dialog .eligibility-summary-card details p{white-space:pre-wrap;overflow-wrap:anywhere}
#studyPhase2Dialog .eligibility-summary-card .eligibility-warning{color:#8b5c00}
#studyPhase2Dialog .eligibility-common{padding:12px 14px;border-radius:8px;background:#f3f6fb;color:var(--navy)}
#studyPhase2Dialog .eligibility-common ul{padding-left:20px;margin:6px 0 0}
#studyPhase2Dialog .eligibility-common li{margin:4px 0}
#studyPhase2Dialog .eligibility-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:12px;margin:12px 0}
#studyPhase2Dialog .eligibility-cards .eligibility-summary-card{margin:0}

/* Keep review and batch saving first; open settings and the editor when needed. */
#studyPhase2Dialog :is(.review-more,.review-source-settings,.review-history,.review-item-navigation,.review-item-detail){border:1px solid var(--line);border-radius:10px;padding:12px 14px;margin:10px 0;min-width:0}
#studyPhase2Dialog :is(.review-more,.review-source-settings,.review-history,.review-item-navigation,.review-item-detail)>summary{cursor:pointer;color:var(--navy);font-weight:600;overflow-wrap:anywhere}
#studyPhase2Dialog :is(.review-more,.review-source-settings,.review-history,.review-item-navigation,.review-item-detail)[open]>summary{margin-bottom:12px}
#studyPhase2Dialog .review-task-help{padding:10px 12px;background:#f3f7fc;border-radius:8px;color:var(--navy);line-height:1.6}
#studyPhase2Dialog .review-row-edit{display:block;padding:7px 12px;margin-top:8px;width:100%;min-width:64px}
#studyPhase2Dialog .review-history .review-source-progress{margin:0}
#studyPhase2Dialog .review-item-detail .phase2-review-value{margin-top:12px}

#studyPhase2Dialog .review-current-source{font-size:13px;color:var(--muted);line-height:1.6;overflow-wrap:anywhere;margin:6px 0 12px}

/* Receipt upload uses the same form sizing and confirmation row as other steps. */
#studyPhase2Dialog .phase2-field[hidden],
#studyPhase2Dialog .phase2-form-actions[hidden],
#studyPhase2Dialog .phase2-direct-upload-status[hidden]{display:none!important}
#studyPhase2Dialog .phase2-direct-upload{margin:20px 0;padding:20px;border:1px solid var(--line,#dce4ef);border-radius:12px;background:#fff}
#studyPhase2Dialog .phase2-direct-upload>summary{font-weight:700;color:var(--navy,#143565);cursor:pointer}
#studyPhase2Dialog .phase2-direct-upload-status{grid-column:1/-1;padding:12px 14px;border-radius:8px;background:#fff7e5;color:#885b14;margin:8px 0 0}
