@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&display=swap');

/* Design tokens ------------------------------------------------------------ */
:root {
  --paper: #f8f7f4;
  --band: #f1efe9;
  --surface: #ffffff;
  --ink: #1f1d28;
  --body: #494555;
  --muted: #6f6b7a;
  --purple: #6a4fb6;
  --purple-deep: #55409a;
  --line: #e5e2e9;
  --line-soft: #efedf1;
  --shadow: 0 1px 2px rgba(40, 32, 70, .03), 0 10px 30px rgba(40, 32, 70, .04);
  --radius: 16px;
}

/* Base --------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0; color: var(--body); background: var(--paper);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16.5px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
figure, h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--purple); outline-offset: 4px; }
sup { font-size: .62em; margin-left: 1px; vertical-align: super; line-height: 0; }
strong { color: var(--ink); font-weight: 600; }
em { font-style: italic; }
/* One column for everything — text, cards and figures share these edges. */
.wrap { width: min(900px, calc(100% - 64px)); margin-inline: auto; }
.skip-link { position: fixed; top: -70px; left: 20px; z-index: 20; padding: 10px 20px; background: white; border-radius: 8px; }
.skip-link:focus { top: 10px; }

/* Headings ----------------------------------------------------------------- */
h2 { font-size: clamp(25px, 2.9vw, 34px); font-weight: 700; letter-spacing: -.025em; line-height: 1.2; color: var(--ink);
     text-align: center; }
/* Centred headings trade the left accent bar for a short rule in the same gradient. */
h2::after { content: ''; display: block; width: 76px; height: 3px; margin: 14px auto 0; border-radius: 2px;
     background: linear-gradient(100deg, #3f6698 0%, #6a4fb6 55%, #a45f80 100%); }
h2 > span { display: inline-block; }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  h2 > span { background: linear-gradient(100deg, #3f6698 0%, #6a4fb6 55%, #a45f80 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); line-height: 1.4; }

/* Header ------------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 10; background: #f8f7f4e6; backdrop-filter: blur(14px); border-bottom: 1px solid #e5e2e999; }
.nav { display: flex; height: 72px; align-items: center; gap: 24px; font-size: 13.5px; }
.nav-brand { font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--ink); flex: none; }
.nav-links { display: flex; gap: 26px; color: var(--muted); flex: 1; justify-content: center; white-space: nowrap; }
.nav-links a { padding-block: 6px; border-bottom: 1.5px solid transparent; }
.nav-links a:hover { color: var(--purple); border-bottom-color: var(--purple); }
.nav-paper { flex: none; font-weight: 600; color: var(--ink); }
.nav-paper:hover { color: var(--purple); }

/* Hero --------------------------------------------------------------------- */
.hero { text-align: center; padding: 60px 0 12px; }
.hero-brand { display: flex; justify-content: center; align-items: center; gap: 16px; margin-bottom: 20px; }
.hero-logo { width: 62px; height: 62px; object-fit: contain; }
.hero-name { display: inline-block; font-size: 72px; font-weight: 650; letter-spacing: -.055em; line-height: 1.1; color: var(--purple); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .hero-name { background: linear-gradient(110deg, #4e82b7 0%, #7055b8 55%, #b36b85 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.paper-title { display: block; max-width: 900px; margin-inline: auto; font-size: clamp(25px, 3.3vw, 38px); line-height: 1.24; font-weight: 500; letter-spacing: -.03em; color: var(--ink); }

.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px clamp(16px, 1.7vw, 24px); max-width: 940px; margin: 34px auto 0; font-size: 20px; font-weight: 550; line-height: 1.45; }
/* Forces the row break before Sayan Deb Sarkar; on narrow screens the list wraps on its own too. */
.author-break { flex-basis: 100%; height: 0; margin: 0; }
.authors a { color: var(--purple); border-bottom: 1px solid transparent; }
.authors a:hover { border-bottom-color: currentColor; }
.affiliations { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px clamp(22px, 2vw, 34px); margin-top: 14px; color: var(--ink); font-size: 17px; font-weight: 500; }
.affiliations sup, .authors sup { color: var(--purple); font-weight: 600; }

.hero-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 32px 0 44px; }
.reslink {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 14.5px; font-weight: 550; line-height: 1;
}
.reslink svg { width: 19px; height: 19px; flex: none; }
/* The arXiv glyph is a solid fill and reads heavier than the stroked icons at the same box. */
.reslink .icon-arxiv { width: 18px; height: 18px; }
.reslink small { font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.reslink.is-live, .reslink.is-demo { background: var(--purple); color: #fff; transition: background .2s, transform .2s; }
.reslink.is-live:hover, .reslink.is-demo:hover { background: var(--purple-deep); transform: translateY(-1px); }
.reslink.is-soon { background: #f1efec; border-color: var(--line); color: #a4a0ac; cursor: not-allowed; }

.teaser { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 26px 30px 22px; }
/* The label is sized in container units so it tracks the figure, not the window. */
.teaser-visual { position: relative; container-type: inline-size; }
.teaser-visual img { width: 100%; }
.teaser-task-label {
  position: absolute; left: 39%; top: 2.5%; display: grid; place-items: center; width: 16%; height: 19%;
  color: #16141a; background: #fff; font-weight: 400; line-height: 1.25;
  font-size: clamp(8px, 1vw, 13.5px);
  font-size: min(1.5cqw, 13.5px);
}
.teaser figcaption { max-width: 900px; margin: 20px auto 0; padding-top: 18px; border-top: 1px solid var(--line-soft); text-align: center; }

/* Summary ------------------------------------------------------------------ */
.summary { padding: 38px 0 10px; }
.summary-inner { padding-top: 32px; border-top: 1px solid var(--line); }
.summary-text { max-width: 880px; margin-inline: auto; font-size: 19.5px; line-height: 1.62; letter-spacing: -.011em; color: #3b3549; text-align: center; }
.summary-text strong { font-weight: 650; color: var(--purple-deep); }

/* Headline numbers: one icon, one figure, one caption per card. */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.hl { padding: 24px 24px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
      box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.hl:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgba(40, 32, 70, .04), 0 14px 34px rgba(40, 32, 70, .09); }
.hl-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px; border-radius: 11px;
      color: #fff; background: linear-gradient(135deg, #3f6698 0%, #6a4fb6 58%, #a45f80 100%);
      box-shadow: 0 4px 12px rgba(88, 66, 158, .26); }
.hl-icon svg { width: 20px; height: 20px; }
.hl-value { display: block; font-size: 34px; font-weight: 650; letter-spacing: -.035em; line-height: 1.05;
      color: var(--purple-deep); font-variant-numeric: tabular-nums; }
.hl-label { display: block; margin-top: 9px; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.hl-note { display: block; margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.hl-label sub { font-size: .7em; }

/* Sections ----------------------------------------------------------------- */
.section { padding-block: 40px; }
.band { background: var(--band); border-block: 1px solid #e6e3dd; }
.section-head { margin: 0 0 40px; }
.lead { margin-top: 16px; font-size: 16.5px; line-height: 1.68; color: var(--body); }
.abstract-body {
  padding: 26px 30px 28px; font-size: 16.5px; line-height: 1.85; text-align: justify; hyphens: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}

/* Subsections stay left-aligned so they read as labels on the column below them. */
.sub-head { margin-top: 52px; font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.3; color: var(--ink); }
.section-head + .sub-head { margin-top: 0; }
.sub-head + .figure-card { margin-top: 20px; }
.figure-card + .lead { margin-top: 24px; }

#method .sub-head { display: flex; align-items: center; gap: 13px; color: var(--purple-deep); font-size: 14px;
      font-weight: 700; letter-spacing: .075em; text-transform: uppercase; }
#method .sub-head::before { content: ""; flex: 0 0 28px; height: 3px; border-radius: 999px; background: var(--purple); }
#method .sub-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
#method .steps + .sub-head { margin-top: 40px; }
/* Half the column each: the wide span strip and its paragraph end up the same height. */
.span-split { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: center; }
#method .sub-head + .span-split { margin-top: 18px; }
.span-split > figure { min-width: 0; }
.span-split > .lead { margin-top: 0; }

/* The three stages read left to right under the architecture figure, in its own flow order. */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 30px; }
.step { padding-top: 15px; border-top: 2px solid #e0dae9; }
.step-n { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; color: var(--purple); font-variant-numeric: tabular-nums; }
.step h4 { margin: 8px 0 0; font-size: 15.5px; font-weight: 650; letter-spacing: -.015em; line-height: 1.35; color: var(--ink); }
.step p { margin-top: 9px; font-size: 14.5px; line-height: 1.62; color: var(--body); }


/* Cards -------------------------------------------------------------------- */
.figure-card, .pr-stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.figure-card { padding: 24px; box-shadow: var(--shadow); }
.figure-card img { width: 100%; margin-inline: auto; }
figcaption { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin-top: 16px; }
figcaption strong { color: var(--body); }

/* A subsection carries its own rule so it reads as analysis under the tables,
   not as a result of its own. */
.sub-block { margin-top: 58px; padding-top: 36px; border-top: 1px solid var(--line); }
.sub-block .sub-head { margin-top: 0; }

.fine-print { color: var(--muted); font-size: 13px; line-height: 1.72; margin-top: 18px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; color: var(--purple); }
.text-link:hover { color: var(--purple-deep); }

/* Qualitative comparison --------------------------------------------------- */
.qual-comparison { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.qual-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; min-height: 54px; padding: 10px 18px; border-bottom: 1px solid var(--line-soft); }
.qual-toolbar > span { color: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.qual-toolbar button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; color: var(--purple-deep); font-size: 11.5px; font-weight: 600; background: #f1edf9; border-radius: 8px; }
.qual-toolbar button:hover { background: #e8e1f5; }
.qual-toolbar button > span:first-child { width: 10px; font-size: 9px; text-align: center; }
.qual-scroll { overflow-x: auto; padding: 14px 18px 18px; scrollbar-color: #c9c4d0 transparent; }
.qual-inner { min-width: 850px; }
.qual-columns {
  display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); align-items: end;
  padding: 0 0 11px; color: var(--ink); font-size: 12px; font-weight: 650; text-align: center;
  letter-spacing: -.01em;
}
.qual-columns span:nth-child(4) { color: var(--purple-deep); }
.qual-example { padding: 13px 0 16px; border-top: 1px solid var(--line-soft); }
.qual-example > header { display: flex; align-items: baseline; gap: 10px; padding: 0 4px 9px; }
.qual-example > header h3 { font-size: 14px; }
.qual-example > header span { color: var(--muted); font-size: 11.5px; }
.qual-video { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line-soft); border-radius: 9px; }
.qual-video video { display: block; width: 100%; height: auto; aspect-ratio: 11 / 2; object-fit: cover; }
.figure-key { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; color: var(--muted); font-size: 12.5px; }
.figure-key span { display: inline-flex; align-items: center; gap: 7px; }
.axis-key { display: inline-block; width: 15px; height: 2px; border-radius: 2px; }
.axis-key.revolute { background: #e34457; }
.axis-key.prismatic { background: #d6af00; }

/* Real-world results ------------------------------------------------------- */
/* The picker reveals one complete comparison at a time. */
.rw-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.rw-picker button { display: flex; align-items: center; gap: 11px; padding: 7px 13px 7px 7px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12.5px; text-align: left; }
/* The captures are portrait; contain keeps each one whole inside the tile. */
.rw-picker button img { flex: none; width: 36px; height: 48px; object-fit: contain; border-radius: 6px; background: var(--paper); }
.rw-picker button:hover { border-color: var(--purple); color: var(--purple); }
.rw-picker button[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }
.rw-figure {
  padding: 6px 24px 10px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.rw-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.rw-head {
  position: relative; z-index: 2; padding: 14px 0 11px;
  color: var(--ink); font-size: 12.5px; font-weight: 650; letter-spacing: -.01em; text-align: center;
}
/* The plate has to bleed into the card's own padding, or rows scroll past in the gutters. */
.rw-head::before { content: ''; position: absolute; inset: 0 -24px; z-index: -1;
  background: var(--surface); box-shadow: 0 1px 0 var(--line); }
.rw-head small { display: block; margin-top: 2px; color: var(--muted); font-size: 10.5px; font-weight: 500; letter-spacing: 0; }
.rw-row { padding: 12px 0 16px; border-top: 1px solid var(--line-soft); }
.rw-row:first-of-type { border-top: 0; }
.rw-row > header { display: flex; align-items: baseline; gap: 10px; padding-bottom: 9px; }
.rw-row > header h3 { font-size: 14px; }
/* Fixed row height, images sized by their own aspect ratio inside it, so panels of
   different shapes still sit on one baseline without being cropped. */
.rw-cell { display: flex; align-items: center; justify-content: center; gap: 10px; height: 200px; }
.rw-cell img { flex: 0 1 auto; min-width: 0; height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.rw-views img { border-radius: 7px; }
.rw-cell-label { display: none; }
.rw-dot { width: 8px; height: 8px; border-radius: 2px; }
.rw-dot-static { background: #999; }
/* One swatch for "a movable part", in the segmentation palette's own first three colours. */
.rw-dot-parts { width: 22px; background: linear-gradient(90deg, #482475 0 33%, #21918c 33% 66%, #bddf26 66%); }
.rw-line { height: 2px; width: 13px; border-radius: 1px; }

/* Shared viewer chrome — the procedural browser below is the only interactive
   stage left on the page, and these are its canvas frame, hint, status and controls. */
.rw-canvas-wrap { position: relative; margin-top: 4px; }
.rw-canvas-wrap canvas { display: block; width: 100%; height: 356px; cursor: grab; touch-action: none; border-radius: 10px; background: linear-gradient(#fdfdfc, #f4f2f6); }
.rw-hint { position: absolute; right: 10px; bottom: 8px; font-size: 10px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; pointer-events: none; }
.rw-status { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--muted); pointer-events: none; padding: 20px; text-align: center; }
.rw-status:empty { display: none; }
.rw-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.rw-drive { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 150px; }
.rw-drive label { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
.rw-drive input { flex: 1; accent-color: var(--purple); min-width: 90px; }
.output-legend { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 20px; font-size: 12px; color: var(--muted); margin-top: 18px; min-height: 18px; }
.output-legend > span { display: inline-flex; align-items: center; gap: 7px; }

/* Results ------------------------------------------------------------------ */
.results-card, .analysis-card, .motion-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.results-card { padding: 22px 28px 20px; }
.results-toolbar { display: flex; align-items: center; margin-bottom: 18px; gap: 16px; flex-wrap: wrap; }
.metric-switch { display: inline-flex; gap: 4px; padding: 4px; background: #e8e5de; border: 1px solid #dcd8d0; border-radius: 10px; }
.metric-switch button { background: transparent; padding: 9px 18px; border-radius: 7px; font-size: 13.5px; font-weight: 500; color: #605c69; }
.metric-switch button[aria-pressed="true"] { color: var(--purple); background: #fff; box-shadow: 0 1px 5px rgba(48, 32, 64, .08); }
.metric-unit { margin-left: auto; font-size: 12px; color: var(--muted); }
.setting-controls { display: flex; align-items: center; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--line-soft); }
.setting-switch { display: flex; gap: 6px; flex-shrink: 0; }
.setting-switch button { padding: 8px 12px; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; }
.setting-switch button[aria-pressed="true"] { background: #f1edf9; color: var(--purple-deep); font-weight: 650; }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; padding: 26px 0 8px; }
.benchmark-chart { min-width: 0; }
.benchmark-chart + .benchmark-chart { border-left: 1px solid var(--line-soft); padding-left: 26px; }
.benchmark-name h4 { margin: 0; font-size: 15px; letter-spacing: -.015em; color: var(--ink); }
.benchmark-name > span { color: var(--muted); font-size: 11px; }
.benchmark-gain { margin: 14px 0 20px; color: var(--muted); font-size: 11px; }
.benchmark-gain strong { color: var(--purple-deep); font-size: 26px; font-weight: 600; letter-spacing: -.04em; margin-right: 4px; }
.benchmark-bars { display: grid; gap: 14px; min-height: 130px; align-content: end; }
.bar-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 30px; align-items: center; gap: 8px; min-height: 22px; }
.bar-method { color: var(--muted); font-size: 11px; }
.bar-track { height: 9px; border-radius: 3px; background: #f1eff3; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: #a79cb9; }
.bar-value { text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; }
.bar-delta-key { color: var(--purple-deep); font-weight: 650; }
.bar-row.is-ours { color: var(--purple-deep); font-weight: 650; }
.bar-row.is-ours .bar-method { color: inherit; }
.bar-row.is-ours .bar-fill { background: var(--purple); }
.chart-axis { display: flex; justify-content: space-between; margin: 8px 38px 0 80px; color: var(--muted); font-size: 9px; border-top: 1px solid var(--line-soft); padding-top: 5px; }
.results-card .card-note { margin-top: 18px; }

.analysis-card { min-width: 0; padding: 24px 26px 20px; }
.analysis-card h3 { margin-top: 3px; font-size: 17px; }
.eyebrow { color: var(--purple); font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.plot-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 11px; }
.plot-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #aaa4b2; }
.legend-dot.seg { background: var(--purple); }
.legend-dot.motion { background: #c07a2e; }
.card-note { margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10.5px; line-height: 1.55; }

/* Full width, and in the same method order as the bars above it. */
.runtime-card { display: grid; grid-template-columns: minmax(0, 290px) minmax(0, 1fr); gap: 34px; align-items: center;
     margin-top: 30px; padding: 26px 30px; }
.runtime-intro .card-note { margin-top: 12px; padding-top: 0; border-top: 0; }
.runtime-plot { display: grid; gap: 14px; margin: 0; }
.runtime-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.runtime-row.is-ours { color: var(--purple-deep); font-weight: 650; }
.runtime-row > strong { color: var(--ink); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.runtime-track { position: relative; height: 12px; border-radius: 999px; background: #f1eff3; }
.runtime-track i { display: block; width: var(--runtime-width); min-width: 8px; height: 100%; border-radius: inherit; background: #b8b2c0; }
.runtime-row.is-opt .runtime-track i, .runtime-row.is-ff .runtime-track i { background: #8d80a8; }
.runtime-row.is-ours .runtime-track i { background: var(--purple); box-shadow: 0 0 0 2px #e7e0f5; }
.runtime-axis { position: relative; height: 14px; margin: -4px 44px 0 102px; color: #8b8593; font-size: 10px; }
.runtime-axis span { position: absolute; left: var(--runtime-x); transform: translateX(-50%); white-space: nowrap; }
.runtime-axis span:first-child { left: 0; transform: none; }
.runtime-axis span:nth-child(2) { --runtime-x: 29%; }
.runtime-axis span:nth-child(3) { --runtime-x: 58%; }
.runtime-axis span:nth-child(4) { --runtime-x: 85%; }
.runtime-axis span:last-child { left: 100%; transform: translateX(-100%); }

.ambiguity-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: stretch; margin-top: 24px; }
.ambiguity-figure { min-width: 0; margin: 0; }
.ambiguity-figure img { max-width: 840px; }
.ambiguity-figure figcaption { max-width: 840px; margin-inline: auto; }
/* Its own line under the caption: trailing an inline key onto the last line of a
   justified-ish paragraph left the swatches wherever the text happened to break. */
.figure-key-inline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; }
.figure-key-inline > span { display: inline-flex; align-items: center; gap: 7px; }
.motion-card { min-width: 0; margin: 0; overflow: hidden; box-shadow: none; }
.motion-chart-wrap { min-width: 0; padding: 24px 26px 18px; }
.motion-chart-head { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; color: var(--ink); font-size: 12px; font-weight: 600; }
.states-chart { display: block; width: 100%; height: auto; margin-top: 8px; overflow: visible; }
.sc-focus { fill: #f2eefb; }
.sc-grid { stroke: #e9e6ed; stroke-width: 1; }
.sc-line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.sc-line.sc-seg { stroke: var(--purple); }
.sc-line.sc-mot { stroke: #c07a2e; }
.sc-dots circle { stroke: var(--surface); stroke-width: 2; }
.sc-dots.sc-seg circle { fill: var(--purple); }
.sc-dots.sc-mot circle { fill: #c07a2e; }
.sc-y-tick { fill: #918b99; font-size: 10px; text-anchor: end; }
.sc-x-ticks { fill: #918b99; font-size: 10px; text-anchor: middle; }
.sc-axis-title { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.motion-takeaway { margin: 0 26px; padding: 16px 0 18px; border-top: 1px solid var(--line-soft); }
.motion-takeaway p { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.motion-takeaway strong { color: var(--purple); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.motion-takeaway span { color: var(--body); white-space: nowrap; }
.motion-takeaway b { color: var(--purple-deep); font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* Procedural data ---------------------------------------------------------- */
.pr-count { margin-bottom: 10px; font-size: 13px; color: var(--muted); }
.pr-count strong { color: var(--ink); font-weight: 650; margin-right: 3px; }
.procedural { margin-top: 24px; }
.pr-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 16px; }
.pr-choice { border: 1px solid var(--line); border-radius: 999px; background: var(--surface); padding: 7px 15px; font-size: 12.5px; color: var(--muted); transition: border-color .2s, color .2s; }
.pr-choice:hover { border-color: #c9bfe0; }
.pr-choice[aria-pressed="true"] { border-color: var(--purple); color: var(--purple); font-weight: 600; }
.pr-stage { padding: 20px 24px 22px; box-shadow: var(--shadow); }
.pr-stage .rw-canvas-wrap canvas { height: 420px; max-width: 860px; margin-inline: auto; }
.pr-view-labels { position: absolute; top: 12px; left: 50%; width: min(100%, 860px); transform: translateX(-50%); display: grid; grid-template-columns: 1fr 1fr; pointer-events: none; }
.pr-view-labels span { justify-self: center; padding: 5px 9px; border-radius: 999px; background: rgba(255, 255, 255, .82); box-shadow: 0 1px 5px rgba(48, 32, 64, .08); color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; backdrop-filter: blur(4px); }
.pr-seed-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pr-mode { margin: 0; }
.pr-mode button[disabled] { opacity: .5; cursor: default; }
.pr-seed { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; letter-spacing: .05em; text-transform: uppercase; }
.pr-reroll { display: inline-flex; align-items: center; gap: 9px; border-radius: 9px; background: var(--purple); color: #fff; padding: 9px 16px; font-size: 12.5px; font-weight: 600; transition: background .2s; }
.pr-reroll:hover { background: var(--purple-deep); }
.pr-reroll[disabled] { background: #cfc9da; cursor: default; }
.pr-stage .rw-controls { justify-content: flex-start; }
.pr-stage .rw-drive { flex: 0 1 auto; margin-left: 10px; }
.pr-stage .rw-drive input { flex: 0 1 auto; width: 300px; }
/* Citation ----------------------------------------------------------------- */
.citation-block { margin: 0; padding: 24px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--muted); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Subtle feedback for links and interactive controls. */
.nav-links a, .nav-paper, .authors a, .text-link { transition: color .2s, border-color .2s; }
.metric-switch button, .setting-switch button { transition: background .2s, color .2s; }
@media (hover: hover) and (pointer: fine) {
  .metric-switch button:not([aria-pressed="true"]):hover,
  .setting-switch button:not([aria-pressed="true"]):not(:disabled):hover { background: #f1edf9; color: var(--purple-deep); }
}

/* Footer ------------------------------------------------------------------- */
footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 28px 34px; }
.wordmark { font-weight: 700; font-size: 16px; color: var(--ink); }
.footer-inner p { font-size: 13px; color: var(--muted); }

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1000px) {
  .charts { grid-template-columns: 1fr; gap: 22px; }
  .benchmark-chart + .benchmark-chart { border-left: 0; border-top: 1px solid var(--line-soft); padding: 20px 0 0; }
  .benchmark-bars { min-height: 0; }
  .ambiguity-layout { grid-template-columns: 1fr; }
  .span-split { grid-template-columns: 1fr; gap: 22px; }
  .runtime-axis span:nth-child(4) { display: none; }
  .steps { gap: 20px; }
  .hl { padding: 20px; }
  .hl-value { font-size: 29px; }
  .hl-label { font-size: 14.5px; }
  .nav-links { gap: 18px; font-size: 12.5px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  html { scroll-padding-top: 78px; }
  .nav { height: 62px; gap: 14px; }
  .nav-links { justify-content: flex-start; overflow-x: auto; gap: 16px; font-size: 12px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-brand { font-size: 14px; }
  .nav-paper { font-size: 12.5px; }

  .hero { padding-top: 38px; }
  .hero-brand { gap: 12px; margin-bottom: 16px; }
  .hero-logo { width: 46px; height: 46px; }
  .hero-name { font-size: 48px; }
  .paper-title { font-size: 25px; }
  .desktop-break { display: none; }
  .authors { font-size: 16.5px; gap: 4px 15px; margin-top: 24px; }
  .affiliations { font-size: 14.5px; gap: 4px 20px; margin-top: 12px; }
  .hero-links { gap: 8px; margin: 26px 0 30px; }
  .reslink { padding: 10px 16px; font-size: 13.5px; gap: 8px; }
  .reslink svg { width: 17px; height: 17px; }
  .teaser { padding: 16px; border-radius: 14px; }
  .teaser figcaption { margin-top: 14px; padding-top: 14px; }
  /* The wide figures shrink to fit the screen rather than scrolling sideways;
     readers can pinch-zoom for detail. */

  .summary { padding-top: 28px; }
  .summary-inner { padding-top: 24px; }
  .summary-text { font-size: 16.5px; }
  .highlights { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; }
  .hl { display: grid; grid-template-columns: 38px 1fr; column-gap: 15px; padding: 18px 20px; }
  .hl-icon { grid-row: 1 / span 3; margin-bottom: 0; }
  .hl-value { font-size: 27px; }

  .section { padding-block: 40px; }
  .section-head { margin-bottom: 26px; }
  h2::after { width: 62px; margin-top: 11px; }
  .lead { font-size: 15.5px; }
  .sub-head { margin-top: 40px; font-size: 18.5px; }
  .sub-block { margin-top: 40px; padding-top: 26px; }
  .steps { grid-template-columns: 1fr; gap: 22px; margin-top: 24px; }
  .abstract-body { padding: 20px 20px 22px; font-size: 15.5px; text-align: left; }
  .figure-card { padding: 14px; }
  .qual-toolbar { padding-inline: 12px; }
  .qual-toolbar > span { font-size: 9.5px; }
  .qual-toolbar button { padding: 6px 9px; font-size: 10.5px; }
  .qual-scroll { padding: 10px; }
  .qual-inner { min-width: 760px; }
  .qual-columns { padding-bottom: 8px; font-size: 10.5px; }
  .qual-example { padding-block: 11px 13px; }
  .qual-example > header { padding-bottom: 7px; }
  .qual-example > header h3 { font-size: 12.5px; }
  .qual-example > header span { font-size: 10.5px; }

  .rw-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .rw-picker button { gap: 9px; padding: 6px 10px 6px 6px; font-size: 11.5px; }
  .rw-picker button img { width: 30px; height: 40px; }
  /* Label each stage directly on smaller screens. */
  .rw-figure { padding: 4px 14px 8px; }
  .rw-head { display: none; }
  /* Views across the top, the two panels side by side under them — one column each
     would make every object a full screen of scrolling. */
  .rw-grid { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
  .rw-views { grid-column: 1 / -1; }
  .rw-row { padding: 14px 0 18px; }
  /* The label takes a full flex line, so the cell has to wrap and the images
     carry the height the cell used to set. */
  .rw-cell { flex-wrap: wrap; height: auto; gap: 8px; }
  .rw-cell img { height: 168px; }
  .rw-views img { flex: 1 1 0; width: 0; height: 130px; }
  .rw-cell-label { display: block; flex: 1 0 100%; color: var(--muted); font-size: 10.5px;
       font-weight: 650; letter-spacing: .07em; text-transform: uppercase; text-align: center; }
  .rw-canvas-wrap canvas { height: 300px; }
  .rw-controls { gap: 10px 12px; }
  .rw-drive { flex: 1 1 100%; }

  .results-card { padding: 18px 16px 16px; }
  .results-toolbar { gap: 12px; }
  .metric-switch { width: 100%; }
  .metric-switch button { flex: 1; padding: 9px; font-size: 12px; }
  .metric-unit { width: 100%; margin-left: 0; }
  .setting-controls { flex-direction: column; align-items: flex-start; gap: 10px; }
  .benchmark-gain { margin: 8px 0 14px; }
  .analysis-card { padding: 21px 20px 18px; }
  .runtime-card { grid-template-columns: 1fr; gap: 20px; padding: 21px 20px; }
  .motion-chart-wrap { padding: 20px 16px 12px; }
  .motion-chart-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .states-chart { min-width: 0; }
  .motion-takeaway { margin-inline: 16px; }

  .pr-stage { padding: 14px; }
  .pr-stage .rw-canvas-wrap canvas { height: 330px; }
  .pr-choice { padding: 6px 12px; font-size: 12px; }
  .pr-seed-row { width: 100%; justify-content: space-between; }
  .footer-inner { flex-wrap: wrap; gap: 8px 16px; padding-block: 22px 26px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .hl:hover, .reslink.is-live:hover, .reslink.is-demo:hover { transform: none; }
}
