:root {
  color-scheme: light;
  --ink: #17252a;
  --muted: #5c6970;
  --paper: #fbfcf9;
  --surface: #ffffff;
  --surface-strong: #f0f5f3;
  --line: #d8e0dd;
  --teal: #006d77;
  --teal-dark: #004d56;
  --orange: #d95d39;
  --green: #2f7d32;
  --shadow: 0 22px 70px rgba(23, 37, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 66px;
  padding: 0 28px;
  background: rgba(251, 252, 249, 0.88);
  border-bottom: 1px solid rgba(216, 224, 221, 0.78);
  backdrop-filter: blur(14px);
}

.brand {
  color: var(--teal-dark);
  font-size: 1.05rem;
  font-weight: 800;
  text-decoration: none;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  padding: 8px 12px;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--surface-strong);
  color: var(--ink);
  outline: none;
}

.paper-header {
  padding: clamp(42px, 6vw, 76px) 0 clamp(36px, 5vw, 64px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--orange);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0 auto 16px;
  max-width: 980px;
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 4.1rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.authors {
  max-width: 860px;
  margin: 0 auto 20px;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  font-weight: 650;
}

.action-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
}

.button-link,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #ffffff;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1;
  padding: 0 20px;
  text-decoration: none;
  cursor: pointer;
}

.button-link:hover,
.button-link:focus-visible,
.copy-button:hover,
.copy-button:focus-visible {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  outline: none;
}

.button-link.secondary {
  background: var(--surface);
  color: var(--teal-dark);
}

.button-link.secondary:hover,
.button-link.secondary:focus-visible {
  background: var(--surface-strong);
}

.paper-banner {
  width: min(100%, 520px);
  margin: 0 auto;
  background: var(--surface);
}

.paper-banner img {
  width: 100%;
  border: 1px solid var(--line);
}

.paper-banner figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
}

.section {
  padding: clamp(64px, 9vw, 132px) 0;
}

.section-contrast {
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.section-inner {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
}

.section-inner.narrow {
  width: min(940px, calc(100% - 44px));
}

.section p {
  color: var(--muted);
  font-size: 1.05rem;
}

.section .narrow p {
  font-size: 1.12rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.steps li,
.callout,
.figure-card {
  border-radius: 8px;
}

.steps li {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.steps strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 1.05rem;
}

.steps span {
  display: block;
  color: var(--muted);
  font-size: 0.98rem;
}

.figure-card {
  margin: 0;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.figure-card figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.wide-figure {
  margin-top: 44px;
}

.wide-figure img {
  max-height: 880px;
  object-fit: contain;
}

.result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 28px 0 36px;
}

.result-summary p {
  margin: 0;
  padding-left: 18px;
  border-left: 4px solid var(--teal);
}

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

.figure-grid .figure-card img {
  aspect-ratio: 1.32;
  object-fit: contain;
  padding: 10px;
}

.callout {
  padding: clamp(24px, 4vw, 36px);
  background: var(--teal);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.callout strong {
  display: block;
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.callout span {
  display: block;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
}

.real-world-grid {
  grid-template-columns: 0.8fr 1.2fr;
  margin-top: 36px;
}

.real-world-grid .figure-card img {
  aspect-ratio: 1.32;
}

.real-world-grid .object-fit-contain {
  object-fit: contain;
  object-position: center;
}

.span-two {
  grid-column: 1 / -1;
}

.figure-card .crop-grasps {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: top center;
  padding: 0;
}

.compact-figure img {
  aspect-ratio: 1.3;
  object-fit: cover;
  object-position: center 50%;
  padding: 0;
}

.evaluator-grid {
  grid-template-columns: 0.92fr 1.42fr;
  margin-top: 36px;
}

.evaluator-grid .figure-card img {
  aspect-ratio: 1.45;
}

.site-footer {
  padding: clamp(56px, 8vw, 92px) 22px;
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
}

.citation-block {
  width: min(940px, 100%);
  margin: 0 auto;
}

.citation-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.site-footer .section-kicker {
  color: #ffb05a;
}

.site-footer h2 {
  margin: 0;
  color: #ffffff;
}

.copy-button {
  flex: 0 0 auto;
  background: #ffffff;
  border-color: #ffffff;
  color: var(--teal-dark);
}

.copy-button:hover,
.copy-button:focus-visible {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  color: var(--teal-dark);
}

.site-footer pre {
  margin: 0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  padding: 20px;
  text-align: left;
}

.site-footer code {
  color: rgba(255, 255, 255, 0.9);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .site-header {
    padding: 0 18px;
  }

  .result-summary,
  .figure-grid,
  .real-world-grid,
  .evaluator-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .wide-figure img {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .site-nav a {
    padding: 6px 5px;
    font-size: 0.84rem;
  }

  h1 {
    font-size: clamp(1.45rem, 7.2vw, 2.2rem);
  }

  h2 {
    font-size: clamp(1.82rem, 10vw, 3rem);
  }

  .section-inner,
  .section-inner.narrow {
    width: min(100% - 28px, 1180px);
  }

  .section p,
  .section .narrow p {
    font-size: 1rem;
  }

  .figure-grid .figure-card img,
  .evaluator-grid .figure-card img {
    aspect-ratio: auto;
  }

  .citation-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }
}
