/* Research figures, tables, and aligned prediction comparisons. */
#method, #results, #qualitative, #citation { scroll-margin-top: var(--header-offset, 90px); }
.pipeline-explorer { border: 1px solid var(--line); border-radius: 3px; background: white; overflow: hidden; }
.pipeline-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
.pipeline-toolbar > div { display: flex; align-items: center; gap: 12px; }
.pipeline-toolbar strong { font-weight: 650; }
#pipeline-position { color: var(--muted); font-size: .875rem; }
.pipeline-toolbar button { min-height: 44px; padding: 8px 12px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; background: white; color: var(--ink); cursor: pointer; font-size: .875rem; }
.pipeline-toolbar button:hover { background: var(--soft); border-color: var(--cyan); }
.pipeline-toolbar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.pipeline-toolbar .play-symbol { fill: currentColor; stroke: none; }
.pipeline-toolbar .pause-symbol { display: none; }
.pipeline-explorer[data-playing="true"] .play-symbol { display: none; }
.pipeline-explorer[data-playing="true"] .pause-symbol { display: block; }
.pipeline-stage-buttons { display: grid; grid-template-columns: repeat(5, 1fr); border-block: 1px solid var(--line); }
.pipeline-stage-buttons button { display: flex; align-items: center; gap: 8px; text-align: left; padding: 12px; min-height: 56px; font-size: .875rem; line-height: 1.4; background: white; border: 0; border-right: 1px solid var(--line); color: var(--muted); cursor: pointer; }
.pipeline-stage-buttons button:last-child { border-right: 0; }
.pipeline-stage-buttons span { font-weight: 700; color: var(--cyan); }
.pipeline-stage-buttons button[aria-pressed="true"] { color: var(--cyan); background: var(--selected); box-shadow: inset 0 -2px var(--cyan); }
.pipeline-canvas { padding: 14px 4px 0; overflow-x: auto; }
.pipeline-svg { display: block; width: 100%; height: auto; font-family: inherit; }
.pipeline-canvas.is-focused { height: 540px; }
.pipeline-canvas.is-focused .pipeline-svg { height: 100%; min-width: 0; }
.pipeline-svg.is-focused .p-panel:not(.is-active), .pipeline-svg.is-focused .p-shared, .pipeline-svg.is-focused .p-external { display: none; }
.pipeline-svg text { fill: var(--ink); font-size: 18px; }
.pipeline-svg .p-panel-title { font-size: 18px; font-weight: 650; }
.pipeline-svg .p-model-label { font-size: 18px; font-weight: 600; }
.pipeline-svg .p-image-label { font-size: 16px; }
.pipeline-svg .p-small { font-size: 15px; fill: var(--muted); }
.pipeline-svg .p-formula { font-size: 18px; }
.pipeline-svg .p-pose-label { font-size: 34px; fill: var(--cyan); }
.pipeline-svg .p-rank-label, .pipeline-svg .p-rank-digit { font-size: 12px; }
.p-panel { cursor: pointer; outline: none; }
.p-panel-bg, .p-input-bg { fill: white; stroke: var(--line); stroke-width: 1.3; }
.p-panel.is-active .p-panel-bg { fill: var(--soft); stroke: var(--cyan); stroke-width: 2; }
.p-panel:focus-visible .p-panel-bg { stroke: var(--cyan); stroke-width: 4; }
.p-renderer-bg { fill: var(--soft); stroke: var(--line); }
.p-node, .p-renderer-node, .p-model-box, .p-operator { fill: var(--selected); stroke: #c7b1aa; }
.p-arrow, .p-flow { fill: none; stroke: #94817c; stroke-width: 1.5; marker-end: url(#pipeline-arrow); }
.p-flow.is-flowing { stroke: var(--cyan); stroke-width: 2; }
.p-flow-packet { fill: var(--cyan); }
.p-loop { fill: none; stroke: var(--cyan); stroke-width: 1.5; stroke-dasharray: 5 4; marker-end: url(#pipeline-loop-arrow); }
.p-neuron-link { stroke: #b5867c; stroke-width: 1; }
.p-neuron { fill: var(--accent); }
.p-grid-frame { fill: none; stroke: #cdbeb9; }
.p-seed { fill: none; stroke: white; stroke-width: 2; }
.p-axis { fill: none; stroke: #9e8b83; }
.p-z-bar { fill: #ddcec5; }
.p-z-bar.is-best { fill: var(--orange); }
.cube-top { fill: #d7c9bd; stroke: white; stroke-width: .6; }
.cube-left { fill: #bc9f8e; stroke: white; stroke-width: .6; }
.cube-right { fill: #c8b2a1; stroke: white; stroke-width: .6; }
.is-selected .cube-top { fill: #ffda88; }.is-selected .cube-left { fill: #e5a927; }.is-selected .cube-right { fill: var(--orange); }
.p-particle { fill: var(--accent); opacity: .85; }.p-particle-amber { fill: #b45731; }
.p-particle-target { fill: white; stroke: var(--cyan); stroke-width: 2; }
.p-correspondence { fill: none; stroke: #ffc84f; stroke-width: 2; stroke-dasharray: 6 4; }
.p-correspondences circle { fill: #ffc84f; stroke: #fff; stroke-width: 1.5; }
.p-frustum { fill: none; stroke: var(--cyan); stroke-width: 2; }.p-camera-plane { fill: #f0c5bf; stroke: var(--cyan); }.p-camera-center { fill: var(--cyan); }
.p-candidate { fill: white; stroke: var(--line); }.p-candidate.is-ready { fill: var(--selected); stroke: #bd8b7d; }
.p-rank-1 { fill: #f0c5bf; }.p-rank-2 { fill: #f4ded8; }.p-rank-3 { fill: #f3e4d8; }.p-rank-4 { fill: #edd8d0; }
.p-winning-column { fill: none; stroke: var(--cyan); stroke-width: 2; }.p-winner-check { fill: none; stroke: var(--cyan); stroke-width: 3; }
.pipeline-scrubber { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 10px 24px; color: var(--muted); font-size: .875rem; }
.pipeline-scrubber input[type="range"] { margin: 0; height: 24px; }
.pipeline-scrubber output { font-variant-numeric: tabular-nums; }
.pipeline-explanation { display: grid; grid-template-columns: 1.65fr 1fr; gap: 36px; padding: 24px; border-top: 1px solid var(--line); }
#pipeline-detail-tag { font-size: .875rem; color: var(--cyan); }
.pipeline-explanation h3 { margin: 8px 0; font-size: 1.25rem; font-weight: 650; line-height: 1.3; }
.pipeline-explanation p { margin: 0; color: var(--muted); font-size: 1rem; }
.pipeline-explanation dl { margin: 0; font-size: 1rem; }
.pipeline-explanation dl div + div { margin-top: 16px; }
.pipeline-explanation dt { font-size: .875rem; color: var(--cyan); font-weight: 650; }
.pipeline-explanation dd { margin: 4px 0 0; }
.pipeline-note { margin: 0; padding: 0 24px 20px; font-size: .8125rem; color: var(--muted); }
.results .section-heading { margin-bottom: 28px; }
.dataset-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.dataset-tabs button { min-height: 46px; padding: 10px 18px; border: 1px solid var(--line); background: white; color: var(--muted); border-radius: 5px; cursor: pointer; font-size: 1rem; }
.dataset-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.table-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin: 24px 0 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; color: var(--muted); }
.field select { min-height: 44px; padding: 8px 34px 8px 12px; background: white; border: 1px solid var(--line); border-radius: 5px; font: inherit; color: var(--ink); max-width: 100%; }
.table-hint { color: var(--muted); font-size: .875rem; margin: 0; }
.table-order-controls { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px 16px; }
.table-order-controls button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: var(--panel); font: inherit; font-size: .875rem; cursor: pointer; }
.table-order-controls button:disabled { color: var(--muted); cursor: default; }
#results-order-label { font-weight: 600; color: var(--ink); }
.table-note { color: var(--muted); font-size: .875rem; margin: 14px 0 0; }
.table-scroll { overflow: auto; border: 1px solid var(--line); border-radius: 7px; background: white; }
.results-table { width: 100%; border-collapse: collapse; font-size: .875rem; line-height: 1.45; }
.results-table caption { text-align: left; padding: 18px; font-weight: 600; font-size: 1rem; }
.results-table thead { background: var(--soft); }
.results-table th, .results-table td { padding: 13px 14px; text-align: left; border-top: 1px solid var(--line); }
.results-table th { font-weight: 600; }
.results-table thead th { padding: 0; }
.results-table th button { display: flex; align-items: center; justify-content: space-between; gap: 7px; padding: 14px; min-height: 48px; width: 100%; border: 0; color: var(--ink); font: inherit; background: transparent; cursor: pointer; text-align: left; white-space: nowrap; }
.results-table th button:hover { background: var(--selected); }
.results-table th button span { color: var(--muted); }
.results-table th[aria-sort]:not([aria-sort="none"]) { color: var(--cyan); background: var(--selected); }
.results-table .metric { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.results-table .metric strong { font-weight: 800; }
.results-table .metric u { text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
.results-table tbody tr:hover { background: var(--soft); }
.results-table .ours { background: var(--selected); }
.results-table .ours th { color: var(--accent); }
.results-table .table-group th { padding: 10px 14px; }
.results-table .table-group-category th { background: var(--soft); color: var(--ink); border-top: 2px solid var(--line); font-size: .9375rem; font-weight: 750; }
.results-table .table-group-setup th { padding-left: 26px; background: var(--panel); color: var(--muted); font-weight: 650; }
.results-table .table-group-method th { padding-left: 38px; background: var(--selected); color: var(--accent); font-weight: 700; }
.results-table tbody[data-result-group="planarcityloc"] > tr[data-row-id] > th { padding-left: 38px; }
.results-table .method-note { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; margin-top: 4px; }
.results-table .setup-cell { min-width: 145px; }
.results-table .model-cell { min-width: 130px; }
.results-table [data-table-tip]:not(button) { cursor: help; }
.results-table [data-table-tip]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.results-table .table-footnote { display: inline-block; padding: 0 3px; color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; }
.table-tooltip { position: fixed; z-index: 100; width: max-content; max-width: min(290px, calc(100vw - 24px)); padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); box-shadow: 0 8px 28px #0002; font-size: .875rem; line-height: 1.5; font-weight: 400; text-align: left; overflow-wrap: anywhere; }
.table-tooltip[hidden] { display: none; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.qualitative-viewer { margin-top: 0; }
.qualitative-viewer .sample-toolbar { margin-top: 22px; }
.qualitative-heading { display: flex; gap: 24px; justify-content: space-between; align-items: end; margin-bottom: 22px; }
.qualitative-heading h3 { font-size: 1.65rem; font-weight: 650; letter-spacing: -.025em; margin-bottom: 6px; }
.qualitative-heading p { color: var(--muted); margin: 0; }
.sample-tabs { display: flex; gap: 10px; margin: 20px 0; flex-wrap: wrap; }
.sample-tabs button { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 64px; padding: 6px; background: white; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; cursor: pointer; font-size: .875rem; }
.sample-tabs img { width: 94px; height: 64px; object-fit: contain; background: var(--soft); border-radius: 2px; }
.sample-tabs button[aria-pressed="true"] { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan); }
.sample-toolbar { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.sample-navigation { display: flex; align-items: center; gap: 14px; font-size: .875rem; }
.sample-navigation button { min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; cursor: pointer; }
.sample-navigation button:disabled { color: #72858d; cursor: default; }
.sample-navigation output { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sample-meta { overflow-wrap: anywhere; }
.comparison-card { background: white; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.comparison-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; padding: 18px 22px; }
.comparison-controls > .field:last-child { text-align: right; }
.comparison-controls .field select { width: 100%; }
.comparison-swap { width: 44px; height: 44px; border: 1px solid var(--line); color: var(--ink); background: var(--panel); border-radius: 5px; cursor: pointer; font-size: 1.3rem; }
.comparison-stage { background: var(--soft); padding: 0 18px; }
.comparison-images { position: relative; width: 100%; max-width: 860px; aspect-ratio: 574 / 431; margin-inline: auto; overflow: hidden; --split: 50%; user-select: none; }
.comparison-images > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.comparison-left-image { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.comparison-divider { position: absolute; top: 0; bottom: 0; left: var(--split); width: 2px; background: white; box-shadow: 0 0 4px #0008; transform: translateX(-1px); pointer-events: none; }
.comparison-divider span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; background: #152e35e6; color: white; font-size: 1.2rem; box-shadow: 0 2px 10px #0004; }
.comparison-images input[type="range"] { position: absolute; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; z-index: 4; cursor: ew-resize; touch-action: pan-y; }
.comparison-images:focus-within { outline: 3px solid var(--cyan); outline-offset: -3px; }
.comparison-image-label { position: absolute; top: 12px; padding: 6px 10px; border-radius: 4px; color: white; background: #10242ce6; font-size: .875rem; pointer-events: none; max-width: calc(50% - 20px); }
.comparison-left-label { left: 12px; }.comparison-right-label { right: 12px; text-align: right; }
.comparison-errors { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 16px 22px; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.comparison-errors > :last-child { text-align: right; }
.comparison-errors strong { color: var(--ink); }
.comparison-note { font-size: .875rem; color: var(--muted); margin: 14px 0 0; }
.comparison-note a { text-decoration: underline; text-underline-offset: 3px; }
.pipeline-explorer, .qualitative-viewer { scroll-margin-top: var(--header-offset, 90px); }
.comparison-status { padding: 14px 22px; color: var(--muted); }
.comparison-status:empty { display: none; }
@media (max-width: 900px) {
  .pipeline-stage-buttons { grid-template-columns: repeat(3, 1fr); }
  .pipeline-stage-buttons button { border-bottom: 1px solid var(--line); }
  .pipeline-explanation { gap: 22px; grid-template-columns: 1fr; }
  .qualitative-heading { display: block; }
}
@media (max-width: 700px) {
  .pipeline-toolbar { padding: 12px; }
  .pipeline-toolbar > div { gap: 8px; flex-wrap: wrap; }
  .pipeline-stage-buttons { grid-template-columns: repeat(2, 1fr); }
  .pipeline-stage-buttons button:last-child { grid-column: 1 / -1; }
  .pipeline-canvas:not(.is-focused) .pipeline-svg { min-width: 1080px; }
  .pipeline-canvas.is-focused { height: 460px; }
  .pipeline-explorer[data-stage="2"] .pipeline-canvas.is-focused { height: 290px; }
  .pipeline-explorer[data-stage="2"] .pipeline-canvas.is-focused .pipeline-svg { min-width: 860px; }
  .pipeline-explorer[data-stage="3"] .pipeline-canvas.is-focused { height: 370px; }
  .pipeline-explorer[data-stage="3"] .pipeline-canvas.is-focused .pipeline-svg { min-width: 670px; }
  .pipeline-explanation { padding: 18px; }
  .pipeline-scrubber { padding: 10px 16px; gap: 10px; }
  .pipeline-scrubber label { display: none; }
  .pipeline-scrubber { grid-template-columns: 1fr auto; }
  .pipeline-note { padding-inline: 18px; }
  .table-toolbar { align-items: start; flex-wrap: wrap; gap: 14px; }
  .table-order-controls { justify-content: flex-start; }
  .results-table { min-width: 1030px; }
  .comparison-controls { grid-template-columns: 1fr 44px; padding: 14px; gap: 10px; }
  .comparison-controls > .field:last-child { grid-column: 1; grid-row: 2; text-align: left; }
  .comparison-swap { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .comparison-stage { padding: 0; }
  .sample-toolbar { flex-wrap: wrap; gap: 14px; }
  .sample-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 2px; margin-inline: -2px; }
  .sample-tabs button { flex: none; }
  .comparison-image-label { font-size: .75rem; top: 8px; padding: 4px 6px; }
  .comparison-errors { padding: 14px; gap: 16px; }
  .dataset-tabs button { padding-inline: 12px; }
}
.comparison-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; margin-top: 28px; }
.comparison-grid .comparison-card { min-width: 0; border-radius: 18px; background: var(--panel); align-self: start; }
.comparison-card-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 22px 22px 0; }
.comparison-card-heading span { font-size: .875rem; color: var(--muted); }
.comparison-card-heading h3 { font-size: 1.25rem; margin: 2px 0 0; }
.sample-browser { padding: 16px 22px 0; }
.comparison-grid .sample-navigation { justify-content: space-between; gap: 8px; }
.comparison-grid .sample-navigation button { padding: 6px 10px; background: var(--panel); }
.comparison-grid .sample-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 12px -2px 0; padding: 2px; }
.comparison-grid .sample-tabs button { flex: none; padding: 4px; font-size: .75rem; background: var(--panel); }
.comparison-grid .sample-tabs img { width: 74px; height: 50px; }
.comparison-grid .comparison-controls { gap: 8px; padding: 18px 16px; grid-template-columns: minmax(0,1fr) 36px minmax(0,1fr); }
.comparison-grid .field { min-width: 0; font-size: .875rem; }
.comparison-grid .field select { padding-left: 9px; padding-right: 16px; font-size: .8125rem; }
.comparison-grid .comparison-controls > .field:last-child { grid-column: auto; grid-row: auto; text-align: right; }
.comparison-grid .comparison-swap { width: 36px; grid-column: auto; grid-row: auto; align-self: end; }
.comparison-grid .comparison-stage { padding: 0; }
.comparison-grid .comparison-errors { gap: 10px; padding: 16px; }
.comparison-grid .comparison-image-label { font-size: .75rem; }
.comparison-frame { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; padding: 0 16px 16px; margin: 0; }
@media (max-width: 800px) { .comparison-grid { grid-template-columns: 1fr; } }
