@font-face {
  font-family: "EB Garamond";
  src: url("fonts/EBGaramond12-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("fonts/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("fonts/Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #241f28;
  --muted: #5c5664;
  --line: #e3dfd8;
  --band: #f6f4f1;
  --mem: #7056ac;
  --mem-soft: #f6f3fb;
  --radius: 6px;
  --section-gap: 76px;
  --measure: 720px;
  --content: 1080px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Lato, "DejaVu Sans", sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  color-scheme: light;
}

::selection {
  background: #e6def4;
  color: var(--ink);
}

button, input { font: inherit; color: inherit; }

.wrap {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
}

.measure,
figcaption,
.caption {
  width: min(var(--measure), 100%);
  margin-inline: auto;
}

.block { padding-block: calc(var(--section-gap) / 2); }

header.block { padding-top: var(--section-gap); }

.band { background: var(--band); }

.keep { white-space: nowrap; }

h1 {
  margin: 0 auto;
  max-width: 980px;
  font-family: "EB Garamond", "DejaVu Serif", serif;
  font-weight: 400;
  font-size: 44px;
  line-height: 1.12;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
  hyphens: manual;
}

h2 {
  margin: 0 0 calc(var(--section-gap) * 0.34);
  font-family: "EB Garamond", "DejaVu Serif", serif;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.2;
  text-align: center;
}

p { margin: 0; }

header .wrap { text-align: center; }

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 0.9em;
  row-gap: 0.15em;
  margin: 20px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
}

.authors span { white-space: nowrap; }

sup {
  font-size: 0.68em;
  line-height: 0;
  position: relative;
  top: -0.35em;
}

.affil,
.equal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  color: var(--muted);
  line-height: 1.45;
}

.affil {
  gap: 0.3em 1.3em;
  margin: 8px 0 0;
  font-size: 14.5px;
}

.equal {
  gap: 0.3em 1.5em;
  margin: 4px 0 0;
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid #d9d4cc;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

a.btn:visited { color: var(--ink); }

.btn svg { display: block; flex: none; }

.btn:hover {
  border-color: var(--mem);
  color: var(--mem);
  background: var(--mem-soft);
}

.btn:disabled {
  color: #8d8794;
  background: #f6f5f3;
  border-color: #e6e2dc;
  cursor: not-allowed;
}

.btn:disabled:hover {
  color: #8d8794;
  background: #f6f5f3;
  border-color: #e6e2dc;
}

.soon {
  font-size: 12px;
  color: #9a948e;
}

.btn:disabled .soon { color: #a39da8; }

.measure p + p { margin-top: 0.9em; }

figure { margin: 0; }

figure + figure { margin-top: calc(var(--section-gap) * 0.72); }

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

figure img { width: 100%; }

.event-fig img {
  width: 75%;
  margin-inline: auto;
}

figcaption,
.caption {
  margin-top: 12px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-align: left;
}

figcaption strong,
.caption strong {
  color: var(--ink);
  font-weight: 700;
}

#video video {
  width: 100%;
  background: #111;
}

.clip-row {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.clip-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.group-label {
  flex: 0 0 102px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--muted);
  text-align: right;
}

.clip-cards {
  display: flex;
  gap: 8px;
  min-width: 0;
  flex: 1;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #d5cfc6 transparent;
}

.clip-cards::-webkit-scrollbar { height: 8px; }
.clip-cards::-webkit-scrollbar-thumb {
  background: #d5cfc6;
  border-radius: 4px;
}

.clip {
  flex: none;
  width: 150px;
  margin: 0;
  padding: 0;
  border: 1px solid #e2ddd6;
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  scroll-snap-align: start;
  appearance: none;
}

.clip img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: contain;
  background: #0a0a0a;
}

.clip-body {
  display: block;
  padding: 7px 7px 9px;
}

.clip-title {
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
  min-height: 2.6em;
}

.clip:hover { border-color: #c9c1d6; }

.clip.on {
  border-color: var(--mem);
  background: #fbfaff;
  box-shadow: inset 0 0 0 1px var(--mem);
}

.clip.on:hover { border-color: var(--mem); }

.method-bar {
  display: flex;
  justify-content: center;
  margin: 18px 0 12px;
}

.methods {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid #d9d4cc;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.method {
  margin: 0;
  padding: 7px 16px;
  border: 0;
  border-right: 1px solid #d9d4cc;
  background: transparent;
  font-size: 14.5px;
  line-height: 1.2;
  cursor: pointer;
}

.method:last-child { border-right: 0; }

.method:hover { background: #f6f4f1; }

.method.on {
  background: var(--ink);
  color: #fff;
}

.method.on:hover { background: #1c1822; }

.method.on.ours,
.method.on.ours:hover {
  background: var(--mem);
  color: #fff;
}

.method.on.ours:hover { background: #624a96; }

.miss {
  margin: 0 0 8px;
  text-align: center;
  color: var(--muted);
  font-size: 14.5px;
}

.stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.pane-label {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--muted);
}

.frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.frame-cam,
.frame-cam video { background: #0a0a0a; }

.frame-world {
  background: #fff;
  border: 1px solid var(--line);
}

.frame-world video { background: #fff; }

.frame-world.is-empty video { display: none; }

.world-empty {
  display: none;
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 20px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.frame-world.is-empty .world-empty { display: flex; }

.transport {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

#play {
  flex: none;
  min-width: 72px;
  margin: 0;
  padding: 6px 12px;
  border: 1px solid #d9d4cc;
  border-radius: var(--radius);
  background: #fff;
  font-size: 14.5px;
  line-height: 1.2;
  cursor: pointer;
}

#play:hover {
  border-color: var(--mem);
  color: var(--mem);
}

.scrub {
  position: relative;
  flex: 1 1 auto;
  min-width: 48px;
  height: 32px;
  cursor: pointer;
  touch-action: none;
}

.track {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  height: 8px;
  background: #d9d3cb;
  border-radius: 4px;
  overflow: hidden;
}

.playhead {
  position: absolute;
  top: 8px;
  bottom: 8px;
  width: 2px;
  margin-left: -1px;
  background: var(--ink);
  pointer-events: none;
}

#clock {
  flex: none;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cite { text-align: center; }

.bibtex {
  margin: 18px auto 0;
  width: min(var(--content), 100%);
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--band);
  color: var(--ink);
  font-family: "DejaVu Sans Mono", ui-monospace, monospace;
  font-size: 13.5px;
  line-height: 1.55;
  text-align: left;
  white-space: pre;
  overflow-x: auto;
}

.cite .btn { margin-top: 14px; }

footer p {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.btn:focus-visible,
.method:focus-visible,
.clip:focus-visible,
#play:focus-visible {
  outline: 2px solid var(--mem);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .stage { grid-template-columns: 1fr; gap: 14px; }
  .event-fig img { width: 100%; }
  h1 { font-size: 34px; }
  .bibtex {
    font-size: 12.5px;
    white-space: pre-wrap;
    overflow-wrap: break-word;
  }
}

@media (max-width: 520px) {
  .wrap { width: min(var(--content), calc(100% - 32px)); }
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
  .clip-group {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .group-label {
    flex: none;
    width: auto;
    text-align: left;
  }
  .transport { gap: 8px; }
  #play { min-width: 64px; padding: 6px 10px; }
  #clock { font-size: 12.5px; }
  .method { padding: 7px 11px; }
}

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