:root {
  --primary: #17365d;
  --primary-dark: #102943;
  --accent: #2b6cb0;
  --accent-soft: #ebf8ff;
  --orange: #dd6b20;
  --green: #2f855a;
  --purple: #6b46c1;
  --background: #ffffff;
  --background-alt: #f7fafc;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --max-width: 1040px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font-family: "Noto Sans", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img,
video {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.container {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 1000;
  padding: 8px 14px;
  color: #fff;
  background: var(--primary);
  border-radius: 6px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  overflow-x: auto;
  background: rgba(237, 242, 247, 0.97);
  border-top: 1px solid #d7dee8;
  border-bottom: 1px solid #d7dee8;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-list {
  display: flex;
  justify-content: center;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0 22px;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 14px 20px;
  color: var(--text);
  border-bottom: 2px solid transparent;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-list a:hover,
.nav-list a:focus-visible,
.nav-list a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
}

.paper-hero {
  padding: 58px 0 54px;
  text-align: center;
  background: #fff;
}

.hero-container {
  max-width: 1080px;
}

.paper-hero h1 {
  max-width: 1020px;
  margin: 0 auto 24px;
  color: var(--primary);
  font-size: clamp(30px, 4.1vw, 46px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px 8px;
  margin: 0 auto 5px;
  color: var(--text);
  font-size: 17px;
  font-weight: 500;
}

.authors span {
  white-space: nowrap;
}

.authors sup,
.equal-note sup {
  color: var(--accent);
  font-size: 0.7em;
  font-weight: 700;
}

.equal-note {
  margin: 0 0 7px;
  color: var(--text-light);
  font-size: 12px;
}

.affiliation {
  margin: 0 0 15px;
  color: var(--text-light);
  font-size: 15px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 34px;
}

.project-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #7c3aed);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 100px;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.18);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.project-button:hover,
.project-button:focus-visible {
  color: #fff;
  filter: brightness(1.02);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.project-button[aria-disabled="true"] {
  cursor: default;
}

.demo-block {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 38px rgba(23, 54, 93, 0.12);
}

.demo-block video {
  display: block;
  width: 100%;
  height: auto;
  background: #0b1522;
  border-radius: 6px;
}

.section {
  padding: 62px 0;
}

.section-alt {
  background: var(--background-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  margin: 0 0 24px;
  color: var(--primary);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.section-intro,
.abstract-text {
  max-width: 860px;
  margin-right: auto;
  margin-left: auto;
  color: var(--text);
  font-size: 16px;
  text-align: justify;
}

.section-intro {
  margin-top: 0;
  margin-bottom: 28px;
}

.abstract-text p {
  margin: 0 0 15px;
}

.paper-figure {
  margin: 34px 0 48px;
  text-align: center;
}

.paper-figure:last-child {
  margin-bottom: 0;
}

.paper-figure img {
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
}

.paper-figure figcaption {
  max-width: 900px;
  margin: 12px auto 0;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.55;
}

.paper-figure figcaption strong {
  color: var(--text);
}

.overview-figure {
  margin-top: 34px;
}

.overview-figure img {
  border: 0;
}

.overview-figure figcaption {
  margin-top: 6px;
}

.borderless-figure img {
  border: 0;
}

.synthesis-table-block,
.removal-table-block {
  width: 100%;
  margin: 42px 0 0;
}

.table-caption {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 13px;
  text-align: center;
}

.comparison-heading {
  margin: 42px 0 24px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.synthesis-table-wrapper,
.removal-table-wrapper {
  margin: 0;
}

.synthesis-table {
  min-width: 900px;
  table-layout: fixed;
}

.synthesis-table .synthesis-column {
  width: 16.6667%;
}

.synthesis-table th:first-child,
.synthesis-table td:first-child {
  text-align: center;
}

.synthesis-table th:nth-child(2),
.synthesis-table td:nth-child(2) {
  text-align: left;
  white-space: nowrap;
}

.synthesis-table .table-group-row th {
  padding: 7px 12px;
  color: var(--primary-dark);
  background: #edf2f7;
  font-style: italic;
  text-align: left;
}

.removal-table {
  min-width: 760px;
  table-layout: fixed;
}

.removal-table .removal-id-column {
  width: 60px;
}

.removal-table .removal-loss-column {
  width: 12%;
}

.removal-table .removal-metric-column {
  width: 16%;
}

.removal-table th:first-child,
.removal-table td:first-child {
  text-align: center;
}

.loss-symbol {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  white-space: nowrap;
}

.loss-symbol sub {
  font-size: 0.72em;
}

.benchmark-table-block {
  margin: 28px 0 0;
}

.benchmark-table-wrapper {
  margin: 0;
}

.benchmark-table-wrapper + .table-caption + .benchmark-table-wrapper {
  margin-top: 34px;
}

.benchmark-table {
  font-size: 14px;
}

.benchmark-video-table {
  min-width: 820px;
}

.benchmark-image-table {
  min-width: 900px;
}

.benchmark-table th,
.benchmark-table td {
  padding: 8px 9px;
  white-space: nowrap;
}

.benchmark-table thead th {
  text-align: center;
}

.benchmark-table th:first-child,
.benchmark-table td:first-child {
  text-align: center;
}

.benchmark-table u {
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 28px 0;
}

.benchmark-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 54, 93, 0.05);
}

.benchmark-card h3 {
  margin: 0 0 5px;
  color: var(--primary);
  font-size: 19px;
}

.benchmark-card > strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 16px;
}

.benchmark-card p {
  margin: 0;
  color: var(--text-light);
  font-size: 14px;
}

.table-wrapper {
  overflow-x: auto;
  margin: 28px 0 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 830px;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  color: #fff;
  background: var(--primary);
}

th,
td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

th {
  font-weight: 600;
}

th:first-child,
td:first-child {
  text-align: left;
  font-weight: 600;
}

tbody tr:hover {
  background: #edf2f7;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.highlight-row {
  color: var(--primary-dark);
  background: var(--accent-soft);
}

.citation-container {
  max-width: 900px;
}

.view-counter {
  margin-top: 32px;
  color: var(--text-light);
  font-size: 13px;
  text-align: center;
}

#bibtex {
  margin: 0;
  padding: 22px 24px;
  overflow-x: auto;
  color: #e2e8f0;
  background: #1a202c;
  border-radius: 8px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

footer {
  padding: 25px 0;
  color: var(--text-light);
  background: var(--background-alt);
  border-top: 1px solid var(--border);
  font-size: 12px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 62px;
  }

  .container {
    width: min(calc(100% - 28px), var(--max-width));
  }

  .nav-list {
    justify-content: center;
    min-width: 100%;
    padding: 0 2px;
  }

  .nav-list a {
    padding: 12px 8px;
    font-size: 12px;
  }

  .paper-hero {
    padding: 42px 0 44px;
  }

  .paper-hero h1 {
    font-size: 29px;
  }

  .authors {
    font-size: 14px;
  }

  .section {
    padding: 48px 0;
  }

  .section h2 {
    font-size: 26px;
  }

  .section-intro,
  .abstract-text {
    font-size: 14px;
    text-align: left;
  }

  .paper-figure {
    margin: 28px 0 40px;
  }

  .paper-figure figcaption {
    font-size: 11px;
    text-align: left;
  }

  .benchmark-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    align-items: flex-start;
    flex-direction: column;
  }

  #bibtex {
    padding: 18px;
    font-size: 10px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* ===== LociArt extensions ===== */
:root {
  --primary: #12324f;
  --primary-dark: #0b2439;
  --accent: #247b86;
  --accent-2: #ed6f57;
  --accent-soft: #e7f4f2;
  --sand: #f2eee6;
  --ink-soft: #536775;
  --deep: #081b2b;
  --max-width: 1160px;
  --card-shadow: 0 16px 44px rgba(18, 50, 79, 0.10);
}

body {
  color: #263947;
}

.paper-hero {
  padding-top: 46px;
  background:
    radial-gradient(circle at 50% 0%, rgba(36, 123, 134, 0.10), transparent 42%),
    linear-gradient(180deg, #fff 0%, #fbfcfc 100%);
}

.paper-hero h1 {
  max-width: 1100px;
  margin-bottom: 20px;
  color: var(--primary);
  font-size: clamp(31px, 4.3vw, 52px);
}

.eyebrow,
.kicker {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.authors {
  max-width: 1020px;
  color: #1d3446;
  font-size: 16px;
}

.equal-note {
  max-width: 880px;
  margin-right: auto;
  margin-left: auto;
  line-height: 1.55;
}

.affiliation {
  color: #5a6a76;
}

.project-button.secondary {
  color: var(--primary);
  background: #fff;
  border-color: #cfdae1;
  box-shadow: 0 10px 25px rgba(18, 50, 79, 0.09);
}

.project-button.secondary:hover,
.project-button.secondary:focus-visible {
  color: #fff;
  background: var(--primary);
}

.demo-block {
  border-radius: 16px;
  box-shadow: 0 22px 60px rgba(18, 50, 79, 0.16);
}

.demo-block video {
  border-radius: 10px;
}

.hero-caption {
  max-width: 800px;
  margin: 12px auto 0;
  color: var(--text-light);
  font-size: 12px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 900px;
  margin: 28px auto 0;
}

.stat {
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.stat strong {
  display: block;
  color: var(--primary);
  font-size: 25px;
  line-height: 1.1;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section {
  padding: 72px 0;
}

.section h2 {
  letter-spacing: -0.02em;
}

.section-intro {
  max-width: 920px;
  margin: 0 auto 34px;
  color: #4c606d;
  font-size: 16px;
  text-align: center;
}

.paper-figure {
  margin: 34px 0 48px;
}

.paper-figure img {
  border: 0;
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(18, 50, 79, 0.09);
}

.section-alt .paper-figure img {
  box-shadow: 0 12px 30px rgba(18, 50, 79, 0.08);
}

.paper-figure figcaption {
  max-width: 980px;
  color: #667986;
}

.overview-figure {
  margin-top: 46px;
}

.compact-figure img {
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
}

.metric-grid {
  display: grid;
  gap: 14px;
  margin: 34px 0 44px;
}

.metric-grid.four-up {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid.six-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.method-card,
.copy-panel,
.citation-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

.metric-card {
  padding: 22px 20px;
}

.metric-card strong {
  display: block;
  color: var(--primary);
  font-size: 32px;
  line-height: 1;
}

.metric-card span {
  display: block;
  margin: 7px 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-card p {
  margin: 0;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.55;
}

.figure-pair,
.split-layout,
.training-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
}

.figure-pair .paper-figure,
.split-layout .paper-figure,
.training-grid .paper-figure {
  margin: 0;
}

/* Interactive galleries */
.interactive-block {
  margin: 46px 0 58px;
}

.interactive-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.interactive-head h3,
.gallery-notes h3,
.copy-panel h3,
.method-card h3 {
  margin: 0;
  color: var(--primary);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.interactive-head p:not(.kicker) {
  max-width: 740px;
  margin: 8px 0 0;
  color: var(--text-light);
  font-size: 14px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.tab {
  padding: 8px 12px;
  color: #526673;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.tab:hover,
.tab:focus-visible,
.tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  outline: none;
}

.interactive-grid {
  display: grid;
  gap: 18px;
}

.video-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
}

.video-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f4;
}

.video-card-title {
  color: #18374d;
  font-size: 14px;
  font-weight: 750;
}

.video-card-subtitle {
  margin-top: 2px;
  color: var(--text-light);
  font-size: 11px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.group-toggle {
  padding: 6px 9px;
  color: var(--primary);
  background: #fff;
  border: 1px solid #cbd9e0;
  border-radius: 7px;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.group-toggle:hover,
.group-toggle:focus-visible,
.group-toggle.is-playing {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.pill {
  padding: 5px 7px;
  color: #246b70;
  background: #e1f1ef;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.video-grid {
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #f7f9fa;
}

.video-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.video-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.video-grid.pipeline {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.video-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 50, 79, 0.95), rgba(36, 123, 134, 0.75));
  border-radius: 8px;
}

.video-cell::before {
  content: "loading video";
  position: absolute;
  color: rgba(255, 255, 255, 0.62);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.video-cell.is-loaded::before {
  display: none;
}

.video-cell video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #06131f;
  cursor: pointer;
}

.video-label {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 4px 6px;
  color: #fff;
  background: rgba(5, 21, 34, 0.78);
  border-radius: 5px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  pointer-events: none;
}

.video-label.result-label {
  background: rgba(237, 111, 87, 0.94);
}

.video-label.mask-label {
  background: rgba(39, 112, 220, 0.92);
}

.video-cell.is-playing::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 2;
  width: 8px;
  height: 8px;
  background: #ff8064;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}

/* Data, method, and results */
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 34px 0 48px;
}

.method-card {
  position: relative;
  padding: 25px 21px 21px;
}

.card-index {
  display: block;
  margin-bottom: 12px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.method-card h3 {
  font-size: 20px;
}

.method-card p {
  margin: 12px 0 16px;
  color: var(--text-light);
  font-size: 14px;
}

.equation {
  padding: 11px 10px;
  overflow-x: auto;
  color: #17495b;
  background: #edf7f6;
  border: 1px solid #d9ebe8;
  border-radius: 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  white-space: nowrap;
}

.result-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 30px 0 40px;
}

.result-highlight {
  padding: 18px;
  color: #fff;
  background: linear-gradient(145deg, #12324f, #246f78);
  border-radius: 12px;
  box-shadow: 0 16px 32px rgba(18, 50, 79, 0.16);
}

.result-highlight strong,
.result-highlight span,
.result-highlight small {
  display: block;
}

.result-highlight strong {
  font-size: 30px;
  line-height: 1;
}

.result-highlight span {
  margin-top: 5px;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-highlight small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
}

.table-block {
  margin: 36px 0 48px;
}

.wide-table-block {
  margin-top: 48px;
}

.table-wrapper {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(18, 50, 79, 0.08);
}

table {
  font-size: 13px;
}

thead {
  background: var(--primary);
}

th,
td {
  padding: 10px 11px;
  white-space: nowrap;
}

.comparison-table {
  min-width: 1080px;
  font-size: 12px;
}

.comparison-table th,
.comparison-table td {
  padding: 8px 8px;
}

.comparison-table tbody tr:last-child {
  background: #e6f4f1;
}

.ablation-table {
  min-width: 650px;
}

.expansion-table {
  min-width: 850px;
}

.split-layout {
  margin-top: 46px;
}

.copy-panel {
  padding: 28px;
}

.copy-panel p:not(.kicker) {
  color: var(--text-light);
}

.check-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  padding: 10px 0 10px 25px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.check-list li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 12px 1px -20px;
  background: var(--accent);
  border-radius: 50%;
}

.analysis-split {
  margin-top: 52px;
}

.mini-table {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 9px;
  overflow: hidden;
}

.mini-table div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.mini-table div:last-child {
  border-bottom: 0;
}

.mini-table span {
  color: var(--text-light);
}

.drop {
  color: #b63d38;
  font-size: 10px;
}

/* Gallery and closing sections */
.gallery-notes {
  max-width: 900px;
  margin: 58px auto 24px;
  text-align: center;
}

.gallery-notes p {
  margin: 8px 0 0;
  color: var(--text-light);
  font-size: 14px;
}

.figure-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.figure-gallery .paper-figure {
  margin: 0;
}


.citation-card {
  position: relative;
  padding: 10px;
}

#bibtex {
  margin: 0;
  padding: 24px 24px 62px;
  color: #e2e8f0;
  background: #122433;
  border-radius: 9px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.copy-button {
  position: absolute;
  right: 22px;
  bottom: 22px;
  padding: 9px 13px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 7px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--accent-2);
  outline: none;
}

.citation-note {
  margin-top: 20px;
  color: var(--text-light);
  font-size: 12px;
  text-align: center;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

@media (max-width: 980px) {
  .metric-grid.four-up,
  .metric-grid.six-up,
  .result-highlights,
  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .interactive-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tabs {
    justify-content: flex-start;
  }

  .video-grid.four,
  .video-grid.pipeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .stat-strip,
  .metric-grid.four-up,
  .metric-grid.six-up,
  .result-highlights,
  .method-grid,
  .figure-pair,
  .split-layout,
  .training-grid,
  .figure-gallery {
    grid-template-columns: 1fr;
  }

  .video-grid.three,
  .video-grid.four,
  .video-grid.pipeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .interactive-head h3,
  .gallery-notes h3,
  .copy-panel h3 {
    font-size: 21px;
  }

  .section {
    padding: 54px 0;
  }

  .paper-figure {
    margin: 28px 0 38px;
  }

  .video-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 480px) {
  .video-grid.three,
  .video-grid.four,
  .video-grid.pipeline {
    grid-template-columns: 1fr;
  }

  .project-button {
    width: 100%;
  }
}

/* Requested refinements */
.project-button[aria-disabled="true"] {
  color: #667986;
  background: #eef2f5;
  border-color: #dbe3e8;
  box-shadow: none;
}

.project-button[aria-disabled="true"]:hover,
.project-button[aria-disabled="true"]:focus-visible {
  color: #667986;
  background: #eef2f5;
  filter: none;
  box-shadow: none;
  transform: none;
}

.stats-pair,
.prototype-pair {
  align-items: stretch;
}

.stats-pair .paper-figure,
.prototype-pair .paper-figure {
  display: flex;
  height: 100%;
  flex-direction: column;
}

.stats-pair .paper-figure img {
  width: 100%;
  height: clamp(260px, 29vw, 390px);
  object-fit: contain;
  background: #fff;
}

.prototype-pair .paper-figure img {
  width: 100%;
  height: clamp(300px, 34vw, 455px);
  object-fit: contain;
  background: #fff;
}

.pipeline-layout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: #f7f9fa;
}

.pipeline-col {
  display: grid;
  gap: 6px;
  align-content: start;
}

.pipeline-col .video-cell {
  aspect-ratio: 16 / 9;
}

.video-cell {
  aspect-ratio: var(--media-ratio, 16 / 9);
}

.video-grid.sota-row {
  display: grid;
  grid-template-columns: repeat(var(--method-count, 4), minmax(0, 1fr));
  gap: 6px;
}

.sota-row video {
  object-fit: contain;
}

.sota-card .video-card-head {
  padding-bottom: 10px;
}

@media (max-width: 980px) {
  .pipeline-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .video-grid.sota-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline-col:nth-child(3),
  .pipeline-col:nth-child(4) {
    margin-top: 6px;
  }
}

@media (max-width: 760px) {
  .stats-pair .paper-figure img,
  .prototype-pair .paper-figure img {
    height: 280px;
  }
}

@media (max-width: 620px) {
  .pipeline-layout,
  .video-grid.sota-row {
    grid-template-columns: 1fr;
  }

  .pipeline-col:nth-child(3),
  .pipeline-col:nth-child(4) {
    margin-top: 0;
  }
}
/* Hero overview and consistent section parts */
.hero-figure {
  max-width: 1100px;
  margin: 28px auto 0;
}

.hero-figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(18, 50, 79, 0.12);
}

.hero-figure figcaption {
  max-width: 1000px;
  margin: 12px auto 0;
  color: var(--text-light);
  font-size: 13px;
  line-height: 1.65;
}

.hero-figure figcaption strong {
  color: var(--primary);
}

.part-block {
  margin-top: 52px;
}

.part-block + .part-block {
  margin-top: 64px;
}

.part-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
}

.part-heading h3 {
  margin: 0;
  color: var(--primary);
  font-size: 24px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.part-heading p:not(.kicker) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--text-light);
  font-size: 14px;
}

.part-block > .paper-figure {
  margin-top: 0;
}

.part-block > .table-block,
.part-block > .result-highlights,
.part-block > .split-layout {
  margin-top: 0;
}

@media (max-width: 760px) {
  .part-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .part-heading .tabs {
    justify-content: flex-start;
  }
}

/* Method references in quantitative tables */
.method-link {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
}

.method-link:hover,
.method-link:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.method-link:focus-visible {
  outline: 2px solid rgba(35, 108, 169, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

