:root {
  --bg: #ffffff;
  --ink: #171717;
  --muted: #5f6672;
  --line: #d9dde3;
  --soft: #f3f6f8;
  --dark: #15171a;
  --dark-ink: #f7f7f5;
  --accent: #b9352b;
  --accent-2: #0d6076;
  --warm: #f2e3d3;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(23, 23, 23, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.nav {
  width: min(var(--max), calc(100% - 32px));
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 18px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--ink);
}

.section-band {
  padding: 50px 0;
}

.section-band.soft {
  background: var(--soft);
}

.section-band.dark {
  background: var(--dark);
  color: var(--dark-ink);
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.narrow {
  max-width: 860px;
}

.hero {
  padding-top: 56px;
  background: #fbfaf8;
}

.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

.hero-copy {
  max-width: 960px;
  text-align: center;
}

.venue {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.08;
  text-align: center;
}

h3 {
  margin-bottom: 14px;
  font-size: 24px;
}

.subtitle {
  max-width: 820px;
  margin-right: auto;
  margin-left: auto;
  color: #3d444d;
  font-size: 19px;
}

.authors {
  margin-top: 18px;
  color: var(--muted);
}

.authors p {
  margin-bottom: 6px;
}

.author-line {
  color: var(--ink);
  font-size: 18px;
  font-weight: 650;
}

.author-line sup,
.author-notes sup,
.affiliations sup {
  font-size: 0.68em;
  line-height: 0;
}

.author-notes,
.affiliations {
  font-size: 14px;
}

.affiliations {
  margin-bottom: 0;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.button,
button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.button {
  min-height: 42px;
  padding: 9px 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.hero-visual {
  width: min(100%, 980px);
  margin: 0 auto;
}

.hero-visual img,
.method-grid figure,
.wide-figure,
.video-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.hero-visual img {
  width: 100%;
}

.hero-visual figcaption {
  text-align: center;
}

figcaption {
  color: var(--muted);
  font-size: 14px;
  padding: 12px 14px 14px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.method-grid figure,
.wide-figure {
  margin: 0;
  overflow: hidden;
}

.method-grid img,
.wide-figure img {
  width: 100%;
  background: #ffffff;
}

.wide-figure {
  max-width: 880px;
  margin: 0 auto;
}

.section-head {
  display: block;
  margin-bottom: 26px;
  text-align: center;
}

.section-head h2 {
  white-space: nowrap;
}

.section-head p {
  max-width: 760px;
  margin-right: auto;
  margin-bottom: 0;
  margin-left: auto;
  color: var(--muted);
}

.video-comparison {
  margin-top: 34px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.video-comparison h3 {
  margin-bottom: 16px;
  color: var(--ink);
}

.main-results-figure {
  max-width: 920px;
  margin: 24px auto 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.main-results-figure img {
  width: 100%;
  background: #ffffff;
}

.main-results-figure figcaption {
  color: #5f6672;
  text-align: center;
}

.correction-comparison {
  margin-top: 58px;
}

.video-grid {
  display: grid;
  gap: 18px;
  align-items: center;
  min-width: 920px;
}

.grid-three {
  grid-template-columns: 118px repeat(3, minmax(0, 1fr));
}

.grid-two {
  grid-template-columns: 118px repeat(2, minmax(0, 1fr));
  min-width: 700px;
}

.grid-head,
.task-label {
  color: var(--ink);
  font-weight: 800;
}

.grid-head {
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.task-head,
.task-label {
  text-align: left;
}

.task-label {
  min-height: 100%;
  display: flex;
  align-items: center;
  padding: 10px 0;
  color: var(--accent);
  font-size: 15px;
}

.video-grid video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000000;
  object-fit: cover;
}

.split {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(260px, 1fr);
  gap: 32px;
  align-items: start;
}

.download-list {
  display: grid;
  gap: 10px;
}

.download-list a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  font-weight: 700;
  background: #ffffff;
}

pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
  color: #111111;
  line-height: 1.45;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 14px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
}

.footer p {
  margin: 0;
}

@media (max-width: 880px) {
  .method-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .section-band {
    padding: 54px 0;
  }

  .hero {
    padding-top: 42px;
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .nav {
    width: min(100% - 22px, var(--max));
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button {
    width: 100%;
  }

  figcaption {
    font-size: 13px;
  }
}
