:root {
  color-scheme: light;
  --ink: #192e29;
  --muted: #4d6059;
  --paper: #f7f7f1;
  --line: #d7ded5;
  --green: #155a49;
  --mint: #e8f1e9;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--sans); }
html { scroll-behavior: smooth; }
a { color: var(--green); text-underline-offset: .22em; }
img, video { display: block; max-width: 100%; }
figure, h1, h2, h3, p, dl, dd { margin: 0; }
select { font: inherit; }
:focus-visible { outline: 3px solid #12785d; outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; z-index: 4; top: .75rem; left: .75rem; padding: .5rem 1rem; background: #fff; transform: translateY(-175%); }
.skip:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.topbar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; min-height: 64px; gap: clamp(1rem, 3vw, 2rem); }
.wordmark, nav a { color: var(--ink); text-decoration: none; }
.wordmark { display: inline-flex; gap: .75rem; align-items: center; font-weight: 750; }
.mark { display: block; width: 14px; height: 14px; background: var(--green); border-radius: 3px; transform: rotate(-15deg); box-shadow: 5px 3px 0 #a6c8ad; }
.topbar > nav { display: flex; justify-content: flex-end; gap: clamp(.8rem, 3vw, 2rem); font-size: .875rem; }
nav a:hover, .footer a:hover { color: var(--green); text-decoration: underline; }
.project-links { position: relative; z-index: 3; font-size: .875rem; }
.project-links summary { padding: .36rem .7rem; border: 1px solid var(--line); border-radius: 7px; color: var(--green); font-weight: 650; cursor: pointer; white-space: nowrap; }
.project-links summary:hover, .project-links[open] summary { background: var(--mint); }
.project-links nav { position: absolute; top: calc(100% + .4rem); right: 0; display: grid; min-width: 10rem; padding: .3rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 8px 24px #192e291a; }
.project-links nav a { padding: .42rem .65rem; border-radius: 5px; }
.project-links nav a:hover { background: var(--mint); }

.hero { padding-top: clamp(2.65rem, 6vw, 4.35rem); }
.hero-copy { max-width: 985px; margin: 0 auto clamp(2rem, 4.5vw, 3rem); text-align: center; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; }
h1 { margin: 1rem 0 1.25rem; }
h1 strong { display: block; margin-bottom: .13em; font-size: clamp(2.96rem, 7.2vw, 5.12rem); font-weight: 650; line-height: .93; letter-spacing: -.075em; }
h1 > span { display: block; font-size: clamp(1.4rem, 3.52vw, 3rem); letter-spacing: -.045em; }
.authors { display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: .25rem 1.35rem; margin: 0; padding: 0; list-style: none; font-size: clamp(1.104rem, 2.4vw, 1.32rem); font-weight: 650; }
.authors li { white-space: nowrap; }
.authors a { text-decoration-color: #a6c8ad; }
.authors a:hover { text-decoration-color: currentColor; }
.authors sup { position: relative; top: -.45em; vertical-align: baseline; line-height: 0; }
.affiliation { margin-top: .2rem; color: var(--muted); font-size: 1.395rem; }
.contribution-note { margin: .15rem 0 .9rem; color: var(--muted); font-size: .82rem; }
.actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .55rem; margin-top: 1.55rem; }
.button { display: inline-flex; align-items: center; gap: .65rem; padding: .58rem 1.15rem; border: 1px solid #c8d4ca; border-radius: 999px; color: var(--ink); font-size: .9rem; font-weight: 650; text-decoration: none; }
.button:hover { background: var(--mint); }
.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.primary:hover { background: var(--green); }

.showcase { background: #172e28; border-radius: 24px; padding: clamp(.65rem, 1.7vw, 1.2rem); color: #f3f8f3; }
.hero-media { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 26%); gap: clamp(.85rem, 2vw, 1.5rem); }
.comparison { --split: 48%; position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 832 / 464; border-radius: 13px; background: #30443d; }
.comparison img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.comparison .before { clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.comparison input { appearance: none; position: absolute; z-index: 2; inset: 0; margin: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.comparison input::-webkit-slider-thumb { appearance: none; width: 1px; height: 26px; }
.comparison input::-moz-range-thumb { width: 1px; height: 26px; border: 0; }
.comparison:has(input:focus-visible) { outline: 3px solid #389a76; outline-offset: 4px; }
.image-tag { position: absolute; top: .75rem; border-radius: 6px; padding: .25rem .57rem; background: #122721ed; color: #fff; font-size: clamp(.67rem, 2.6vw, .85rem); font-weight: 650; }
.before-tag { left: .75rem; }
.after-tag { right: .75rem; background: #edf5ea; color: #193c2f; }
.divider { position: absolute; top: 0; bottom: 0; left: var(--split); display: grid; width: 2px; place-items: center; transform: translateX(-50%); background: #fff; }
.divider span { position: absolute; display: grid; place-items: center; width: 42px; height: 42px; border: 2px solid #fff; border-radius: 50%; background: #1b392f; color: #fff; font-size: 1.1rem; font-weight: 700; }
.references { align-self: center; padding: .35rem 0; }
.references p { margin-bottom: .65rem; font-size: .72rem; font-weight: 650; letter-spacing: .11em; text-transform: uppercase; color: #cfdfd2; }
.references div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.references img { width: 100%; height: auto; aspect-ratio: 1.28; object-fit: cover; border-radius: 7px; }
.showcase figcaption { padding: .8rem .15rem .05rem; color: #dce9df; font-size: .83rem; }

.section { padding-block: clamp(3rem, 7.5vw, 6rem); }
h2 { font-size: clamp(2.4rem, 5.4vw, 4.15rem); letter-spacing: -.05em; }
h3 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
.text-section { max-width: 760px; }
.text-section h2, .video-section h2 { text-align: center; margin-bottom: 1.4rem; }
.text-section p, .section-intro p, .method-grid p, .downstream-card p, .nvs p { color: var(--muted); }
.text-section p { font-size: clamp(1rem, 2vw, 1.14rem); }
.section-intro { max-width: 760px; margin-bottom: 1.6rem; }
.section-intro p { margin-top: .75rem; font-size: clamp(1rem, 2vw, 1.12rem); }
.video-section { color: #f3f8f3; background: #172e28; }
.video-section .shell { max-width: 930px; }
video { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #111b17; }
.video-link { margin-top: .8rem; text-align: right; font-size: .875rem; }
.video-link a { color: #e1f0e4; }
.paper-figure { overflow: hidden; padding: clamp(.45rem, 2vw, 1.2rem); border: 1px solid var(--line); border-radius: 14px; background: white; }
.paper-figure a { display: block; }
.paper-figure img { width: 100%; height: auto; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2rem); margin-top: 1.6rem; }
.method-grid article { padding-top: 1rem; border-top: 3px solid #a6c8ad; }
.method-grid p, .downstream-card h3 + p { margin-top: .65rem; }

.result-section { background: #edf1e9; border-block: 1px solid #dde4da; }
.result-card { border: 1px solid var(--line); border-radius: 16px; padding: clamp(.85rem, 2.7vw, 1.6rem); background: #fff; }
.controls { display: flex; flex-wrap: wrap; gap: .8rem 1.2rem; padding-bottom: 1rem; }
.controls label { display: grid; gap: .25rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
.controls select { width: min(100%, 23rem); min-height: 42px; border: 1px solid #a8bbad; border-radius: 7px; padding: .38rem 2rem .38rem .58rem; color: var(--ink); font-size: .92rem; background: #f7faf6; }
.gallery-comparison { width: min(100%, 720px); margin-inline: auto; aspect-ratio: 3 / 2; }
.note { margin-top: .8rem; color: var(--muted); font-size: .82rem; }
.quantitative { margin-top: clamp(2.3rem, 5vw, 4rem); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 490px; border-collapse: collapse; font-size: .92rem; font-variant-numeric: tabular-nums; }
caption { padding-bottom: .45rem; color: var(--muted); font-size: .83rem; text-align: left; }
th, td { border-bottom: 1px solid #e3e8e1; padding: .56rem clamp(.5rem, 1.4vw, 1rem); text-align: right; }
th:first-child { text-align: left; }
thead th { background: #f1f4ee; }
tbody th { font-weight: 550; }
.corest-row { color: #0d4938; background: #e6f3e8; font-weight: 750; }
.corest-row th { font-weight: inherit; }
.downstream-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.downstream-card dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 1.5rem; padding-top: 1.2rem; }
.downstream-card dl div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.downstream-card dt { font-weight: 650; }
.downstream-card dd { font-size: clamp(1rem, 2.6vw, 1.6rem); font-variant-numeric: tabular-nums; }
.downstream-card dd span { color: var(--muted); }
.downstream-card strong { color: var(--green); }
.downstream-examples { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.15rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.downstream-examples figcaption { margin-bottom: .45rem; font-size: .9rem; font-weight: 650; }
.figure-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.figure-scroll a { display: block; min-width: 720px; }
.figure-scroll a:focus-visible { outline-offset: -3px; }
.figure-scroll img { width: 100%; height: auto; }
.section-intro .figure-scroll-hint { display: none; font-size: .85rem; }
.downstream-examples .note { margin-top: 0; }
.nvs { margin-top: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: 14px; }
.nvs p, .nvs figure { margin-top: .9rem; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; padding-block: 1.4rem 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.footer a { text-decoration: none; }

@media (max-width: 740px) {
  .shell { width: calc(100% - 36px); }
  .hero-media { grid-template-columns: 1fr; }
  .references { padding: 0 .1rem; }
  .references div { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .references img { aspect-ratio: 1.5; }
  .method-grid { grid-template-columns: 1fr; }
}

@media (max-width: 830px) {
  .section-intro .figure-scroll-hint { display: block; }
}

@media (max-width: 550px) {
  .topbar { grid-template-columns: 1fr auto; padding-block: .65rem; gap: .55rem 1rem; }
  .topbar > nav { grid-area: 2 / 1 / 3 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .project-links { grid-area: 1 / 2; }
  .downstream-card dl { grid-template-columns: 1fr; }
}

@media (max-width: 450px) {
  .wide-break { display: none; }
  .controls label:nth-child(2) { min-width: 0; }
  .gallery-comparison .divider span { width: 35px; height: 35px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
