.comparison{max-width:1500px;margin:auto}.comparison section{margin:24px 0}.comparison h2{font-size:21px;margin:0 0 5px}.comparison h3{font-size:17px;margin:0 0 8px}.comparison p{color:var(--muted)}.comparison .toolbar{background:white;padding:16px;border:1px solid var(--border);border-radius:8px}.comparison .toolbar label{min-width:220px;flex:1}.comparison .toolbar button{min-height:40px}.comparison details{background:white;border:1px solid var(--border);padding:12px 16px;border-radius:8px}.comparison summary{cursor:pointer;font-weight:650}.paired{display:grid;grid-template-columns:repeat(var(--columns,2),minmax(0,1fr));gap:20px}.dataset-panel{min-width:0;background:white;border:1px solid var(--border);border-radius:8px;padding:18px}.plot{height:330px}.plot.tall{height:760px}.comparison table{width:100%;border-collapse:collapse;font-size:13px}.comparison th,.comparison td{text-align:left;border-bottom:1px solid var(--border);padding:7px}.comparison caption{text-align:left;padding:8px 0;color:var(--muted)}.icon-outcomes img{width:34px;height:34px;object-fit:contain;vertical-align:middle;margin-right:7px}.icon-outcomes td:first-child{width:60%}.metric-bar{height:6px;background:#edf0f5;margin-top:4px}.metric-bar span{display:block;height:100%;background:#3156a3}.comparison button:focus-visible,.comparison select:focus-visible,.comparison summary:focus-visible{outline:3px solid #89a6da;outline-offset:3px}.comparison .error{color:#a22626}.dataset-panel .empty{padding:80px 12px;text-align:center}.table-scroll{overflow-x:auto}@media(max-width:850px){.paired{grid-template-columns:1fr}.plot.tall{height:650px}.comparison .toolbar{align-items:stretch}.comparison .toolbar label{min-width:100%}}
.comparison .refresh-bar{display:flex;flex-wrap:wrap;align-items:center;gap:16px}.comparison .check{display:flex;align-items:center;gap:8px;font-weight:400}.comparison .check input{width:18px;height:18px}.comparison #loaded{font-size:13px;color:var(--muted);flex:2}.comparison #studyProgress{background:white;border:1px solid var(--border);border-radius:8px;padding:18px;margin-top:20px}.matrix-icon-key{display:grid;gap:8px;margin-top:12px}.matrix-icon-key span{display:flex;align-items:center;gap:8px;font-size:13px}.matrix-icon-key img{width:38px;height:38px;object-fit:contain}.dataset-panel>button{margin-bottom:10px}.dataset-panel details{padding:10px;margin-top:10px}.comparison select{max-width:100%}
.comparison{width:100%;min-width:0}.comparison .toolbar{min-width:0}.comparison .toolbar label{min-width:0;max-width:100%;flex:1 1 220px}.comparison .toolbar select{min-width:0;width:100%}.comparison #loaded{min-width:0;flex:1 1 220px}.paired,.table-scroll{min-width:0;max-width:100%}.plot{width:100%;min-width:0;overflow:hidden}.matrix-icon-key span{min-width:0;overflow-wrap:anywhere}@media(max-width:850px){.comparison .toolbar label{flex-basis:100%}}
/* Comparison workspace: condition colors stay consistent with the study images. */
#detailDialog{width:calc(100vw - 48px);max-width:1600px;height:calc(100vh - 48px);max-height:none;box-sizing:border-box;border:1px solid #b6c3d5;border-radius:10px;padding:24px;background:#f5f7fa;color:#18202f;overflow:auto}
#detailDialog::backdrop{background:rgba(24,32,47,.55)}
.dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;position:sticky;top:-24px;z-index:5;background:#f5f7fa;padding:16px 0;border-bottom:1px solid #cbd5e1}
.dialog-heading button{flex-shrink:0}.dialog-heading p{max-width:75ch}.combined{height:430px;background:white}.condition-key{font-size:14px;padding:12px;background:#eef2f8;border-left:3px solid #3156a3}#results>section>details{margin-top:12px}#openDetails{margin-top:18px}.matrix-icon-key{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.matrix-icon-key img{width:48px;height:48px;flex-shrink:0}#detailResults section{margin:30px 0}#detailResults .paired{align-items:start}
@media(max-width:850px){#detailDialog{width:calc(100vw - 16px);height:calc(100vh - 16px);padding:12px}.dialog-heading{top:-12px;gap:12px}.dialog-heading h2{font-size:19px}.combined{height:480px}}
/* Combined icon rows retain both condition provenance and the frozen image. */
.icon-outcomes td:first-child{width:30%}.icon-outcomes td:nth-child(2){min-width:180px}.comparison .table-scroll th{vertical-align:top}
/* Per-icon table: one column per condition with that condition's image. */
.icon-outcomes td:first-child{width:auto}.icon-outcomes td:not(:first-child){white-space:nowrap;min-width:150px}.icon-outcomes td img{margin-right:6px}#detailResults h3{margin:22px 0 8px}
/* Feature page tables: sortable headings and the selected feature column. */
.feature-table th button{all:unset;cursor:pointer;font-weight:650}.feature-table th button:focus-visible{outline:3px solid #89a6da}.feature-table .selected{background:#fff6d6}.feature-table td{white-space:nowrap}.feature-table img{width:34px;height:34px;object-fit:contain;vertical-align:middle;margin-right:7px}
