:root {
  --font-sans: "Roboto", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Ubuntu", "Helvetica Neue", Arial, sans-serif;

  --bg: #ffffff;
  --surface: #ffffff;
  --text: #171b22;
  --muted: #576271;
  --line: #d5dde7;
  --strong-line: #bac4d2;
  --accent: #0a648f;
  --accent-soft: #e4f3fb;
  --best: #0f5f87;
  --second: #8a5d0a;

  --max: 1140px;
  --narrow: 800px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.65;
}

img {
  width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid #153b53;
  outline-offset: 2px;
}

.wrap {
  width: min(calc(100% - 2.8rem), var(--max));
  margin: 0 auto;
}

.narrow {
  width: min(calc(100% - 2.8rem), var(--max));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(7px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.2rem;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.28rem;
  font-weight: 500;
  color: #4d4d4d;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.topnav a {
  color: #4d4d4d;
  font-size: 0.92rem;
  font-weight: 650;
}

.topnav a:hover {
  color: #4d4d4d;
  text-decoration: none;
}

.section {
  padding: 3.3rem 0;
}

.hero {
  padding-top: 2.2rem;
}

.hero .narrow {
  text-align: center;
}

.venue {
  display: inline-block;
  margin: 0;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #184a65;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

h1 {
  margin: 0 auto 1.35rem;
  font-family: var(--font-sans);
  font-size: clamp(2.35rem, 5.1vw, 4.35rem);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 700;
  color: #303030;
  text-wrap: balance;
}

.subtitle {
  margin: 0;
  font-weight: 700;
  color: #1f2c3b;
}

.subtitle span {
  color: #8794a8;
}

.authors {
  margin: 0 auto;
  color: #1e8cf0;
  font-size: clamp(1.05rem, 2vw, 1.55rem);
  font-weight: 400;
  line-height: 1.38;
}

.authors sup,
.affiliations sup {
  font-size: 0.62em;
  line-height: 0;
  vertical-align: super;
}

.affiliations {
  margin: 0.15rem auto 0;
  color: #303030;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  line-height: 1.38;
}

.affiliations span {
  display: block;
}

.resource-row {
  margin: 1.45rem 0 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  align-items: center;
}

.resource-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.56rem 1.4rem;
  border: 1px solid #333333;
  border-radius: 999px;
  background: #333333;
  color: #ffffff;
  font-size: clamp(1rem, 1.7vw, 1.32rem);
  font-weight: 500;
  line-height: 1.2;
  box-shadow: 0 1px 1px rgba(15, 21, 28, 0.12);
  transition:
    background 150ms ease,
    border-color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.resource-button:hover {
  text-decoration: none;
  border-color: #1f1f1f;
  background: #1f1f1f;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 9px rgba(15, 21, 28, 0.18);
}

.resource-button:focus-visible {
  outline: 3px solid #153b53;
  outline-offset: 3px;
}

.resource-button.is-disabled {
  cursor: default;
  box-shadow:
    0 0 0 3px rgba(51, 51, 51, 0.26),
    0 1px 1px rgba(15, 21, 28, 0.12);
}

.resource-button.is-disabled:hover {
  border-color: #333333;
  background: #333333;
  transform: none;
  box-shadow:
    0 0 0 3px rgba(51, 51, 51, 0.26),
    0 1px 1px rgba(15, 21, 28, 0.12);
}

.resource-icon {
  display: inline-flex;
  width: 1.18rem;
  height: 1.18rem;
  flex: 0 0 auto;
}

.resource-icon svg {
  width: 100%;
  height: 100%;
}

.resource-icon .icon-fill {
  fill: currentColor;
}

.resource-icon .icon-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.teaser-pair {
  margin-top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.teaser-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #e9eef7;
}

.teaser-motion {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.teaser-cycle-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 760ms cubic-bezier(0.16, 0.84, 0.3, 1);
  opacity: 0;
  will-change: opacity;
  pointer-events: none;
}

.teaser-cycle-image.is-visible {
  opacity: 1;
}

.teaser-method-tag,
.teaser-example-label {
  position: absolute;
  z-index: 2;
  padding: 0.2rem 0.44rem;
  font-size: 0.75rem;
  line-height: 1.2;
  color: #eef5ff;
  background: rgba(18, 33, 51, 0.68);
}

.teaser-method-tag {
  top: 0.52rem;
  left: 0.52rem;
  font-weight: 600;
}

.teaser-example-label {
  right: 0.52rem;
  bottom: 0.52rem;
  text-align: right;
}

.teaser-pair figure,
.wide-figure,
.triptych figure {
  margin: 0;
}

.teaser-pair img,
.wide-figure img,
.triptych img,
.qual-grid img {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.teaser-pair figcaption,
.wide-figure figcaption,
.triptych figcaption,
.qual-grid figcaption {
  margin-top: 0.56rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.takeaway {
  margin: 1rem 0 0;
  font-size: 1.03rem;
  font-weight: 620;
  color: #1f3844;
}

.hero-takeaways {
  margin: 0.7rem 0 0;
  padding-left: 1.2rem;
}

.hero-takeaways li {
  margin: 0.2rem 0;
}

.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

h2 {
  margin: 0 0 0.9rem;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  color: #4d4d4d;
  line-height: 1.12;
  font-weight: 400;
}

.intro {
  margin: 0;
  color: var(--muted);
}

.summary-list {
  margin: 0.72rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.summary-list li {
  margin: 0.24rem 0;
}

.delta-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.delta-list li {
  padding: 0.62rem 0;
  border-top: 1px solid var(--line);
}

.delta-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.method-lines {
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.method-lines li {
  padding: 0.9rem 0 1rem;
  border-top: 1px solid var(--line);
}

.method-lines li:last-child {
  border-bottom: 1px solid var(--line);
}

.method-lines h3,
.subhead {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
}

.contrib-head {
  margin-top: 1.15rem;
}

.method-lines p {
  margin: 0.25rem 0 0;
}

.subhead {
  margin-top: 1.25rem;
}

.method-highlights {
  margin: 0.72rem 0 0;
  padding-left: 1.2rem;
}

.method-highlights li {
  margin: 0.28rem 0;
}

.method-delta-wrap {
  margin-top: 0.8rem;
  width: 100%;
  overflow-x: auto;
}

.method-delta-table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  border-top: 1px solid #243850;
  border-bottom: 1px solid #243850;
}

.method-delta-table th,
.method-delta-table td {
  padding: 0.6rem 0.55rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--line);
}

.method-delta-table th {
  font-weight: 600;
  border-top: 0;
  color: #243850;
}

.results-stack {
  margin-top: 1.1rem;
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.result-table-block {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.metric-legend {
  margin: 0.5rem 0 0;
  color: #425264;
  font-size: 0.96rem;
}

.results-panel {
  border-top: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
}

.results-panel:last-child {
  border-bottom: 1px solid var(--line);
}

.results-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.48rem 0 0.62rem;
  color: #2b3d50;
  font-weight: 500;
}

.results-panel > summary::marker,
.results-panel > summary::-webkit-details-marker {
  display: none;
}

.results-panel > summary::after {
  content: "+";
  color: #516375;
  font-weight: 500;
}

.results-panel[open] > summary::after {
  content: "\2212";
}

.results-panel > summary:hover {
  color: var(--accent);
}

.results-panel[open] > summary {
  padding-bottom: 0.44rem;
}

.table-scroll {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.paper-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 0.92rem;
  border-top: 1.7px solid #323e4d;
  border-bottom: 1.7px solid #323e4d;
  font-variant-numeric: tabular-nums;
}

.paper-table.cub-combined-table {
  min-width: 1180px;
}

.cub-combined-table thead th[rowspan] {
  vertical-align: middle;
}

/* Visual splits before DINOv2 and before DINOv3 groups (paper-like layout) */
.cub-combined-table thead tr:first-child th:nth-child(3),
.cub-combined-table thead tr:first-child th:nth-child(4),
.cub-combined-table thead tr:nth-child(2) th:nth-child(1),
.cub-combined-table thead tr:nth-child(2) th:nth-child(5),
.cub-combined-table tbody td:nth-last-child(8),
.cub-combined-table tbody td:nth-last-child(4) {
  border-left: 1.1px solid #8e9db0;
}

.paper-table th,
.paper-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.42rem 0.5rem;
  border: 0;
}

.paper-table th {
  color: #2f3d50;
  font-size: 0.84rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  border-bottom: 1.05px solid #5f6f81;
}

.paper-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
}

.paper-table thead tr:first-child th {
  z-index: 3;
}

.paper-table.cub-combined-table thead tr:nth-child(2) th {
  top: 2.05rem;
  z-index: 2;
}

.paper-table.cub-combined-table thead tr:first-child th[rowspan] {
  z-index: 4;
}

.paper-table .num {
  text-align: center;
}

.paper-table .head-group {
  text-align: center;
}

.paper-table tbody tr + tr td {
  border-top: 0.7px solid #d5dde7;
}

.paper-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.paper-table tbody tr.group-start:not(:first-child) td {
  border-top: 1px solid #9eacbc;
}

.paper-table td[rowspan] {
  vertical-align: middle;
  white-space: nowrap;
  color: #203145;
}

.table-caption {
  margin: 0.55rem 0 0;
  color: #4c5a6a;
  font-size: 0.95rem;
  line-height: 1.45;
}

.table-caption strong {
  color: #2e3c4d;
  font-weight: 500;
}

.best,
.second {
  color: inherit;
}

.best {
  font-weight: 700;
}

.second {
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}

.results-note {
  margin: 1.1rem 0 0;
  color: #1f3744;
  font-weight: 620;
}

.triptych {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.qual-grid {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.qual-grid figure {
  margin: 0;
}

.citation-tools {
  margin-top: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.copy-btn {
  border: 1px solid var(--strong-line);
  background: #ffffff;
  color: #2b3d50;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.25rem 0.62rem;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-btn:focus-visible {
  outline: 2px solid #153b53;
  outline-offset: 2px;
}

#copy-status {
  font-size: 0.88rem;
  color: var(--muted);
}

pre {
  margin: 0.9rem 0 0;
  padding: 1rem;
  overflow-x: auto;
  background: #f2f6fb;
  border: 1px solid var(--line);
}

pre code {
  font-size: 0.84rem;
}

.citation-section .resource-row {
  margin-top: 1rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0;
  background: #ffffff;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .results-stack {
    gap: 0.95rem;
  }
}

@media (max-width: 900px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    padding: 0.62rem 0;
  }

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

  .teaser-pair,
  .triptych,
  .qual-grid {
    grid-template-columns: 1fr;
  }

  .teaser-pair.teaser-cycle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .table-scroll {
    overflow-x: auto;
    overflow-y: auto;
    max-height: min(72vh, 34rem);
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

}

@media (max-width: 640px) {
  .wrap,
  .narrow {
    width: min(calc(100% - 1.4rem), var(--max));
  }

  .section {
    padding: 2.4rem 0;
  }

  .hero {
    padding-top: 3.1rem;
  }

  .paper-table th,
  .paper-table td {
    font-size: 0.82rem;
  }

  .table-caption {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto;
  }
}
