/* =========================================================================
   XU Lab project page template — style.css
   Plain CSS, no build step. Re-theme by editing the custom properties below.
   Modules: base · layout · hero · demos · results chart · capabilities
            (nav, card, pipeline, speedup, icl, planner) · contributions · footer
   ========================================================================= */

:root {
  /* Surfaces */
  --c-bg: #ffffff;
  --c-band: #f7f8fa;          /* alternating grey section band */
  --c-card: #ffffff;
  --c-media: #eef0ff;         /* placeholder behind videos */
  --c-media-dark: #0b0d10;

  /* Ink */
  --c-heading: #262626;
  --c-accent: #b3561a;        /* pumpkin, deep: links, active states, labels (5:1 on white) */
  --c-text: #6a6a6a;          /* body copy */
  --c-text-strong: #4a4a4a;
  --c-muted: #7a7a7a;         /* captions */
  --c-axis: #666666;

  /* Warm greys (borders, chart series) */
  --c-line: #e4e2da;
  --c-line-strong: #d4d3cb;
  --c-line-hover: #8c8a84;
  --c-series-1: #e07b39;      /* chart: ours */
  --c-series-2: #8fb8de;
  --c-series-3: #f2d3b8;
  --c-active-bg: #faf3ef;     /* pale pumpkin */
  --c-nav-hover: #edeff4;

  /* Shape */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --shadow-card: 0 12px 36px rgba(17, 24, 39, 0.06);
  --shadow-card-lg: 0 16px 44px rgba(17, 24, 39, 0.06);

  /* Widths */
  --w-text: 800px;            /* hero, intros, media */
  --w-section: 1040px;
  --w-wide: 1120px;
  --w-cap-card: 920px;
  --gutter: 32px;

  /* Section rhythm */
  --pad-top: 56px;
  --pad-bottom: 72px;

  --font: "Alibaba PuHuiTi 3.0", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Helvetica, Arial, sans-serif;
}

@media (min-width: 768px) {
  :root {
    --pad-top: 72px;
    --pad-bottom: 96px;
  }
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-heading);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;           /* clip (not hidden) keeps position: sticky working */
}

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.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;
}

/* ---------- Layout ---------- */
.section { padding: var(--pad-top) var(--gutter) var(--pad-bottom); }
.section--band { background: var(--c-band); }
.container { width: 100%; max-width: var(--w-section); margin: 0 auto; }
.container--wide { max-width: var(--w-wide); }

.section-head { max-width: var(--w-text); margin: 0 auto 48px; text-align: center; }
.section-title {
  font-size: 26px; line-height: 34px; font-weight: 600;
  color: var(--c-heading); text-align: center;
}
.section-lead {
  margin-top: 12px;
  font-size: 14px; line-height: 22px; color: var(--c-text);
}
@media (min-width: 768px) {
  .section-title { font-size: 40px; line-height: 52px; }
  .section-lead { font-size: 16px; line-height: 26px; }
}

/* Shared media frame (16:9, rounded) */
.media {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  overflow: hidden; border-radius: var(--r-sm); background: var(--c-media);
}
.media > video,
.media > img,
.media > .placeholder { width: 100%; height: 100%; object-fit: cover; }
.media--dark { background: var(--c-media-dark); }
.media video { cursor: pointer; }

/* Neutral placeholder used by starter.html */
.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, #e9eaee 0 12px, #f1f2f5 12px 24px);
  color: #9a9ca3; font-size: 14px; letter-spacing: 0.04em;
}

/* ---------- Hero ---------- */
.hero { padding: 100px var(--gutter) 64px; text-align: center; }
.hero__inner { max-width: var(--w-text); margin: 0 auto; }
.hero__title {
  font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.025em;
  color: var(--c-heading);
}
.hero__title-accent { color: inherit; } /* titles stay black */
.hero__subtitle { margin-top: 12px; font-size: 14px; line-height: 21px; color: var(--c-text); }
.hero__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px; border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 999px;
  font-size: 14px; line-height: 21px; color: var(--c-heading); text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.pill:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.pill svg { width: 16px; height: 16px; flex: none; }
.hero__media { margin-top: 24px; border-radius: var(--r-lg); background: #e9eaee; }
.hero__summary {
  margin-top: 80px; text-align: left;
  font-size: 14px; line-height: 24px; color: var(--c-text);
}
@media (min-width: 768px) {
  .hero { padding: 160px var(--gutter) 88px; }
  .hero__title { font-size: 64px; line-height: 80px; }
  .hero__subtitle { margin-top: 16px; font-size: 16px; line-height: 24px; }
  .pill { padding: 8px 24px; font-size: 16px; line-height: 24px; }
  .hero__media { margin-top: 72px; }
  .hero__summary { font-size: 16px; line-height: 24px; }
}

/* ---------- Task demos (player + thumbnail list) ---------- */
.demos__desc { line-height: 24px; }
@media (min-width: 768px) { .demos__desc { line-height: 26px; } }

.demos__stage { display: flex; flex-direction: column-reverse; gap: 12px; }
.demos__player { width: 100%; max-width: var(--w-text); margin: 0 auto; border-radius: var(--r-lg); }
.demos__list {
  display: flex; gap: 8px; padding: 8px; overflow-x: auto;
  background: #fff; border-radius: var(--r-sm); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  scrollbar-width: none;
}
.demos__list::-webkit-scrollbar { display: none; }
.thumb {
  flex: none; display: flex; flex-direction: column; width: 137px; padding: 0;
  overflow: hidden; cursor: pointer; text-align: center; background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08); border-radius: var(--r-sm);
  transition: border-color 0.3s;
}
.thumb:hover { border-color: var(--c-line-hover); }
.thumb[aria-pressed="true"] { border-color: var(--c-accent); }
.thumb img, .thumb .placeholder { width: 135px; height: 76px; object-fit: cover; font-size: 11px; }
.thumb__label {
  display: block; padding: 4px 4px; font-size: 12px; line-height: 16px; color: var(--c-axis);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 1180px) {
  /* Player stays centred; list hangs to its left like the reference */
  .demos__stage {
    display: grid; grid-template-columns: 1fr minmax(0, var(--w-text)) 1fr;
    align-items: stretch; gap: 0;
  }
  .demos__player { grid-column: 2; grid-row: 1; }
  .demos__stage { margin-bottom: 24px; }
  .demos__list {
    grid-column: 1; grid-row: 1; justify-self: end; margin-right: 24px;
    flex-direction: column; justify-content: space-between; overflow: visible;
  }
}

/* ---------- Quantitative results (bar chart) ---------- */
.chart {
  width: 100%; max-width: 880px; margin: 0 auto;
  padding: 16px; background: #fff; border-radius: var(--r-lg);
}
.chart__title { margin-bottom: 8px; text-align: center; font-size: 18px; line-height: 27px; font-weight: 600; color: var(--c-heading); }
.chart__scroll { position: relative; overflow-x: auto; }
.chart__svg { width: 100%; max-width: none; height: 240px; overflow: visible; }
.chart__svg text { font-family: var(--font); }
.chart__legend {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px;
  margin: 12px 0 0; padding: 0; list-style: none;
}
.chart__legend li { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: var(--c-axis); }
.chart__swatch { width: 12px; height: 4px; border-radius: 2px; }
.chart__tip {
  position: absolute; pointer-events: none; z-index: 2; min-width: 150px;
  padding: 8px 12px; background: rgba(255, 255, 255, 0.97); border: 1px solid var(--c-line);
  border-radius: var(--r-sm); box-shadow: var(--shadow-card); font-size: 12px; line-height: 20px; color: var(--c-text-strong);
}
.chart__tip b { display: block; color: var(--c-heading); }
.chart__tip span { display: flex; align-items: center; gap: 6px; }
.chart__tip i { width: 8px; height: 8px; border-radius: 2px; }
/* The data table stays in the DOM for no-JS / screen readers */
.chart__table { width: 100%; border-collapse: collapse; font-size: 13px; color: var(--c-text-strong); }
.chart__table th, .chart__table td { padding: 6px 8px; border-bottom: 1px solid var(--c-line); text-align: right; }
.chart__table th:first-child, .chart__table td:first-child { text-align: left; }
.js .chart__table { position: absolute; display: block; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Capabilities ---------- */
.cap-title { font-size: 26px; line-height: 34px; font-weight: 600; color: var(--c-heading); }
@media (min-width: 768px) { .cap-title { font-size: 40px; line-height: 52px; } }
.cap-head { margin-bottom: 48px; }
.cap-head .section-lead { margin-top: 16px; }

.cap-layout { position: relative; width: 100%; max-width: var(--w-cap-card); margin: 0 auto; }
.cap-stack { display: flex; flex-direction: column; gap: 24px; }
@media (min-width: 768px) { .cap-stack { gap: 32px; } }

/* Side nav: hidden until there is room for it beside the cards */
.cap-nav { display: none; }
@media (min-width: 1280px) {
  .cap-layout { max-width: min(var(--w-cap-card), calc(100vw - 520px)); }
  .cap-nav { display: block; position: absolute; top: 0; bottom: 0; left: -252px; width: 222px; }
  .cap-nav__inner { position: sticky; top: 104px; display: flex; flex-direction: column; }
}
.cap-nav__item {
  display: flex; flex-direction: column; justify-content: center; height: 80px; padding: 0 16px;
  border-left: 2px solid transparent; color: var(--c-axis); text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-radius 0.2s;
}
.cap-nav__item:hover { background: var(--c-nav-hover); color: var(--c-heading); border-radius: 0 var(--r-md) var(--r-md) 0; }
.cap-nav__item.is-active {
  background: #fff; color: var(--c-heading); border-left-color: var(--c-accent);
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.cap-nav__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.cap-nav__sub { margin-top: 2px; font-size: 12px; line-height: 18px; color: var(--c-text); }

/* Card */
.cap-card {
  scroll-margin-top: 96px;
  padding: 20px; background: var(--c-card); border-radius: var(--r-sm); box-shadow: var(--shadow-card);
}
.cap-card__title { margin-bottom: 18px; font-size: 22px; line-height: 30px; font-weight: 600; color: var(--c-heading); }
.cap-card__title--tight { margin-bottom: 12px; }
.cap-card__text { font-size: 14px; line-height: 24px; color: var(--c-text); }
.cap-card__intro { display: grid; gap: 24px; align-items: start; }
.cap-card__intro .media { max-width: 520px; justify-self: end; }
@media (min-width: 768px) {
  .cap-card { padding: 28px; }
  .cap-card__title { margin-bottom: 22px; font-size: 32px; line-height: 40px; }
  .cap-card__title--tight { margin-bottom: 12px; }
  .cap-card__text { font-size: 16px; line-height: 28px; }
}
@media (min-width: 1024px) {
  .cap-card__intro--media { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

/* Sub-block inside a card (pipeline, speedup, scenario) */
.sub-block { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--c-line); }
.sub-block__head { max-width: 820px; margin-bottom: 16px; }
.sub-block__title { margin-bottom: 8px; font-size: 16px; line-height: 24px; font-weight: 600; color: var(--c-heading); }
.sub-block__text { font-size: 14px; line-height: 24px; color: var(--c-text); }
@media (min-width: 768px) { .sub-block__title { font-size: 18px; } }

.figure { margin: 0; }
.figure__frame { width: 100%; overflow-x: auto; border-radius: var(--r-sm); background: #fff; }
.figure__frame > svg { width: 100%; height: auto; min-width: 720px; }
.figure__caption { margin-top: 10px; text-align: center; font-size: 13px; line-height: 20px; color: var(--c-muted); }

/* Foresight diagram text defaults */
.diagram { font-family: var(--font); }
.diagram text { fill: #3b3b3b; }
.diagram .fs-wire { fill: none; stroke: #ababab; stroke-width: 1.4; }

/* Speedup video grid */
.clip-grid { display: grid; gap: 16px; }
@media (min-width: 768px) { .clip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.clip-grid figcaption { margin-top: 8px; text-align: center; font-size: 13px; line-height: 20px; color: var(--c-text-strong); }

/* ICL scenario carousel */
.icl { margin-top: 28px; }
.icl__title { margin-bottom: 18px; }
.carousel { display: flex; align-items: stretch; gap: 10px; }
.carousel__step {
  flex: none; display: flex; align-items: center; justify-content: center; width: 40px;
  border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); background: #fff;
  font-size: 22px; line-height: 1; color: var(--c-accent); cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.carousel__step:hover { border-color: var(--c-line-hover); background: var(--c-active-bg); }
.carousel__track { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__chips { display: flex; gap: 10px; padding-bottom: 2px; }
.chip {
  flex: none; width: 220px; min-height: 64px; padding: 10px 14px; text-align: left;
  border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); background: #fff;
  font-size: 13px; line-height: 20px; font-weight: 600; color: var(--c-text-strong); cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.chip:hover { border-color: var(--c-line-hover); color: var(--c-accent); }
.chip[aria-pressed="true"] { border-color: var(--c-accent); background: var(--c-active-bg); color: var(--c-accent); }
@media (min-width: 768px) { .chip { width: 250px; font-size: 14px; } }
.pair { display: grid; gap: 18px; margin-top: 20px; }
@media (min-width: 1024px) { .pair { grid-template-columns: 1fr 1fr; } }
.pair__label { margin-bottom: 10px; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--c-heading); }

/* Planner diagram animation */
.pl-flow { stroke-dasharray: 12 12; animation: pl-flow 1.8s linear infinite; }
.pl-flow--late { animation-delay: -0.75s; }
.pl-feedback { stroke-dasharray: 10 14; animation: pl-feedback 2.6s linear infinite; }
.pl-pulse { animation: pl-pulse 3.8s ease-in-out infinite; }
.pl-chip { animation: pl-chip 2.8s ease-in-out infinite; }
@keyframes pl-flow { to { stroke-dashoffset: -48; } }
@keyframes pl-feedback { to { stroke-dashoffset: -60; } }
@keyframes pl-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(17, 24, 39, 0)); }
  50% { filter: drop-shadow(0 0 10px rgba(17, 24, 39, 0.18)); }
}
@keyframes pl-chip { 0%, 100% { opacity: 0.78; } 50% { opacity: 1; } }

/* ---------- Contributions (numbered 2×2 cards) ---------- */
.how-lead {
  max-width: 900px; margin: 16px auto 48px;
  font-size: 15px; line-height: 26px; color: var(--c-text);
}
.how-grid { display: grid; gap: 18px; }
.how-card {
  display: flex; flex-direction: column; min-height: 260px; padding: 26px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-sm); box-shadow: var(--shadow-card-lg);
}
.how-card__num { font-size: 28px; line-height: 1; font-weight: 600; color: var(--c-line-strong); }
.how-card__kicker {
  margin-top: 20px; font-size: 14px; line-height: 22px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--c-accent);
}
.how-card__body { margin-top: 22px; font-size: 16px; line-height: 29px; color: var(--c-text); }
@media (min-width: 768px) {
  .how-lead { font-size: 18px; line-height: 30px; }
  .how-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .how-card { min-height: 300px; padding: 36px; }
  .how-card__num { font-size: 34px; }
  .how-card__kicker { font-size: 15px; line-height: 24px; }
  .how-card__body { font-size: 18px; line-height: 32px; }
}

/* ---------- Footer ---------- */
.footer {
  padding: 28px var(--gutter); border-top: 1px solid var(--c-line); text-align: center;
  font-size: 13px; line-height: 1.5; letter-spacing: 0.04em; color: var(--c-text);
}
.footer a { color: var(--c-heading); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .pl-flow, .pl-feedback, .pl-pulse, .pl-chip { animation: none; }
}

/* ============================== BibTeX ============================== */
.bibtex { position: relative; max-width: var(--w-section); margin: 0 auto; }
.bibtex__code {
  margin: 0; padding: 22px 88px 22px 24px; overflow-x: auto;
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.65;
  color: var(--c-text-strong); white-space: pre;
}
.bibtex__copy {
  position: absolute; top: 12px; right: 12px; padding: 4px 12px;
  font: inherit; font-size: 12px; color: var(--c-accent); background: var(--c-card);
  border: 1px solid var(--c-line); border-radius: 999px; cursor: pointer;
}
.bibtex__copy:hover { border-color: var(--c-accent); background: var(--c-active-bg); }

/* PosePlaner project content. Keep the supplied XU Lab theme. */
[hidden] { display: none !important; }
.skip-link { position: absolute; top: -60px; left: 12px; background: #fff; padding: 12px; z-index: 100; }
.skip-link:focus { top: 12px; }
.site-nav { border-bottom: 1px solid var(--c-line); background: #fff; }
.site-nav__inner { max-width: 1120px; padding: 19px 24px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark { font-weight: 650; text-decoration: none; font-size: 17px; white-space: nowrap; }
.wordmark span { font-weight: 400; color: var(--c-muted); }
.site-nav__links { display: flex; gap: 25px; font-size: 13px; }
.site-nav__links a { text-decoration: none; color: var(--c-text-strong); }
.site-nav__links a:hover { color: var(--c-accent); }
.hero { padding-top: 64px; padding-bottom: 52px; }
.hero__inner { max-width: 1080px; }
.eyebrow { color: var(--c-accent); font-size: 11px; line-height: 1.6; font-weight: 650; letter-spacing: .15em; margin-bottom: 18px; }
.hero__title { font-size: 64px; line-height: 1.08; font-weight: 650; letter-spacing: -.045em; }
.paper-title { display: block; font-size: 29px; line-height: 1.3; letter-spacing: -.025em; font-weight: 500; margin-top: 17px; }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin: 28px 0 12px; font-size: 16px; }
.authors sup { font-size: 10px; margin-left: 3px; color: var(--c-accent); }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; color: var(--c-text); font-size: 13px; }
.corresponding { margin-top: 8px; color: var(--c-muted); font-size: 11px; }
.hero-figure { max-width: 930px; margin: 37px auto 0; }
.hero-figure img { width: 100%; height: auto; }
.hero-figure figcaption, .method-figure figcaption { margin-top: 12px; font-size: 13px; color: var(--c-muted); text-align: center; }
.overview .eyebrow { text-align: center; }
.overview__text { max-width: 800px; margin: 25px auto 0; color: var(--c-text-strong); font-size: 18px; line-height: 1.85; text-align: center; }
.feature-strip { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 43px; gap: 25px; }
.feature-strip div { padding-left: 22px; border-left: 2px solid var(--c-line); }
.feature-strip strong { font-size: 19px; font-weight: 550; display: block; }
.feature-strip span { font-size: 13px; color: var(--c-muted); display: block; margin-top: 5px; }
.method-figure { margin: 0 auto 36px; }
.method-figure img { width: 100%; height: auto; }
.result-controls { display: flex; justify-content: center; flex-wrap: wrap; gap: 14px; margin: -12px auto 25px; }
.result-controls label { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--c-text); }
.result-controls select { appearance: auto; background: #fff; border: 1px solid var(--c-line-strong); border-radius: 8px; padding: 9px 12px; font: inherit; font-size: 14px; color: var(--c-heading); max-width: 100%; }
.result-controls select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }
.result-note { max-width: 830px; margin: 20px auto 0; color: var(--c-muted); font-size: 13px; line-height: 1.75; }
.values { max-width: 850px; margin: 15px auto 0; font-size: 13px; }
.values summary { color: var(--c-accent); cursor: pointer; padding: 8px 0; }
.table-scroll { overflow-x: auto; }
.values table { width: 100%; border-collapse: collapse; background: #fff; }
.values caption { text-align: left; padding: 10px; color: var(--c-muted); }
.values th, .values td { border-bottom: 1px solid var(--c-line); padding: 9px 12px; text-align: right; }
.values th:first-child { text-align: left; }
.trajectory-legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; margin: -20px 0 32px; font-size: 12px; color: var(--c-text); }
.trajectory-legend span { display: flex; align-items: center; gap: 8px; }
.trajectory-legend i { height: 3px; width: 20px; }
.legend-gt { background: #262626; }.legend-init { background: #2365cd; }.legend-refined { background: #d53434; }
.trajectory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.trajectory-grid figure { margin: 0; background: #fff; padding: 18px; border: 1px solid var(--c-line); border-radius: var(--r-md); }
.trajectory-grid img { height: 245px; width: 100%; object-fit: contain; }
.trajectory-grid figcaption { font-size: 14px; font-weight: 600; text-align: center; margin-top: 12px; }
@media (max-width: 767px) {
 :root { --gutter: 20px; }
 .site-nav__inner { padding: 16px 20px; }.site-nav__links { gap: 12px; font-size: 11px; }.site-nav__links a:nth-child(3) { display: none; }.wordmark { font-size: 14px; }.wordmark span { display: none; }
 .hero { padding-top: 46px; padding-bottom: 40px; }.hero__title { font-size: 48px; }.paper-title { font-size: 24px; line-height: 1.32; }.desktop-break { display: none; }
 .authors { gap: 10px 16px; font-size: 14px; }.hero-figure { margin-top: 30px; }.hero-figure figcaption { font-size: 12px; }
 .overview__text { font-size: 16px; line-height: 1.8; text-align: left; }.feature-strip { grid-template-columns: 1fr; gap: 22px; }
 .result-controls { align-items: flex-start; gap: 10px; }.result-controls label { flex-direction: column; align-items: flex-start; gap: 5px; }
 .chart { padding: 12px 0; }.chart__title { font-size: 15px; }.trajectory-grid { grid-template-columns: 1fr; }.trajectory-grid img { height: 260px; }
}

.chart-hint { display:none; }
@media(max-width:767px){ .chart-hint { display:block; text-align:center; color:var(--c-muted); font-size:11px; margin:6px 0 12px; } }

/* Expanded research narrative and complete paper tables. */
.prose { max-width: 800px; margin: 26px auto 0; padding: 0 24px; font-size: 17px; line-height: 1.85; color: var(--c-text-strong); }
.prose p + p { margin-top: 18px; }
.story-path { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; max-width: 1000px; margin: 40px auto 0; }
.story-path > div { padding: 8px 0 8px 20px; border-left: 2px solid var(--c-series-1); }
.story-path span { display:block; font-size: 10px; font-weight: 650; letter-spacing: .12em; color: var(--c-accent); }
.story-path strong { display:block; margin: 8px 0; font-size: 17px; font-weight: 600; line-height:1.5; }
.story-path p { font-size:13px; line-height:1.7; color:var(--c-muted); }
.geometry-figure { max-width: 900px; margin: 26px auto; }
.geometry-figure img { width:100%; height:auto; }
.geometry-figure figcaption { font-size:12px; line-height:1.7; color:var(--c-muted); text-align:center; margin-top:14px; }
.equation-pair { display:flex; flex-wrap:wrap; justify-content:center; gap:14px 42px; padding:24px 12px; margin:18px 0; border-top:1px solid var(--c-line); border-bottom:1px solid var(--c-line); font-family: Georgia, serif; font-size:22px; }
.metric-explainer { max-width:880px; padding:0 24px; margin:0 auto 28px; text-align:center; color:var(--c-muted); font-size:12px; line-height:1.8; }
.full-results { max-width:1040px; margin:28px auto 0; background:#fff; border:1px solid var(--c-line); border-radius:10px; }
.full-results table { width:100%; border-collapse:collapse; font-size:13px; line-height:1.5; white-space:nowrap; font-variant-numeric:tabular-nums; }
.full-results caption { text-align:left; padding:16px 18px; font-size:14px; font-weight:600; color:var(--c-heading); }
.full-results th, .full-results td { padding:9px 15px; text-align:right; }
.full-results thead { background:#f5f4f1; border-top:1px solid var(--c-line); border-bottom:1px solid var(--c-line); }
.full-results thead th:first-child, .full-results thead th:nth-child(2), .full-results tbody th { text-align:left; }
.full-results tbody + tbody { border-top:1px solid var(--c-line); }
.full-results tbody th { font-weight:400; }
.full-results .upstream-name { font-weight:600; vertical-align:middle; }
.full-results .row-ours { background:#fff5ec; }
.full-results strong { font-weight:700; color:var(--c-heading); }
.protocol-notes { max-width:880px; margin:25px auto 0; padding:0 24px; font-size:13px; line-height:1.8; color:var(--c-text); }
.protocol-notes p + p { margin-top:10px; }
.evidence-block { max-width:1040px; margin:36px auto 0; }
.evidence-block + .evidence-block { margin-top:54px; }
.evidence-block h3 { font-size:22px; font-weight:550; line-height:1.4; text-align:center; margin-bottom:18px; }
.evidence-block .result-controls { margin:24px auto; }
.evidence-block > p { max-width:800px; margin:18px auto; padding:0 24px; font-size:15px; line-height:1.8; }
@media(max-width:767px) {
 .story-path { grid-template-columns:1fr; gap:20px; }
 .prose { font-size:16px; padding:0 20px; }
 .container .prose { padding:0; }
 .equation-pair { font-size:20px; gap:14px; flex-direction:column; align-items:center; }
 .full-results { margin-left:20px; margin-right:20px; }
 .full-results th, .full-results td { padding:8px 11px; font-size:12px; }
 .full-results caption { padding:14px 12px; font-size:13px; }
 .evidence-block h3 { font-size:20px; padding:0 20px; }
 .geometry-figure { padding:0 12px; }
}

/* Research-first hierarchy using the template's existing typography and figures. */
.project-summary { max-width:760px; margin:24px auto 0; line-height:1.7; }
.project-highlights { max-width:930px; margin:30px auto 0; text-align:left; }
.project-highlights a { text-decoration:none; display:block; }
.project-highlights a:hover strong { text-decoration:underline; text-decoration-thickness:1px; text-underline-offset:5px; }
.project-highlights strong { font-size:30px; line-height:1.3; font-variant-numeric:tabular-nums; }
.project-highlights span { line-height:1.65; }
.highlight-note { font-size:11px; color:var(--c-muted); margin:17px 0 0; }
.residual-grid { max-width:1000px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:28px; margin:26px auto 0; }
.residual-grid img { width:100%; height:auto; }
@media(max-width:767px) {
 .project-highlights { gap:18px; }
 .project-highlights strong { font-size:26px; }
 .project-summary { font-size:15px; }
 .highlight-note { text-align:left; font-size:11px; line-height:1.7; }
 .residual-grid { grid-template-columns:1fr; gap:25px; }
}

/* Simultaneous metric panels, built on the template chart component. */
.metric-board { max-width:1040px; margin:0 auto; }
.metric-board__title { font-size:20px; text-align:center; font-weight:600; }
.metric-board__legend { list-style:none; display:flex; justify-content:center; flex-wrap:wrap; gap:12px 24px; padding:0; margin:16px 0 22px; }
.metric-board__legend li { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--c-text); }
.metric-board__legend i { width:15px; height:7px; border-radius:2px; }
.legend-init-bar { background:var(--c-series-2); }.legend-nope-bar { background:#b8b5b0; }.legend-ours-bar { background:var(--c-series-1); }
.metric-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.metric-card.chart { margin:0; max-width:none; min-width:0; padding:19px 14px 10px; border:1px solid var(--c-line); border-radius:var(--r-md); background:var(--c-card); }
.metric-card .chart__title { font-size:16px; line-height:24px; margin-bottom:16px; }
.metric-card .chart__svg { height:auto; }
.metric-board__note { font-size:11px; line-height:1.7; color:var(--c-muted); text-align:center; margin-top:14px; }
@media(max-width:767px) {
 .metric-grid { grid-template-columns:minmax(0,1fr); gap:16px; }
 .metric-card.chart { padding:16px 9px 8px; }
 .metric-board__title { font-size:18px; }
 .metric-board__legend { gap:10px 15px; }
 .metric-board__legend li { font-size:11px; }
}

/* Three sequence lengths in parallel, with matched scales per metric. */
.length-board { max-width:1120px; }
.length-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.length-column { min-width:0; }
.length-column__title { padding:12px 8px; margin:0 0 14px; border-top:2px solid var(--c-line-strong); text-align:center; font-size:18px; font-weight:600; }
.length-column__title span { font-size:12px; font-weight:400; color:var(--c-muted); }
.length-metrics { display:grid; gap:18px; }
.length-board .metric-card.chart { padding:17px 9px 8px; }
.length-board .chart__title { font-size:14px; margin-bottom:12px; }
.result-download { text-align:center; margin:25px auto 0; font-size:12px; line-height:1.9; color:var(--c-muted); }
.result-download a { color:var(--c-accent); text-underline-offset:3px; }
@media(min-width:700px) and (max-width:1099px) {
 .length-grid { grid-template-columns:minmax(0,1fr); gap:32px; }
 .length-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:699px) {
 .length-grid { grid-template-columns:minmax(0,1fr); gap:30px; }
 .length-column__title { font-size:19px; }
 .result-download { padding:0 12px; }
}

/* Concise project-page results: two questions, four selected plots. */
.compact-method .how-card { min-height:0; padding:26px; }
.compact-method .how-card__num { font-size:25px; }
.compact-method .how-card__kicker { margin-top:16px; }
.compact-method .how-card__body { margin-top:14px; font-size:16px; line-height:1.8; }
.selected-results .section-head { margin-bottom:42px; }
.result-story + .result-story { margin-top:58px; padding-top:48px; border-top:1px solid var(--c-line); }
.result-story__head { max-width:800px; margin:0 auto 23px; text-align:center; }
.result-story__head h3 { font-size:26px; line-height:1.4; font-weight:600; }
.result-story__head p { margin-top:13px; font-size:16px; line-height:1.8; color:var(--c-text); }
.selected-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.selected-grid > div { min-width:0; }
.selected-chart__scope { font-size:11px; line-height:1.7; color:var(--c-muted); margin:10px 0 4px; text-align:center; }
.trajectory-example { margin:36px auto 0; }
.trajectory-example h4 { font-size:18px; font-weight:600; text-align:center; }
.trajectory-example > p { font-size:13px; color:var(--c-text); text-align:center; line-height:1.8; margin:10px auto 22px; }
.trajectory-example .trajectory-grid img { height:215px; }
.result-story__note { max-width:830px; margin:23px auto 0; text-align:center; font-size:12px; line-height:1.8; color:var(--c-muted); }
@media(max-width:767px) {
 .selected-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
 .result-story__head h3 { font-size:22px; }
 .result-story__head p { font-size:15px; }
 .result-story + .result-story { margin-top:40px; padding-top:35px; }
 .trajectory-example .trajectory-grid img { height:240px; }
}

/* A single result chart and an interactive geometric illustration. */
.experiment-tabs,.plane-demo__stages { display:flex; justify-content:center; flex-wrap:wrap; gap:10px; margin:0 auto 24px; }
.experiment-tabs button,.plane-demo__stages button { padding:10px 20px; background:var(--c-card); border:1px solid var(--c-line); border-radius:999px; cursor:pointer; font-size:14px; }
.experiment-tabs [aria-selected="true"],.plane-demo__stages [aria-pressed="true"] { background:var(--c-active-bg); border-color:var(--c-accent); color:var(--c-accent); }
.experiment-summary { max-width:800px; margin:0 auto 30px; text-align:center; font-size:14px; line-height:1.8; color:var(--c-text); }
.plane-demo { max-width:900px; border:1px solid var(--c-line); border-radius:var(--r-lg); padding:26px; background:#faf9f6; }
.plane-demo__stages { margin-bottom:0; }
.plane-demo__scene { width:100%; height:auto; max-height:350px; }
.plane-demo .metric-board__legend { margin:4px 0 16px; }
.plane-demo__caption { min-height:48px; text-align:center; color:var(--c-text-strong); font-size:15px; line-height:1.7; }
.plane-demo__controls { max-width:580px; display:flex; align-items:center; gap:22px; margin:14px auto; }
.plane-demo__controls button { min-width:144px; justify-content:center; background:#fff; cursor:pointer; }
.plane-demo__controls input { width:100%; accent-color:var(--c-accent); cursor:pointer; }
.plane-demo__note { margin-top:18px; font-size:11px; color:var(--c-muted); text-align:center; line-height:1.7; }
@media(max-width:767px) {
 .experiment-tabs button,.plane-demo__stages button { padding:9px 13px; font-size:12px; }
 .plane-demo { padding:18px 10px; }
 .plane-demo__stages { gap:6px; }
 .plane-demo__controls { flex-direction:column; gap:15px; }
 .plane-demo__controls input { max-width:260px; }
 .plane-demo__caption { min-height:70px; font-size:14px; padding:0 10px; }
}

/* One idea section: geometric intuition, animation, and compact measured evidence. */
.idea-evidence { max-width:900px; margin:30px auto 0; padding-top:26px; border-top:1px solid var(--c-line); }
.idea-evidence h3 { font-size:19px; line-height:1.5; text-align:center; }
.idea-evidence .metric-board__legend { margin:13px 0 20px; }
.residual-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px; }
.residual-summary { margin:0; padding:17px 10px 5px; border:1px solid var(--c-line); border-radius:var(--r-md); background:var(--c-card); }
.residual-summary figcaption { font-size:14px; text-align:center; font-weight:600; margin-bottom:6px; }
.residual-summary svg { width:100%; height:auto; }
.residual-gridline { stroke:var(--c-line); stroke-dasharray:3 4; }
.residual-tick { font-size:10px; fill:var(--c-muted); }
.residual-dataset { font-size:11px; fill:var(--c-text-strong); }
.residual-connector { stroke:#cbc7bf; stroke-width:2; }
.residual-before { fill:var(--c-series-2); }.residual-after { fill:var(--c-series-1); }
.residual-value { font-size:11px; font-variant-numeric:tabular-nums; }
.residual-value--before { fill:#4c7396; }.residual-value--after { fill:#9e5119; }
.idea-evidence__note { max-width:790px; text-align:center; margin:14px auto 0; font-size:11px; line-height:1.8; color:var(--c-muted); }
@media(max-width:767px) {
 .residual-summary-grid { grid-template-columns:minmax(0,1fr); gap:14px; }
 .idea-evidence h3 { font-size:18px; }
}

.plane-demo__controls button { min-width:170px; flex-shrink:0; white-space:nowrap; }

.residual-summary .sr-only { display:block; max-width:1px; }

/* A compact process strip supports the main geometric animation. */
.plane-demo { background:#fff; border-color:transparent; border-radius:0; padding:24px 30px; }
.refinement-strip { display:grid; grid-template-columns:1fr 28px 1fr 28px 1fr; align-items:center; gap:10px; max-width:720px; margin:0 auto; }
.refinement-step { min-width:0; border:0; border-bottom:2px solid transparent; background:none; padding:7px 0 12px; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:6px; color:var(--c-muted); }
.refinement-step > span:not(.refinement-delta) { font-size:14px; font-weight:600; }
.refinement-step small { font-size:10px; font-weight:400; color:var(--c-muted); white-space:nowrap; }
.refinement-step[aria-pressed="true"] { border-bottom-color:var(--c-accent); color:var(--c-accent); }
.refinement-step:focus-visible { outline:2px solid var(--c-accent); outline-offset:3px; }
.refinement-strip__arrow { text-align:center; font-size:21px; color:#b9b6af; }
.matched-views { width:170px; height:56px; }
.matched-views__label { font-size:30px; fill:var(--c-text-strong); }
.matched-views__match { font-size:19px; fill:var(--c-muted); }
.noise-flow { width:105px; height:35px; margin:4px 0; }
.refinement-delta { display:block; font-family:Georgia,serif; font-size:30px; height:56px; padding-top:5px; color:var(--c-accent); }
.refinement-delta sub { font-size:15px; }
.plane-demo__scene { max-height:320px; margin:6px auto 0; }
.pose-update { font-family:Georgia,serif; font-size:19px; fill:#77736d; opacity:.55; }
.pose-update.is-active { opacity:1; }
.pose-update.is-active .pose-update__correction { fill:var(--c-accent); }
.pose-scene-label { font-family:Arial,sans-serif; font-size:14px; fill:#77736d; }
.pose-scene-label--active { fill:#a95723; font-weight:600; }
.pose-scene-label--gt { fill:#262626; font-weight:600; }
.plane-demo__note { margin-top:10px; }
.plane-demo__controls { margin:8px auto; }
@media(max-width:600px) {
 .plane-demo { padding:18px 8px; }
 .refinement-strip { grid-template-columns:1fr 12px 1.15fr 12px 1fr; gap:2px; }
 .refinement-step > span:not(.refinement-delta) { font-size:10px; }
 .refinement-step small { font-size:8px; white-space:normal; min-height:22px; }
 .refinement-strip__arrow { font-size:15px; }
 .matched-views { width:100%; height:43px; }
 .noise-flow { width:70px; height:26px; margin:4px 0 0; }
 .refinement-delta { height:43px; font-size:25px; }
 .refinement-step { padding-bottom:8px; }
 .plane-demo__scene { margin-top:12px; }
}

/* A compact learned-refiner symbol, with plane conditioning above. */
.refiner-symbol { width:160px; height:62px; }
.refinement-step--model[aria-pressed="true"] .refiner-symbol__nodes { stroke:var(--c-accent); fill:var(--c-active-bg); }
.refinement-step--model[aria-pressed="true"] .refiner-symbol__edges { stroke:#d4aa8b; }
@media(max-width:600px) { .refiner-symbol { width:100%; max-width:118px; height:43px; } }

/* One paper title, with equal emphasis across both lines. */
.hero__title--paper { font-size:clamp(28px,3vw,38px); line-height:1.25; font-weight:650; letter-spacing:-.025em; }

/* Reuse the diffusion symbol directly from the paper teaser. */
.refiner-symbol--paper { width:62px; height:62px; opacity:.8; }
.refinement-step--model[aria-pressed="true"] .refiner-symbol--paper { opacity:1; }
@media(max-width:600px) { .refiner-symbol--paper { width:43px; height:43px; } }

/* Actual stage progress, synchronized with the animation playhead. */
.refinement-step { position:relative; }
.refinement-step[aria-pressed="true"] { border-bottom-color:transparent; }
.refinement-step::before,.refinement-step::after { content:""; position:absolute; left:0; right:0; bottom:-2px; height:2px; pointer-events:none; }
.refinement-step::before { background:var(--c-line); }
.refinement-step::after { background:var(--c-accent); transform:scaleX(var(--stage-progress,0)); transform-origin:left; }

/* Publication resources: compact controls and original affiliation marks. */
.hero__logos { display: flex; align-items: center; justify-content: center; gap: 44px; margin: 24px 0 20px; }
.hero__logos img { display: block; object-fit: contain; }
.hero__logo-hkust { width: 64px; height: 64px; }
.hero__logo-robbyant { width: 148px; height: 42px; }
.hero__resources { gap: 10px; margin: 0 0 28px; }
.resource-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 17px; border: 1px solid #555; border-radius: 6px; background: #fff; color: #333; font: inherit; font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: none; transition: background-color .15s, border-color .15s; }
.resource-button svg { width: 17px; height: 17px; flex: none; }
.resource-button small { font-size: 10px; font-weight: 400; }
.resource-button:enabled:hover, a.resource-button:hover { border-color: var(--c-accent); background: var(--c-active-bg); color: var(--c-accent); }
.resource-button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 4px; }
.resource-button:disabled { color: #999; border-color: #d1d1d1; background: #fafafa; cursor: not-allowed; }
@media (max-width: 600px) {
 .hero__logos { gap: 32px; margin: 22px 0 18px; }
 .hero__logo-hkust { width: 56px; height: 56px; }
 .hero__logo-robbyant { width: 132px; height: 38px; }
 .hero__resources { gap: 8px; margin-bottom: 24px; }
 .resource-button { padding: 8px 12px; gap: 6px; font-size: 13px; }
}
