.research-matching-modes { display:flex; gap:8px; flex-wrap:wrap; border-bottom:1px solid var(--line,#d7dfdc); padding:4px 0 16px; margin-bottom:18px; }
/* The matching controls replace timeline recipes, while dates remain editable. */
#graphs-page .analysis-result[data-analyze-result=relationships] :is(#analyze-view-field,#analyze-units,#analyze-recipe-panel,#analysis-result-status) { display:none!important; }
#graphs-page .analyze-lab[data-layout=observatory] .analysis-result[data-analyze-result=relationships] #analyze-canvas-controls { grid-template-columns:minmax(0,1fr); }
.research-matching-modes button { border:1px solid var(--line,#d7dfdc); border-radius:6px; padding:10px 16px; background:var(--paper,#fff); color:var(--ink,#233a36); font:inherit; cursor:pointer; }
.research-matching-modes button[aria-pressed=true] { color:#fff; background:#216c63; border-color:#216c63; }
#research-matching-panel { min-width:0; }
#research-matching-panel [hidden],#research-pairing-temporal[hidden] { display:none!important; }
.research-matching-intro { max-width:78ch; line-height:1.55; }
.research-matching-sources { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }
.research-matching-source-info { font-size:.83rem; line-height:1.5; color:var(--muted,#596b67); }
.research-matching-source-info :is(strong,span) { display:block; overflow-wrap:anywhere; }.research-matching-source-info strong { color:var(--ink,#233a36); font-weight:600; }
.research-matching-source-actions { display:flex; align-items:center; gap:14px; margin-top:12px; }.research-matching-source-actions button { flex:none; }.research-matching-source-actions p { margin:0; max-width:72ch; font-size:.83rem; line-height:1.5; color:var(--muted,#596b67); }
.research-matching-preflight { border-left:3px solid #216c63; background:#f1f6f3; padding:14px 18px; margin:16px 0; font-size:.87rem; line-height:1.5; overflow-wrap:anywhere; }
.research-matching-preflight[data-status=blocked] { border-color:#a66523; background:#fbf5e9; }.research-matching-preflight p { margin:5px 0; }.research-matching-preflight ul { padding-left:20px; margin:8px 0; }.research-matching-preflight .button { margin-top:8px; }
.research-matching-exclusion-help { border-top:1px solid var(--line,#d7dfdc); padding-top:14px; margin-top:14px; font-size:.87rem; line-height:1.55; }.research-matching-exclusion-help ul { padding-left:20px; margin:8px 0; }
.research-matching-purpose { display:grid; grid-template-columns:minmax(240px,1fr) 1fr; align-items:center; gap:18px; margin:18px 0; }
.research-matching-limits { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:18px; border:1px solid var(--line,#d7dfdc); border-radius:6px; margin:18px 0; }
.research-matching-limits legend { padding:0 8px; font-weight:650; }
.research-matching-limits p { grid-column:1/-1; font-size:.83rem; line-height:1.5; margin:0; color:var(--muted,#596b67); }
.research-matching-policies { display:grid; grid-template-columns:minmax(180px,1fr) 1fr; gap:20px; margin-bottom:18px; align-items:center; }
.research-matching-reuse { display:flex; align-items:flex-start; gap:10px; font-size:.9rem; line-height:1.5; }
.research-matching-reuse input { width:18px; height:18px; flex:none; margin-top:4px; }
.research-matching-reuse small { display:block; color:var(--muted,#596b67); }
.research-matching-warnings { border-left:3px solid #b17a2b; background:rgba(177,122,43,.06); padding:12px 18px 12px 32px; line-height:1.5; font-size:.87rem; }
.research-matching-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); gap:14px; padding:18px 0; border-block:1px solid var(--line,#d7dfdc); }
.research-matching-summary dt { font-size:.8rem; color:var(--muted,#596b67); }.research-matching-summary dd { margin:6px 0 0; font-size:1.5rem; font-weight:650; }
.research-matching-chart { overflow:hidden; }.research-matching-chart svg { display:block; width:100%; max-width:100%; height:auto; }
#research-matching-panel select,#research-matching-panel input[type=number] { min-width:0; width:100%; }
#research-matching-table { max-width:100%; overflow:auto; }#research-matching-table td { white-space:nowrap; }
#research-matching-excluded-summary { font-size:.9rem; line-height:1.6; }
@media(max-width:720px) { .research-matching-sources,.research-matching-purpose,.research-matching-policies { grid-template-columns:1fr; }.research-matching-limits { grid-template-columns:1fr; }.research-matching-modes button { flex:1; }.research-matching-source-actions { align-items:flex-start; flex-direction:column; gap:6px; } }
