:root {
  --gaussian-teal: #0f766e;
  --action-color: #1f2a44;
  --link-blue: #1677be;
  --ink: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --soft-line: #eceff1;
  --surface: #ffffff;
  --surface-muted: #f7f9fa;
  --best-red: #d93025;
  --rank-blue: #1a73e8;
  --good-green: #188038;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #ffffff; color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.68; }
.gaussian-shell { width: min(1120px, 100%); margin: 0 auto; padding: 42px 28px 72px; }

.publication-header { max-width: 1060px; margin: 0 auto; padding: 18px 0 48px; text-align: center; }
.eyebrow { display: none; }
h1, h2, h3 { color: var(--ink); }
h1 { max-width: 1000px; margin: 0 auto 28px; font-size: clamp(2.1rem, 4vw, 3.35rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.16; }
.title-accent { background: linear-gradient(135deg, #1f2a44 0%, #155e75 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: #155e75; font-weight: 700; }
h2 { display: inline-block; margin: 0 0 22px; padding-bottom: 8px; border-bottom: 2px solid var(--gaussian-teal); font-size: clamp(1.65rem, 2.8vw, 2rem); font-weight: 600; letter-spacing: -.02em; }
h3 { margin: 0 0 12px; font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 16px; }
.authors { max-width: 900px; margin: 0 auto 8px; color: var(--link-blue); font-size: 1.06rem; font-weight: 400; }
.affiliation { margin: 0; color: var(--ink); font-size: 1rem; }
.resource-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.paper-link { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border: 0; border-radius: 14px; background: #1f2a44; box-shadow: 0 4px 8px rgb(31 42 68 / .24); color: #fff; font-size: 1rem; font-weight: 600; text-decoration: none; transition: background .18s ease, box-shadow .18s ease, transform .18s ease; }
.paper-link:hover, .paper-link:focus-visible { background: #162036; box-shadow: 0 6px 12px rgb(31 42 68 / .28); color: #fff; transform: translateY(-2px); }
.github-icon { width: 17px; height: 17px; }
.arxiv-icon { width: 17px; height: 17px; fill: currentColor; }

.research-section { padding: 52px 0; }
.research-section + .research-section { border-top: 1px solid var(--soft-line); }
.paper-card { max-width: 1000px; margin: 0 auto; padding: 0; background: transparent; box-shadow: none; }
.template-section > .paper-card > h2, #experiments > h2 { text-align: left; }
.abstract-card > p, .comparison-card > p, .method-card > p, .experiment-card > p, .samples-card > p { color: var(--muted); }
.abstract-card > p, .comparison-card > p, .method-card > p { font-size: 1.04rem; line-height: 1.8; }
#abstract { width: auto; margin-left: 0; padding: 52px 0; border: 0; background: transparent; }
#abstract .paper-card { max-width: 920px; }
#abstract p { color: var(--ink); font-size: 1.05rem; line-height: 1.82; text-align: justify; }
#abstract h2::after, .template-section > .paper-card > h2::after, #experiments > h2::after { content: none; }

#experiments > h2 { margin-bottom: 32px; }
.experiment-card { max-width: 1080px; }
.experiment-card + .experiment-card { margin-top: 54px; padding-top: 44px; border-top: 1px solid var(--soft-line); }
.experiment-card > h3 { color: var(--ink); }
.result, .best-cell { color: var(--best-red); font-weight: 700; }

figure { margin: 26px 0 0; padding: 0; background: transparent; box-shadow: none; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--soft-line); }
figcaption { padding: 10px 2px 0; color: var(--muted); font-size: .92rem; line-height: 1.5; text-align: center; }

.table-wrap { margin: 24px 0 0; overflow-x: auto; border: 1px solid var(--line); background: #fff; box-shadow: none; }
.results-table { width: 100%; min-width: 760px; border-collapse: collapse; color: var(--ink); font-size: .82rem; line-height: 1.45; }
.results-table caption { padding: 12px 16px; color: var(--muted); text-align: center; }
.results-table th, .results-table td { padding: 11px 12px; border-top: 1px solid var(--soft-line); text-align: center; white-space: nowrap; }
.results-table thead th { background: var(--surface-muted); color: var(--ink); font-weight: 600; }
.results-table tbody th { background: #fff; font-weight: 600; text-align: left; }
.split-header { position: relative; min-width: 168px; height: 76px; overflow: hidden; }
.split-header::after { position: absolute; top: -20%; left: 50%; width: 1px; height: 145%; background: #bdc1c6; content: ""; transform: rotate(-50deg); transform-origin: center; }
.split-header .test-label { position: absolute; top: 10px; right: 12px; }
.split-header .train-label { position: absolute; bottom: 10px; left: 12px; }
.bpr-results-table { min-width: 700px; }
.bpr-results-table tbody th { text-align: center; }
.toggle-on { color: var(--good-green); font-size: 1.15em; font-weight: 700; }
.toggle-off { color: var(--best-red); font-size: 1.15em; font-weight: 700; }
.rank-best { color: var(--best-red); font-weight: 700; }
.rank-second { color: var(--rank-blue); font-weight: 700; }

.carousel-stage { position: relative; margin-top: 24px; outline: none; }
.carousel-surface { min-height: 360px; }
.carousel-surface h4 { margin: 0 0 12px; color: var(--ink); font-size: 1.16rem; font-weight: 600; text-align: center; }
#ood-results > h4 { margin: 24px 0 12px; color: var(--ink); font-size: 1.16rem; font-weight: 600; text-align: center; }
.carousel-control { position: absolute; top: 50%; z-index: 1; width: 46px; height: 46px; border: 1px solid var(--action-color); border-radius: 50%; background: var(--action-color); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.carousel-control:hover, .carousel-control:focus-visible { border-color: #162036; background: #162036; }
.carousel-control.previous { left: -22px; transform: translateY(-50%); }
.carousel-control.next { right: -22px; transform: translateY(-50%); }
.qualitative-stage { max-width: 940px; margin: 24px auto 0; }
.qualitative-stage .carousel-surface { min-height: 0; }

.sample-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.sample-comparison { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: #fff; box-shadow: none; }
.sample-viewport { --comparison-position: 50%; position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-muted); user-select: none; }
.sample-image, .sample-gt-layer img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sample-gt-layer { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--comparison-position)); }
.sample-comparison.sample-crop-top .sample-image, .sample-comparison.sample-crop-top .sample-gt-layer img { object-position: center 25%; }
.sample-label { position: absolute; top: 8px; z-index: 1; padding: 3px 7px; border-radius: 3px; background: rgb(32 33 36 / .84); color: #fff; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.sample-label.blur { left: 8px; }
.sample-label.gt { right: 8px; }
.sample-divider { position: absolute; top: 0; bottom: 0; left: var(--comparison-position); z-index: 2; width: 2px; background: #fff; box-shadow: 0 0 0 1px rgb(32 33 36 / .18); transform: translateX(-50%); pointer-events: none; }
.sample-divider::after { content: '\2194'; position: absolute; top: 50%; left: 50%; display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--action-color); color: #fff; font-size: .95rem; transform: translate(-50%, -50%); }
.sample-slider { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; appearance: none; opacity: 0; cursor: ew-resize; }
.sample-slider:focus-visible { opacity: 1; outline: 3px solid var(--link-blue); outline-offset: -3px; }
.sample-name { margin: 0; padding: 9px 10px; color: var(--muted); font-size: .84rem; text-align: center; }

.page-footer { margin-top: 12px; padding: 28px 0 0; border-top: 1px solid var(--soft-line); color: var(--muted); font-size: .9rem; text-align: center; }
.page-footer a { color: var(--link-blue); text-decoration: none; }
.page-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .gaussian-shell { padding: 28px 16px 52px; }
  .publication-header { padding: 8px 0 34px; }
  h1 { font-size: clamp(2rem, 9vw, 2.7rem); }
  .research-section, #abstract { padding: 38px 0; }
  .sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .carousel-control { top: auto; bottom: -20px; width: 42px; height: 42px; }
  .carousel-control.previous { left: calc(50% - 48px); transform: none; }
  .carousel-control.next { right: calc(50% - 48px); transform: none; }
  .carousel-stage { padding-bottom: 42px; }
}

@media (max-width: 480px) {
  .resource-links { display: grid; grid-template-columns: 1fr; }
  .paper-link { justify-content: center; }
  .sample-grid { grid-template-columns: 1fr; }
  .results-table { font-size: .75rem; }
}
