@font-face {
  font-family: 'Inter';
  src: url('./assets/fonts/inter-latin-bold.woff2') format('woff2');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #ffffff;
  --foreground: #242629;
  --accent: #374151;
  --border: #e4e5e7;
  --surface: #fafaf9;
  --section-tint: #f5f5f7;
  --card-shadow: 0 4px 16px rgb(29 29 31 / 4%);
  --muted: #626871;
  --subtle: #6c727c;
  --nav-width: clamp(188px, 13vw, 208px);
  --font-sans:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 32px;
}
html.is-inertia-scrolling {
  scroll-behavior: auto;
}
body {
  --content-inset: var(--nav-width);
  margin: 0;
  padding-left: var(--content-inset);
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Opening fade; the hero video sits behind its content and white scrim. */
@keyframes page-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.hero {
  animation: page-fade-in 850ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: 60ms;
}
/* JS arms each content block once; section backgrounds and anchors stay fixed. */
[data-section-reveal] {
  transition: opacity 650ms ease-in-out, transform 650ms ease-in-out;
}
.reveal-pending {
  opacity: 0;
  transform: translateY(16px);
  transition: none;
}
[data-section-reveal]:focus-within {
  opacity: 1;
  transform: none;
  transition: none;
}
@media print {
  [data-section-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
}
a,
button {
  -webkit-tap-highlight-color: transparent;
}
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
  border-radius: 4px;
}
::selection {
  background: #e5e7eb;
  color: #242629;
}
svg {
  flex-shrink: 0;
}
sup {
  font-size: 0.62em;
  margin-left: 2px;
  vertical-align: super;
  color: var(--subtle);
}
.container {
  width: min(1080px, calc(100% - 80px));
  margin-inline: auto;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: #fff;
  color: #000;
  padding: 12px 20px;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  --nav-ink: #30322f;
  --nav-line: rgb(60 62 56 / 13%);
  --nav-progress: 0;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  display: flex;
  align-items: center;
  width: var(--nav-width);
  padding: 12px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateX(-12px);
  /* Keep the rail rendered until fade-out finishes, including on fast scrolls. */
  transition:
    opacity 320ms ease-in-out,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 320ms;
}
.site-header.is-visible {
  visibility: visible;
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0s;
}
.nav-inner {
  width: 100%;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  border: 1px solid #deded9;
  border-radius: 12px;
  background: linear-gradient(155deg, #fdfdfc, #f8f8f6 48%, #f2f2ef);
  box-shadow:
    0 16px 40px -12px rgb(34 36 32 / 18%),
    0 2px 8px rgb(34 36 32 / 6%),
    inset 0 1px 0 rgb(255 255 255 / 90%);
  color: var(--nav-ink);
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: #c3c4bd transparent;
}
.nav-toggle {
  display: none;
  list-style: none;
  cursor: pointer;
}
.nav-toggle::-webkit-details-marker {
  display: none;
}
.nav-close-icon {
  display: none;
}
.nav-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 16px;
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--nav-line);
  color: #686965;
}
.nav-brand img {
  display: block;
  width: 96px;
  height: auto;
  flex-shrink: 0;
}
.site-header nav {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 16px 20px 16px 26px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  color: #5f605d;
}
.site-header nav::before {
  content: '';
  position: absolute;
  inset: 20px auto 20px 26px;
  width: 1px;
  background: linear-gradient(transparent, #cdcec8 12%, #cdcec8 88%, transparent);
  pointer-events: none;
}
.site-header nav a {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  align-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 14px 0 14px 20px;
  white-space: nowrap;
  transition: color 180ms ease;
}
.site-header nav a::before {
  content: '';
  position: absolute;
  inset: 50% auto auto -3px;
  width: 7px;
  height: 7px;
  border: 1px solid #9a9c95;
  border-radius: 50%;
  background: #f8f8f6;
  transform: translateY(-50%);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.site-header nav a > span:last-child {
  transition: transform 180ms ease;
}
.nav-index {
  color: #686965;
  font-size: 0.625rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.14em;
  transition: color 180ms ease;
}
.site-header nav a:hover {
  color: var(--nav-ink);
}
.site-header nav a:hover > span:last-child {
  transform: translateX(3px);
}
.site-header nav a[aria-current] {
  color: var(--nav-ink);
  font-weight: 600;
}
.site-header nav a[aria-current]::before {
  border-color: #ba7738;
  background: #e7a35b;
  box-shadow: 0 0 0 4px rgb(231 163 91 / 16%);
}
.site-header nav a[aria-current] .nav-index {
  color: #93541d;
}
.site-header a:focus-visible,
.nav-toggle:focus-visible {
  outline: 2px solid #77756e;
  outline-offset: 2px;
  border-radius: 4px;
}
.nav-toggle:focus-visible {
  outline-offset: -4px;
}
.nav-progress {
  height: 2px;
  margin: 12px 18px 20px;
  overflow: hidden;
  border-radius: 2px;
  background: #d7d8d1;
}
.nav-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #a3a19b, #d88b3c);
  transform: scaleX(var(--nav-progress));
  transform-origin: left;
}
@media (min-width: 1101px) {
  .site-header {
    align-items: stretch;
    padding: 0;
  }
  .nav-inner {
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-width: 0 1px 0 0;
    border-radius: 0;
    box-shadow:
      12px 0 32px -12px rgb(34 36 32 / 18%),
      2px 0 8px rgb(34 36 32 / 6%),
      inset -1px 0 0 rgb(255 255 255 / 80%);
  }
  .nav-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
  }
  .nav-brand {
    flex-shrink: 0;
    margin-inline: 22px;
    padding-block: clamp(28px, 4vh, 48px);
  }
  .site-header nav {
    flex: 1 0 auto;
    justify-content: space-evenly;
    padding-block: 28px;
  }
  .nav-progress {
    flex-shrink: 0;
    margin: 16px 22px 32px;
  }
}
@media (max-width: 1100px) {
  body {
    --content-inset: 0px;
  }
  .site-header {
    inset: 12px auto auto 12px;
    width: auto;
    padding: 0;
  }
  .nav-inner {
    width: 132px;
    border-radius: 10px;
  }
  .nav-inner[open] {
    width: 208px;
    border-radius: 12px;
  }
  .nav-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 12px 16px;
  }
  .nav-toggle svg {
    width: 16px;
    height: 16px;
  }
  .nav-toggle-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .nav-inner[open] .nav-menu-icon {
    display: none;
  }
  .nav-inner[open] .nav-close-icon {
    display: block;
  }
  .nav-brand {
    padding-top: 8px;
  }
}
.hero {
  --hero-video-opacity: 0.82;
  --hero-inset: clamp(32px, 5vh, 88px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  /* Fill the viewport while keeping the sidebar gutter for the sections below. */
  margin-left: calc(-1 * var(--content-inset));
  padding-block: var(--hero-inset);
}
.hero-background {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--background);
}
.hero-background video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: var(--hero-video-opacity);
}
.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgb(255 255 255 / 50%) 0%, rgb(255 255 255 / 32%) 55%, rgb(255 255 255 / 6%) 100%),
    linear-gradient(to bottom, transparent 90%, #fff 100%);
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  width: min(1600px, calc(100% - clamp(40px, 10vw, 280px)));
  min-height: min(940px, calc(92dvh - 2 * var(--hero-inset)));
}
.hero-byline {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #20252c;
  font-weight: 600;
  text-shadow: 0 1px 2px rgb(0 0 0 / 16%);
}
#paper-title::before,
.hero-byline::before {
  content: '';
  position: absolute;
  z-index: -1;
  pointer-events: none;
  /* Feather only the scrim; the video and lettering keep their sharpness. */
  filter: blur(clamp(20px, 2.5vw, 40px));
}
#paper-title::before {
  inset: -56px -88px;
  background: radial-gradient(ellipse closest-side at 50% 60%,
    rgb(255 255 255 / 30%) 0%,
    rgb(255 255 255 / 25%) 30%,
    rgb(255 255 255 / 14%) 55%,
    rgb(255 255 255 / 5%) 76%,
    rgb(255 255 255 / 0%) 100%);
}
.hero-byline::before {
  inset: -48px -72px;
  background: radial-gradient(ellipse closest-side,
    rgb(255 255 255 / 38%) 0%,
    rgb(255 255 255 / 30%) 30%,
    rgb(255 255 255 / 17%) 55%,
    rgb(255 255 255 / 6%) 76%,
    rgb(255 255 255 / 0%) 100%);
}
.hero-byline sup {
  color: #343a43;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: clamp(44px, 6.4vw, 82px);
  font-weight: 600;
  line-height: 1.065;
  letter-spacing: -4px;
  margin-bottom: 26px;
}
h1 > span {
  color: #656b74;
}
h2,
.section-title {
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 550;
  letter-spacing: -1.9px;
  margin-bottom: 20px;
}
h2 > span {
  color: #656b74;
}

.authors {
  display: grid;
  grid-template-columns: repeat(5, max-content);
  align-self: center;
  justify-content: space-between;
  width: min(100%, clamp(760px, 60vw, 1240px));
  gap: 14px clamp(8px, 1vw, 24px);
  font-size: clamp(16px, 1.05vw, 24px);
}
.authors > span,
.affiliations > span {
  white-space: nowrap;
}
.authors sup,
.affiliations sup {
  position: relative;
  top: -0.5em;
  line-height: 0;
  vertical-align: baseline;
}
.authors sup {
  display: inline-block;
  width: 0;
  margin-left: 0;
  left: 2px;
  text-align: left;
  font-size: 0.7em;
}
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px clamp(22px, 3vw, 64px);
  color: #343a43;
  font-size: clamp(14px, 1vw, 20px);
  margin: 22px 0 0;
}
.author-notes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 28px;
  margin: 12px 0 0;
  color: #343a43;
  font-size: clamp(12px, 0.72vw, 16px);
}
.affiliation-logos {
  display: grid;
  /* Common symbol-height baseline; individual scales balance visual weight. */
  grid-template-columns: 2.975055fr 3.657765fr 5.072879fr 5.2fr;
  align-items: center;
  align-self: center;
  gap: clamp(24px, 3vw, 64px);
  width: min(100%, clamp(840px, 55vw, 1180px));
  margin: 0;
}
.affiliation-logo {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: var(--logo-ratio);
  transform: scale(var(--logo-scale, 1));
  transform-origin: center;
}
.affiliation-logo--tsinghua {
  --logo-ratio: 2.975055;
  --logo-scale: 1.1; /* Fine seal details and calligraphy need more visual weight. */
}
.affiliation-logo--xspark {
  --logo-ratio: 3.657765;
  --logo-scale: 0.9; /* The broad X and bold wordmark appear larger at equal height. */
}
.affiliation-logo--hkust-gz {
  --logo-ratio: 5.072879;
  --logo-scale: 1.02; /* The symbol occupies slightly less than the image height. */
}
.affiliation-logo--hku { --logo-ratio: 5.2; }
.affiliation-logo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.affiliation-logo--xspark {
  position: relative;
  overflow: hidden;
}
.affiliation-logo--xspark img {
  /* Original 6749x2951 PNG: visible bounds are (1525,970)-(5223,1981). */
  position: absolute;
  top: -95.944610%;
  left: -41.238507%;
  width: 182.504056%;
  height: auto;
  max-width: none;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(16px, 1.5vw, 32px);
  margin: 0;
}
.hero-actions .button {
  padding: 14px clamp(24px, 2vw, 44px);
  font-size: clamp(14px, 0.9vw, 18px);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border-radius: 100px;
  padding: 12px 21px;
  font-size: 0.875rem;
  font-weight: 500;
  min-height: 48px;
  border: 1px solid transparent;
  box-shadow: 0 2px 4px rgba(24, 28, 33, 0.035);
  transition:
    background 0.2s,
    transform 0.2s;
}
.button:hover {
  transform: translateY(-2px);
}

.button[aria-disabled="true"] {
  cursor: default;
}
.button[aria-disabled="true"]:hover {
  transform: none;
}
.button-status {
  color: #d4d4d8;
  font-size: 0.75rem;
  white-space: nowrap;
  padding-left: 10px;
  border-left: 1px solid #ffffff40;
}
.brand-logo {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex-shrink: 0;
}
.button-arxiv {
  background: #b31b1b;
  border-color: #b31b1b;
  color: #fff;
}
.button-arxiv[href]:hover {
  background: #9f1818;
}
.button-code {
  background: #191919;
  border-color: #191919;
  color: #fff;
}
.button-code[href]:hover {
  background: #303030;
}
.button-huggingface {
  background: #ffe16b;
  border-color: #e5c456;
  color: #32343d;
}
.button-huggingface[href]:hover {
  background: #ffd954;
}
.button-huggingface .brand-logo {
  width: 26px;
  height: 26px;
}

.section {
  padding-block: 48px 96px;
  /* Continue the section color beneath the fading rail; keep content aligned. */
  margin-left: calc(-1 * var(--content-inset));
  padding-left: var(--content-inset);
  background: var(--background);
}
#benchmarks,
#citation {
  background: var(--section-tint);
}
.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: 2px;
  color: var(--muted);
  margin-bottom: 40px;
}

@media (max-width: 760px) {
  .container {
    width: calc(100% - 40px);
  }
  h1 {
    letter-spacing: -2px;
    font-size: clamp(40px, 7.9vw, 60px);
  }

  .authors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 32px;
    font-size: 0.9375rem;
  }
  .section {
    padding-block: 32px 64px;
  }
  .section-label {
    margin-bottom: 28px;
  }

  h2,
  .section-title {
    font-size: 2.375rem;
  }

  .affiliations {
    flex-wrap: wrap;
    gap: 2px 18px;
    margin-top: 14px;
  }
  .author-notes {
    gap: 4px 18px;
    margin-top: 8px;
  }
  .affiliation-logos {
    /* The widest mark (HKU, 5.2:1) determines a shared height for both rows. */
    --logo-height: min(36px, calc((100vw - 64px) / 10.4));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 24px;
    max-width: 400px;
    margin-top: 0;
  }
  .affiliation-logo {
    width: calc(var(--logo-height) * var(--logo-ratio));
    height: var(--logo-height);
    justify-self: center;
  }
}
@media (max-width: 440px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .button {
    width: 205px;
  }

  .desktop-break {
    display: none;
  }

  .authors {
    column-gap: 28px;
    font-size: 0.875rem;
  }

}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal-pending {
    opacity: 1;
    transform: none;
  }
}

/* Research sections */
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(380px, 45%);
  align-items: end;
  gap: 70px;
  margin-bottom: 44px;
}
.section-heading > .section-heading-meta {
  width: fit-content;
  max-width: 100%;
  justify-self: end;
  margin: 0 0 4px;
  padding: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.8;
  text-align: left;
}
.section-heading h2 {
  margin-bottom: 0;
}

/* Paper Figure 1 palette, with selectable HTML labels and a shared 0–100 scale. */
#benchmarks {
  --chart-baseline: #bdb2cc;
  --chart-highlight: #e7a35b;
  --chart-highlight-text: #8a4b0f;
}
.benchmark-meta p {
  margin: 0;
  font-size: inherit;
  font-weight: 550;
  color: var(--foreground);
}
.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.benchmark-chart {
  --plot-height: 208px;
  min-width: 0;
  margin: 0;
  padding: 26px 24px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--background);
  box-shadow: var(--card-shadow);
}
.benchmark-chart-wide {
  --plot-height: 236px;
  grid-column: 1 / -1;
}
.chart-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px 16px;
  padding: 0;
  background: none;
  line-height: 1.4;
}
.chart-heading h3 {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 550;
  letter-spacing: -0.45px;
}
.chart-heading > span {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.chart-content {
  position: relative;
  margin: 34px 0 0 30px;
}
.chart-gridlines {
  position: absolute;
  inset: 0 0 auto;
  height: var(--plot-height);
  pointer-events: none;
}
.chart-gridlines > span {
  position: absolute;
  top: var(--tick);
  inset-inline: 0;
  border-top: 1px solid #edf0f3;
}
.chart-gridlines > span:last-child {
  border-color: #d7dde4;
}
.chart-gridlines > span > span {
  position: absolute;
  right: calc(100% + 9px);
  top: 0;
  transform: translateY(-50%);
  color: var(--subtle);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.chart-bars {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chart-bar {
  display: grid;
  grid-template-rows: var(--plot-height) auto;
  gap: 12px;
  min-width: 0;
}
.chart-bar-name {
  grid-row: 2;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}
.chart-bar-name sup,
.chart-bar-name sub {
  /* Offset the glyph without changing the label's line box or baseline. */
  position: relative;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}
.chart-bar-name sup {
  inset-block-start: -0.5em;
}
.chart-bar-name sub {
  inset-block-start: 0.25em;
}
.chart-bar-track {
  position: relative;
  display: block;
  grid-row: 1;
  height: 100%;
}
.chart-bar-fill {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(66%, 48px);
  height: var(--value);
  border-radius: 3px 3px 0 0;
  background: var(--chart-baseline);
}
.chart-bar-value {
  position: absolute;
  left: 50%;
  bottom: calc(var(--value) + 7px);
  transform: translateX(-50%);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.chart-bar-highlight .chart-bar-fill {
  background: var(--chart-highlight);
}
.chart-bar-highlight .chart-bar-name,
.chart-bar-highlight .chart-bar-value {
  color: var(--chart-highlight-text);
  font-weight: 650;
}
@media (max-width: 1000px) {
  .benchmark-chart {
    padding-inline: 18px;
  }
  .benchmark-chart-wide .chart-bar-name {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    justify-self: center;
    text-align: right;
  }
}
@media (max-width: 900px) {
  .section-heading {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 22px;
    margin-bottom: 28px;
  }
  .section-heading > .section-heading-meta {
    margin: 0;
  }
  .benchmark-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .benchmark-grid .benchmark-chart .chart-content {
    margin: 24px 0 0;
    padding-bottom: 24px;
  }
  .benchmark-grid .benchmark-chart .chart-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .benchmark-grid .benchmark-chart .chart-bar {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: minmax(24px, auto);
    align-items: center;
    gap: 12px;
  }
  .benchmark-grid .benchmark-chart .chart-bar-name {
    grid-row: 1;
    writing-mode: horizontal-tb;
    transform: none;
    justify-self: start;
    font-size: 0.8125rem;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .benchmark-grid .benchmark-chart .chart-bar-track {
    grid-column: 2;
    height: 20px;
    margin-right: 2.375rem;
  }
  .benchmark-grid .benchmark-chart .chart-bar-fill {
    inset: 0 auto 0 0;
    transform: none;
    width: var(--value);
    height: 100%;
    border-radius: 0 3px 3px 0;
  }
  .benchmark-grid .benchmark-chart .chart-bar-value {
    left: calc(var(--value) + 7px);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }
  .benchmark-grid .benchmark-chart .chart-gridlines {
    inset: 0 2.375rem 0 108px;
    height: auto;
  }
  .benchmark-grid .benchmark-chart .chart-gridlines > span {
    top: 0;
    bottom: 24px;
    left: calc(100% - var(--tick));
    right: auto;
    border-top: 0;
    border-left: 1px solid #edf0f3;
  }
  .benchmark-grid .benchmark-chart .chart-gridlines > span > span {
    top: calc(100% + 6px);
    left: 0;
    right: auto;
    transform: translateX(-50%);
  }
}
@media (max-width: 480px) {
  .benchmark-chart {
    --plot-height: 180px;
    padding: 22px 16px 20px;
  }
  .chart-heading h3 {
    font-size: 1.125rem;
  }
  .chart-bars {
    gap: 4px;
  }
  .benchmark-grid .benchmark-chart .chart-gridlines > span:nth-child(even) {
    display: none;
  }
}

figcaption {
  font-size: 0.8125rem;
  color: var(--muted);
  line-height: 1.7;
  padding: 20px 28px;
  background: var(--surface);
}
figcaption > span {
  color: var(--foreground);
}

.citation-heading {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  align-items: center;
  margin-bottom: 28px;
}
.citation-heading h2 {
  margin-bottom: 13px;
}
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid #d8dadd;
  border-radius: 100px;
  padding: 12px 18px;
  font-size: 0.875rem;
  color: #424951;
  cursor: pointer;
  min-width: 149px;
  white-space: nowrap;
}
.copy-button:hover {
  background: #f0f1f2;
}
.citation-code {
  margin: 0;
  padding: 28px 30px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  color: #4b5563;
  overflow: auto;
  scrollbar-color: #c8cdd3 var(--surface);
  scrollbar-width: thin;
  font-size: 0.875rem;
  line-height: 1.9;
  tab-size: 2;
}
.citation-code code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
}
.citation-code:focus-visible {
  outline: 2px solid var(--accent);
}
.copy-status {
  min-height: 1.5em;
  font-size: 0.8125rem;
  color: var(--accent);
  margin: 10px 0 0;
}
.citation-section {
  padding-bottom: 70px;
}
.site-footer {
  margin-left: calc(-1 * var(--content-inset));
  padding-left: var(--content-inset);
  padding-block: 28px 38px;
  background: var(--section-tint);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-footer p {
  font-size: 0.8125rem;
  color: var(--subtle);
  margin: 0;
}
.back-top {
  margin-inline-start: auto;
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  gap: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  figcaption {
    padding: 17px 20px;
  }

  .citation-heading {
    flex-wrap: wrap;
    gap: 22px;
  }
  .citation-code {
    padding: 20px;
    font-size: 0.8125rem;
  }
  .footer-inner {
    justify-content: center;
    flex-wrap: wrap;
  }
  .site-footer p {
    order: 3;
    flex-basis: 100%;
    text-align: center;
  }
}
@media (max-width: 480px) {
  .citation-heading h2 {
    font-size: 2rem;
  }
  h1 {
    overflow-wrap: anywhere;
  }
}
/* Optional media and inline links. */
.media-block {
  margin: 36px 0;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  background: var(--background);
}
.media-block img,
.media-block .paper-figure-svg,
.media-block video {
  display: block;
  width: 100%;
  height: auto;
}
/* MoPA project content. Figure sources remain vector SVGs. */
#paper-title {
  position: relative;
  isolation: isolate;
  font-size: inherit;
  letter-spacing: normal;
  line-height: 1;
  margin: 0;
}
.paper-brand {
  display: block;
  width: clamp(260px, 23vw, 560px);
  margin-inline: auto;
}
.paper-brand img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 4px rgb(0 0 0 / 20%)) drop-shadow(0 5px 12px rgb(0 0 0 / 10%));
}
#paper-title .paper-title-detail {
  display: block;
  margin-top: clamp(24px, 3vh, 42px);
  color: #333a44;
  font-family: 'Inter', var(--font-sans);
  font-size: clamp(33px, 2.75vw, 66px);
  font-weight: 700;
  font-kerning: normal;
  line-height: 1.22;
  letter-spacing: normal;
  text-wrap: balance;
  text-shadow: 0 2px 4px rgb(0 0 0 / 18%);
}
.paper-title-mo {
  color: #7041a9;
}
.paper-title-pa {
  color: #e88c2b;
}

.figure-image {
  display: block;
  background: #fff;
  padding: 24px;
}
.method-figure {
  margin: 0;
}
.architecture-benefits {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  align-items: end;
  gap: 32px;
  margin-top: 80px;
}
.architecture-summary {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}
.architecture-heading {
  /* Keep the figure natural-height; distribute spare space around the title. */
  margin-block: auto;
  padding: 16px 20px 0;
}
.architecture-heading h3 {
  margin: 0;
}
.architecture-heading h3 > span {
  color: var(--muted);
}
.architecture-evidence {
  display: grid;
  grid-template-rows: auto auto;
  align-content: end;
  gap: 20px;
  min-width: 0;
}
.architecture-figure {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  background: var(--surface);
}
.architecture-figure .figure-image {
  flex: 0 0 auto;
  padding: 16px 20px;
}
.architecture-figure .figure-image img,
.paper-figure-svg {
  min-width: 0;
}
.paper-figure-svg text {
  -webkit-user-select: text;
  user-select: text;
}
.architecture-figure figcaption {
  flex: 0 0 auto;
  padding: 12px 20px;
}
@media (max-width: 1000px) {
  .architecture-benefits {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 56px;
  }
  .architecture-heading {
    margin-block: 0;
    padding: 0;
  }
  .architecture-summary {
    gap: 28px;
  }
  .architecture-evidence {
    grid-template-rows: auto;
  }
  .architecture-figure .figure-image {
    padding: 12px;
  }
  .architecture-summary > .architecture-figure {
    max-width: 680px;
    margin: 0;
  }
}
.section-heading + .media-block {
  margin-top: 0;
}
.real-world-demos {
  display: grid;
  gap: 36px;
  margin-top: 48px;
}
.demo-task {
  min-width: 0;
}
.demo-task-heading,
.demo-task-heading h3 {
  display: flex;
  align-items: center;
}
.demo-task-heading {
  justify-content: space-between;
  gap: 12px 24px;
  margin-bottom: 16px;
}
.demo-task-heading h3 {
  gap: 12px;
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 550;
  line-height: 1.4;
  letter-spacing: -0.4px;
}
.demo-task-number {
  color: var(--subtle);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.section-heading > .section-heading-meta,
.demo-speed {
  margin-inline-end: clamp(16px, 2vw, 24px);
}
.demo-speed {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.875rem;
  white-space: nowrap;
  line-height: 1.8;
}
.demo-video-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: #c8cdd3 transparent;
}
.demo-video-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
  border-radius: 12px;
}
.demo-policy {
  min-width: 0;
  margin: 0;
  scroll-snap-align: start;
}
.demo-policy--ours + .demo-policy {
  grid-column: 3;
}
.demo-policy-label {
  padding: 9px 4px 2px;
  background: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 550;
  line-height: 1.5;
  text-align: center;
}
.demo-policy-label sub {
  position: relative;
  top: 0.25em;
  font-size: 0.75em;
  line-height: 0;
  vertical-align: baseline;
}
.demo-policy--ours .demo-policy-label {
  color: #8a4b0f;
  font-weight: 650;
}
.demo-video-frame {
  /* The frame determines row height before and after video metadata loads. */
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f2f3f4;
  overflow: hidden;
}
.demo-video-frame video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  .demo-video-row {
    grid-template-columns: minmax(220px, 1fr) 12px repeat(3, minmax(220px, 1fr));
    padding-bottom: 8px;
  }
}
@media (max-width: 760px) {
  .hero {
    padding-block: 28px;
  }
  .hero-content {
    width: calc(100% - 40px);
    min-height: 0;
    gap: 28px;
    justify-content: center;
  }
  #paper-title::before,
  .hero-byline::before {
    inset: -36px -24px;
  }
  .paper-brand {
    width: clamp(210px, 60vw, 300px);
  }
  #paper-title .paper-title-detail {
    font-size: clamp(24px, 5.9vw, 35px);
    margin-top: 20px;
  }

  .figure-image {
    padding: 12px;
  }
  .real-world-demos {
    gap: 28px;
    margin-top: 36px;
  }
}
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .hero-actions .button {
    width: min(100%, 280px);
  }

  .demo-task-heading {
    align-items: baseline;
    gap: 12px;
  }
  .demo-task-heading h3 {
    font-size: 1.0625rem;
  }
}
