:root {
  /* Base surfaces (page tone locked to the published identity) */
  --page: #fbfaf7;
  --surface: #ffffff;
  --surface-alt: #f3eff8;
  --ink: #221f28;
  --ink-soft: #4a4653;
  --muted: #77737f;
  --line: #e8e2f0;
  --line-dark: #d6cee2;

  /* Soft pastel accents (aqua + violet are part of the locked identity) */
  --accent-aqua: #9fe8e5;
  --accent-violet: #b8b9ff;
  --accent-orchid: #e5c8f4;
  --accent-ink: #6f57a8;

  /* Creamy signature palette — lavender · butter yellow · cream green */
  --lav-soft: #c9b8ea;
  --lav: #9b7fd4;
  --iris-bright: #8b6fc4;
  --iris: #6f57a8;
  --lav-deep: #6f57a8;
  --green-soft: #aed3a0;
  --green: #7aa86f;
  --green-deep: #57854f;
  --yellow-soft: #f4dc94;
  --yellow: #ecc766;
  --yellow-deep: #a97f28;
  /* legacy aliases kept so existing references resolve to the creamy palette */
  --magenta: #8b6fc4;
  --fuchsia: #c9b8ea;
  --pink: #ecc766;
  --cyan: #7aa86f;
  --cyan-bright: #84b578;
  --teal: #57854f;

  --grad: linear-gradient(115deg, #9b7fd4 0%, #c9b8ea 26%, #f0d78a 60%, #a4cf94 100%);
  --grad-ink: linear-gradient(110deg, #6f57a8 0%, #7e72ac 45%, #57854f 100%);
  --grad-soft: linear-gradient(120deg, #efe8fb, #fbf3dd 55%, #e8f4e0);

  --best: #dcefd3;
  --second: #fbeec6;
  --wide: min(1480px, calc(100vw - 64px));
  --figure: min(1040px, calc(100vw - 64px));
  --reading: min(850px, calc(100vw - 48px));
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Baskerville, Georgia, serif;
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shadow: 0 18px 55px rgba(40, 36, 50, 0.08);
  --shadow-color: 0 24px 55px rgba(139, 111, 196, 0.20);
  --ease: cubic-bezier(.2, .75, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--page);
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: clamp(19px, calc(17px + 0.25vw), 21px);
  line-height: 1.65;
  letter-spacing: -.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: rgba(139, 111, 196, .24); color: var(--ink); }
body::selection { background: rgba(139, 111, 196, .24); color: var(--ink); }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
a { color: inherit; }
figure, h1, h2, h3, p, pre { margin-top: 0; }
h1, h2, h3, strong { color: var(--ink); }
.wide-shell, .nav-shell { width: var(--wide); margin-inline: auto; }
.reading-shell { width: var(--reading); margin-inline: auto; }
.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; z-index: 1000; top: 12px; left: 12px; padding: 10px 16px;
  border-radius: 999px; background: var(--lav-deep); color: #fff; font-size: .85rem;
  font-weight: 700; text-decoration: none; transform: translateY(-150%);
}
.skip-link:focus { transform: none; }
:focus-visible { outline: 3px solid rgba(139, 111, 196, .6); outline-offset: 4px; }

/* Shared spectrum treatment for signature type */
.section-kicker,
.table-heading span,
.contribution-list span,
.method-steps span {
  background-image: var(--grad-ink);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Scrollbars */
* { scrollbar-color: rgba(139, 111, 196, .5) rgba(139, 111, 196, .1); }

/* Navigation */
.site-header {
  position: sticky; z-index: 100; top: 0; border-bottom: 1px solid transparent;
  background: rgba(251, 250, 247, .82); backdrop-filter: blur(18px) saturate(140%);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.site-header::before {
  content: ""; position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad);
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 10px 34px rgba(90, 72, 130, .1); }
.nav-shell { display: flex; min-height: 70px; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.02rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; }
.brand-mark {
  width: 23px; height: 23px; border: 1px solid rgba(255,255,255,.7); border-radius: 7px;
  background: conic-gradient(from 140deg, #a4cf94, #9b7fd4, #c9b8ea, #f0d78a, #a4cf94);
  box-shadow: 0 6px 18px rgba(139, 111, 196, .32);
}
.site-nav { display: flex; align-items: center; gap: 25px; font-size: .9rem; font-weight: 650; }
.site-nav a { position: relative; color: #57545f; text-decoration: none; transition: color 150ms ease; }
.site-nav a:not(.nav-paper)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease);
}
.site-nav a:not(.nav-paper):hover { color: var(--ink); }
.site-nav a:not(.nav-paper):hover::after { transform: scaleX(1); }
.site-nav .nav-paper {
  padding: 8px 15px; border: 1px solid transparent; border-radius: 999px; background: var(--grad);
  color: #3a2f14; font-weight: 700; box-shadow: 0 8px 20px rgba(139, 111, 196, .28);
  transition: transform 170ms var(--ease), box-shadow 170ms ease;
}
.site-nav .nav-paper:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(139, 111, 196, .36); }
.nav-toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-dark); border-radius: 50%; background: #fff; }

/* Publication header */
.publication-hero {
  position: relative; overflow: hidden; padding: 76px 0 52px; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 16% 6%, rgba(155,127,212,.28), transparent 30%),
    radial-gradient(circle at 84% 16%, rgba(132,181,120,.26), transparent 32%),
    radial-gradient(circle at 50% 118%, rgba(236,199,102,.26), transparent 42%),
    linear-gradient(160deg, #ffffff 0%, #f7f3fb 46%, #f2f8ee 100%);
}
.publication-hero::before {
  position: absolute; inset: 0; content: ""; pointer-events: none; opacity: .3;
  background-image: linear-gradient(rgba(110,87,168,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(110,87,168,.05) 1px, transparent 1px);
  background-size: 86px 86px; mask-image: linear-gradient(to bottom, #000, transparent 86%);
}
.hero-spectrum {
  position: absolute; top: -340px; left: 50%; width: 780px; height: 560px; border-radius: 50%;
  background: conic-gradient(from 120deg, #a4cf94, #9b7fd4, #c9b8ea, #f0d78a, #a4cf94);
  filter: blur(92px); opacity: .5; transform: translateX(-50%);
  animation: spin-spectrum 26s linear infinite;
}
@keyframes spin-spectrum { to { transform: translateX(-50%) rotate(360deg); } }
.publication-heading { position: relative; z-index: 1; width: min(1180px, calc(100vw - 64px)); text-align: center; }
.publication-status { display: flex; justify-content: center; gap: 22px; margin-bottom: 28px; color: var(--lav-deep); font-size: .86rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.publication-status span + span::before { display: inline-block; width: 26px; height: 1px; margin: 0 22px 4px 0; background: var(--green); content: ""; opacity: .7; }
/* Assembling wordmark — enacts the paper's part-to-whole assembly + refinement.
   Left half = Hemi_L (lavender), right half = Hemi_R (cream green),
   base underline = cerebellar-brainstem CB (butter yellow).
   Parts fly in, meet at a glowing seam, then the whole emerges noisy and denoises. */
.assemble-title {
  margin: 0 auto 14px; font-family: var(--serif); font-size: min(13.5vw, 128px);
  font-weight: 500; letter-spacing: -.045em; line-height: 1;
}
.assemble-stage { position: relative; display: inline-block; padding-bottom: .12em; cursor: default; }
.assemble-whole, .assemble-part {
  display: inline-block; white-space: nowrap;
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.assemble-part {
  position: absolute; top: 0; left: 0; margin: 0; opacity: 0;
  will-change: transform, filter, opacity;
}
.assemble-part-left  { clip-path: inset(-14% 50% -20% -14%); background-image: linear-gradient(120deg, #9b7fd4, #c9b8ea); }
.assemble-part-right { clip-path: inset(-14% -14% -20% 50%); background-image: linear-gradient(120deg, #84b578, #aed3a0); }
.assemble-seam {
  position: absolute; top: 2%; bottom: 22%; left: 50%; width: 3px; border-radius: 3px;
  background: linear-gradient(#9b7fd4, #ecc766, #84b578); opacity: 0;
  transform: translateX(-50%) scaleY(0); transform-origin: center;
  box-shadow: 0 0 20px rgba(155, 127, 212, .55);
}
.assemble-cb {
  position: absolute; left: 50%; bottom: 0; height: 4px; width: 66%; border-radius: 4px;
  background: linear-gradient(90deg, #9b7fd4, #c9b8ea, #ecc766, #84b578);
  transform: translateX(-50%); box-shadow: 0 6px 20px rgba(139, 111, 196, .3);
}
@media (prefers-reduced-motion: no-preference) {
  .assemble-whole { animation: ana-refine 2.8s var(--ease) both; }
  .assemble-part-left  { animation: ana-left 2.4s var(--ease) both; }
  .assemble-part-right { animation: ana-right 2.4s var(--ease) both; }
  .assemble-seam { animation: ana-seam 2.8s var(--ease) both; }
  .assemble-cb { animation: ana-cb 2.8s var(--ease) both; }
  .assemble-title[data-assemble-title] { cursor: pointer; }
}
@keyframes ana-left {
  0%   { transform: translate(-48%, -11%) rotate(-5deg); filter: blur(20px); opacity: 0; }
  20%  { opacity: 1; }
  54%  { transform: translate(0, 0) rotate(0); filter: blur(3px); opacity: 1; }
  70%  { filter: blur(0); opacity: 1; }
  100% { transform: translate(0, 0) rotate(0); filter: blur(0); opacity: 0; }
}
@keyframes ana-right {
  0%   { transform: translate(48%, 11%) rotate(5deg); filter: blur(20px); opacity: 0; }
  20%  { opacity: 1; }
  54%  { transform: translate(0, 0) rotate(0); filter: blur(3px); opacity: 1; }
  70%  { filter: blur(0); opacity: 1; }
  100% { transform: translate(0, 0) rotate(0); filter: blur(0); opacity: 0; }
}
@keyframes ana-refine {
  0%, 48%  { opacity: 0; filter: blur(13px); }
  60%      { opacity: 1; filter: blur(7px); }
  100%     { opacity: 1; filter: blur(0); }
}
@keyframes ana-seam {
  0%, 38%  { transform: translateX(-50%) scaleY(0); opacity: 0; }
  50%      { transform: translateX(-50%) scaleY(1); opacity: .95; }
  64%      { opacity: .75; }
  100%     { transform: translateX(-50%) scaleY(1); opacity: 0; }
}
@keyframes ana-cb {
  0%, 42%  { width: 0; opacity: 0; }
  58%      { width: 40%; opacity: 1; }
  100%     { width: 66%; opacity: 1; }
}
.paper-subtitle { max-width: 1180px; margin: 0 auto 36px; color: var(--ink); font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 400; line-height: 1.12; letter-spacing: -.025em; }
.authors { margin-bottom: 12px; color: #38353f; font-size: clamp(1.05rem, 1.35vw, 1.3rem); font-weight: 600; line-height: 1.65; }
.authors sup, .affiliations sup, .author-note sup { color: var(--lav-deep); font-size: .68em; font-weight: 800; }
.affiliations { margin-bottom: 9px; color: #6a6772; font-size: clamp(.98rem, 1.15vw, 1.15rem); }
.author-note { margin-bottom: 32px; color: #8a8791; font-size: clamp(.9rem, 1vw, 1rem); }
.resource-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.resource-links a {
  display: inline-flex; min-height: 46px; align-items: center; gap: 10px; padding: 10px 18px;
  border: 1px solid var(--line-dark); border-radius: 999px; background: rgba(255,255,255,.78);
  color: var(--ink); font-size: .9rem; font-weight: 700; text-decoration: none;
  transition: transform 170ms var(--ease), border-color 170ms ease, box-shadow 170ms ease;
}
.resource-links a:hover { transform: translateY(-2px); border-color: var(--iris-bright); box-shadow: 0 12px 26px rgba(139,111,196,.18); }
.resource-icon { width: 17px; height: 17px; flex: none; }
.resource-links .resource-primary { border-color: transparent; background: var(--grad); color: #33290f; box-shadow: 0 12px 30px rgba(139,111,196,.3); }
.resource-links .resource-primary:hover { border-color: transparent; box-shadow: 0 16px 36px rgba(139,111,196,.4); }
.hero-summary { max-width: 900px; margin: 37px auto 0; color: #59565f; font-family: var(--serif); font-size: clamp(1.35rem, 1.9vw, 1.7rem); font-weight: 400; line-height: 1.48; }

/* Shared paper structure */
.paper-section { padding: 64px 0; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 32px; text-align: center; }
.section-kicker { margin-bottom: 13px; font-size: .85rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.section-heading .section-kicker::after {
  content: ""; display: block; width: 48px; height: 3px; margin: 14px auto 0; border-radius: 3px; background: var(--grad);
}
.section-heading h2, .abstract-section h2, .limitations-section h2, .future-section h2, .citation-section h2 {
  margin-bottom: 23px; font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 4.15rem);
  font-weight: 400; letter-spacing: -.035em; line-height: 1.06;
}
.section-heading > p:last-child { max-width: 760px; margin: 0 auto; color: #62606a; font-size: 1.15rem; }

/* Paper figures */
.teaser-section { padding: 36px 0 52px; background: linear-gradient(180deg, #ffffff, #f7f3fb); }
.paper-figure { width: var(--figure); margin: 0 auto 56px; }
.paper-figure-lead { margin-bottom: 0; }
.figure-link {
  display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; box-shadow: var(--shadow); text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s ease, border-color .3s ease;
}
.figure-link:hover { transform: translateY(-3px); border-color: var(--iris-bright); box-shadow: var(--shadow-color); }
.paper-figure-image { display: block; width: 100%; height: auto; }
.paper-figure-dark .figure-link { padding: 12px; background: #0f0a17; border-color: #241c33; }
.paper-figure figcaption {
  display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 28px; align-items: start;
  padding: 25px 4px 0; color: #5f5d67; font-size: 1.0625rem; line-height: 1.55;
}
.figure-label { color: var(--lav-deep); font-size: .87rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.paper-figure figcaption h2, .paper-figure figcaption h3 { margin-bottom: 8px; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; letter-spacing: -.015em; line-height: 1.25; }
.paper-figure figcaption p { margin-bottom: 0; }
.full-resolution-link { color: var(--lav-deep); font-size: .9rem; font-weight: 730; text-decoration: underline; text-decoration-color: rgba(139,111,196,.4); text-underline-offset: 4px; white-space: nowrap; }

/* Abstract */
.abstract-section { position: relative; isolation: isolate; background: var(--surface-alt); overflow: hidden; }
.abstract-section::before {
  content: ""; position: absolute; z-index: 0; top: -140px; right: -120px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(132,181,120,.2), transparent 68%); pointer-events: none;
}
.abstract-motion {
  position: absolute; inset: 0; z-index: 0; display: grid; place-items: center;
  overflow: hidden; background: transparent; pointer-events: none;
}
.abstract-motion video,
.abstract-motion img {
  position: absolute; top: 50%; left: 50%; display: block;
  max-width: none; height: auto; background: transparent;
  transform: translate(-50%, calc(-50% + 120px));
}
.abstract-motion video { width: min(1100px, 78vw); opacity: .3; }
.abstract-motion img { width: min(540px, 39vw); opacity: .3; }
.abstract-section .section-kicker,
.abstract-section h2 { text-align: left; }
.abstract-section .section-kicker::after {
  content: ""; display: block; width: 48px; height: 3px; margin: 14px 0 0;
  border-radius: 3px; background: var(--grad);
}
.abstract-section h2 { max-width: 760px; margin-inline: 0; }
.abstract-section > .reading-shell { position: relative; z-index: 1; }
.abstract-section > .reading-shell > p:not(.section-kicker) { color: #58565f; font-size: 1.12rem; }
.abstract-section .abstract-lead { color: var(--ink); font-family: var(--serif); font-size: 1.58rem; font-weight: 400; line-height: 1.48; }
.abstract-contributions {
  display: block; column-count: 1; margin: 32px 0 0; padding-left: 1.5rem;
  border: 0; background: transparent; color: #58565f;
  font-size: clamp(1.2rem, 1.6vw, 1.45rem); line-height: 1.68;
}
.abstract-contributions li { padding-left: .45rem; }
.abstract-contributions li + li { margin-top: 1.25rem; }
.abstract-contributions li::marker { color: var(--lav-deep); }
.tldr {
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start;
  margin: 0 0 30px; padding: 16px 20px; border-radius: 14px;
  background: rgba(255,255,255,.72); border: 1px solid var(--line-dark);
  box-shadow: 0 12px 30px rgba(139,111,196,.1);
}
.tldr-label {
  flex: none; margin-top: 2px; padding: 5px 12px; border-radius: 999px; background: var(--grad);
  color: #2a2114; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
}
.tldr p { flex: 1 1 320px; margin: 0; color: var(--ink); font-size: 1.06rem; line-height: 1.55; }
.tldr strong { color: var(--lav-deep); font-weight: 750; }
.contribution-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; border: 1px solid var(--line); background: var(--line); border-radius: 10px; overflow: hidden; }
.contribution-list article {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); align-content: start; gap: 0 16px;
  min-height: 0; padding: 24px 26px 26px; background: #fff; position: relative;
  transition: background 220ms ease;
}
.contribution-list article::before, .method-steps article::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--grad); opacity: 0; transition: opacity 240ms ease;
}
.contribution-list article:hover, .method-steps article:hover { background: #f9f7fc; }
.contribution-list article:hover::before, .method-steps article:hover::before { opacity: 1; }
.contribution-list span, .method-steps span {
  grid-column: 1; grid-row: 1; padding-top: .18rem;
  font-size: .95rem; font-weight: 800; letter-spacing: .04em;
}
.contribution-list h3 {
  grid-column: 2; grid-row: 1; margin: 0; font-family: var(--serif);
  font-size: 1.42rem; font-weight: 400; line-height: 1.15;
}
.contribution-list p { grid-column: 2; margin: 12px 0 0; color: #696772; font-size: 1rem; line-height: 1.55; }

/* Method */
.method-section { position: relative; background: var(--page); overflow: hidden; }
.method-section::before {
  content: ""; position: absolute; top: 40px; left: -140px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,199,102,.18), transparent 68%); pointer-events: none;
}
.method-section > * { position: relative; z-index: 1; }
.method-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: -28px 0 0; border-block: 1px solid var(--line); background: #fff; border-radius: 10px; overflow: hidden; }
.method-steps article {
  display: grid; grid-template-columns: 38px minmax(0, 1fr); align-content: start; gap: 0 16px;
  min-height: 0; padding: 24px 26px 26px; border-left: 1px solid var(--line); position: relative;
  transition: background 220ms ease;
}
.method-steps article:last-child { border-right: 1px solid var(--line); }
.method-steps h3 { grid-column: 2; grid-row: 1; margin: 0; font-family: var(--serif); font-size: 1.42rem; font-weight: 400; line-height: 1.15; }
.method-steps p { grid-column: 2; margin: 12px 0 0; max-width: 34ch; color: #696772; font-size: 1rem; line-height: 1.55; }

/* Results and large native tables */
.results-section { background: linear-gradient(180deg, #ffffff, #f6faf2); }
.table-block { margin: 8px 0 56px; }
.table-heading {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr); gap: 42px;
  align-items: end; margin-bottom: 20px; padding-top: 28px; border-top: 2px solid transparent;
}
.table-heading::before { content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 2px; background: var(--grad); }
.table-heading span { font-size: .84rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.table-heading h3 { margin: 6px 0 0; font-family: var(--serif); font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 400; letter-spacing: -.02em; line-height: 1.15; }
.table-heading > p { margin: 0; color: #65636d; font-size: 1rem; line-height: 1.55; }
.table-key { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 13px; color: #77767e; font-size: .86rem; }
.table-key span { display: inline-flex; align-items: center; gap: 6px; }
.table-key i { display: inline-block; width: 12px; height: 12px; border: 1px solid rgba(20,20,25,.08); border-radius: 3px; }
.key-best { background: var(--best); }
.key-second { background: var(--second); }
.table-scroll {
  overflow-x: auto; border: 1px solid var(--line-dark); border-radius: 8px; background: #fff;
  box-shadow: 0 14px 40px rgba(90, 80, 120, .07);
}
.paper-table {
  width: 100%; min-width: 1780px; border-collapse: separate; border-spacing: 0;
  color: #343139; font-size: 1.0625rem; line-height: 1.28; font-variant-numeric: tabular-nums;
}
.paper-table th, .paper-table td { padding: 15px 17px; border-right: 1px solid #eee7f2; border-bottom: 1px solid #eae3f0; text-align: center; white-space: nowrap; }
.paper-table thead th { background: linear-gradient(180deg, #f4effa, #eee6f6); color: var(--ink); font-weight: 750; }
.paper-table thead tr:first-child th { border-bottom: 1px solid var(--line-dark); font-family: var(--serif); font-size: 1.1rem; font-weight: 400; }
.paper-table thead tr:last-child th { font-size: .94rem; }
.paper-table tbody th { color: var(--ink); font-weight: 690; text-align: left; }
.paper-table th:first-child {
  position: sticky; z-index: 5; left: 0; min-width: 240px; background: #fff; background-clip: padding-box; box-shadow: 1px 0 #ded7ea;
}
.paper-table thead th:first-child { z-index: 7; background: #eee6f6; }
.paper-table tr:last-child > * { border-bottom: 0; }
.paper-table th:last-child, .paper-table td:last-child { border-right: 0; }
.paper-table .ci { display: block; margin-top: 4px; color: #7f7e88; font-size: .9rem; font-weight: 450; }
.method-cite { display: block; margin-top: 3px; color: #8a8592; font-size: .82rem; font-weight: 450; }
.paper-table .best { background: var(--best); color: #3f7a43; font-weight: 760; }
.paper-table .second { background: var(--second); color: #8a6410; font-weight: 720; }
.paper-table .ours-row th:first-child { background: linear-gradient(120deg, #efe8fb, #e9f4e1); color: var(--lav-deep); font-weight: 820; box-shadow: inset 4px 0 0 #8b6fc4, 1px 0 #ded7ea; }
.paper-table .ours-row > th, .paper-table .ours-row > td { border-top: 2px solid var(--iris-bright); }
/* Visual divider between the MedicalNet FID group and the SynthSeg Cohen's |d| group in Table 1 */
.generation-table thead tr:first-child th:nth-child(3),
.generation-table thead tr:last-child th:nth-child(6),
.generation-table tbody td:nth-child(7) { border-left: 2px solid var(--line-dark); }
.ablation-block { margin-top: 64px; }
.ablation-table { min-width: 1390px; }
.ablation-table .group-row th { position: static; padding: 10px 17px; background: #efe8fb; color: var(--lav-deep); box-shadow: none; font-size: .86rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; }
.editing-table-block { margin-top: 64px; margin-bottom: 0; }
.editing-table { min-width: 1510px; }
/* editing table uses rowspan for Region, so the sticky first-column rule mis-pins
   the "Segm. cLDM" method cell on rows without a Region cell — disable sticky here */
.editing-table th:first-child { min-width: 210px; position: static; box-shadow: none; z-index: auto; }
.editing-table thead th:first-child { position: static; }
.editing-table th:nth-child(2) { min-width: 160px; }
.editing-table .region-start > * { border-top: 2px solid var(--line-dark); }

/* Collapsible secondary tables — keep the page light, content stays in the DOM */
.table-collapse { margin-top: 6px; }
.table-collapse > summary {
  display: inline-flex; align-items: center; gap: 10px; width: fit-content; cursor: pointer; list-style: none;
  padding: 11px 18px; border: 1px solid var(--line-dark); border-radius: 999px; background: #fff;
  color: var(--lav-deep); font-size: .88rem; font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.table-collapse > summary::-webkit-details-marker { display: none; }
.table-collapse > summary::before {
  content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px); transition: transform 220ms var(--ease);
}
.table-collapse[open] > summary::before { transform: rotate(-135deg) translateY(-1px); }
.table-collapse > summary:hover { border-color: var(--iris-bright); background: #faf8ff; box-shadow: 0 6px 16px rgba(139,111,196,.12); }
.table-collapse[open] > summary { margin-bottom: 18px; }
.samples-collapse { margin-top: 4px; text-align: center; }
.samples-collapse > summary { display: flex; margin-inline: auto; }

/* Editing */
.editing-section { background: var(--page); }

/* Samples — soft-lit gallery on warm plum */
.samples-section {
  position: relative; padding: 64px 0 56px; border-top: 1px solid #201a30; color: #edeae6;
  background:
    radial-gradient(1100px 520px at 14% -12%, rgba(139,111,196,.42), transparent 60%),
    radial-gradient(920px 520px at 100% 0%, rgba(132,181,120,.36), transparent 56%),
    radial-gradient(760px 640px at 62% 122%, rgba(236,199,102,.3), transparent 60%),
    linear-gradient(180deg, #171226 0%, #120e1f 100%);
}
.samples-section::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: .85; }
.samples-heading { margin-bottom: 43px; text-align: center; }
.samples-heading .section-kicker { -webkit-text-fill-color: currentColor; background: none; color: var(--green-soft); }
.samples-heading h2 { margin-bottom: 18px; color: #fff; font-family: var(--serif); font-size: clamp(2.7rem, 5vw, 4.3rem); font-weight: 400; letter-spacing: -.035em; }
.samples-heading > p:not(.section-kicker):not(.gallery-status) { color: #c2bdc9; }
.gallery-status { margin: 25px 0 0; color: var(--green-soft); font-size: .8rem; font-weight: 740; letter-spacing: .1em; text-transform: uppercase; }
.gallery-viewport { width: 100%; overflow: hidden; }
.gallery-rail {
  display: flex; gap: 22px; overflow-x: auto; padding: 12px max(32px, calc((100vw - min(1320px, 86vw)) / 2)) 32px;
  scroll-padding-inline: max(32px, calc((100vw - min(1320px, 86vw)) / 2)); scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: #8b6fc4 #211a2e;
}
.sample-card {
  flex: 0 0 min(720px, 62vw); overflow: hidden; border: 1px solid #322a44; border-radius: 12px;
  background: #0d0a15; scroll-snap-align: start; box-shadow: 0 30px 80px rgba(28, 18, 48, .5);
}
.sample-meta { display: flex; align-items: center; justify-content: space-between; padding: 18px 21px; border-bottom: 1px solid #241c37; background: linear-gradient(120deg, #1e1730, #181125); }
.sample-meta span { color: #fff; font-family: var(--serif); font-size: 1.2rem; }
.sample-meta p { margin: 0; color: #a29fb4; font-size: .84rem; letter-spacing: .06em; text-transform: uppercase; }
.sample-card img { width: 100%; height: auto; padding: clamp(12px, 2vw, 28px); background: #0d0a15; image-rendering: auto; }
.gallery-controls { display: flex; align-items: center; justify-content: space-between; padding-top: 9px; }
.gallery-controls > p { margin: 0; color: #9a97ab; font-size: .9rem; }
.gallery-controls > div { display: flex; gap: 9px; }
.gallery-controls button { display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid #423a54; border-radius: 50%; background: #211a2e; color: #fff; cursor: pointer; font-size: 1.1rem; transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--ease); }
.gallery-controls button:hover:not(:disabled) { border-color: var(--green-soft); background: #2a2340; transform: translateY(-1px); }
.gallery-controls button:disabled { opacity: .35; cursor: default; }

/* Limitations and citation */
.limitations-section { background: var(--surface-alt); }
.limitations-section h2 { margin-bottom: 42px; }
.limitations-list { border-top: 2px solid transparent; border-image: var(--grad) 1; }
.limitations-list p { display: grid; grid-template-columns: 210px 1fr; gap: 28px; margin: 0; padding: 23px 0; border-bottom: 1px solid var(--line); color: #605e68; }
.limitations-list strong { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; color: var(--lav-deep); }
.citation-section { position: relative; padding: 64px 0; background: linear-gradient(180deg, #ffffff, #f8f5fc); overflow: hidden; }
.citation-grid { display: grid; grid-template-columns: minmax(330px, .72fr) minmax(580px, 1.28fr); gap: 80px; align-items: center; }
.citation-section h2 { margin-bottom: 20px; }
.citation-section p:not(.section-kicker) { max-width: 520px; color: #68666f; }
.citation-links { justify-content: flex-start; margin-top: 27px; }
.bibtex-card { position: relative; overflow: hidden; border: 1px solid #251d38; border-radius: 12px; background: linear-gradient(160deg, #1a1428, #14101f); box-shadow: var(--shadow-color); }
.bibtex-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }
.bibtex-card > div { display: flex; align-items: center; justify-content: space-between; min-height: 59px; padding: 10px 17px; border-bottom: 1px solid #2a2247; color: #b6b2c8; font-size: .74rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.bibtex-card button { min-height: 38px; padding: 0 15px; border: 1px solid transparent; border-radius: 999px; background: var(--grad); color: #33290f; cursor: pointer; font-size: .7rem; font-weight: 700; transition: transform 150ms var(--ease), box-shadow 150ms ease; }
.bibtex-card button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(139,111,196,.4); }
.bibtex-card pre { max-height: 350px; margin: 0; overflow: auto; padding: 25px; color: #e8e6f0; font: .8rem/1.65 "SFMono-Regular", Consolas, monospace; white-space: pre-wrap; }
.bibtex-card > p { min-height: 28px; margin: 0; padding: 0 25px 12px; color: var(--green-soft); font-size: .75rem; }

/* Footer */
.site-footer { position: relative; padding: 48px 0; border-top: 1px solid #251d38; background: linear-gradient(180deg, #120e1f, #0d0a16); color: #9a97ab; }
.site-footer::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: .75; }
.footer-grid { display: grid; grid-template-columns: 1fr auto auto; gap: 60px; align-items: center; }
.footer-brand { color: #fff; }
.footer-grid > div:first-child > p { max-width: 470px; margin: 11px 0 0; font-size: .76rem; }
.footer-links { display: flex; gap: 22px; font-size: .78rem; font-weight: 660; }
.footer-links a { text-decoration: none; transition: color 150ms ease; }
.footer-links a:hover { color: var(--green-soft); }
.footer-logos { display: flex; align-items: center; gap: 18px; }
.footer-logos img { width: auto; object-fit: contain; }
.footer-logos img:first-child { max-width: 54px; max-height: 54px; filter: none; opacity: 1; }
.footer-logos img:last-child { max-width: 160px; max-height: 44px; filter: brightness(0) invert(1); opacity: .9; }

/* Interactive volume viewer (NiiVue) */
.viewer-section {
  position: relative; padding: 64px 0 60px; border-top: 1px solid #201a30; color: #edeae6;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(139,111,196,.4), transparent 60%),
    radial-gradient(820px 480px at 100% 0%, rgba(132,181,120,.32), transparent 56%),
    radial-gradient(700px 560px at 60% 120%, rgba(236,199,102,.26), transparent 60%),
    linear-gradient(180deg, #141024 0%, #100c1c 100%);
}
.viewer-section::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad); opacity: .85; }
.viewer-heading { margin-bottom: 34px; text-align: center; }
.viewer-heading .section-kicker { -webkit-text-fill-color: currentColor; background: none; color: var(--green-soft); }
.viewer-heading h2 { margin-bottom: 16px; color: #fff; font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 3.9rem); font-weight: 400; letter-spacing: -.035em; }
.viewer-heading > p:not(.section-kicker) { color: #bbb7cb; }
.viewer-heading strong { color: #fff; }
.viewer-heading code { padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.09); font-size: .82em; }
.viewer-shell {
  display: grid; grid-template-columns: 210px minmax(0, 520px); gap: 24px; align-items: start; justify-content: center;
}
.viewer-controls, .viewer-viewport { min-width: 0; }
.viewer-chips { display: flex; flex-direction: column; gap: 8px; }
.viewer-chips button {
  width: 100%; padding: 11px 15px; border: 1px solid #3a3358; border-radius: 999px; background: #1c1730; color: #d8d5e6;
  cursor: pointer; font-size: .85rem; font-weight: 650; text-align: left;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms var(--ease);
}
.viewer-chips button:hover { border-color: var(--iris-bright); color: #fff; transform: translateY(-1px); }
.viewer-chips button.is-active { border-color: transparent; background: var(--grad); color: #21172c; font-weight: 760; }
.viewer-stage {
  position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 1; overflow: hidden;
  border: 1px solid #2c2545; border-radius: 14px; background: #0b0817; box-shadow: 0 30px 80px rgba(20,8,40,.5);
}
.viewer-canvas { display: block; width: 100%; height: 100%; outline: none; }
.viewer-status { margin: 12px 0 0; min-height: 1.2em; color: #a7a3bb; font-size: .85rem; text-align: center; }

@media (max-width: 720px) {
  .viewer-section { padding: 78px 0 68px; }
  .viewer-shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .viewer-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viewer-chips button { text-align: center; }
  .viewer-chips button:last-child { grid-column: 1 / -1; }
}

@media (max-width: 1040px) {
  :root { --wide: calc(100vw - 40px); }
  .site-nav { gap: 17px; }
  .paper-figure figcaption { grid-template-columns: 78px 1fr; }
  .full-resolution-link { grid-column: 2; }
  .contribution-list { grid-template-columns: 1fr; }
  .method-steps { grid-template-columns: repeat(2, 1fr); }
  .table-heading { grid-template-columns: 1fr; gap: 15px; }
  .citation-grid { grid-template-columns: 1fr; gap: 50px; }
}

@media (max-width: 820px) {
  :root { --wide: calc(100vw - 30px); --figure: calc(100vw - 30px); --reading: calc(100vw - 34px); }
  .publication-heading { width: calc(100vw - 34px); }
  html { scroll-padding-top: 70px; }
  .nav-shell { min-height: 62px; }
  .nav-toggle { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
  .nav-toggle > span:not(.sr-only) { width: 17px; height: 2px; border-radius: 2px; background: var(--lav-deep); }
  .site-nav {
    position: absolute; top: 62px; right: 15px; left: 15px; display: grid; gap: 2px; padding: 11px;
    border: 1px solid var(--line); border-radius: 12px; background: rgba(251,250,247,.98); box-shadow: var(--shadow);
    opacity: 0; pointer-events: none; transform: translateY(-7px); transition: opacity 160ms ease, transform 160ms var(--ease);
  }
  .site-nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .site-nav a { min-height: 42px; padding: 9px 11px; border-radius: 8px; }
  .site-nav a:not(.nav-paper)::after { display: none; }
  .site-nav .nav-paper { text-align: center; }
  .publication-hero { padding: 56px 0 44px; }
  .publication-status { display: block; }
  .publication-status span { display: block; }
  .publication-status span + span { margin-top: 4px; }
  .publication-status span + span::before { display: none; }
  .paper-subtitle { font-size: clamp(1.45rem, 7vw, 2.15rem); }
  .paper-section { padding: 48px 0; }
  .teaser-section { padding: 24px 0 44px; }
  .paper-figure { margin-bottom: 44px; }
  .method-steps { margin-top: -20px; }
  .sample-card { flex-basis: 88vw; }
  .sample-meta { align-items: flex-start; gap: 8px; }
  .sample-meta p { max-width: 55%; text-align: right; }
  .limitations-list p { grid-template-columns: 1fr; gap: 7px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 720px) {
  .paper-figure figcaption { grid-template-columns: 1fr; gap: 10px; padding-top: 19px; }
  .abstract-motion video {
    width: 165vw; opacity: .3;
  }
  .abstract-motion img {
    width: 78vw; opacity: .3;
  }
  .full-resolution-link { grid-column: auto; margin-top: 5px; }
  .method-steps { grid-template-columns: 1fr; }
  .method-steps article { min-height: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .paper-table { font-size: .95rem; }
  .paper-table th, .paper-table td { padding: 13px 14px; }
  .table-block { margin-bottom: 48px; }
  .ablation-block, .editing-table-block { margin-top: 48px; }
  .gallery-rail { gap: 13px; padding-inline: 15px; scroll-padding-inline: 15px; }
  .sample-card { flex-basis: calc(100vw - 30px); }
  .gallery-controls > p { display: none; }
  .gallery-controls { justify-content: flex-end; }
  .citation-section { padding: 48px 0; }
  .bibtex-card pre { padding: 18px; font-size: .7rem; }
}

@media (max-width: 480px) {
  .authors { font-size: .9rem; }
  .resource-links { display: grid; }
  .resource-links a { width: 100%; justify-content: center; }
  .samples-heading { text-align: left; }
  .sample-meta { display: block; }
  .sample-meta p { max-width: none; margin-top: 5px; text-align: left; }
  .footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
