:root {
  --bg: #f3f0e9;
  --panel: #fbfaf6;
  --panel-strong: #ffffff;
  --ink: #171a1f;
  --muted: #6c706f;
  --line: #dcd8ce;
  --line-dark: #bdb9ae;
  --acid: #c8f04b;
  --acid-dark: #708c17;
  --coral: #f06e4f;
  --cyan: #42b8cc;
  --blue: #2f6783;
  --shadow: 0 20px 60px rgba(24, 27, 26, 0.1);
  --radius: 18px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(23, 26, 31, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 26, 31, 0.025) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 0.85rem; line-height: 1.05; letter-spacing: -0.045em; }
h1 { max-width: 11ch; font-size: clamp(3.4rem, 7vw, 7rem); }
h2 { max-width: 16ch; font-size: clamp(2.2rem, 4.5vw, 4.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.45rem); }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
pre {
  overflow-x: auto;
  padding: 1.2rem;
  color: #f5f3ed;
  background: #171a1f;
  border-radius: 12px;
}
kbd {
  min-width: 1.75rem;
  padding: 0.16rem 0.42rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line-dark);
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.76rem;
  text-align: center;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 240, 233, 0.88);
  border-bottom: 1px solid rgba(189, 185, 174, 0.6);
  backdrop-filter: blur(18px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.72rem 1.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 850;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand small {
  margin-left: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  color: #10120b;
  background: var(--acid);
  border: 1px solid #96b332;
  border-radius: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}
.nav-links { display: flex; gap: 0.15rem; }
.nav-links a {
  padding: 0.5rem 0.72rem;
  color: var(--muted);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.72); }

main { max-width: 1440px; margin: 0 auto; }
section[id] { scroll-margin-top: 76px; }
.section, .section-grid { padding: clamp(3.75rem, 7vw, 7rem) 1.25rem; }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}
.section-grid > * { min-width: 0; }
.section-grid p code { overflow-wrap: anywhere; }
.two-col { align-items: start; }
.eyebrow, .control-label {
  display: block;
  margin: 0 0 0.7rem;
  color: var(--acid-dark);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}
.section-heading { max-width: 880px; margin-bottom: 2.2rem; }
.section-heading > p:last-child { max-width: 65ch; color: var(--muted); }
.section-heading.split {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  max-width: none;
}

.hero { min-height: calc(100vh - 64px); }
.hero-lede { max-width: 55ch; color: #454a4d; font-size: clamp(1.05rem, 1.7vw, 1.32rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; margin: 1.8rem 0 1.5rem; }
.button, .icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-weight: 850;
}
.button { min-height: 44px; padding: 0.75rem 1rem; border-radius: 10px; }
.button-primary { color: #fff; background: var(--ink); }
.button-primary:hover { background: #30343b; transform: translateY(-1px); }
.button-secondary { background: rgba(255, 255, 255, 0.74); border-color: var(--line-dark); }
.button-secondary:hover { background: #fff; }
.keyboard-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 0.32rem; color: var(--muted); font-size: 0.78rem; }

.hero-preview {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: #111;
  border: 1px solid #363b3d;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(23, 26, 31, 0.22);
  transform: rotate(1.2deg);
}
.hero-preview img { width: 100%; height: 100%; min-height: 460px; object-fit: cover; display: block; filter: saturate(0.9) contrast(1.04); }
.hero-preview::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 45%, rgba(8, 11, 12, 0.88));
  pointer-events: none;
}
.hero-preview-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(rgba(200, 240, 75, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 240, 75, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(transparent 15%, black 100%);
}
.hero-preview-label {
  position: absolute;
  right: 1.1rem;
  bottom: 1.1rem;
  left: 1.1rem;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.55rem;
  color: #fff;
  font-size: 0.76rem;
}
.status-dot { width: 0.65rem; height: 0.65rem; background: var(--acid); border-radius: 50%; box-shadow: 0 0 0 4px rgba(200, 240, 75, 0.18); }

.manifest-status {
  flex: 0 0 auto;
  padding: 0.5rem 0.72rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.74rem;
}
.dataset-overview { border-top: 1px solid var(--line); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.dataset-metrics { margin-bottom: 0.75rem; }
.metric {
  min-height: 145px;
  padding: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.metric-index { display: block; margin-bottom: 1.8rem; color: var(--line-dark); font-family: monospace; font-size: 0.72rem; }
.metric strong { display: block; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 0.95; letter-spacing: -0.06em; }
.metric span:last-child { display: block; margin-top: 0.5rem; color: var(--muted); font-size: 0.85rem; }
.overview-grid { display: grid; grid-template-columns: 0.78fr 1.22fr; gap: 0.75rem; }
.data-panel {
  min-width: 0;
  padding: 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.panel-heading .eyebrow { margin-bottom: 0.35rem; }
.panel-heading h3 { margin-bottom: 0; }
.microcopy { color: var(--muted); font-size: 0.72rem; }
.composition-group + .composition-group { margin-top: 1.25rem; }
.composition-label { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.8rem; font-weight: 850; }
.composition-track { display: flex; height: 1rem; overflow: hidden; background: #e8e4db; border-radius: 4px; }
.composition-segment { min-width: 3px; border-right: 2px solid var(--panel); background: var(--color, var(--acid)); }
.composition-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 0.8rem; margin-top: 0.65rem; color: var(--muted); font-size: 0.72rem; }
.composition-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.composition-legend i { width: 0.55rem; height: 0.55rem; background: var(--color); border-radius: 2px; }

.modality-matrix {
  max-height: 430px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.matrix-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(5, 52px);
  min-width: 470px;
  border-top: 1px solid var(--line);
}
.matrix-row:first-child { border-top: 0; }
.matrix-row.matrix-head {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: var(--panel);
  box-shadow: 0 1px var(--line);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.matrix-cell {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 0.5rem;
  text-align: center;
}
button.matrix-row {
  width: 100%;
  color: inherit;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  cursor: pointer;
}
button.matrix-row:hover { background: #f4f2eb; }
.matrix-name { display: block; overflow: hidden; font-size: 0.76rem; font-weight: 800; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.matrix-mark { width: 9px; height: 9px; background: #dedad0; border-radius: 50%; }
.matrix-mark.has-data { background: var(--acid-dark); box-shadow: 0 0 0 3px rgba(112, 140, 23, 0.12); }

.explorer-section { max-width: none; padding-top: 4rem; }
.workbench {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 760px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line-dark);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.sample-browser {
  min-width: 0;
  background: #eeece5;
  border-right: 1px solid var(--line-dark);
}
.browser-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 73px;
  padding: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.browser-title .eyebrow { margin-bottom: 0.15rem; }
.browser-title strong { font-size: 0.86rem; }
.icon-button {
  min-width: 38px;
  min-height: 36px;
  padding: 0.45rem 0.62rem;
  background: var(--panel-strong);
  border-color: var(--line-dark);
  border-radius: 8px;
  font-size: 0.74rem;
}
.icon-button:hover { border-color: #8c8a82; }
.file-button input { display: none; }
.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--line);
}
.toolbar .search-field { grid-column: 1 / -1; }
.toolbar input, .toolbar select, .mesh-select {
  width: 100%;
  min-height: 38px;
  padding: 0.52rem 0.62rem;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}
.toolbar input:focus, .toolbar select:focus, .mesh-select:focus { border-color: var(--acid-dark); box-shadow: 0 0 0 3px rgba(112, 140, 23, 0.12); }
.gallery { max-height: 610px; overflow-y: auto; }
.card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0.75rem;
  padding: 0.75rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 120ms ease;
}
.card:hover { background: rgba(255, 255, 255, 0.56); }
.card.is-active { background: var(--panel-strong); box-shadow: inset 4px 0 var(--acid-dark); }
.thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: #d9d5cc; border-radius: 8px; }
.thumb img, .thumb video { width: 100%; height: 100%; display: block; object-fit: cover; }
.thumb span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 0.65rem; text-align: center; }
.card-body { min-width: 0; }
.card-title { overflow: hidden; margin: 0.15rem 0 0.42rem; font-size: 0.8rem; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.badges { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.badge {
  padding: 0.16rem 0.32rem;
  color: #505453;
  background: #e4e1d8;
  border-radius: 4px;
  font-size: 0.58rem;
  font-weight: 850;
  text-transform: uppercase;
}
.card-modalities { display: flex; gap: 0.3rem; margin-top: 0.5rem; }
.modality-dot { width: 7px; height: 7px; background: #cbc7bd; border-radius: 50%; }
.modality-dot.has-data { background: var(--acid-dark); }
.empty-state { padding: 1.5rem; color: var(--muted); text-align: center; }

.detail-panel { min-width: 0; background: var(--panel-strong); }
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 150px;
  gap: 1.4rem;
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.detail-heading { min-width: 0; flex: 1 1 auto; }
.detail-header .eyebrow { margin-bottom: 0.35rem; }
.detail-header h3 { margin-bottom: 0.35rem; word-break: break-word; }
.detail-header p { margin-bottom: 0; font-size: 0.82rem; }
.detail-header-actions { display: flex; align-items: center; gap: 0.7rem; }
.active-sample-thumbnail {
  position: relative;
  width: clamp(200px, 22vw, 270px);
  aspect-ratio: 16 / 9;
  flex: 0 0 auto;
  overflow: hidden;
  margin: 0;
  background: #101318;
  border: 1px solid rgba(24, 31, 35, 0.38);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(27, 33, 36, 0.14);
}
.active-sample-thumbnail img { width: 100%; height: 100%; display: block; object-fit: cover; }
.active-sample-thumbnail figcaption {
  position: absolute;
  right: 0.35rem;
  bottom: 0.3rem;
  padding: 0.16rem 0.3rem;
  color: #fff;
  background: rgba(8, 11, 13, 0.72);
  border-radius: 3px;
  font-size: 0.52rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.sample-steppers { display: flex; gap: 0.35rem; }
.view-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0.85rem 1.4rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.view-tabs-label {
  flex: 0 0 auto;
  margin-right: 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.view-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.95rem;
  --tab-accent: 47, 103, 131;
  color: var(--ink);
  background: rgba(var(--tab-accent), 0.12);
  border: 1px solid var(--line-dark);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.view-tab + .view-tab { margin-left: -1px; }
.view-tab:nth-of-type(even) { --tab-accent: 112, 140, 23; }
.view-tabs-label + .view-tab { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
.view-tab:last-child { border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
.view-tab:not(.is-active):hover { background: rgba(var(--tab-accent), 0.2); color: var(--ink); border-color: rgb(var(--tab-accent)); }
.view-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; z-index: 2; }
.view-tab span { margin-right: 0.3rem; color: var(--line-dark); font-family: monospace; }
.view-tab.is-active { position: relative; z-index: 1; color: #fff; background: var(--ink); border-color: var(--ink); }
.view-tab.is-active span { color: rgba(255, 255, 255, 0.7); }
.data-view { padding: 1.25rem 1.4rem 1.4rem; }
.evidence-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  min-height: 58px;
  margin-bottom: 0.75rem;
}
.evidence-toolbar .control-label { margin-bottom: 0.4rem; }
.evidence-mode-label { display: block; font-size: 0.78rem; }
.view-mode-toggle button {
  padding: 0.42rem 0.58rem;
  color: var(--muted);
  background: #f2f0e9;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 850;
}
.view-mode-toggle { display: flex; }
.view-mode-toggle button { border-radius: 0; }
.view-mode-toggle button:first-child { border-radius: 6px 0 0 6px; }
.view-mode-toggle button:last-child { margin-left: -1px; border-radius: 0 6px 6px 0; }
.view-mode-toggle button.is-active { z-index: 1; color: #fff; background: var(--ink); border-color: var(--ink); }
.media-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 500px;
  overflow: hidden;
  color: #e8e9e3;
  background:
    linear-gradient(45deg, #161a1e 25%, transparent 25%),
    linear-gradient(-45deg, #161a1e 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #161a1e 75%),
    linear-gradient(-45deg, transparent 75%, #161a1e 75%),
    #101316;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  border: 1px solid #24292d;
  border-radius: 12px;
}
.media-stage.placeholder { color: var(--muted); background: #e8e5dc; border-color: var(--line); }
.media-stage video { width: 100%; max-height: 620px; display: block; }
.camera-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--frame-ratio, 16 / 9);
  overflow: hidden;
  background: #080a0c;
}
.camera-frame img { width: 100%; height: 100%; display: block; object-fit: fill; user-select: none; }
.projection-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: var(--overlay-opacity, 0.72);
  pointer-events: none;
}
.media-stage.is-wipe .projection-canvas {
  opacity: 1;
  clip-path: inset(0 calc(100% - var(--wipe-position, 72%)) 0 0);
}
.wipe-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--wipe-position, 72%);
  z-index: 5;
  display: none;
  width: 2px;
  background: var(--acid);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transform: translateX(-1px);
  pointer-events: none;
}
.media-stage.is-wipe .wipe-line { display: block; }
.projection-loader {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.media-stage.is-loading .projection-loader { display: flex; }
.media-stage.is-loading .camera-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 6;
  background: rgba(8, 10, 12, 0.4);
}
.media-stage.is-loading .wipe-line,
.media-stage.is-loading .wipe-range-overlay { opacity: 0; pointer-events: none; }
.projection-loader .spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: projection-spin 0.8s linear infinite;
}
@keyframes projection-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .projection-loader .spinner { animation-duration: 1.8s; } }
.wipe-range-overlay {
  position: absolute;
  top: 50%;
  left: -12px;
  z-index: 7;
  display: none;
  width: calc(100% + 24px);
  height: 48px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: ew-resize;
  transform: translateY(-50%);
}
.media-stage.is-wipe .wipe-range-overlay { display: block; }
.wipe-range-overlay::-webkit-slider-runnable-track { height: 2px; background: transparent; }
.wipe-range-overlay::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
  margin-top: -11px;
  appearance: none;
  background: var(--acid);
  border: 3px solid #101316;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.82), 0 3px 12px rgba(0,0,0,0.45);
}
.wipe-range-overlay::-moz-range-track { height: 2px; background: transparent; }
.wipe-range-overlay::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--acid);
  border: 3px solid #101316;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.82), 0 3px 12px rgba(0,0,0,0.45);
}
.layer-tag {
  position: absolute;
  top: 0.75rem;
  z-index: 6;
  padding: 0.32rem 0.5rem;
  color: #fff;
  background: rgba(13, 16, 18, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}
.layer-tag.base { left: 0.75rem; }
.layer-tag.overlay-label { right: 0.75rem; }
.visual-controls { margin-top: 0.75rem; }
.blend-control { display: grid; grid-template-columns: 120px 1fr 45px; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.72rem; font-weight: 800; }
.blend-control[hidden] { display: none; }
.visual-controls input { width: 100%; accent-color: var(--acid-dark); }
.visual-controls output { color: var(--ink); font-family: monospace; text-align: right; }
.camera-controls {
  display: grid;
  grid-template-columns: auto repeat(3, minmax(125px, 1fr)) auto;
  align-items: end;
  gap: 0.55rem;
  padding: 0.75rem;
  margin-top: 0.65rem;
  background: #f3f1ea;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.camera-control-title {
  align-self: center;
  max-width: 100px;
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}
.camera-controls label { position: relative; display: grid; gap: 0.28rem; color: var(--muted); font-size: 0.65rem; font-weight: 800; }
.camera-controls input {
  min-width: 0;
  padding: 0.48rem 1.8rem 0.48rem 0.5rem;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  font: 700 0.72rem monospace;
}
.camera-controls small { position: absolute; right: 0.48rem; bottom: 0.52rem; color: var(--muted); font-size: 0.6rem; pointer-events: none; }
.camera-controls button {
  padding: 0.5rem 0.65rem;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--line-dark);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 850;
}
.camera-controls button:hover { background: var(--acid); border-color: #9ebd38; }
.view-caption { margin: 0.7rem 0 0; color: var(--muted); font-size: 0.76rem; }

.contact-viz { display: grid; grid-template-columns: minmax(440px, 1.45fr) minmax(250px, 0.55fr); gap: 1rem; }
.contact-mesh-lab, .contact-breakdown {
  min-height: 420px;
  padding: 1.2rem;
  background: #f3f1ea;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.contact-mesh-lab { min-width: 0; }
.contact-mesh-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 0.7rem; }
.contact-mesh-toolbar .control-label { margin-bottom: 0.2rem; }
.contact-mesh-toolbar strong { font-size: 0.78rem; }
.contact-filter { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.3rem; }
.contact-filter button {
  padding: 0.36rem 0.52rem;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.66rem;
  font-weight: 850;
}
.contact-filter button:hover { border-color: var(--line-dark); }
.contact-filter button.is-active { color: #fff; background: var(--ink); border-color: var(--ink); }
.contact-mesh-viewer {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 520px;
  overflow: hidden;
  color: #f9f1e9;
  background: #101318;
  border: 1px solid #292e32;
  border-radius: 10px;
  touch-action: none;
}
.contact-canvas-viewer { width: 100% !important; height: 520px !important; display: block; cursor: grab; }
.contact-canvas-viewer:active { cursor: grabbing; }
.contact-face-tooltip {
  position: absolute;
  z-index: 8;
  display: grid;
  min-width: 115px;
  padding: 0.48rem 0.58rem;
  color: #fff;
  background: rgba(7, 10, 12, 0.9);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  font-size: 0.68rem;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.contact-face-tooltip[hidden] { display: none; }
.contact-face-tooltip span { color: rgba(255,255,255,0.7); font-family: monospace; font-size: 0.62rem; }
.contact-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 0.45rem 0.8rem; margin-top: 0.65rem; color: var(--muted); font-size: 0.68rem; }
.contact-legend span { display: inline-flex; align-items: center; gap: 0.32rem; }
.contact-legend i { width: 14px; height: 10px; background: var(--region-color); border: 1px solid rgba(10,12,14,0.65); border-radius: 2px; }
.contact-legend .contact-legend-note { margin-left: auto; }
.contact-breakdown { display: flex; flex-direction: column; }
.contact-total { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.contact-total strong { display: block; font-size: clamp(3rem, 6vw, 5rem); line-height: 1; letter-spacing: -0.07em; }
.contact-total span { color: var(--muted); font-size: 0.78rem; }
.contact-total small { display: block; max-width: 30ch; margin-top: 0.45rem; color: var(--muted); font-size: 0.67rem; line-height: 1.4; }
.contact-rows { margin-top: 1rem; }
.contact-row {
  display: grid;
  grid-template-columns: 70px 1fr 48px;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
}
.contact-row strong { font-size: 0.78rem; text-transform: capitalize; }
.contact-row:hover, .contact-row.is-active { background: rgba(255,255,255,0.6); }
.contact-bar { height: 8px; overflow: hidden; background: #ddd9d0; border-radius: 3px; }
.contact-bar i { display: block; width: var(--contact-width); height: 100%; background: var(--contact-color); }
.contact-row span:last-child { font-family: monospace; font-size: 0.75rem; text-align: right; }
.contact-focus { margin-top: auto; padding-top: 1rem; color: var(--muted); font-size: 0.78rem; }
.contact-focus strong { color: var(--ink); }
.annotation-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem; margin-top: 0.75rem; }
.annotation-item { padding: 0.8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.annotation-item strong { display: block; overflow: hidden; margin-bottom: 0.25rem; font-size: 0.7rem; text-overflow: ellipsis; white-space: nowrap; }
.annotation-item code { color: var(--acid-dark); font-size: 0.68rem; }

.mesh-panel { max-width: 940px; margin: 0 auto; }
.mesh-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.7rem; margin-bottom: 0.7rem; }
.mesh-summary { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.74rem; }
.mesh-viewer {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 560px;
  overflow: hidden;
  color: #f9f1e9;
  background: #101318;
  border: 1px solid #292e32;
  border-radius: 12px;
  touch-action: none;
}
.mesh-viewer canvas { width: 100% !important; height: 560px !important; display: block; }
.mesh-note { margin: 0.6rem 0 0; color: var(--muted); font-size: 0.74rem; }
.obj-canvas-viewer { width: 100% !important; height: 560px !important; display: block; cursor: grab; }
.obj-canvas-viewer:active { cursor: grabbing; }
.mesh-controls {
  position: absolute;
  top: 0.7rem;
  left: 0.75rem;
  padding: 0.32rem 0.55rem;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(7, 9, 13, 0.58);
  border-radius: 6px;
  font-size: 0.68rem;
  pointer-events: none;
  backdrop-filter: blur(8px);
}
.mesh-loading, .mesh-error { padding: 1rem; color: #f9f1e9; text-align: center; }
.mesh-error { display: grid; gap: 0.45rem; line-height: 1.45; }
.mesh-error span { color: rgba(249, 241, 233, 0.82); }
.mesh-error code { padding: 0.08rem 0.28rem; color: #fff; background: rgba(255, 255, 255, 0.1); border-radius: 0.35rem; }

.asset-empty { color: var(--muted); font-size: 0.72rem; }

.callout-stack { display: grid; gap: 0.75rem; }
.callout, .panel {
  padding: 1.3rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.callout h3 { color: var(--blue); }
.timeline { display: grid; gap: 0.7rem; padding: 0; margin: 0; list-style: none; }
.timeline li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; padding: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.timeline li > span { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; color: #10120b; background: var(--acid); border-radius: 7px; font-size: 0.72rem; font-weight: 900; }
.timeline p { margin: 0.3rem 0 0; color: var(--muted); }
.model-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.architecture-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; }
.architecture-cards article { padding: 1.1rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.architecture-cards strong { display: block; margin-bottom: 0.45rem; color: var(--blue); }
.architecture-cards span { color: var(--muted); font-size: 0.85rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: var(--panel-strong); }
th, td { padding: 0.78rem 0.9rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.07em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
.highlight-row td { color: #536815; background: #f4f9df; font-weight: 900; }
.footer { max-width: 1440px; margin: 0 auto; padding: 2rem 1.25rem 4rem; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.78rem; }
.muted { color: var(--muted); }

@media (max-width: 1120px) {
  .workbench { grid-template-columns: 270px minmax(0, 1fr); }
  .media-stage { min-height: 420px; }
  .contact-viz { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .section-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-preview, .hero-preview img { min-height: 380px; }
  .overview-grid { grid-template-columns: 1fr; }
  .workbench { display: block; overflow: visible; }
  .sample-browser { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .gallery { display: flex; max-height: none; overflow-x: auto; }
  .card { flex: 0 0 255px; border-right: 1px solid var(--line); border-bottom: 0; }
  .card.is-active { box-shadow: inset 0 -4px var(--acid-dark); }
  .architecture-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .camera-controls { grid-template-columns: repeat(3, minmax(110px, 1fr)); }
  .camera-control-title { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 680px) {
  .nav { align-items: start; flex-direction: column; gap: 0.45rem; }
  .nav-links { width: 100%; overflow-x: auto; }
  .nav-links a { white-space: nowrap; }
  .brand small { display: none; }
  .section-heading.split, .evidence-toolbar { align-items: start; flex-direction: column; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 125px; }
  .metric-index { margin-bottom: 1.2rem; }
  .view-tabs { padding: 0.7rem 0.85rem; }
  .view-tab { padding: 0.4rem 0.7rem; }
  .detail-header { align-items: start; }
  .detail-header-actions { align-items: flex-end; flex-direction: column-reverse; }
  .active-sample-thumbnail { width: clamp(150px, 42vw, 190px); }
  .detail-header, .data-view { padding-right: 0.85rem; padding-left: 0.85rem; }
  .media-stage { min-height: 300px; }
  .blend-control { grid-template-columns: 1fr 48px; }
  .blend-control span { grid-column: 1 / -1; }
  .camera-controls { grid-template-columns: 1fr; }
  .camera-controls button { width: 100%; }
  .annotation-summary { grid-template-columns: 1fr; }
  .architecture-cards { grid-template-columns: 1fr; }
  .mesh-viewer, .mesh-viewer canvas, .obj-canvas-viewer { min-height: 390px; height: 390px !important; }
  .contact-mesh-toolbar { align-items: start; flex-direction: column; }
  .contact-filter { justify-content: flex-start; }
  .contact-mesh-viewer { min-height: 390px; }
  .contact-canvas-viewer { height: 390px !important; }
  .contact-legend .contact-legend-note { width: 100%; margin-left: 0; }
}

/* Academic visual refresh */
:root {
  --bg: #ffffff;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #292d32;
  --muted: #626a70;
  --line: #e2e6e8;
  --line-dark: #c8d0d4;
  --acid: #367f91;
  --acid-dark: #2b6d7d;
  --blue: #367f91;
  --shadow: none;
  --radius: 5px;
}

html { scroll-padding-top: 1rem; }
body {
  background: #ffffff;
  color: var(--ink);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
body::before { display: none; }
a { color: var(--blue); }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.015em; line-height: 1.2; }
h1 { max-width: none; font-size: clamp(2.8rem, 6vw, 4.8rem); }
h2 { max-width: none; font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.15rem; }

.site-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.nav { max-width: 1120px; padding: 0.9rem 1.5rem; }
.brand { color: var(--ink); font-size: 1.15rem; font-weight: 500; letter-spacing: -0.01em; }
.nav-links { gap: 1.15rem; }
.nav-links a {
  padding: 0;
  color: var(--blue);
  background: none;
  font-size: 0.9rem;
  font-weight: 400;
}
.nav-links a:hover, .nav-links a:focus-visible {
  color: #205765;
  background: none;
  text-decoration: underline;
}
.nav-links a.is-active {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--acid);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Results tables: per-column best + improvement deltas */
.delta {
  margin-left: 0.3em;
  font-size: 0.78em;
  font-weight: 700;
  color: #1f7a44;
  white-space: nowrap;
}
.col-best {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--acid);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.table-legend {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.table-legend .delta { margin-left: 0; }

main { max-width: 1200px; }
.section, .section-grid { padding: 4.5rem 1.5rem; }
.eyebrow, .control-label, .paper-kicker {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  display: block;
  min-height: auto;
  max-width: 960px;
  margin: 0 auto;
  padding: 5rem 1.5rem 3.5rem;
  text-align: center;
}
.hero-copy { max-width: 760px; margin: 0 auto 2.5rem; }
.paper-kicker { margin-bottom: 0.8rem; }
.paper-subtitle {
  margin: 0.35rem 0 0;
  color: #42494e;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}
.hero-lede {
  max-width: 680px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1rem;
}
.hero-actions { justify-content: center; gap: 0.45rem; margin: 1.25rem 0 0; }
.hero-actions a { font-weight: 500; text-decoration: none; }
.hero-actions a:hover { text-decoration: underline; }
.hero-actions span { color: var(--line-dark); }
.hero-preview {
  max-width: 820px;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  transform: none;
  background: #f8f9f9;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}
.hero-preview::after, .hero-preview-grid, .hero-preview-label { display: none; }
.hero-preview img {
  display: block;
  width: 100%;
  min-height: 0;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.hero-preview figcaption {
  padding: 0.55rem 0.75rem;
  color: var(--muted);
  background: #ffffff;
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
  text-align: left;
}

.section-heading { margin-bottom: 1.5rem; }
.section-heading > p:last-child { color: var(--muted); }
.manifest-status {
  padding: 0;
  color: var(--muted);
  background: none;
  border: 0;
  font-family: inherit;
}
.explorer-section { padding-top: 4rem; border-top: 1px solid var(--line); }
.workbench {
  min-height: 760px;
  background: #ffffff;
  border: 1px solid var(--line-dark);
  border-radius: 5px;
  box-shadow: none;
}
.sample-browser { background: #fafbfb; border-right-color: var(--line); }
.browser-title { min-height: 64px; }
.toolbar input, .toolbar select, .icon-button, .contact-filter button,
.camera-controls button, .camera-controls select { border-radius: 3px; }
.toolbar input:focus, .toolbar select:focus, .camera-controls select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(54, 127, 145, 0.12);
}
.card { border-radius: 3px; }
.card:hover { border-color: var(--line-dark); box-shadow: none; }
.card.is-active {
  background: #ffffff;
  border-color: var(--line-dark);
  box-shadow: inset 3px 0 var(--blue);
}
.thumb, .active-sample-thumbnail { border-radius: 3px; }
.active-sample-thumbnail { border-color: var(--line-dark); box-shadow: none; }
.badge {
  color: #4d6066;
  background: #edf2f3;
  border-radius: 2px;
  font-weight: 600;
}
.modality-dot.has-data { background: var(--blue); }
.contact-mesh-lab, .contact-breakdown, .camera-controls {
  background: #fafbfb;
  border-radius: 4px;
}
.contact-filter button { font-weight: 500; }
.contact-filter button.is-active { background: var(--blue); border-color: var(--blue); }

.timeline { gap: 0; }
.timeline li {
  padding: 1rem 0;
  background: #ffffff;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline li > span {
  color: var(--blue);
  background: #ffffff;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-weight: 500;
}
.model-section, .results-section { border-top: 1px solid var(--line); }
.architecture-cards { gap: 0; border-top: 1px solid var(--line); }
.architecture-cards article {
  padding: 1rem;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.architecture-cards strong { color: var(--ink); font-weight: 600; }
.table-wrap { border-radius: 3px; }
.highlight-row td { color: var(--ink); background: #eef5f6; }
.footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  text-align: center;
}

@media (max-width: 900px) {
  .hero { padding-top: 4rem; }
  .hero-preview, .hero-preview img { min-height: 0; }
}

@media (max-width: 680px) {
  .nav { align-items: flex-start; padding: 0.8rem 1rem; }
  .nav-links { width: auto; gap: 0.8rem; }
  .hero { padding: 3.5rem 1rem 2.5rem; }
  .section, .section-grid { padding: 3.5rem 1rem; }
  .hero-preview img { aspect-ratio: 4 / 3; }
}

/* Paper overview */
.hero h1 {
  max-width: 900px;
  margin-right: auto;
  margin-left: auto;
  font-size: clamp(2.35rem, 5.2vw, 4rem);
}

.project-name {
  margin: 1rem 0 0;
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 500;
}

.paper-authors {
  /* Let the author line use the full hero width (not just the 760px copy
     column) so it stays on one line at the larger font. width:max-content keeps
     it on a single line; the breakout is centered on the hero and capped to the
     viewport so it can never cause horizontal overflow on small screens. */
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(940px, 92vw);
  margin: 1rem 0 0;
}

.author-list {
  margin: 0;
  color: var(--ink);
  font-size: 1.22rem;
  line-height: 1.85;
}

.author-list a {
  color: var(--ink);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.author-list a:hover,
.author-list a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.paper-authors sup {
  position: relative;
  top: -0.15em;
  margin-left: 0.08em;
  color: var(--blue);
  font-size: 0.62em;
}

.affiliation-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.affiliation-list span {
  white-space: nowrap;
}

.affiliation-list a {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 0.16em;
}

.affiliation-list a:hover,
.affiliation-list a:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.paper-overview,
.method-section {
  border-top: 1px solid var(--line);
}

.overview-heading {
  max-width: 790px;
}

.contribution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
}

.contribution-grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  padding: 1.6rem 1.4rem 1.6rem 0;
}

.contribution-grid article + article {
  padding-left: 1.4rem;
  border-left: 1px solid var(--line);
}

.contribution-grid h3,
.method-track h3 {
  margin: 0 0 0.45rem;
}

.contribution-grid p,
.method-track > p,
.method-note {
  margin: 0;
  color: var(--muted);
}

.component-index {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  color: var(--blue);
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 600;
}

.paper-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 2rem 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.paper-stats div {
  padding: 1.3rem 1rem;
  text-align: center;
}

.paper-stats div + div {
  border-left: 1px solid var(--line);
}

.paper-stats dt {
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 500;
  line-height: 1.15;
}

.paper-stats dd {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.method-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3.5rem;
}

.method-track {
  min-width: 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line-dark);
}

.method-track-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.method-track-heading .eyebrow {
  margin-bottom: 0.25rem;
}

.method-track .timeline {
  margin-top: 0.25rem;
}

.model-flow {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.5rem 0;
  overflow-x: auto;
  color: var(--muted);
  font-size: 0.76rem;
  white-space: nowrap;
}

.model-flow span {
  padding: 0.55rem 0.7rem;
  color: var(--ink);
  background: #fafbfb;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.model-flow i {
  color: var(--blue);
  font-style: normal;
}

.method-note {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
}

.result-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 2.2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.result-highlights div {
  display: grid;
  gap: 0.3rem;
  padding: 1.3rem 1.1rem;
}

.result-highlights div + div {
  border-left: 1px solid var(--line);
}

.result-highlights strong {
  color: var(--blue);
  font-size: 1.35rem;
  font-weight: 500;
}

.result-highlights span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.table-label {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 800px) {
  .contribution-grid,
  .method-columns {
    grid-template-columns: 1fr;
  }

  .contribution-grid article + article {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .paper-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-stats div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .paper-stats div:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .result-highlights {
    grid-template-columns: 1fr;
  }

  .result-highlights div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 680px) {
  .hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .paper-authors {
    margin-top: 0.85rem;
  }

  .author-list {
    font-size: 1.05rem;
    line-height: 1.75;
  }

  .affiliation-list {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
  }

  .paper-stats dt {
    font-size: 1.4rem;
  }
}

/* ----------------------------------------------------------------
   Paper content additions (figures, hero buttons, dataset, citation)
   Additive only - does not modify the dataset demo (#explorer).
   ---------------------------------------------------------------- */

/* Figures */
.paper-figure {
  margin: 2.4rem 0;
  padding: 0;
}
.paper-figure img,
.paper-figure video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}
.paper-figure figcaption {
  margin: 0.95rem auto 0;
  max-width: 80ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
}
.paper-figure figcaption strong { color: var(--ink); }
.paper-figure--wide { margin-left: auto; margin-right: auto; }

/* Hero teaser video sits tight under the hero: drop the section's vertical
   padding and the figure margin so it doesn't double up the spacing. The
   hero's bottom padding (above) and the overview's top padding (below) supply
   the gaps. */
.video-band { padding-top: 0; padding-bottom: 0; }
.video-band .paper-figure { margin: 0; }

/* Hero action buttons (Paper / arXiv / Code / anchors) */
.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line-dark);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.hero-action:hover { background: #fff; transform: translateY(-1px); text-decoration: none; }
.hero-action[href="assets/paper/epic_contact_v2.pdf"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.hero-action[href="assets/paper/epic_contact_v2.pdf"]:hover { background: #30343b; }
.hero-action.is-soon {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.4);
  border-style: dashed;
  cursor: not-allowed;
  opacity: 0.85;
}
.hero-action.is-soon:hover { transform: none; background: rgba(255, 255, 255, 0.4); }
.hero-action.is-soon em {
  font-style: normal;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: var(--acid-dark);
  color: #fff;
}

/* Inline tag pill in contribution headings */
.tag-pill {
  display: inline-block;
  vertical-align: middle;
  margin-left: 0.4rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(66, 184, 204, 0.16);
}

/* Dataset section */
.dataset-pipeline { margin-top: 1.2rem; }
.dataset-stats { margin-top: 1.4rem; }
.section-handoff {
  margin-top: 1.8rem;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  border-top: 1px dashed var(--line-dark);
  padding-top: 1.4rem;
}

/* Citation */
.citation-section .bibtex {
  margin: 0;
  padding: 1.3rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow-x: auto;
  box-shadow: var(--shadow);
}
.citation-section .bibtex code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--ink);
  white-space: pre;
}

/* Venue badge (below title + authors) */
.venue-badge {
  display: inline-block;
  margin: 0.4rem 0 1.2rem;
  padding: 0.4rem 1.05rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}
.venue-badge a { color: inherit; text-decoration: none; }
.venue-badge a:hover { text-decoration: underline; }

/* Hero before/after slider with live 3D mesh projection */
/* Neutralise the static .hero-preview framing so the slider controls its own look. */
.hero-compare {
  transform: none;
  min-height: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.hero-compare::after { display: none; }
.hero-compare .img-compare__base { min-height: 0; filter: none; }
.hero-compare figcaption {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.hero-compare .img-compare {
  --reveal: 55%;
  position: relative;
  width: 100%;
  aspect-ratio: 456 / 256;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #111;
  touch-action: pan-y;
}
.img-compare__base,
.img-compare__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.img-compare__base { object-fit: cover; }
.img-compare__reveal {
  position: absolute;
  inset: 0;
  -webkit-clip-path: inset(0 0 0 var(--reveal));
  clip-path: inset(0 0 0 var(--reveal));
}
.img-compare__divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal);
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}
.img-compare__divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.1rem;
  height: 2.1rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 14px rgba(8, 11, 12, 0.35);
}
.img-compare__divider::before {
  content: "\2194";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 0.9rem;
  color: #171a1f;
}
.img-compare__tag {
  position: absolute;
  bottom: 0.7rem;
  z-index: 2;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
  backdrop-filter: blur(4px);
}
.img-compare__tag.is-left { left: 0.7rem; background: rgba(17, 20, 24, 0.72); color: #fff; }
.img-compare__tag.is-right { right: 0.7rem; background: var(--acid-dark); color: #fff; }
.img-compare__range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}
.img-compare__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2.4rem;
  height: 100%;
  cursor: ew-resize;
}
.img-compare__range::-moz-range-thumb {
  width: 2.4rem;
  height: 240px;
  border: 0;
  background: transparent;
  cursor: ew-resize;
}
.img-compare__range:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Two-line hero title */
.hero-copy h1 {
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2rem, 3.6vw, 3.2rem);
  text-wrap: balance;
}

/* TL;DR summary box - width matched to the hero title */
.tldr {
  max-width: 48rem;
  margin: 0 auto 1.6rem;
  padding: 1.05rem 1.3rem;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 4px solid var(--acid-dark);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.tldr-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.14rem 0.6rem;
  border-radius: 999px;
  background: var(--acid-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.tldr p {
  margin: 0;
  color: #3a3f42;
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.55;
}

/* BibTeX block with copy button */
.bibtex-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bibtex-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.7rem 0.5rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.bibtex-bar-label {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.copy-button {
  padding: 0.32rem 0.9rem;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.copy-button:hover { background: #fff; border-color: var(--ink); }
.copy-button.is-copied { background: var(--acid-dark); border-color: var(--acid-dark); color: #fff; }
.bibtex-block .bibtex {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

/* Benchmark dataset toggle (EPIC-Contact / ARCTIC) */
.dataset-toggle {
  display: inline-flex;
  gap: 0.3rem;
  margin-bottom: 1.2rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}
.dataset-toggle button {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.45rem 1.15rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.dataset-toggle button span {
  font-weight: 500;
  font-size: 0.7rem;
  opacity: 0.7;
}
.dataset-toggle button:hover { color: var(--ink); }
.dataset-toggle button.is-active { background: var(--ink); color: #fff; }

/* Hero stage: before/after slider + auto-rotating 3D geometry panel side by side */
.hero-stage {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
.hero-stage .img-compare { flex: 1.7 1 0; }
.hero-mesh {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b0e13;
}
.hero-mesh__canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-mesh__tag {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  z-index: 2;
  padding: 0.26rem 0.58rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  pointer-events: none;
  color: #fff;
  background: rgba(17, 20, 24, 0.72);
  backdrop-filter: blur(4px);
}
@media (max-width: 680px) {
  /* Stack the slider above the mesh. Reset flex to `none` so each child's
     height comes from its aspect-ratio instead of a zero vertical flex-basis
     (which otherwise collapses the whole hero figure to ~0 height). */
  .hero-stage { flex-direction: column; }
  .hero-stage .img-compare { flex: none; width: 100%; }
  .hero-mesh { flex: none; width: 100%; aspect-ratio: 16 / 10; }
}

/* Active-sample pills (hand side · video id · object) - replaces the full id */
#detail-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0;
}
.sample-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  white-space: nowrap;
}
#detail-meta:empty { display: none; margin: 0; }

/* Interactive dataset composition: bar chart + per-category rotating 3D viewer */
.composition .composition-grid {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}
.composition-bars {
  flex: 1.1 1 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  justify-content: center;
}
.cbar {
  display: grid;
  grid-template-columns: 4.5rem 1fr 2.6rem;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.32rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cbar:hover { background: var(--panel); }
.cbar.is-active { background: var(--panel-strong); border-color: var(--line); }
.cbar-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: capitalize;
}
.cbar.is-active .cbar-name { color: var(--ink); }
.cbar-track {
  height: 0.8rem;
  border-radius: 999px;
  background: #e8e4db;
  overflow: hidden;
}
.cbar-fill {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 999px;
  background: var(--blue);
  opacity: 0.5;
  transition: width 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.15s ease;
}
.cbar:hover .cbar-fill,
.cbar.is-active .cbar-fill { opacity: 1; }
.cbar-count {
  text-align: right;
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.composition-viewer {
  position: relative;
  flex: 0.9 1 0;
  min-width: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b0e13;
}
.composition-canvas { display: block; width: 100%; height: 100%; }
.composition-frame {
  position: absolute;
  right: 0.7rem;
  top: 0.7rem;
  z-index: 2;
  width: 38%;
  max-width: 230px;
  display: block;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}
.composition-tag {
  position: absolute;
  left: 0.7rem;
  bottom: 0.7rem;
  z-index: 2;
  padding: 0.3rem 0.62rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: rgba(17, 20, 24, 0.72);
  backdrop-filter: blur(4px);
}
.composition-tag strong { color: #fff; }
@media (max-width: 680px) {
  /* Stack bars above the viewer. Reset the viewer's flex to `none` so its
     height comes from aspect-ratio rather than a zero vertical flex-basis,
     which would otherwise collapse it to 0 height and hide the mesh. */
  .composition .composition-grid { flex-direction: column; }
  .composition-viewer { flex: none; width: 100%; aspect-ratio: 16 / 10; }
}

/* Qualitative comparison. */
.qualitative-section { border-top: 1px solid var(--line); }
.qual-samples {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-bottom: 1.6rem;
}
.qual-sample {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.4rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.qual-thumb {
  position: relative;
  display: block;
  border-radius: 6px;
  overflow: hidden;
}
.qual-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.qual-frame-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.qual-frame-line {
  fill: none;
  stroke: #ff2d78;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  stroke-linecap: round;
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.7));
}
.qual-sample span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.qual-sample:hover { border-color: var(--line-dark); transform: translateY(-2px); }
.qual-sample.is-active {
  border-color: var(--ink);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}
.qual-sample.is-active span { color: var(--ink); }

.qual-viewer { margin: 0; }
.qual-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
  align-items: start;
}
.qual-col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.qual-method {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink);
}
.qual-method em {
  font-style: normal;
  font-weight: 700;
  color: var(--acid-dark);
  margin-left: 0.2rem;
}
.qual-proj-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b0e13;
}
.qual-proj-wrap { aspect-ratio: 16 / 10; }
.qual-proj { display: block; width: 100%; height: 100%; object-fit: cover; }
.qual-mesh-wrap {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b0e13;
}
.qual-mesh-wrap canvas { display: block; width: 100%; height: 100%; }

@media (max-width: 900px) {
  .qual-samples { grid-template-columns: repeat(3, 1fr); }
  .qual-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .qual-samples { grid-template-columns: repeat(2, 1fr); }
  .qual-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .qual-frame-svg { display: none; }
}
