@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "OffBeat Title";
  src: url("fonts/offbeat-title.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  --bg: #FFFFFF;
  --ink: #1B1F2A;
  --muted: #5E6270;
  --line: #E2E3E8;
  --accent: #A61E4D;
  --pre: #F5F5F5;
  --gut: 20px;
  --text: 800px;
  --media: 1040px;
  --toc-w: 160px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 "Familjen Grotesk", system-ui, sans-serif;
  text-rendering: optimizeLegibility;
}
@media (min-width: 700px) { body { font-size: 17px; } }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
p { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: #fff; padding: 10px 14px; }
.skip:focus { left: 8px; }

/* contents */
.toc { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.toc ol { list-style: none; margin: 0; padding: 0 var(--gut); display: flex; gap: 20px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.toc ol::-webkit-scrollbar { display: none; }
.toc li:last-child { padding-right: var(--gut); }
.toc a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; line-height: 1.35; color: var(--ink); text-decoration: none; }
.toc a[aria-current="true"] { color: var(--accent); text-decoration: underline 2px; text-underline-offset: 6px; }
@media (hover: hover) { .toc a:hover { text-decoration: underline; } }
@media print { .toc { display: none; } }

/* header */
.hero { text-align: center; padding: 28px var(--gut) 24px; }
.hero h1 { letter-spacing: 0; }
.name { display: block; }
.hero .sub {
  display: block; margin: 14px auto 0; max-width: 22em;
  font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance;
}
.authors { margin-top: 18px; font-size: 17px; }
.authors span { white-space: nowrap; }
.affil { margin-top: 2px; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  border-radius: 2px; border: 1.5px solid var(--ink);
  font: 600 16px/1 "Familjen Grotesk", system-ui, sans-serif;
  text-decoration: none; cursor: pointer; background: transparent; color: var(--ink);
}
.btn:active { transform: translateY(1px); }
@media (hover: hover) { .btn:not(:disabled):hover { background: var(--ink); color: #fff; } }
.btn-off { border-color: #DADCE2; color: var(--muted); cursor: default; }
.btn-off:active { transform: none; }

.wordmark {
  font-family: "OffBeat Title", system-ui, sans-serif;
  font-size: 56px;
  line-height: .9;
  letter-spacing: 0;
  font-weight: 700;
  white-space: nowrap;
}
/* the mark as set in the paper: five bars 1.7 pt wide at the 14.4 pt title size, 0.5em tall, 0.06em apart,
   bars 2 and 4 raised 0.22em, then 0.3em to the name in IBM Plex Sans Bold */
.ob-mark { display: inline-block; width: .83em; height: .72em; margin-right: .3em; vertical-align: baseline; overflow: visible; }
.ob-mark .d { fill: var(--ink); }
.ob-mark .p { fill: var(--accent); }
.ob-word { display: inline-block; }
.wordmark .off { color: var(--accent); }
/* Title motion after the OpenMotion "Swiss" style card (github.com/nexu-io/openmotion, Apache-2.0): the bars fire one per
   trigger slot with hard cuts, the two offset bars lift by their offset, then the name wipes in. Plays once and stops on the paper's mark. */
.ob-mark rect { animation: ob-fire 1ms steps(1, start) calc(var(--k) * 200ms) both; }
.ob-mark .p { animation: ob-fire 1ms steps(1, start) calc(var(--k) * 200ms) both, ob-lift 420ms var(--ease) calc(var(--k) * 200ms + 140ms) both; }
.ob-word { animation: ob-wipe 900ms var(--ease) 1100ms both; }
.js:not(.tm-go) .ob-mark rect, .js:not(.tm-go) .ob-word { animation-play-state: paused; }
@keyframes ob-fire { from { opacity: 0; } to { opacity: 1; } }
@keyframes ob-lift { from { transform: translateY(22px); } to { transform: none; } }
@keyframes ob-wipe { from { clip-path: inset(-.3em 100% -.3em -.3em); } to { clip-path: inset(-.3em -.3em -.3em -.3em); } }
@media (prefers-reduced-motion: reduce) { .ob-mark rect, .ob-mark .p, .ob-word { animation: none; } }
@media (forced-colors: active) { .ob-mark rect, .ob-mark .p, .ob-word { animation: none; } .ob-mark rect { fill: CanvasText; } }
.hero .name { font-size: 40px; }

/* body column */
main { padding: 0 var(--gut) 24px; }
main > section, main > figure { max-width: var(--media); margin-left: auto; margin-right: auto; }
section { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); }
h2 { font-size: 26px; line-height: 1.2; margin-bottom: 16px; }
h3 { font-size: 20px; line-height: 1.25; margin-bottom: 14px; }
.sub-sec { margin-top: 36px; }
.sub-sec:first-of-type { margin-top: 8px; }
.prose { max-width: 720px; margin: 0; }
.prose p + p { margin-top: 1em; }

.media { margin: 0 auto; max-width: var(--media); }
.media video, .media img { width: 100%; border-radius: 0; background: #fff; }
.teaser { margin-top: 4px; }
figcaption, .cap { margin: 10px auto 0; max-width: var(--text); text-align: center; font-size: 16px; line-height: 1.5; }
.lab { font-weight: 600; }
.best th, .best td { font-weight: 700; }
/* the two novel-view clips end in a baked info strip: crop the box to the renders, the native controls stay inside it */
.crop-bt { aspect-ratio: 1920 / 810; object-fit: cover; object-position: top; }
.crop-orbit { aspect-ratio: 1680 / 451; object-fit: cover; object-position: top; }
.vids { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.cap { margin-top: 14px; }
#method figcaption { margin-top: 12px; }

.tbl-wrap { margin: 22px auto 0; max-width: var(--media); overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.35; font-variant-numeric: tabular-nums; }
caption { caption-side: top; text-align: center; padding-bottom: 8px; font-size: 16px; }
th, td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
thead th { border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); font-weight: 600; }
tbody th { text-align: left; font-weight: 400; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 1px solid var(--ink); }
thead th:first-child { text-align: left; }
@media (max-width: 699px) { thead th { white-space: normal; vertical-align: bottom; } }

pre {
  margin: 0; max-width: 720px; padding: 16px 18px;
  background: var(--pre); color: var(--ink);
  font: 400 14px/1.55 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  overflow-x: auto; border-radius: 0;
}

.foot { margin: 28px 0 0; padding: 0 var(--gut) 40px; text-align: center; font-size: 15px; }
.foot p { max-width: var(--media); margin: 0 auto; padding-top: 18px; border-top: 1px solid var(--line); }

@media (min-width: 700px) {
  .hero { padding-top: 40px; }
  .hero .sub { font-size: 30px; max-width: 24em; }
  .authors { font-size: 19px; }
  .affil { font-size: 17px; }
  .hero .name { font-size: 56px; }
  h2 { font-size: 30px; }
  h3 { font-size: 22px; }
  main, .foot { padding-left: 32px; padding-right: 32px; }
}

@media (min-width: 1280px) {
  .toc { position: fixed; left: 0; top: clamp(88px, 18vh, 160px); width: var(--toc-w); padding: 12px 8px 12px 32px; border-bottom: 0; background: none; }
  .toc ol { flex-direction: column; gap: 3px; overflow: visible; padding: 0; }
  .toc a { min-height: 0; padding-block: 4px; }
  .toc li.sub { padding-left: 14px; }
  .toc li:last-child { padding-right: 0; }
  .hero, main, .foot { margin-left: calc(var(--toc-w) + 32px); margin-right: 48px; }
  main, .foot { padding-left: 0; padding-right: 0; }
}
@media (min-width: 1440px) {
  .hero, main, .foot { margin-right: 64px; }
}
@media (max-width: 1279px) {
  .toc li.sub { display: none; }
  .toc:has(li.sub a[aria-current="true"]) a[href="#results"] { color: var(--accent); text-decoration: underline 2px; text-underline-offset: 6px; }
  section, .sub-sec { scroll-margin-top: 64px; }
  h3 { scroll-margin-top: 64px; }
}
@media (max-width: 699px) {
  .actions { flex-wrap: nowrap; gap: 8px; }
  .btn { padding: 0 10px; font-size: 15px; }
}
