/* Measured experiments, styled to match the academic project page. */
.lab-section-heading { margin-bottom: 24px; }
.lab-section-heading h2 { margin-top: 4px; }
.lab-eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #658099; }
.lab { padding: 24px; border: 1px solid #d9e2ea; border-radius: 8px; background: #fff; }
.lab [hidden] { display: none !important; }
.lab-loading { padding: 25px; text-align: center; color: #65798b; font-size: 13px; }
.lab-controls { display: grid; grid-template-columns: 1.4fr .7fr 1fr; align-items: end; gap: 20px; margin-bottom: 23px; }
.lab-controls > label { font-size: 12px; font-weight: 600; color: #4e6172; min-width: 0; }
.lab select { display: block; margin-top: 7px; width: 100%; max-width: 100%; height: 36px; border: 1px solid #cbd8e3; border-radius: 5px; background: #fff; color: #3c576e; padding: 6px 9px; font: inherit; font-size: 12px; }
.lab-mode-group { display: flex; border: 1px solid #cbd8e3; border-radius: 5px; overflow: hidden; height: 36px; }
.lab-mode-group button { flex: 1; border: 0; border-right: 1px solid #dce4eb; border-radius: 0; background: #fff; color: #667b8d; padding: 5px 12px; font-size: 12px; }
.lab-mode-group button:last-child { border-right: 0; }
.lab-mode-group button[aria-pressed=true] { background: #eaf3fb; color: #21679e; font-weight: 600; }
.lab button:disabled, .lab select:disabled, .lab input:disabled { opacity: .6; cursor: wait; }
.lab input[type=range] { display: block; width: 100%; accent-color: #307db8; cursor: pointer; margin: 10px 0 0; }
.lab button:focus-visible, .lab select:focus-visible, .lab input:focus-visible { outline: 2px solid #2e81bd; outline-offset: 3px; }
.robust-image-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.robust-image-pair figure { min-width: 0; }
.robust-image-pair figcaption { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.robust-image-pair figcaption strong { font-size: 13px; font-weight: 600; color: #3e596e; }
.robust-image-pair figcaption span { font-size: 10px; font-variant-numeric: tabular-nums; color: #7e8e9c; }
.lab-image-frame { aspect-ratio: 1.3; overflow: hidden; position: relative; border: 1px solid #dce5ed; border-radius: 5px; background: #f3f6f9; display: flex; align-items: center; justify-content: center; }
.lab-image-frame img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lab-image-frame.is-loading::after { content: 'Loading image…'; position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 3px; color: #355b78; background: #fffffff0; font-size: 10px; }
.robust-level-control { margin-top: 22px; padding: 16px 20px; border: 1px solid #dbe6ef; border-radius: 5px; background: #f8fbfe; }
.robust-level-control > div:first-child, .heads-opacity-control > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.robust-level-control label, .heads-opacity-control label { font-size: 12px; font-weight: 600; color: #4e657a; }
.robust-level-control output, .heads-opacity-control output { color: #236a9f; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.robust-level-ticks { display: flex; justify-content: space-between; margin-top: 9px; gap: 6px; color: #7b8c9b; font-size: 10px; }
.robust-level-ticks span { flex: 1; text-align: center; }
.robust-level-ticks span:first-child { text-align: left; }.robust-level-ticks span:last-child { text-align: right; }
.robust-results { display: grid; grid-template-columns: 230px 1fr; gap: 28px; margin-top: 25px; align-items: center; }
.robust-metrics { border-right: 1px solid #e2e8ee; padding-right: 22px; }
#robust-score { display: block; font-size: 37px; line-height: 1.5; font-weight: 550; color: #235f92; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.robust-verdict { color: #627c91; font-size: 11px; margin-bottom: 16px; }
.robust-metrics dl { margin: 0; font-size: 11px; color: #7a8b99; }
.robust-metrics dl div { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; }
.robust-metrics dd { margin: 0; color: #455f75; font-variant-numeric: tabular-nums; }
.lab-small { font-size: 11px; color: #7b8c9b; line-height: 1.75; }
#robust-source-label { margin-top: 13px; color: #526c81; }
.robust-chart-column { min-width: 0; }
.lab-chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #4c6378; font-size: 12px; margin-bottom: 10px; }
.lab-chart-heading strong { font-weight: 600; }.lab-chart-heading > span { font-size: 10px; color: #2f73a7; background: #edf5fb; padding: 3px 7px; border-radius: 4px; }
#robust-curve svg { width: 100%; display: block; overflow: visible; }
#robust-curve [role=button] { cursor: pointer; }
#robust-curve [role=button]:focus-visible { outline: none; filter: drop-shadow(0 0 2px #267bbc); }
.lab-status { margin-top: 17px; color: #566f84; font-size: 12px; line-height: 1.8; }
.lab-protocol { border-top: 1px solid #e5ebf0; margin-top: 18px; padding-top: 12px; }
.lab-protocol summary { font-size: 12px; color: #637d91; }
.lab-protocol p { font-size: 11px; line-height: 1.85; color: #7e8d99; margin-top: 10px; }
.lab-text-button { background: none; border: 0; padding: 0; font: inherit; color: #2673ac; text-decoration: underline; text-underline-offset: 2px; }
.heads-controls { grid-template-columns: 1.4fr 1fr 1fr; }
.heads-context { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: center; padding: 16px; border: 1px solid #e0e8ee; border-radius: 5px; background: #fafcfe; }
.heads-overview { min-width: 0; display: flex; justify-content: center; }
#heads-original { width: 100%; max-width: 280px; }
#heads-original svg { display: block; width: 100%; max-height: 230px; }
.heads-inspection { display: grid; grid-template-columns: 122px 1fr; align-items: center; gap: 18px; }
.heads-crop { width: 122px; height: 122px; border: 1px solid #ccdbe6; border-radius: 5px; overflow: hidden; }
.heads-crop svg { display: block; width: 100%; height: 100%; }
.heads-inspection h3 { font-size: 19px; margin: 5px 0; font-weight: 600; color: #36556e; }
.heads-inspection .lab-small { font-size: 10px; }
.heads-scale { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; font-size: 10px; color: #73889a; }
.heads-scale > div { display: flex; align-items: center; gap: 8px; }.heads-scale i { display: block; width: 180px; height: 9px; border-radius: 5px; background: linear-gradient(90deg,#23395d,#6886ab,#b4bfcb,#f7a342,#ee503c); }
.heads-instruction { font-size: 11px; line-height: 1.8; color: #7a8b98; margin: 14px 0; }
.heads-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.head-card { border: 1px solid #d9e3ec; border-radius: 6px; overflow: hidden; background: #fff; min-width: 0; }
.head-card header { display: flex; justify-content: space-between; align-items: center; padding: 10px; border-bottom: 1px solid #e6edf2; background: #f8fafc; gap: 5px; }
.head-card h3 { color: #3d5c75; font-size: 13px; margin: 0; font-weight: 600; }
.head-card header span { font-size: 9px; color: #7c90a0; }
.head-map { aspect-ratio: 1.16; background: #edf2f6; }
.head-map svg { width: 100%; height: 100%; display: block; }
.head-map [data-head-tile], #heads-original [data-head-tile] { cursor: crosshair; }
.head-map [data-head-tile]:focus-visible, #heads-original [data-head-tile]:focus-visible { outline: none; }
.head-map [data-head-tile]:focus-visible rect, #heads-original [data-head-tile]:focus-visible rect { stroke: #fff; stroke-width: 3px; }
.head-selection { pointer-events: none; }
.head-card footer { border-top: 1px solid #e2eaf1; padding: 10px; }
.head-readout { display: flex; justify-content: space-between; gap: 4px; align-items: center; font-size: 10px; color: #71879a; }
.head-readout strong { font-weight: 600; color: #315f83; font-variant-numeric: tabular-nums; }
.head-ratio-track { position: relative; height: 4px; margin-top: 9px; border-radius: 3px; background: #edf2f6; }
.head-ratio-track i { display: block; height: 100%; width: 0; border-radius: 3px; background: #598bb3; }
.head-ratio-track::after { content: ''; position: absolute; left: 25%; top: -2px; height: 8px; width: 1px; background: #8b9dab; }
.head-ratio-label { display: block; text-align: right; font-size: 9px; color: #8495a3; margin-top: 5px; }
@media(max-width: 950px) {
 .lab-controls { gap: 15px; grid-template-columns: 1.4fr .8fr; }.lab-mode-group { grid-column: 1/-1; }
 .heads-controls { grid-template-columns: 1fr 1fr; }.heads-opacity-control { grid-column: 1/-1; }
 .robust-results { grid-template-columns: 190px 1fr; gap: 20px; }
 .heads-context { gap: 18px; }.heads-inspection { grid-template-columns: 90px 1fr; gap: 12px; }.heads-crop { width: 90px; height: 90px; }
 .heads-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .heads-scale { flex-wrap: wrap; }.heads-scale i { width: 150px; }
}
@media(max-width: 650px) {
 .lab { padding: 17px 13px; }.lab-section-heading { margin-bottom: 20px; }
 .lab-controls { grid-template-columns: 1fr 1fr; gap: 14px 10px; }.lab-controls > label { font-size: 11px; }.lab select { font-size: 11px; padding: 6px; }
 .lab-controls > label:first-child { grid-column: 1/-1; }.lab-mode-group { grid-column: auto; align-self: end; }.lab-mode-group button { padding: 5px 7px; font-size: 11px; }
 .robust-image-pair { gap: 10px; }.lab-image-frame { aspect-ratio: .9; }.robust-image-pair figcaption { display: block; }.robust-image-pair figcaption strong { display: block; font-size: 12px; }.robust-image-pair figcaption span { display: block; font-size: 9px; margin-top: 3px; }
 .robust-level-control { padding: 13px 11px; margin-top: 16px; }.robust-level-ticks { font-size: 8px; gap: 3px; }
 .robust-results { grid-template-columns: 1fr; gap: 23px; }.robust-metrics { border-right: 0; border-bottom: 1px solid #e1e9f0; padding: 0 0 17px; }
 #robust-score { font-size: 34px; }.robust-metrics dl { max-width: 280px; }.lab-chart-heading { font-size: 11px; }
 .lab-small { font-size: 10px; }.lab-status { font-size: 11px; }.lab-protocol p { font-size: 10px; }
 .heads-controls { grid-template-columns: 1fr 1fr; }.heads-opacity-control { grid-column: auto; min-width: 0; }.heads-opacity-control label { font-size: 10px; }.heads-opacity-control output { font-size: 11px; }
 .heads-context { grid-template-columns: 1fr; padding: 12px; gap: 16px; }#heads-original { max-width: 280px; }#heads-original svg { max-height: 220px; }
 .heads-inspection { grid-template-columns: 90px 1fr; }.heads-inspection h3 { font-size: 17px; }.heads-inspection .lab-eyebrow { font-size: 9px; }
 .heads-scale { gap: 9px; justify-content: flex-start; font-size: 9px; }.heads-scale > span:last-child { width: 100%; }.heads-scale i { width: 125px; }
 .heads-instruction { font-size: 10px; }.heads-grid { gap: 9px; }.head-card header { padding: 8px; }.head-card h3 { font-size: 12px; }.head-card header span { font-size: 8px; }
 .head-card footer { padding: 8px; }.head-readout { font-size: 9px; }.head-ratio-label { font-size: 8px; }
}
.head-heat { opacity: var(--head-alpha, .45); pointer-events: none; }
.lab-section-heading > .lab-eyebrow { display: block; text-align: center; }
.robust-image-pair figcaption { margin-top: 0; text-align: left; }
#robust-curve [role=button]:focus { outline: none; }
#robust-curve [role=button]:focus-visible circle:last-of-type { stroke-width: 3; stroke: #174e77; }
.heads-context { min-height: 264px; }
.heads-inspection { min-height: 142px; }
@media(max-width:650px) { .heads-context { min-height: 0; } }
