/* SPARC project page: light-blue academic layout, palette shared with the figures and the video. */
:root {
  color-scheme: light;
  --nav-h: 60px;
  --content-width: 1160px;
  --gutter: 28px;
  --ink: #1f2a44;
  --muted: #5b6b85;
  --accent: #2f7fd8;
  --accent-dark: #1a4f9c;
  --accent-soft: #eaf3fd;
  --band: #f4f9ff;
  --border: #dce9f8;
  --history: #2f6fde;
  --target: #f07a1a;
  --observed: #c88a00;
  --dense: #8e44d9;
  --gradient: linear-gradient(110deg, #7cc4fa 0%, #3b8beb 45%, #1f4fa8 100%);
  --shadow: 0 10px 30px rgb(31 79 168 / 8%);
  --shadow-lg: 0 28px 60px rgb(31 79 168 / 22%);
  font-family: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 18px; line-height: 1.68; }
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 3px; background: var(--gradient); z-index: 60; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, p, figure { margin: 0; }
::selection { background: #cfe5fb; color: #0f2c5c; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.nowrap { white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 80; padding: 8px 16px; background: #fff; }
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main, .site-footer, .toc-inner { width: min(var(--content-width), calc(100% - 2 * var(--gutter))); margin-inline: auto; }

/* ---------- navigation ---------- */
.toc {
  --progress: 0;
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgb(255 255 255 / 84%);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  transition: box-shadow 200ms ease;
}
.toc.is-stuck { box-shadow: 0 6px 24px rgb(31 79 168 / 8%); }
.toc-inner { display: flex; align-items: center; justify-content: center; height: var(--nav-h); }
.toc-links { display: flex; align-items: center; gap: 4px; }
.toc-links a {
  position: relative; padding: 7px 12px; border-radius: 999px;
  font-size: 15px; font-weight: 700; line-height: 1.3; white-space: nowrap; color: #6a7891; text-decoration: none;
  transition: color 180ms ease, background 180ms ease;
}
.toc-links a:hover { color: var(--accent); background: var(--accent-soft); }
.toc-links a.is-active { color: var(--accent-dark); background: var(--accent-soft); }
.toc-links a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 16px; height: 3px; margin-left: -8px; border-radius: 3px; background: var(--gradient); }
.toc-sep { width: 1px; height: 20px; margin: 0 8px; background: var(--border); }
.toc-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gradient); transform-origin: left; transform: scaleX(var(--progress)); }
.toc-toggle { display: none; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--accent); }
.toc-toggle svg { width: 20px; height: 20px; }
@media (max-width: 1160px) {
  .toc-inner { justify-content: flex-end; }
  .toc-toggle { display: grid; }
  .toc-links { position: absolute; top: var(--nav-h); right: var(--gutter); flex-direction: column; align-items: stretch; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms; }
  .toc-links.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .toc-sep { width: auto; height: 1px; margin: 6px 4px; }
}

/* ---------- hero ---------- */
.hero-bg { position: absolute; inset: 0 0 auto 0; height: 760px; z-index: -1; overflow: hidden;
  background: radial-gradient(1100px 520px at 50% -8%, #dcecfd 0%, rgb(234 243 253 / 70%) 38%, rgb(255 255 255 / 0) 72%); }
.token-field { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(auto-fill, 34px); grid-auto-rows: 34px; gap: 6px; padding: 8px;
  mask-image: radial-gradient(ellipse 62% 58% at 50% 30%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 30%, #000 10%, transparent 72%); opacity: .55; }
.token-field i { display: block; border-radius: 7px; background: #cfe3fa; opacity: .35; transition: opacity 1.6s ease, background 1.6s ease, transform 1.6s ease; }
.token-field i.on { opacity: .9; background: #9cc8f6; }
.token-field i.cut { opacity: .08; transform: scale(.7); }

.paper-header { padding: 34px 0 30px; text-align: center; container-type: inline-size; }
.title { display: block; font-weight: 400; }
.title-anim { position: relative; display: block; width: min(100%, 980px); aspect-ratio: 3 / 1; margin: 0 auto -1.2%; cursor: pointer; }
.title-video, .title-anim sparc-title, .title-anim img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.title-anim sparc-title { display: flex; align-items: center; justify-content: center; --cell: clamp(9px, 2.1cqi, 22px); }
.title-anim.is-resting .title-video { visibility: hidden; }
.title-rest { position: absolute; inset: 0; }
.title-rest > div { position: absolute; }
.title-rest canvas { display: block; width: 100%; height: 100%; }
.tr-letter { transform-origin: 50% 100%; }
.tr-letter canvas { animation: tr-float 3.4s ease-in-out calc(var(--i) * .45s) infinite; }
.tr-shadow, .tr-shadow canvas { transform-origin: var(--o, 50% 20%); }
.tr-shadow canvas { animation: tr-shade 3.4s ease-in-out calc(var(--i) * .45s) infinite; }
@keyframes tr-float { 50% { transform: translateY(calc(var(--lift) * -.3)); } }
@keyframes tr-shade { 50% { transform: scale(.88); opacity: .75; } }
.subtitle {
  display: block; max-width: 24em; margin: 0 auto;
  font-family: "Acme", "Nunito Sans", sans-serif; font-size: clamp(24px, 3.4cqi, 40px); line-height: 1.22; letter-spacing: .01em;
  color: #1d3561; text-shadow: .04em .05em .14em rgb(31 79 168 / 14%); text-wrap: balance;
}
.venue {
  display: inline-block; margin-top: 16px; padding: 4px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: rgb(255 255 255 / 80%); font-size: 14.5px; font-weight: 900; line-height: 1.5; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-dark); box-shadow: 0 4px 14px rgb(31 79 168 / 6%);
}
.authors, .affiliations, .author-notes { display: flex; flex-wrap: wrap; justify-content: center; margin-inline: auto; }
.authors { gap: 2px 20px; max-width: 1000px; margin-top: 18px; font-size: 19px; font-weight: 700; line-height: 1.7; color: var(--ink); }
.author { white-space: nowrap; }
.authors a { color: var(--accent-dark); text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size 200ms ease, color 200ms ease; }
.authors a:hover { color: var(--accent); background-size: 100% 1.5px; }
.authors sup, .affiliations sup, .author-notes sup { margin-left: 1px; font-size: .64em; font-weight: 700; line-height: 0; color: var(--accent); }
.affiliations { gap: 0 24px; margin-top: 8px; font-size: 16.5px; font-weight: 600; color: var(--muted); }
.affiliations sup { margin: 0 2px 0 0; }
.author-notes { gap: 0 20px; margin-top: 2px; font-size: 14.5px; color: #8090a8; }
.author-notes sup { margin: 0 3px 0 0; font-size: .8em; }
.header-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px 9px 15px; border-radius: 999px;
  background: #1f2f52; color: #fff; font-size: 16px; font-weight: 800; line-height: 1.2; text-decoration: none;
  box-shadow: 0 6px 16px rgb(20 40 90 / 20%); transition: transform 180ms ease, background 180ms ease;
}
.link-btn svg { width: 18px; height: 18px; }
a.link-btn:hover { color: #fff; background: var(--accent); transform: translateY(-2px); }
.link-btn--light { background: var(--accent); }
.link-btn.is-soon { cursor: default; }
.link-soon { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: rgb(255 255 255 / 64%); }
.link-soon::before { content: ""; width: 1px; height: 14px; background: rgb(255 255 255 / 30%); }
.highlights { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 26px auto 0; padding: 0; list-style: none; max-width: 1000px; }
.highlights li { padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px; background: rgb(255 255 255 / 80%); font-size: 15.5px; color: var(--muted); box-shadow: 0 4px 14px rgb(31 79 168 / 6%); }
.highlights strong { color: var(--accent-dark); }

/* ---------- sections ---------- */
.paper-section { padding: 70px 0 78px; scroll-margin-top: var(--nav-h); }
.paper-section:nth-of-type(odd) { border-image: linear-gradient(var(--border) 0 1px, var(--band) 1px calc(100% - 1px), var(--border) 0) fill 0 / / 0 100vmax; }
h2 {
  position: relative; width: fit-content; max-width: 940px; margin: 0 auto 26px; padding-bottom: 16px;
  font-size: 36px; font-weight: 900; line-height: 1.22; letter-spacing: -.5px; text-align: center; text-wrap: balance; color: var(--accent-dark);
}
.comparison-section h2 { font-size: 31px; }
h2::after { content: ""; position: absolute; bottom: 0; left: calc(50% - 20px); width: 40px; height: 3px; border-radius: 3px; background: var(--gradient); }
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  h2, .inline-accent { background-image: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
}
h3 { font-size: 21px; font-weight: 800; line-height: 1.3; color: var(--accent-dark); }
.section-intro { max-width: 1020px; margin: 0 auto; text-wrap: pretty; }
.note { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin-top: 14px; font-size: 14.5px; font-style: italic; color: var(--muted); }
.note svg { flex: none; width: 17px; height: 17px; margin-top: 3px; color: #8fb4e0; }
.key { display: inline-block; width: 12px; height: 12px; margin: 0 6px 0 2px; border-radius: 3px; vertical-align: -1px; }
.key--blue { background: var(--history); }
.key--orange { background: var(--target); }

/* ---------- media ---------- */
.media-figure { margin-top: 28px; }
.media-frame { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.media-frame video { display: block; width: 100%; height: auto; background: #fff; }
.media-figure figcaption { max-width: 1020px; margin: 14px auto 0; font-size: 16px; color: var(--muted); text-wrap: pretty; }
.media-figure figcaption strong { color: var(--ink); }
.split { display: grid; grid-template-columns: 1.65fr 1fr; gap: 26px; align-items: center; margin-top: 10px; }
.split > .media-figure { margin-top: 28px; }
.stat-stack { display: grid; gap: 14px; }
.stat { padding: 18px 22px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.stat-num { display: block; font-size: 40px; font-weight: 900; line-height: 1.05; letter-spacing: -.5px; color: var(--accent); }
.stat-num small { font-size: 22px; color: var(--muted); font-weight: 800; }
.stat-num--sm { font-size: 30px; }
.stat-num--muted { color: #93a2bb; }
.stat-label { display: block; margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--muted); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* ---------- gallery: uniform 4 x 2 grid; on hover every tile zooms by the same factor (so to the same size),
   growing away from the gallery edges it touches ---------- */
.bento { --gap: 16px; --zoom: 1.65; --w: min(1400px, 100vw - 2 * var(--gutter)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap);
  width: var(--w); margin: 34px 0 0 calc(50% - var(--w) / 2); }
.b-item {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(18px) scale(.98); transform-origin: center top;
  transition: opacity 700ms ease, transform 420ms cubic-bezier(.2, .8, .2, 1), box-shadow 320ms ease;
}
.b-item:nth-child(4n + 1) { transform-origin: left top; }
.b-item:nth-child(4n) { transform-origin: right top; }
.b-item:nth-child(n + 5):nth-child(4n + 1) { transform-origin: left bottom; }
.b-item:nth-child(n + 5):nth-child(4n + 2), .b-item:nth-child(n + 5):nth-child(4n + 3) { transform-origin: center bottom; }
.b-item:nth-child(n + 5):nth-child(4n) { transform-origin: right bottom; }
.b-item.is-in { opacity: 1; transform: none; }
.b-item.is-in:hover { z-index: 5; transform: scale(var(--zoom)); box-shadow: var(--shadow-lg); transition-delay: 0ms, 90ms, 90ms; }
.b-media { position: relative; width: 100%; aspect-ratio: 832 / 480; border-radius: 13px 13px 0 0; overflow: hidden; background: #e8f1fc; }
.b-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.b-badge, .b-speed { position: absolute; top: 8px; z-index: 2; padding: 1px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.6; color: #fff; background: rgb(15 35 80 / 52%); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.b-badge { left: 8px; }
.b-speed { right: 8px; background: rgb(47 127 216 / 82%); letter-spacing: .02em; }
.b-time { position: absolute; left: 8px; bottom: 11px; z-index: 2; padding: 0 7px; border-radius: 6px; font-size: 10px; font-weight: 800; line-height: 1.7; font-variant-numeric: tabular-nums; color: #fff; background: rgb(15 35 80 / 58%); opacity: 0; transition: opacity 200ms ease; pointer-events: none; }
.b-progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: 4px; background: rgb(255 255 255 / 45%); cursor: pointer; opacity: 0; touch-action: none; transition: opacity 200ms ease, height 150ms ease; }
.b-progress::before { content: ""; position: absolute; inset: -10px 0 0; }
.b-progress span { display: block; height: 100%; background: var(--gradient); transform-origin: left; transform: scaleX(0); pointer-events: none; }
.b-progress i { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--accent), 0 1px 4px rgb(15 35 80 / 40%); opacity: 0; transition: opacity 150ms ease; pointer-events: none; }
.b-progress:hover, .is-scrubbing .b-progress { height: 6px; }
.b-progress:hover i, .is-scrubbing .b-progress i, .b-progress:focus-visible i { opacity: 1; }
.b-progress:focus-visible { outline-offset: 2px; }
.b-item:hover .b-progress, .b-item:hover .b-time, .b-item:focus-within .b-progress, .b-item:focus-within .b-time,
.is-scrubbing .b-progress, .is-scrubbing .b-time { opacity: 1; }
.b-item.is-in.is-scrubbing { z-index: 5; transform: scale(var(--zoom)); box-shadow: var(--shadow-lg); user-select: none; -webkit-user-select: none; }
.b-caption { flex: none; padding: 8px 12px 10px; }
.b-title { display: block; font-size: 13.5px; font-weight: 800; line-height: 1.35; color: var(--accent-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-prompt { margin-top: 2px; font-size: 12.4px; line-height: 1.45; color: #56637c; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 2.9em; }
@media (max-width: 860px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-item.is-in:hover { transform: none; }
  .b-progress, .b-time { opacity: 1; }
}

/* ---------- motivation ---------- */
.motivation-points { display: grid; gap: 12px; max-width: 1040px; margin: 0 auto; padding: 0; list-style: none; }
.motivation-points li { position: relative; padding: 14px 20px 14px 50px; border: 1px solid var(--border); border-radius: 12px; background: #fff; text-wrap: pretty; }
.motivation-points li::before { content: ""; position: absolute; left: 20px; top: calc(14px + .84em - 7px); width: 14px; height: 14px; border: 2px solid #b7c7de; border-radius: 50%; background: #fff; }
.motivation-points .mp-limit { color: #4d5a72; }
.motivation-points .mp-insight { border-color: #c9dcf4; }
.motivation-points .mp-insight::before { border-color: var(--accent); }
.motivation-points .mp-ours { border-color: #b9d4f3; background: var(--accent-soft); }
.motivation-points .mp-ours::before { border: 0; background: var(--gradient); box-shadow: 0 0 0 4px rgb(59 139 235 / 16%); }

/* ---------- method ---------- */
.method-copy { display: grid; gap: 14px; max-width: 1040px; margin: 0 auto; }
.method-highlight { padding: 14px 20px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: var(--accent-soft); font-size: 18.5px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.pillar { position: relative; padding: 20px 22px 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.pillar h3 { margin: 4px 0 8px; }
.pillar p { font-size: 15.5px; color: #4d5a72; }
.pillar-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-weight: 900; font-size: 15px; color: #fff; background: var(--gradient); }
@media (max-width: 960px) { .pillars { grid-template-columns: 1fr; } }
.method-figure { margin-top: 30px; }
.method-image-link { display: block; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); cursor: zoom-in; transition: box-shadow 240ms ease, transform 240ms ease; }
.method-image-link:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.method-figure figcaption { max-width: 1040px; margin: 14px auto 0; font-size: 16px; color: var(--muted); }
.method-figure figcaption strong { color: var(--ink); }

.tabs { margin-top: 40px; }
.tab-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 6px; width: fit-content; margin: 0 auto; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.tab { padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; font-size: 15.5px; font-weight: 800; color: var(--muted); transition: background 160ms ease, color 160ms ease; }
.tab:hover { color: var(--accent); }
.tab.is-active { color: #fff; background: var(--gradient); box-shadow: 0 6px 16px rgb(47 127 216 / 30%); }
.tab-panel .media-figure { margin-top: 18px; }

.mask-explorer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px; align-items: center; margin-top: 22px; padding: 22px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.mask-explorer img { width: 100%; image-rendering: pixelated; border-radius: 8px; }
.mx-side h3 { margin-bottom: 10px; }
.mx-slider { width: 100%; margin: 12px 0 6px; accent-color: var(--accent); }
.mx-chunk { font-size: 15px; font-weight: 800; color: var(--accent-dark); }
.mx-hist { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.mx-hist span { padding: 2px 9px; border-radius: 999px; font-size: 13px; font-weight: 700; border: 1px solid var(--border); background: var(--band); }
.mx-hist span.first { border-color: #b8cdf5; color: var(--history); }
.mx-hist span.coverage { color: #0f8a6a; border-color: #bfe8d9; }
.mx-hist span.recent { color: #8a5bd0; border-color: #ddcdf6; }
.mx-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.mx-stats div { padding: 10px 12px; border-radius: 12px; background: var(--band); }
.mx-stats b { display: block; font-size: 22px; color: var(--accent); }
.mx-stats span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.legend i { display: inline-block; width: 13px; height: 13px; margin-right: 6px; border-radius: 3px; vertical-align: -2px; }
@media (max-width: 860px) { .mask-explorer { grid-template-columns: 1fr; } }

/* ---------- ablation ---------- */
.abl-conds { display: grid; grid-template-columns: auto repeat(5, 1fr); gap: 10px; align-items: center; max-width: 1000px; margin: 26px auto 0; }
.abl-conds .lbl { font-size: 14px; font-weight: 800; color: var(--muted); line-height: 1.25; }
.abl-cond { position: relative; border-radius: 9px; overflow: hidden; border: 2px solid #f3a25b; }
.abl-cond.first { border-color: var(--history); }
.abl-cond span { position: absolute; top: 5px; left: 5px; padding: 0 8px; border-radius: 6px; font-size: 11.5px; font-weight: 800; color: #fff; background: var(--target); }
.abl-cond.first span { background: var(--history); }
.abl-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; }
.abl-card { padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.abl-card.ours { border-color: #9cc3f0; background: linear-gradient(#fff, var(--accent-soft)); }
.abl-card img { width: 100%; border-radius: 6px; image-rendering: pixelated; }
.abl-name { display: block; margin-top: 8px; font-size: 14.5px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.abl-card.ours .abl-name { color: var(--accent-dark); }
.abl-meta { display: block; font-size: 12.5px; color: var(--muted); font-style: italic; }
.abl-bar { position: relative; height: 8px; margin: 8px 0 4px; border-radius: 999px; background: #e9eef6; overflow: hidden; }
.abl-bar span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--gradient); }
.abl-sparsity { font-size: 13px; font-weight: 800; color: var(--accent); }
.abl-sparsity.zero { color: #93a2bb; }
.split--rope { grid-template-columns: 1.6fr 1fr; margin-top: 12px; }
.rope-copy p { margin-top: 8px; font-size: 16.5px; color: #4d5a72; }
.rope-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.rope-stats > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
@media (max-width: 860px) {
  .abl-cards { grid-template-columns: repeat(2, 1fr); }
  .abl-conds { grid-template-columns: repeat(3, 1fr); }
  .abl-conds .lbl { grid-column: 1 / -1; }
}

/* ---------- comparison viewers ---------- */
.thumbs { display: grid; grid-template-columns: repeat(var(--cols, 8), minmax(0, 120px)); justify-content: center; gap: 12px; margin-top: 28px; padding: 12px 6px 16px; }
.thumb { position: relative; display: block; aspect-ratio: 416 / 240; padding: 0; border: 0; border-radius: 9px; background: #e8f1fc; transition: transform 320ms cubic-bezier(.2, .8, .2, 1), box-shadow 320ms ease; }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; filter: saturate(.6) brightness(1.08); transition: filter 260ms ease; }
.thumb::after { content: ""; position: absolute; inset: 0; border-radius: 9px; background: rgb(255 255 255 / 38%); transition: opacity 260ms ease; }
.thumb:hover::after { opacity: .4; }
.thumb-label { position: absolute; left: 6px; bottom: 6px; z-index: 1; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 800; line-height: 1.7; color: #fff; background: rgb(15 35 80 / 58%); opacity: 0; transition: opacity 200ms ease; }
.thumb:hover .thumb-label, .thumb.is-active .thumb-label { opacity: 1; }
@media (max-width: 700px) { .thumbs { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); } }
.thumb.is-active { z-index: 2; transform: translateY(-6px) scale(1.12); box-shadow: 0 0 0 2.5px var(--accent), 0 14px 28px rgb(31 79 168 / 30%); }
.thumb.is-active img { filter: none; }
.thumb.is-active::after { opacity: 0; }
.viewer { margin-top: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 12px; }
.viewer-title { font-size: 16px; font-weight: 800; color: var(--accent-dark); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-tools { display: flex; align-items: center; gap: 10px; }
.speed { display: inline-flex; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--band); }
.speed button { padding: 3px 11px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 800; color: var(--muted); }
.speed button.is-on { color: #fff; background: var(--accent); }
.viewer-nav { display: flex; align-items: center; gap: 8px; }
.viewer-counter { min-width: 64px; text-align: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--muted); }
.viewer-arrow { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 50%; color: var(--accent); background: #fff; }
.viewer-arrow:hover { background: var(--accent-soft); }
.viewer-arrow svg { width: 18px; height: 18px; stroke-width: 2; }
.viewer-media { display: grid; gap: 14px; }
.viewer-media.with-camera { grid-template-columns: minmax(0, 2.45fr) minmax(0, 1fr); align-items: start; }
.viewer-video { position: relative; border-radius: 10px; overflow: hidden; background: var(--band); }
[data-dataset="dl3dv"] .viewer-video, [data-dataset="worldScore"] .viewer-video { aspect-ratio: 2116 / 498; }
.viewer-video video { display: block; width: 100%; height: 100%; object-fit: contain; }
.viewer-progress { height: 4px; margin-top: 8px; border-radius: 999px; background: #e9eef6; overflow: hidden; cursor: pointer; }
.viewer-progress span { display: block; height: 100%; background: var(--gradient); transform-origin: left; transform: scaleX(0); }
.viewer-camera { margin: 12px 0 0; }
.viewer-camera figcaption { margin: 0 0 6px; font-size: 13.5px; color: var(--muted); text-align: center; }
.viewer-camera a { display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.viewer-camera img { width: 100%; }
.viewer-prompt { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--band); font-size: 14.5px; color: #4d5a72; }
.viewer-prompt b { color: var(--accent-dark); }

/* ---------- misc ---------- */
.bibtex-box { position: relative; max-width: 960px; margin: 0 auto; }
.bibtex { margin: 0; padding: 20px 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: 14px; line-height: 1.65; overflow-x: auto; color: #243457; }
.bibtex code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.bibtex-copy {
  position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--band); font-size: 13px; font-weight: 800; color: var(--accent-dark);
  transition: background 160ms ease, color 160ms ease;
}
.bibtex-copy svg { width: 15px; height: 15px; }
.bibtex-copy:hover { background: var(--accent-soft); color: var(--accent); }
.bibtex-copy.is-done { border-color: var(--accent); background: var(--accent); color: #fff; }
.site-footer { padding: 26px 0 40px; text-align: center; font-size: 14px; color: #93a2bb; }
/* video loading queue: one overlay per video over its poster until the file is in */
.vload {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 16px; cursor: pointer;
  color: #fff; background: rgb(26 58 120 / 30%); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  transition: opacity 320ms ease, visibility 0s linear 0s;
}
.is-ready > .vload { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 320ms ease, visibility 0s linear 320ms; }
.vload-panel { width: min(78%, 280px); font-size: 12.5px; font-weight: 800; line-height: 1.3; text-shadow: 0 1px 3px rgb(10 30 70 / 45%); }
.vload-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.vload-bar { position: relative; height: 5px; border-radius: 999px; overflow: hidden; background: rgb(255 255 255 / 32%); }
.vload-fill { position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #bfe3ff, #7cc4fa 40%, #3b8beb); transform-origin: left center; transform: scaleX(0); transition: transform 180ms linear; }
.vload.is-indeterminate .vload-fill { right: auto; width: 35%; transform: none; transition: none; animation: vload-slide 1.2s ease-in-out infinite; }
@keyframes vload-slide { from { translate: -100% 0; } to { translate: 290% 0; } }
.vload-size { display: block; min-height: 1.3em; margin-top: 6px; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .85; }
.vload[data-state="queued"] .vload-status { opacity: .9; }
.vload[data-state="queued"] .vload-fill { transform: scaleX(0); }
.vload[data-state="failed"] .vload-bar { display: none; }
.media-frame .vload-panel, .viewer-video .vload-panel { width: min(60%, 360px); font-size: 14px; }
.media-frame .vload-size, .viewer-video .vload-size { font-size: 12.5px; }
.b-media:not(.is-ready) .b-progress, .b-media:not(.is-ready) .b-time { display: none; }
@media (prefers-reduced-motion: reduce) { .vload.is-indeterminate .vload-fill { animation: none; width: 100%; opacity: .5; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .b-item { opacity: 1; transform: none; transition: none; }
  .token-field i { transition: none; }
}
