:root {
  --ink: #18211f;
  --muted: #5d6965;
  --paper: #f6f7f3;
  --white: #ffffff;
  --line: #cad1cd;
  --yellow: #f2c94c;
  --yellow-deep: #d49b00;
  --teal: #147c74;
  --teal-pale: #dcefed;
  --red: #d84a3a;
  --blue-pale: #e8f0f5;
  --max-width: 1180px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("assets/workflow-new.png");
  background-position: center;
  background-size: 1400px auto;
  opacity: 0.018;
}

a {
  color: inherit;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 32px;
  border-bottom: 1px solid rgba(24, 33, 31, 0.16);
  background: rgba(246, 247, 243, 0.94);
  backdrop-filter: blur(14px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.wordmark-mark {
  width: 16px;
  height: 16px;
  border: 4px solid var(--ink);
  background: var(--yellow);
  transform: rotate(45deg);
}

nav {
  display: flex;
  gap: 28px;
}

nav a {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible,
footer a:hover,
footer a:focus-visible {
  color: var(--teal);
}

.hero {
  position: relative;
  display: flex;
  min-height: 92vh;
  align-items: center;
  overflow: hidden;
  background-image: url("assets/teaser.jpg");
  background-position: center;
  background-size: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(246, 247, 243, 0.76);
}

.hero-inner {
  position: relative;
  width: min(var(--max-width), calc(100% - 64px));
  margin: 64px auto 88px;
}

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

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  max-width: 960px;
  margin: 0;
  font-size: 5.6rem;
  line-height: 0.94;
  font-weight: 800;
  letter-spacing: 0;
}

.hero-deck {
  max-width: 780px;
  margin: 28px 0 18px;
  font-family: "IBM Plex Serif", serif;
  font-size: 1.55rem;
  line-height: 1.35;
}

.authors {
  margin: 0 0 30px;
  font-weight: 600;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.action:hover,
.action:focus-visible {
  background: var(--ink);
  color: var(--white);
  transform: translateY(-2px);
}

.action-primary {
  border-color: var(--yellow);
  background: var(--yellow);
}

.hero-caption {
  position: absolute;
  right: 28px;
  bottom: 18px;
  max-width: 540px;
  margin: 0;
  padding: 5px 8px;
  background: rgba(246, 247, 243, 0.88);
  font-size: 0.72rem;
}

.section,
.band-inner {
  width: min(var(--max-width), calc(100% - 64px));
  margin: 0 auto;
  padding: 112px 0;
}

.section-intro {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr;
  gap: 42px 72px;
}

.section-heading h2,
.heading-wide h2,
.demo-copy h2 {
  margin: 0;
  font-size: 3.15rem;
  line-height: 1.04;
  letter-spacing: 0;
}

.section-heading > p:last-child,
.heading-wide > p:last-child {
  max-width: 760px;
  margin: 22px 0 0;
  color: var(--muted);
}

.abstract-copy {
  max-width: 700px;
}

.abstract-copy p {
  margin: 0 0 18px;
}

.abstract-copy .lead {
  margin-top: 0;
  font-family: "IBM Plex Serif", serif;
  font-size: 1.38rem;
  line-height: 1.5;
}

.metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 30px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metrics div {
  padding: 26px 24px;
  border-right: 1px solid var(--line);
}

.metrics div:first-child {
  padding-left: 0;
}

.metrics div:last-child {
  border-right: 0;
}

.metrics dt,
.dataset-stats dt {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}

.metrics dd,
.dataset-stats dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.section-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.method-band {
  background: var(--blue-pale);
}

.heading-wide {
  max-width: 900px;
  margin-bottom: 46px;
}

.publication-figure {
  margin: 0;
}

.publication-figure a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
}

.publication-figure img {
  width: 100%;
  height: auto;
  transition: transform 220ms ease;
}

.publication-figure a:hover img,
.publication-figure a:focus-visible img {
  transform: scale(1.008);
}

.publication-figure figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 62px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.method-steps li {
  min-width: 0;
  padding: 28px 32px 0;
  border-right: 1px solid var(--line);
}

.method-steps li:first-child {
  padding-left: 0;
}

.method-steps li:last-child {
  border-right: 0;
}

.method-steps span {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
}

.method-steps h3,
.table-intro h3 {
  margin: 6px 0 10px;
  font-size: 1.3rem;
  line-height: 1.2;
}

.method-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.results-section {
  padding-bottom: 124px;
}

.figure-results {
  margin-top: 20px;
}

.table-intro {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 40px;
  align-items: end;
  margin-top: 92px;
}

.table-intro p {
  margin: 0;
  color: var(--muted);
}

.table-wrap {
  max-width: 100%;
  margin-top: 28px;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

th:first-child,
td:first-child {
  text-align: left;
}

thead th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

tbody tr:last-child th,
tbody tr:last-child td {
  border-bottom: 0;
}

.ours {
  background: var(--teal-pale);
}

.ours th {
  color: var(--teal);
}

.evidence-band {
  background: var(--white);
}

.figure-radar {
  margin-bottom: 68px;
}

.evidence-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.evidence-grid .publication-figure a {
  aspect-ratio: 2 / 1;
}

.evidence-grid img {
  height: 100%;
  object-fit: contain;
}

.demo-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 72px;
  align-items: end;
}

.demo-copy p:not(.section-kicker) {
  max-width: 700px;
  color: var(--muted);
}

.dataset-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-top: 1px solid var(--line);
}

.dataset-stats div {
  padding: 22px 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dataset-stats div:nth-child(2n) {
  border-right: 0;
}

.citation-section {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 64px;
  border-top: 1px solid var(--line);
}

.citation-block {
  position: relative;
  min-width: 0;
}

pre {
  margin: 0;
  padding: 58px 24px 24px;
  overflow-x: auto;
  border-radius: 4px;
  background: var(--ink);
  color: #edf5f0;
  font-size: 0.76rem;
  line-height: 1.7;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #68736f;
  border-radius: 4px;
  background: transparent;
  color: var(--white);
  font: 600 0.72rem "Archivo", sans-serif;
  cursor: pointer;
}

.copy-button:hover,
.copy-button:focus-visible {
  border-color: var(--yellow);
  color: var(--yellow);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 32px;
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: var(--white);
  font-size: 0.78rem;
}

footer p {
  margin: 0;
}

footer div {
  display: flex;
  gap: 22px;
}

footer a {
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--yellow-deep);
  outline-offset: 3px;
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

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

  nav {
    gap: 16px;
  }

  h1 {
    font-size: 4.1rem;
  }

  .section-intro,
  .demo-section,
  .citation-section {
    grid-template-columns: 1fr;
  }

  .section-intro,
  .demo-section,
  .citation-section {
    gap: 42px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
  }

  .metrics div:nth-child(2) {
    border-right: 0;
  }

  .metrics div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .method-steps {
    grid-template-columns: 1fr;
  }

  .method-steps li,
  .method-steps li:first-child {
    padding: 24px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .method-steps li:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 58px;
  }

  .wordmark {
    font-size: 0.9rem;
  }

  nav a:nth-child(-n + 2) {
    display: none;
  }

  nav {
    gap: 14px;
  }

  nav a {
    font-size: 0.75rem;
  }

  .hero {
    min-height: 88vh;
    background-position: 82% center;
  }

  .hero-inner,
  .section,
  .band-inner {
    width: min(100% - 36px, var(--max-width));
  }

  .hero-inner {
    margin-top: 82px;
  }

  h1 {
    font-size: 3.15rem;
    line-height: 0.96;
  }

  .hero-deck {
    font-size: 1.18rem;
  }

  .authors {
    font-size: 0.85rem;
  }

  .hero-caption {
    right: 18px;
    bottom: 12px;
    left: 18px;
  }

  .section,
  .band-inner {
    padding: 78px 0;
  }

  .section-heading h2,
  .heading-wide h2,
  .demo-copy h2 {
    font-size: 2.2rem;
  }

  .abstract-copy .lead {
    font-size: 1.16rem;
  }

  .metrics dt,
  .dataset-stats dt {
    font-size: 1.5rem;
  }

  .metrics div,
  .metrics div:first-child {
    padding: 20px 10px;
  }

  .table-intro,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .table-intro {
    gap: 18px;
    margin-top: 64px;
  }

  .figure-radar {
    margin-bottom: 46px;
  }

  .action {
    min-height: 44px;
    padding: 0 14px;
  }

  footer {
    flex-direction: column;
    padding: 24px 18px;
  }
}