:root {
  --bg-color: #f7f8f5;
  --text-color: #101413;
  --secondary-text: #4c5550;
  --border-color: #d9dfd8;
  --card-color: #fff;
  --section-color: #edf0ea;
  --accent-color: #20483a;
  --content-gutter: clamp(1.25rem, 4vw, 3rem);
}

.wrap {
  max-width: 82rem;
  padding-inline: var(--content-gutter);
}

body { font-size: var(--type-body); }
strong { font-weight: 700; }

.site-header { padding-top: 0; }

.nav {
  flex-wrap: wrap;
  padding-block: 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.home-link { font-size: var(--type-body); font-weight: 700; }
.nav-links { flex-wrap: wrap; gap: .45rem clamp(.9rem, 2.5vw, 2rem); }
.nav-links a, .nav-links a:first-child {
  display: inline-block;
  font-size: var(--type-body);
  font-weight: 550;
}

.home-link, .nav-links a { border-color: transparent; }
.home-link:hover, .nav-links a:hover { border-color: currentColor; }

.project-hero {
  padding-block: clamp(2.25rem, 4vw, 3.5rem) 0;
  text-align: left;
}

.project-hero h1,
.section h2,
.closing h2 {
  font-family: inherit;
  font-weight: 750;
  letter-spacing: -.055em;
  line-height: 1.06;
}

.project-hero h1 {
  margin: 0 0 1.6rem;
  font-size: var(--type-title);
  overflow-wrap: anywhere;
}

.project-title-punctuation {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.project-hero .project-subtitle {
  display: block;
  max-width: 42ch;
  margin-top: .55rem;
  font-size: var(--type-section);
  font-weight: 650;
  letter-spacing: -.045em;
  line-height: 1.15;
  text-wrap: pretty;
  white-space: normal;
}

.project-authors, .project-affiliations {
  max-width: 70rem;
  margin-inline: 0;
  text-align: left;
}

.project-authors {
  margin-bottom: .6rem;
  font-size: var(--type-body);
  line-height: 1.6;
}

.project-authors a { font-weight: 700; }

.project-affiliations {
  justify-content: flex-start;
  gap: .35rem 1.25rem;
  margin-bottom: 1.65rem;
  font-size: var(--type-support);
  line-height: 1.55;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.5rem;
}

.project-resources {
  display: flex;
  flex-wrap: wrap;
  width: auto;
  max-width: none;
  margin: 0;
  gap: .5rem;
}

.resource-chip {
  justify-content: space-between;
  min-width: 7rem;
  min-height: 2.8rem;
  padding: .62rem .85rem;
  gap: .65rem;
  border: 1px solid var(--border-color);
  border-radius: .35rem;
  background: transparent;
  color: var(--text-color);
  font-size: var(--type-body);
  font-weight: 650;
  text-decoration: none;
}

.project-resources li:first-child .resource-chip {
  border-color: var(--text-color);
  background: var(--text-color);
  color: var(--card-color);
}

.project-resources a.resource-chip:hover {
  border-color: var(--text-color);
  background: var(--section-color);
  color: var(--text-color);
}

.project-jump-links {
  justify-content: flex-start;
  gap: .4rem 1.15rem;
  margin-top: 0;
  font-size: var(--type-body);
  font-weight: 550;
}

.project-jump-links a:hover { color: var(--text-color); }

.project-preview {
  width: 100%;
  margin: clamp(1.65rem, 3vw, 2.25rem) 0 0;
}

.project-preview a {
  padding: clamp(.35rem, 1vw, .65rem);
  border-radius: .65rem;
}

.project-preview img { width: 100%; border-radius: .32rem; }

.section { padding-top: clamp(3.6rem, 7.75vw, 6rem); }

.section.tinted {
  margin-top: clamp(3.6rem, 7.75vw, 6rem);
  padding-bottom: clamp(3.6rem, 7.75vw, 6rem);
  background: var(--section-color);
}

.section-heading { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }

.section h2, .closing h2 {
  margin-bottom: .7rem;
  padding-bottom: 0;
  border: 0;
  font-size: var(--type-section);
  text-wrap: balance;
}

.lede {
  max-width: 68ch;
  font-size: var(--type-lead);
  line-height: 1.55;
}

.section h3 {
  color: var(--text-color);
  font-family: inherit;
  font-size: var(--type-subhead);
  font-weight: 700;
  letter-spacing: -.027em;
  line-height: 1.25;
}

.abstract p, .result-intro p, .small-note { max-width: 77ch; }
.contribution-grid p, .method-steps p, .demo-card p { font-size: var(--type-body); }

.stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.9rem, 2.5vw, 2rem);
}

.stats strong {
  font: 750 var(--type-section)/1.1 'Inter', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -.052em;
}

.stats strong span { font-size: var(--type-support); }
.stats p { max-width: 24ch; margin: .65rem 0 0; font-size: var(--type-support); }
.stats p br { display: none; }

.paper-figure {
  padding: clamp(.55rem, 1.65vw, 1.25rem);
  border: 1px solid var(--border-color);
  border-radius: .65rem;
  box-shadow: none;
}

.paper-figure figcaption, .small-note, .data-details p { font-size: var(--type-support); }
.method-steps article { border-top: 1px solid var(--border-color); padding-top: .9rem; }
.method-steps h3 { margin-top: 0; }

.cad-viewer :is(.cad-toolbar, .cad-assembly-controls, .cad-help, .cad-status, select),
.cad-downloads p,
.cad-downloads details :is(summary, ul) {
  font-size: var(--type-support);
}

.cad-viewer .cad-surface { background: #e4e9e2; }
.gripper-tabs a { font-size: var(--type-body); }
.gripper-tabs a:hover { border-color: var(--accent-color); }
.gripper-tabs a[aria-selected="true"],
.cad-viewer button[aria-pressed="true"] {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: var(--card-color);
}

.cad-downloads .cad-build-notes {
  padding-top: .5rem;
  border-top: 1px solid var(--border-color);
  margin: 1rem 0;
}

.cad-build-notes summary { color: var(--accent-color); }
.cad-build-notes p:first-of-type { margin-top: .75rem; }

.chart-label, .task-buttons button, .bar-row, table, caption, thead th { font-size: var(--type-support); }
.chart-label, caption, thead th { color: var(--text-color); font-weight: 650; }
.bar-row { grid-template-columns: 115px minmax(0, 1fr) 3.4rem; }
.bar-track { background: #e4e7e0; }
.bar-fill { background: #a0aaa0; }
.bar-row.ours .bar-fill { background: var(--accent-color); }
tr.ours { background: #e9eee7; }

.demo-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .65rem 1.5rem; }
.demo-heading .button { margin-bottom: 1rem; }
:focus-visible { outline-color: var(--accent-color); }
.button, .text-link { font-size: var(--type-body); font-weight: 650; }
.video-meta, .full-video :is(p, summary), .footer { font-size: var(--type-support); }
.footer .wordmark { font-family: inherit; font-size: var(--type-body); font-weight: 700; }

@media (max-width: 680px) {
  .nav { gap: .7rem; padding-block: .85rem; }
  .nav-links { row-gap: .3rem; }
  .project-hero h1 { letter-spacing: -.043em; }
  .project-affiliations { gap: .25rem 1rem; }
  .stats { grid-template-columns: 1fr; }
  .stats > div + div { border-top: 1px solid var(--border-color); padding-top: .85rem; }
  .stats p { max-width: none; }
  .bar-row { grid-template-columns: minmax(0, 6.5rem) 1fr auto; gap: .4rem; }
  .full-video summary { gap: .5rem; }
}
