/* Project page extensions on top of style.css */

:root {
  --bg: #ffffff;
  --bg-alt: #f3f4f6;
  --border: #d8dde3;
  --text: #111;
  --text-muted: #5b6470;
  --accent: #1367a7;
  --accent-strong: #0e5187;
}

/* Template-inspired styling */
body {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
  font-size: 18px;
  color: var(--text);
  background: var(--bg);
}

/* ============================================================
   BUTTONS (Paper / Supplementary / Code)
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.4rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  color: #fff;
  background: #1f242c;
  border: 1px solid #1f242c;
  border-radius: 999px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.btn:link,
.btn:visited {
  color: #fff;
  text-decoration: none;
}

.btn:hover,
.btn:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(19, 103, 167, 0.18);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: none;
}

/* Section title styling */
.section h1 {
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.5rem;
  font-weight: 300;
  margin: 0.4em auto 0.4em;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.8rem;
}

.section h2 {
  text-align: left;
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 1.5rem;
  font-weight: 300;
  margin: 0.4em auto 0.4em;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.4rem;
}

.subsection {
  text-align: left;
  font-weight: 300;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.15rem;
  margin: 2rem auto 0.5rem;
  max-width: 1100px;
  color: #000;
}
============================================================ */
a:link, a:visited {
  color: #1367a7;
  text-decoration: none;
}

a:hover {
  color: #208799;
}

/* Disclaimer box */
.disclaimerbox {
  background-color: #eee;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  padding: 20px;
}

/* Rounded images and videos */
video.header-vid {
  height: 140px;
}

img.header-img {
  height: 140px;
}

img.rounded {
}

/* Layered paper effect (big version) */
.layered-paper-big {
  box-shadow:
    0px 0px 1px 1px rgba(0, 0, 0, 0.35),
    5px 5px 0 0px #fff,
    5px 5px 1px 1px rgba(0, 0, 0, 0.35),
    10px 10px 0 0px #fff,
    10px 10px 1px 1px rgba(0, 0, 0, 0.35),
    15px 15px 0 0px #fff,
    15px 15px 1px 1px rgba(0, 0, 0, 0.35),
    20px 20px 0 0px #fff,
    20px 20px 1px 1px rgba(0, 0, 0, 0.35),
    25px 25px 0 0px #fff,
    25px 25px 1px 1px rgba(0, 0, 0, 0.35);
  margin-left: 10px;
  margin-right: 45px;
}

/* Layered paper effect */
.layered-paper {
  box-shadow:
    0px 0px 1px 1px rgba(0, 0, 0, 0.35),
    5px 5px 0 0px #fff,
    5px 5px 1px 1px rgba(0, 0, 0, 0.35),
    10px 10px 0 0px #fff,
    10px 10px 1px 1px rgba(0, 0, 0, 0.35);
  margin-top: 5px;
  margin-left: 10px;
  margin-right: 30px;
  margin-bottom: 5px;
}

/* Vertical center helper */
.vert-cent {
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

/* HR styling */
hr {
  margin: 0;
  border: 0;
  height: 1.5px;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}

/* Rotate utility */
.rotate {
  -moz-transform: rotate(-90.0deg);
  -o-transform: rotate(-90.0deg);
  -webkit-transform: rotate(-90.0deg);
  filter: progid: DXImageTransform.Microsoft.BasicImage(rotation=0.083);
  -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)";
  transform: rotate(-90.0deg);
}

c {
  white-space: nowrap;
  writing-mode: tb-rl;
  transform: rotate(-180.0deg);
}

/* ============================================================
   HERO
============================================================ */
.project-hero {
  padding: 3.5rem 1.5rem 2rem;
  background: var(--bg);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.project-title {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 2.625rem;
  font-weight: 300;
  line-height: 1.25;
  margin: 0.4em auto 0.6em;
  max-width: 980px;
  color: #000;
}

.project-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0.4rem 1.4rem;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.5;
  color: #000;
  max-width: 980px;
  margin: 0 auto 0.5rem;
}

.project-authors .author {
  white-space: nowrap;
}

.project-authors sup {
  vertical-align: baseline;
  position: relative;
  top: -0.45em;
  font-size: 0.75em;
  line-height: 0;
}

.project-authors a {
  color: #000;
  text-decoration: none;
}

.project-authors a:hover { 
  color: #208799; 
  text-decoration: none; 
}

.equal-note {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.95rem;
  font-weight: 300;
  font-style: italic;
  color: var(--text-muted);
  text-align: center;
  margin: 0.15rem auto 0.8rem;
  text-decoration: none;
}

.project-venue {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.25rem;
  font-weight: 300;
  text-align: center;
  color: #000;
  margin: 0.4rem auto 0.6rem;
}

/* Inline anchor link row (jump nav) */
.anchor-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  margin: 1rem auto 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  max-width: 1100px;
}

.anchor-nav a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.anchor-nav a:hover { color: var(--accent); text-decoration: none; }

/* Button row */
.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 0.4rem;
  margin-bottom: 2rem;
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

/* ============================================================
   FIGURES
============================================================ */
.teaser,
.full-figure {
  max-width: 1100px;
  margin: 1.25rem auto 0;
}

.teaser img,
.full-figure img,
.full-figure video {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  background: var(--bg-alt);
  min-height: 220px; /* keeps layout stable while images are blank */
}

@media (max-width: 700px) {
  .teaser img,
  .full-figure img,
  .full-figure video { min-height: 0; }
}

.teaser figcaption,
.full-figure figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.7rem;
  line-height: 1.55;
  text-align: center;
}

figcaption strong,
p strong {
  font-family: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 600;
}

.figure-row {
  display: flex;
  gap: 1rem;
  margin-top: 1.25rem;
}

.figure-row figure {
  flex: 1;
  margin: 0;
}

.figure-row img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  background: var(--bg-alt);
  min-height: 180px;
}

/* Two-column row: text on the left, figure/video on the right.
   Used by the Experimental Prototype section. */
.prototype-row {
  max-width: 1100px;
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  align-items: center;
}

.prototype-row .prototype-text {
  min-width: 0;
}

.prototype-row .prototype-text .project-text {
  max-width: none;
  margin: 0;
}

.prototype-row .prototype-figure {
  margin: 0;
  min-width: 0;
}

.prototype-row .prototype-figure video,
.prototype-row .prototype-figure img {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  background: var(--bg-alt);
}

.prototype-row .prototype-figure figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin-top: 0.7rem;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 820px) {
  .prototype-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 700px) {
  .figure-row img { min-height: 0; }
}

.figure-row figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.82rem;
  color: #333;
  margin-top: 0.5rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 700px) {
  .figure-row { flex-direction: column; }
}

/* TL;DR bullet list */
.tldr-list {
  list-style: disc;
  padding-left: 1.4rem;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.tldr-list li {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.7;
  color: #000;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

/* Intro video in hero, right under the button row */
.intro-video {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  text-align: center;
}

.intro-video video {
  max-width: 100%;
  height: auto;
  display: inline-block;
  background: var(--bg-alt);
}

/* Pose explorer: scene tabs + per-scene pose thumbnails */
.pose-explorer {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pose-scene-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pose-scene-tab {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.pose-scene-tab:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pose-scene-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(19, 103, 167, 0.25);
}

.pose-viewer {
  margin: 0 auto;
  text-align: center;
}

.pose-viewer-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: start;
}

.pose-viewer-row figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pose-viewer-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  background: var(--bg);
  display: block;
}

.pose-viewer-row figure:nth-child(-n+2) img {
  object-fit: contain;
  padding: 0.35rem;
}

.pose-viewer-row figure:nth-child(3) img {
  object-fit: cover;
  object-position: center;
}

.pose-viewer-row figcaption {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  padding: 0.55rem 0.5rem 0.35rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  order: 2;
}

.pose-viewer-row img.pose-legend {
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 56px;
  aspect-ratio: auto;
  margin: 0.5rem auto 0.7rem;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  display: block;
  object-fit: contain;
  order: 3;
}

@media (max-width: 700px) {
  .pose-viewer-row img.pose-legend { max-height: 44px; }
}

.pose-viewer-cap {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  margin: 1rem 0 0;
  text-align: center;
}

@media (max-width: 700px) {
  .pose-viewer-row { grid-template-columns: 1fr; gap: 0.75rem; }
}

.pose-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.pose-dot {
  padding: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.pose-dot:hover {
  border-color: var(--accent);
  background: #eaf2f9;
}

.pose-dot.is-active {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.2);
}

/* ============================================================
   BODY TEXT
============================================================ */
.project-text {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 18px;
  font-weight: 300;
  color: #000;
  line-height: 1.75;
  max-width: 1100px;
  margin: 0 auto;
  text-align: justify;          /* full-justify body paragraphs */
  text-align-last: left;        /* but don't stretch the last line */
  hyphens: auto;                /* allow soft hyphenation if needed */
}

.subsection {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 1.15rem;
  font-weight: 300;
  margin: 2rem auto 0.5rem;
  max-width: 1100px;
  color: #000;
}

/* ============================================================
   RESULTS PLOTS (4-up F1 vs CD)
============================================================ */
.results-plots {
  max-width: 1100px;
  margin: 1.25rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  align-items: stretch;
}

.results-plots figure {
  margin: 0;
}

.results-plots img {
  width: 100%;
  height: auto;
  display: block;
  background: var(--bg);
}

/* ── Quantitative results table ── */
.quant-table-wrap {
  overflow-x: auto;
  margin: 1.5rem auto 0;
  max-width: 1100px;
}

.quant-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  text-align: center;
}

.quant-table th,
.quant-table td {
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.quant-table thead th {
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
}

.quant-table .col-group-header {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border-color: var(--accent-strong);
}

.quant-table .col-method {
  text-align: left;
  background: var(--bg-alt);
  min-width: 160px;
}

.quant-table td.col-method,
.quant-table tbody td:first-child {
  text-align: left;
}

.quant-table .section-divider td {
  background: var(--bg-alt);
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-top: 2px solid var(--border);
}

.quant-table .row-ours td {
  background: #eef4fb;
  font-weight: 500;
}

.quant-table .row-ours td:first-child {
  color: var(--accent-strong);
  font-weight: 600;
}

.quant-table tbody tr:hover td {
  background: #f8fafc;
}

.quant-table .row-ours:hover td {
  background: #ddeaf7;
}

.results-plots-cap {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-size: 0.85rem;
  color: #333;
  margin: 0.75rem auto 0;
  max-width: 1100px;
  line-height: 1.55;
  text-align: center;
}

/* ============================================================
   BIBTEX BLOCK
============================================================ */
pre.bibtex {
  background: #0f1115;
  color: #e6edf3;
  padding: 1rem 1.1rem;
  border-radius: 10px;
  -moz-border-radius: 10px;
  -webkit-border-radius: 10px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
  font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
  max-width: 1100px;
  margin: 0 auto;
}

pre.bibtex code { font-family: inherit; }

/* Make the nav-name clickable like a link without underline */
a.nav-name { color: var(--text); }
a.nav-name:hover { color: var(--accent); text-decoration: none; }

/* Additional heading and paragraph styling for template */
.container p {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
}

.container h3 {
  font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
  font-weight: 300;
}

/* ============================================================
   RESULTS EXPLORER — 3-column layout with interactive zoom
============================================================ */
.res-explorer {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.res-scene-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.res-scene-tab {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.res-scene-tab:hover  { color: var(--accent); border-color: var(--accent); }
.res-scene-tab.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(19,103,167,0.25);
}

/* All 3 columns stretch to the same height */
.res-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  align-items: stretch;
}

/* Left column: Camera + RA stacked, each taking equal height */
.res-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.res-col > .res-cell {
  flex: 1;
  min-height: 0;
}

/* Image in left-column cells fills the available cell height */
.res-col > .res-cell > .res-img {
  flex: 1 1 0%;
  min-height: 0;
  height: 0;          /* flex controls height, not natural size */
  aspect-ratio: unset;
  object-fit: contain;
}

/* Pair column: one card, label → fan image → zoom ring */
.res-pair {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.res-cell {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.res-label {
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #3066a2;
  text-align: center;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
  white-space: nowrap;
  flex-shrink: 0;
}

.res-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
}

/* Fan image + draggable circle overlay */
.res-panel-wrap {
  position: relative;
  width: 100%;
  flex-shrink: 0;    /* keep natural 16:9 height; don't stretch */
  z-index: 1;        /* stay above the zoom-area flex sibling below */
}

.res-panel-wrap .res-img {
  display: block;
  width: 100%;
  height: auto;
}

.res-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  cursor: crosshair;
  touch-action: none;
}

/* Zoom area fills remaining vertical space in the pair card */
.res-zoom-area {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.5rem;
}

.res-zoom-ring {
  width: 54%;
  max-width: 170px;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #377E22;
  background: #fff;
}

.res-zoom-ring canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Connector SVG overlay (absolute, spans full card) */
.res-connector {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 5;
}

.res-conn-line {
  stroke: #377E22;
  stroke-width: 1.8;
  stroke-dasharray: 6 4;
  stroke-opacity: 0.65;
  fill: none;
}

.res-conn-ring {
  fill: none;
  stroke: #377E22;
}

.fan-annot-svg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.res-img-box {
  position: relative;
  flex: 1 1 0%;
  min-height: 0;
}

.res-col > .res-cell > .res-img-box > .res-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Legend: one centred row matching the video colours ── */
.res-legend-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.3rem 0.85rem;
  margin-top: 1rem;
  padding: 0.5rem 1.1rem;
  background: #ECECEC;
  border: 1px solid #b9c0cf;
  border-radius: 8px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  white-space: nowrap;
}

.leg-mark {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  overflow: visible;
}

.leg-mark-wide {
  width: 24px;
  height: 15px;
  flex-shrink: 0;
  overflow: visible;
}

.leg-txt {
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.76rem;
  color: #333;
}

.leg-sep {
  width: 1px;
  height: 1.1em;
  background: #b9c0cf;
  margin: 0 0.1rem;
  flex-shrink: 0;
}

.leg-cbar-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
}

.leg-cbar {
  width: 70px;
  height: 9px;
  background: linear-gradient(to right, #0a0000, #cc1100, #ff6a00, #ffd400, #ffffff);
  border: 1px solid #999;
  border-radius: 1px;
  display: inline-block;
  flex-shrink: 0;
}

.leg-cbar-label {
  font-family: "HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-size: 0.68rem;
  color: #5F5F5F;
}

/* Pose dots */
.res-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1rem;
}

.res-dot {
  padding: 0;
  width: 11px;
  height: 11px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--bg);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.res-dot:hover     { border-color: var(--accent); background: #eaf2f9; }
.res-dot.is-active { background: var(--accent); border-color: var(--accent); transform: scale(1.2); }

.res-cap {
  display: none;
}

@media (max-width: 700px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-zoom-ring { width: 50%; max-width: 140px; }
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
  .project-title { font-size: 1.95rem; }
  .project-authors { font-size: 1.05rem; }
  .anchor-nav { gap: 0.8rem; }
  .anchor-nav a { font-size: 0.83rem; }
}
