/* Title and names use the regular Google Sans face only, exactly as the QOED page loads it
   (its 600 weight is then rendered the same way). */
@font-face { font-family: 'Google Sans Regular'; font-style: normal; font-weight: 400; font-display: swap;
  src: url(https://fonts.gstatic.com/s/googlesans/v76/4Ua_rENHsxJlGDuGo1OIlJfC6l_24rlCK1Yo_Iqcsih3SAyH6cAwhX9RFD48TE63OOYKtrwEIJllpyk.woff2) format('woff2'); }

:root {
  --ink: #29282c;
  --muted: #68656e;
  --accent: #70559a;
  --accent-hover: #594279;
  --line: #e6e3eb;
  --surface: #faf9fc;
}

html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: 'Noto Sans', sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
figure { margin: 0; }
.page-container { width: min(1080px, calc(100% - 64px)); margin-inline: auto; }
.text-container { width: min(800px, calc(100% - 64px)); margin-inline: auto; }

.publication-header { padding: 44px 0 0; text-align: center; }
.publication-title {
  margin: 0;
  font-family: 'Google Sans Regular', 'Google Sans', sans-serif;
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.125;
  text-wrap: balance;
}
.publication-subtitle {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 600;
  line-height: 1.125;
}
.publication-teaser { margin: 24px auto 18px; }
.publication-teaser img { display: block; width: 100%; height: auto; }
.publication-teaser figcaption { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 20px; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.teaser-legend { display: inline-flex; align-items: center; gap: 8px; }
.legend-endpoint { font-size: 11px; }
.axle-color-scale { display: inline-block; width: 68px; height: 8px; border-radius: 2px; background: linear-gradient(to right, #edb0a9, #b5484b, #6e1427); }
.publication-authors { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 28px; font-family: 'Google Sans Regular', 'Google Sans', sans-serif; font-size: 20px; line-height: 1.5; }
.publication-authors a { color: #000; }
.publication-affiliation { margin: 4px 0 0; color: #000; font-family: 'Google Sans Regular', 'Google Sans', sans-serif; font-size: 20px; }
/* venue line as on the QOED page (Bulma title is-4, Google Sans, blue) */
.publication-venue { margin: 16px 0 20px; font-family: 'Google Sans Regular', 'Google Sans', sans-serif; font-size: 1.5rem; font-weight: 600; line-height: 1.125; }
.publication-venue a { color: #0F4BEA; }
.publication-venue a:hover { color: #0F4BEA; text-decoration: underline; }
.publication-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.resource-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.resource-link svg { width: 1em; }
.resource-link.is-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.resource-link.is-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.resource-link.is-pending { color: var(--muted); background: var(--surface); }
.resource-status { margin-left: 3px; font-size: 12px; font-weight: 400; }

.paper-section { padding: 58px 0; scroll-margin-top: 24px; }
h2 {
  margin: 0 0 24px;
  font-family: 'Google Sans', 'Noto Sans', sans-serif;
  font-size: clamp(1.45rem, 2.6vw, 1.8rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.3;
  text-align: center;
  text-wrap: balance;
}
.overview-copy { max-width: 800px; margin-inline: auto; color: #48454e; text-align: left; }
.overview-copy p + p { margin-top: 18px; }
.overview-copy strong { color: var(--ink); font-weight: 600; }
.overview-copy .result-highlight { color: var(--accent); }
.overview-tabs { display: flex; justify-content: center; gap: 6px; margin: 0 auto 28px; }
.overview-tabs[hidden], .explanation-panel[hidden] { display: none; }
.overview-tabs button {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.overview-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.overview-tabs button:hover:not([aria-selected="true"]) { background: var(--surface); color: var(--ink); }
.overview-tabs button:focus-visible, .explanation-panel:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.method-figure { margin: 32px 0 26px; }
.method-figure img { display: block; width: 100%; height: auto; }
.method-figure figcaption { margin-top: 16px; color: var(--muted); text-align: center; font-size: 14px; }
.method-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; list-style: none; counter-reset: method-step; }
.method-steps li { border-top: 1px solid var(--line); padding-top: 16px; counter-increment: method-step; }
.method-steps h3 { margin: 0 0 8px; font-size: 16px; font-weight: 600; line-height: 1.5; }
.method-steps h3::before { content: counter(method-step) ". "; color: var(--accent); }
.method-steps p, .method-note { color: #48454e; font-size: 14px; line-height: 1.75; }
.method-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.method-note strong { color: var(--ink); font-weight: 600; }
.experiments-section { background: var(--surface); border-block: 1px solid var(--line); }
.section-heading { margin-bottom: 30px; text-align: center; }
.section-heading h2 { margin-bottom: 10px; }
.section-heading p { color: var(--muted); font-size: 15px; }
.experiment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }
.experiment { min-width: 0; }
.experiment video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #211f24;
}
.experiment figcaption { margin-top: 10px; text-align: center; font-size: 14px; font-weight: 500; }

.results-figure { margin-top: 32px; }
.figure-link { display: block; border-radius: 4px; cursor: zoom-in; }
.results-figure img { display: block; width: 100%; height: auto; }
.figure-note { margin: 20px 0; color: var(--muted); font-size: 13px; text-align: center; }
.site-footer { padding: 24px 24px 32px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 12px; }
.site-footer a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.skip-link { position: absolute; top: 8px; left: 16px; padding: 8px 16px; background: #fff; transform: translateY(-160%); z-index: 1; }
.skip-link:focus { transform: translateY(0); }

@media (max-width: 640px) {
  .page-container, .text-container { width: calc(100% - 36px); }
  .publication-header { padding-top: 28px; }
  .publication-teaser { margin: 20px auto 16px; }
  .publication-links { gap: 8px; }
  .resource-link { padding: 8px 12px; font-size: 13px; gap: 6px; }
  .resource-status { font-size: 11px; }
  .paper-section { padding: 40px 0; }
  .overview-copy { font-size: 15px; }
  .experiment-grid, .method-steps { grid-template-columns: 1fr; }
  .method-steps { gap: 18px; }
  .experiment-grid { gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* One video beside eight interactive views, sharing one canvas. */
.teaser-comparison { display: grid; grid-template-columns: 1fr 2fr; gap: 2px; align-items: stretch; }
.teaser-real { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px 0 0 5px; background: #ddd; }
.teaser-simulations { min-width: 0; position: relative; aspect-ratio: 2; }
.teaser-preview { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0 5px 5px 0; overflow: hidden; background: #eee; cursor: pointer; }
.teaser-preview:disabled { cursor: default; }
.teaser-preview:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.teaser-preview img { height: 100%; object-fit: cover; }
.teaser-preview-action { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 18px; padding: 9px 16px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent); background: rgba(255,255,255,.96); font: 500 13px 'Noto Sans', sans-serif; white-space: nowrap; }
.teaser-preview:hover .teaser-preview-action { background: #fff; border-color: #b4a2cc; }
.teaser-preview[hidden], .teaser-preview-action[hidden], .teaser-explorer[hidden], .viewer-status[hidden], .viewer-toolbar[hidden] { display: none; }
.teaser-explorer, .viewer-viewport { width: 100%; height: 100%; }
.viewer-viewport { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); background: #e3e3e3; border-radius: 0 5px 5px 0; overflow: hidden; }
.viewer-viewport canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; pointer-events: none; }
.viewer-tile { position: relative; z-index: 1; min-width: 0; min-height: 0; border: 1px solid rgba(255,255,255,.8); touch-action: none; cursor: grab; }
.viewer-tile:active { cursor: grabbing; }
.viewer-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.viewer-number, .viewer-depth { position: absolute; left: 5px; color: #48454e; font-size: 10px; line-height: 1.2; pointer-events: none; text-shadow: 0 1px 2px #fff; }
.viewer-number { top: 5px; }
.viewer-depth { bottom: 5px; }
.viewer-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; z-index: 2; background: #e3e3e3; font-size: 13px; }
.viewer-toolbar { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
.viewer-toolbar button { font: inherit; font-size: 12px; line-height: 1.5; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 5px 9px; cursor: pointer; }
.viewer-toolbar button[aria-pressed="true"] { color: var(--accent); border-color: #c7badb; background: var(--surface); }
.viewer-toolbar :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) {
  .teaser-comparison { grid-template-columns: 1fr 2fr; }
  .teaser-preview-action { gap: 7px; padding: 7px 9px; font-size: 11px; }
  .viewer-toolbar button { min-height: 36px; }
  .viewer-number, .viewer-depth { font-size: 8px; left: 2px; }
}

/* Static paper panels, selected and compared without a charting engine. */
.results-explorer[hidden], .results-figure[hidden], .results-legend[hidden] { display: none; }
.results-toolbar { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 16px; }
.results-toolbar select, .results-tabs button, .results-dialog-heading button { font: inherit; font-size: 13px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--muted); cursor: pointer; }
.results-toolbar select { color: var(--ink); }
.results-tabs { display: flex; gap: 10px; }
.results-tabs button { display: flex; flex-direction: column; align-items: center; padding: 3px 10px 7px; font-size: 14px; line-height: 1.4; }
.results-tabs button img { display: block; width: 108px; height: auto; }
.results-tabs button[aria-selected="true"] { color: var(--accent); background: var(--surface); border-color: #c7badb; }
.results-grid { overflow-x: auto; overscroll-behavior-x: contain; padding: 4px 0; }
.posterior-matrix { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: clamp(4px, .7vw, 10px) 0; }
.posterior-matrix th { font-size: clamp(11px, 1.3vw, 14px); line-height: 1.4; font-weight: 500; vertical-align: middle; }
.posterior-matrix thead th { text-align: center; padding-bottom: 12px; overflow-wrap: anywhere; }
.posterior-matrix th:first-child { width: clamp(56px, 6vw, 80px); position: sticky; left: 0; background: #fff; z-index: 2; }
.results-robot-snapshot { display: block; width: 100%; height: 88px; object-fit: contain; margin: auto; }
.posterior-matrix th.is-ours { color: var(--accent); font-weight: 600; }
.posterior-matrix td { padding: 0; vertical-align: top; }
.posterior-matrix tbody tr:not(:last-child) > * { padding-bottom: 12px; }
@media (max-width: 640px) {
  .posterior-matrix { min-width: 940px; }
  .posterior-matrix.has-residual { min-width: 1080px; }
  .posterior-matrix th { font-size: 14px; }
  .posterior-matrix th:first-child { width: 80px; }
}
.posterior-plot { position: relative; aspect-ratio: 1; width: 100%; cursor: crosshair; outline-offset: 3px; }
.posterior-plot > img, .posterior-plot > svg { display: block; width: 100%; height: 100%; }
.posterior-plot > svg { position: absolute; inset: 0; pointer-events: none; }
.sample-highlight { visibility: hidden; fill: none; stroke: var(--accent); stroke-width: 2; }
.has-selection .sample-highlight { visibility: visible; }
.sample-readout { display: none; position: absolute; bottom: 1px; left: 1px; right: 1px; padding: 4px; background: rgba(255,255,255,.96); color: var(--ink); font-size: 10px; line-height: 1.4; text-align: center; pointer-events: none; font-variant-numeric: tabular-nums; }
.has-selection .sample-readout { display: block; }
.sample-pinned .sample-readout { border-top: 1px solid #c7badb; }
.plot-open { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: rgba(255,255,255,.95); color: var(--accent); cursor: zoom-in; opacity: 0; }
.posterior-plot:hover .plot-open, .posterior-plot:focus-within .plot-open { opacity: 1; }
.posterior-plot:focus-visible, .plot-open:focus-visible, .results-toolbar :focus-visible, .results-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: none) { .plot-open { opacity: 1; } }
.results-legend { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 6px 24px; margin-top: 0; font-size: 15px; color: var(--muted); }
.results-belief { display: inline-flex; align-items: center; gap: 7px; }
.belief-color-scale { width: 86px; height: 11px; border: 1px solid var(--line); background: linear-gradient(to right,#fbfcfc,#dcecef,#97c8d5,#f3f1ed,#f5b599,#ed846e); }
.truth-marker { color: #d32f2f; font-size: 21px; vertical-align: -1px; margin-right: 4px; }
.mean-marker { color: #e65100; font-size: 21px; vertical-align: -1px; margin-right: 4px; }
.results-detail-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 16px; }
.results-dialog { width: min(860px,calc(100% - 32px)); max-height: 90vh; margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); overflow: auto; }
.results-dialog:not([open]) { display: none; }
.results-dialog::backdrop { background: rgba(25,22,30,.42); }
.results-dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.results-dialog-heading h3 { font-size: 17px; font-weight: 600; }
.results-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px; }
.results-comparison h3 { font-size: 14px; text-align: center; margin-bottom: 10px; }
.results-comparison img { display: block; width: 100%; height: auto; }
.results-coordinates { margin-top: 12px; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.results-coordinates > div { display: flex; justify-content: space-between; gap: 8px; }
@media (max-width: 600px) {
  .results-toolbar { gap: 12px; }
  .results-dialog { padding: 18px; }
  .results-comparison { grid-template-columns: 1fr; gap: 24px; }
  .results-toolbar select, .results-tabs button, .results-dialog-heading button { min-height: 40px; }
}
