:root {
  --paper-green: #2a817d;
  --paper-purple: #7a5db4;
  --spline-purple: #3d0b73;
  --spline-magenta: #8f1b6d;
  --spline-red: #d63e4b;
  --spline-orange: #f08a24;
  --spline-gold: #f2c94c;
  --heading: #18181b;
  --ink: #333337;
  --muted: #66666e;
  --line: #e2e2e6;
  --surface: #f6f6f7;
  --accent-gradient: linear-gradient(100deg, var(--paper-green) 0%, var(--paper-purple) 100%);
  --spline-gradient: linear-gradient(100deg, var(--spline-purple) 0%, var(--spline-magenta) 34%, var(--spline-red) 58%, var(--spline-orange) 82%, var(--spline-gold) 100%);
  --white: #fff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 20px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4 { color: var(--heading); line-height: 1.25; }
h2 { font-size: 36px; font-weight: 700; margin-bottom: 28px; text-align: center; }
h2::after { content: ''; display: block; width: 72px; height: 4px; margin: 18px auto 0; border-radius: 4px; background: var(--accent-gradient); }
h3 { font-size: 28px; font-weight: 600; margin: 36px 0 18px; }
h4 { font-size: 23px; font-weight: 600; }
p + p { margin-top: 18px; }
strong { font-weight: 600; color: var(--heading); }
a { color: var(--paper-green); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; color: var(--paper-purple); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
button, a, input, select, canvas { outline-offset: 4px; }
:focus-visible { outline: 3px solid #9b87ca; }
img, video { display: block; max-width: 100%; }
img { height: auto; }
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.page-shell {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 28px;
  width: min(1408px, calc(100% - 64px));
  margin-inline: auto;
}
.page-content { min-width: 0; }
.page-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  padding-top: 70px;
  color: var(--muted);
}
.toc-title {
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
}
.toc-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.toc-links a {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
}
.toc-links a:hover {
  color: var(--paper-green);
  text-decoration: none;
}
.math { font-family: Georgia, 'Times New Roman', serif; font-style: italic; }
.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; }
.skip-link { position: fixed; top: -80px; left: 20px; background: #fff; z-index: 100; padding: 10px 18px; }
.skip-link:focus { top: 10px; }

/* A wide, centered academic project page. */
.hero { text-align: center; padding: 70px 0 38px; }
.hero::before { content: ''; display: block; width: 124px; height: 5px; margin: 0 auto 25px; border-radius: 5px; background: var(--accent-gradient); }
.hero h1 { font-size: 64px; font-weight: 800; letter-spacing: -1.5px; color: var(--heading); }
.hero h1 span { color: inherit; }
.hero h1 .title-lie,
.hero h1 .title-spline {
  display: inline-block;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .title-lie { background-image: var(--accent-gradient); }
.hero h1 .title-spline { background-image: var(--spline-gradient); }
.paper-subtitle { font-size: 32px; line-height: 1.35; color: var(--heading); margin: 18px auto 0; font-weight: 500; }
.authors { font-size: 22px; margin-top: 24px; color: var(--ink); }
.hero-links { display: flex; gap: 14px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 24px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 20px; border: 1px solid #cdcdd3; background: #fff; border-radius: 24px; font-size: 18px; line-height: 1.4; color: var(--heading); font-weight: 500; text-decoration: none; }
.button-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; }
.button:hover { background: var(--surface); border-color: #96969f; text-decoration: none; color: var(--heading); }
.hero-links .button, .button.primary { background: var(--heading); border-color: var(--heading); color: #fff; }
.hero-links .button:hover, .button.primary:hover { background: #3b3b42; border-color: #3b3b42; }
.button[aria-disabled="true"] { cursor: default; }
.button.small { font-size: 17px; padding: 7px 16px; }
.resource-pending { color: var(--muted); font-size: 18px; }
.tldr { margin: 30px auto 0; font-size: 21px; max-width: 840px; }
.tldr strong { color: var(--heading); }
.section { padding: 42px 0 48px; border-top: 1px solid var(--line); }
.highlight-section { margin: 28px 0 34px; padding: 42px 34px 48px; border: 1px solid #bfd7d4; border-radius: 8px; background: linear-gradient(135deg, #eef8f6 0%, #edf7f4 34%, #edf4f7 44%, #f1eef9 58%, #f4effb 72%, #f4effb 100%); box-shadow: 0 18px 42px rgba(42, 129, 125, .08); }
.section > p { margin-bottom: 24px; }
.section-heading { margin-bottom: 24px; }
.section-intro { font-size: 20px; margin-top: 18px; }
.note, .figure-note, .table-note { font-size: 18px; color: var(--muted); line-height: 1.6; margin-top: 16px; }

/* Three task columns: LieSpline-DP first, the baseline below. */
.media-toolbar { display: flex; gap: 12px; margin: 26px 0 8px; }
.demo-comparison { margin-top: 28px; }
.demo-row + .demo-row { margin-top: 16px; padding-top: 0; }
.demo-row-label { font-size: 25px; margin: 0 0 18px; }
.demo-videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.media-well { position: relative; aspect-ratio: 16 / 9; background: var(--surface); border-radius: 8px; overflow: hidden; }
.media-well video { width: 100%; height: 100%; object-fit: contain; background: #111; }
.video-switcher { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 24px; margin-top: 10px; }
.video-switch { width: 34px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: transparent; display: inline-flex; align-items: center; justify-content: center; }
.video-switch::before { content: ''; display: block; width: 8px; height: 8px; border-radius: 999px; background: #a5a8b3; transition: width 160ms ease, height 160ms ease, background-color 160ms ease; }
.video-switch:hover::before { background: #6f7482; }
.video-switch.is-active::before { width: 26px; height: 7px; background: var(--heading); }
.video-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(24, 24, 27, .42); color: #fff; font-size: 25px; font-weight: 700; line-height: 1.2; letter-spacing: .04em; text-transform: uppercase; opacity: 0; visibility: hidden; transition: opacity 200ms ease; pointer-events: none; }
.video-done.is-visible { opacity: 1; visibility: visible; }
.video-done-icon { display: block; width: 30px; height: 30px; flex: 0 0 30px; filter: brightness(0) invert(1); }
.demo-videos figcaption, .video-grid figcaption { font-size: 20px; text-align: center; margin-top: 8px; line-height: 1.4; }
.media-placeholder { height: 100%; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px; background: var(--surface); border: 1px dashed #c9c9d0; border-radius: 8px; font-size: 18px; color: var(--muted); }
.media-placeholder strong { color: var(--heading); font-size: 20px; font-weight: 500; }
.media-error { position: absolute; inset: 0; padding: 20px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 12px; background: var(--surface); text-align: center; font-size: 18px; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.reactivity-block { margin-top: 44px; }
.reactivity-block > p { margin-bottom: 24px; }

/* Figures sit directly in the article, without decorative card headers. */
.paper-figure { margin: 28px 0 34px; }
.figure-image { background: #fff; }
.figure-image img { width: 100%; }
.paper-figure figcaption { margin-top: 15px; color: var(--muted); font-size: 18px; line-height: 1.6; text-align: center; }
.figure-expand { font-size: inherit; white-space: nowrap; margin-left: 5px; }
.dataset-figure { width: min(600px, 100%); margin-inline: auto; }
.dataset-figure figcaption { position: relative; left: 50%; width: min(760px, calc(100vw - 64px)); transform: translateX(-50%); }
.interactive-section { margin: 38px 0; scroll-margin-top: 25px; }
.interactive-section > p { margin-bottom: 22px; }
.stitching-frame { display: block; width: 100%; height: 860px; border: 0; background: #fff; }

.results-panel { margin: 26px 0 36px; }
.table-scroll { width: 100%; overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; font-size: 18px; line-height: 1.5; text-align: center; }
.results-table caption { text-align: left; font-size: 20px; color: var(--heading); font-weight: 500; margin-bottom: 16px; }
.results-table th, .results-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.results-table thead { border-top: 2px solid #52525b; border-bottom: 1px solid #b9b9c1; }
.results-table th { font-weight: 500; }
.results-table th:first-child { text-align: left; }
.results-table td { min-width: 160px; }
.results-table .ours-column { background: var(--surface); color: var(--heading); font-weight: 600; }
.results-table .metric-start th, .results-table .metric-start td { border-top: 1.5px solid #b9b9c1; }
.criteria-list, .failure-list { padding-left: 25px; margin: 22px 0; }
.criteria-list li, .failure-list li { padding-left: 4px; margin-bottom: 18px; }
.criteria-list strong, .failure-list strong { color: var(--heading); }
.jerk-block { margin-top: 36px; }
.jerk-figure { margin-top: 26px; }
.jerk-placeholder { display: grid; gap: 20px; }
.jerk-metric { height: 170px; border: 1px dashed #c9c9d0; border-radius: 8px; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 20px; font-size: 20px; color: var(--heading); }
.jerk-metric span { font-size: 18px; color: var(--muted); }
.jerk-figure figcaption { margin-top: 16px; font-size: 18px; color: var(--muted); }
.metric-details { margin-top: 22px; font-size: 18px; }
.metric-details summary { cursor: pointer; color: var(--heading); }
.metric-details summary:hover { color: var(--paper-green); }
.metric-details > div { margin-top: 16px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 42px; font-size: 17px; color: var(--muted); text-align: center; }
.site-footer a { white-space: nowrap; }
.figure-dialog { width: min(1440px, 95vw); max-height: 95vh; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: auto; }
.figure-dialog::backdrop { background: #18181baa; }
.dialog-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; }
.dialog-toolbar h3 { margin: 0 auto 0 0; font-size: 22px; }
.dialog-toolbar a { font-size: 17px; }
.figure-dialog > img { width: auto; height: auto; max-width: 100%; max-height: 81vh; object-fit: contain; padding: 20px; margin: auto; }

@media (max-width: 980px) {
  .page-shell { display: block; width: calc(100% - 36px); }
  .page-toc { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 19px; line-height: 1.6; }
  .wrap { width: calc(100% - 36px); }
  .page-shell { display: block; width: calc(100% - 36px); }
  .page-toc { display: none; }
  .hero { padding-top: 44px; padding-bottom: 30px; }
  .hero h1 { font-size: clamp(42px, 9vw, 60px); letter-spacing: -1px; }
  .paper-subtitle { font-size: 25px; }
  .paper-subtitle br { display: none; }
  .authors { font-size: 21px; margin-top: 22px; }
  .hero-links { gap: 10px; }
  .button { padding: 8px 16px; font-size: 17px; }
  .tldr { font-size: 20px; margin-top: 26px; }
  h2 { font-size: 32px; }
  h3 { font-size: 26px; }
  .section { padding: 30px 0 34px; }
  .highlight-section { margin: 24px 0 30px; padding: 30px 18px 34px; }
  .demo-videos { gap: 16px; }
  .demo-videos figcaption, .video-grid figcaption { font-size: 18px; }
  .video-grid { grid-template-columns: 1fr; gap: 24px; }
  .media-placeholder { font-size: 17px; padding: 14px; }
  .media-placeholder strong { font-size: 18px; }
  .results-table th, .results-table td { padding: 12px 14px; }
  .results-table td { min-width: 135px; }
  .results-table { font-size: 17px; }
  .site-footer { font-size: 16px; }
  .dataset-figure figcaption { width: min(760px, calc(100vw - 36px)); }
}
@media (max-width: 520px) {
  .demo-videos { grid-template-columns: 1fr; gap: 24px; }
  .paper-subtitle { font-size: 24px; }
  .resource-pending { width: 100%; }
  .dialog-toolbar h3 { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .video-done { transition: none; } .video-switch::before { transition: none; } }

/* Paper experiment figures keep their native aspect ratios. */
.experiment-plot { display: block; width: 100%; height: auto; margin-inline: auto; }
 .experiment-figures { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 28px; margin: 26px 0 30px; }
.experiment-figures .jerk-figure { margin: 0; min-width: 0; }
.experiment-plot-frame { height: 100%; display: flex; align-items: center; }
.experiment-figures .jerk-figure { display: grid; grid-template-rows: 1fr auto; }
.experiment-figures figcaption { font-size: 17px; line-height: 1.6; }
@media (max-width: 760px) {
  .experiment-figures { grid-template-columns: 1fr; }
  .experiment-plot-frame { height: auto; }
}

/* Paper-style success comparison with restrained rules and aligned numerals. */
#experiments .results-panel { width: min(100%, 720px); margin: 24px auto 30px; }
#experiments .results-table { font-size: 18px; font-variant-numeric: tabular-nums; border-bottom: 2px solid #52525b; }
#experiments .results-table caption { text-align: center; margin-bottom: 14px; font-size: 18px; }
#experiments .results-table thead { border-top: 2px solid #52525b; border-bottom: 1px solid #b9b9c1; }
#experiments .results-table th, #experiments .results-table td { padding: 12px 16px; border-bottom: 0; }
#experiments .results-table thead th { font-size: 16px; color: var(--muted); white-space: nowrap; }
#experiments .results-table td { min-width: 0; width: 24%; }
#experiments .results-table th:first-child { width: 28%; white-space: nowrap; }
#experiments .results-table .ours-row th, #experiments .results-table .ours-row td { font-weight: 700; color: var(--heading); }
#experiments .table-note { text-align: center; font-size: 15px; margin-top: 12px; }
@media (max-width: 600px) {
  #experiments .results-table { font-size: 16px; }
  #experiments .results-table th, #experiments .results-table td { padding: 10px; }
  #experiments .results-table thead th { font-size: 14px; }
}

.hero .authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-bottom: 18px; }
.authors > span { white-space: nowrap; }
.authors sup, .affiliation sup { font-size: 0.65em; margin-left: 2px; }
.affiliation { display: flex; align-items: center; justify-content: center; gap: 14px; font-size: 21px; }
.affiliation img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.hero .author-notes { margin: 12px 0 22px; color: var(--muted); font-size: 15px; }
@media (max-width: 600px) {
  .affiliation { font-size: 18px; gap: 10px; }
  .affiliation img { width: 34px; height: 34px; }
}
