:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --accent: #7c3aed;
  --ink: #172033;
  --muted: #5b687c;
  --soft-muted: #8792a5;
  --surface: #ffffff;
  --surface-alt: #f7f9fc;
  --border: #dfe5ee;
  --border-strong: #cbd5e1;
  --success-soft: #ecfdf5;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-dark);
}

img {
  height: auto;
  max-width: 100%;
}

sup {
  font-size: 0.65em;
}

section[id] {
  scroll-margin-top: 4.5rem;
}

.container.is-max-desktop {
  max-width: 1120px !important;
}

.narrow-container {
  max-width: 850px !important;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2000;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(223, 229, 238, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.site-nav {
  display: flex;
  min-height: 4rem;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.site-mark {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.site-mark:hover {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
}

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

.project-hero {
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 18%, rgba(37, 99, 235, 0.09), transparent 32%),
    radial-gradient(circle at 88% 8%, rgba(124, 58, 237, 0.07), transparent 30%),
    var(--surface);
}

.project-hero .hero-body {
  padding: 4.5rem 1.5rem 3.5rem;
}

.venue-line {
  margin-bottom: 1rem;
}

.venue-pill {
  display: inline-flex;
  padding: 0.32rem 0.82rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.publication-title {
  max-width: 1060px;
  margin: 0 auto 1.35rem !important;
  color: var(--ink) !important;
  font-size: clamp(2rem, 4.4vw, 3.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.045em;
  line-height: 1.12 !important;
  text-wrap: balance;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.2rem;
  margin: 0 auto 0.55rem;
  color: #263249;
  font-size: 1.08rem;
  font-weight: 650;
}

.affiliations {
  margin: 0 auto;
  color: var(--muted);
  font-size: 0.9rem;
}

.equal-contribution {
  margin: 0.25rem 0 0;
  color: var(--soft-muted);
  font-size: 0.8rem;
}

.resource-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.75rem 0 2.35rem;
}

.resource-item {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.resource-icon {
  width: 2.75rem;
  height: 2.75rem;
  flex: 0 0 2.75rem;
  box-sizing: border-box;
  padding: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  object-fit: contain;
  box-shadow: var(--shadow-sm);
}

.resource-icon-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  font-size: 1.8rem;
  line-height: 1;
}

.button {
  min-height: 2.75rem;
  border-radius: 10px !important;
  font-weight: 700 !important;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.14);
}

.hero-figure {
  max-width: 980px;
  margin: 0 auto;
}

.hero-figure img,
.structure-figure img,
.agent-figure img {
  display: block;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-md);
}

figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.5;
  text-align: center;
}

.section {
  padding: 5rem 1.5rem;
}

.section-intro {
  padding-top: 4.5rem;
}

.alternate-section {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}

.section-heading {
  max-width: 850px;
  margin: 0 auto 2.4rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.title.is-2 {
  margin: 0 0 1rem !important;
  color: var(--ink) !important;
  font-size: clamp(1.8rem, 3vw, 2.45rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.035em;
  line-height: 1.18 !important;
  text-wrap: balance;
}

.lead {
  margin: 0 auto;
  color: #3d4a60;
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
  line-height: 1.7;
}

.compact-lead {
  max-width: 780px;
}

.section-summary {
  max-width: 780px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.02rem;
}

.subsection-heading {
  max-width: 850px;
  margin: 4rem auto 1.75rem;
  padding-top: 3.5rem;
  border-top: 1px solid var(--border);
}

.subsection-title {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.stat-grid {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  margin: 0 auto;
}

.stat-card {
  flex: 0 1 260px;
  width: 260px;
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.stat-card dt {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stat-card dd {
  margin: 0;
}

.stat-card strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.65rem, 2.7vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.stat-card span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.fact-note,
.centered-note {
  max-width: 850px;
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 0.92rem;
  text-align: center;
}

.gap-grid,
.finding-grid,
.tool-grid,
.quickstart-grid,
.construction-flow {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gap-grid,
.finding-grid,
.tool-grid,
.quickstart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-card,
.finding-card,
.example-card,
.tool-grid article,
.quickstart-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.gap-card,
.finding-card,
.tool-grid article,
.quickstart-card {
  padding: 1.45rem;
}

.gap-card {
  position: relative;
}

.gap-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -0.77rem;
  z-index: 2;
  display: grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--primary);
  font-weight: 800;
  transform: translateY(-50%);
}

.emphasized-card {
  border-color: #93c5fd;
  background: var(--primary-soft);
}

.step-number,
.finding-index,
.task-label {
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gap-card h3,
.finding-card h3,
.example-card h3,
.tool-grid h3,
.quickstart-card h3 {
  margin: 0.5rem 0 0.6rem;
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 750;
  line-height: 1.4;
}

.gap-card p,
.finding-card p,
.example-card p,
.tool-grid p,
.quickstart-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.machine-summary {
  max-width: 960px;
  margin: 1.5rem auto 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  background: #fff;
  color: #344159;
  font-size: 0.96rem;
}

.taxonomy-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.taxonomy-strip span {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.82rem;
}

.taxonomy-strip b {
  margin-right: 0.25rem;
  color: var(--primary);
}

.example-note {
  margin: 0 auto 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

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

.example-card {
  padding: 1.35rem;
}

.example-card:last-child {
  grid-column: 1 / -1;
}

.example-card h3 {
  font-size: 1rem;
  font-weight: 650;
}

.task-label,
.finding-index {
  margin: 0 !important;
}

.finding-card {
  border-top: 4px solid #93c5fd;
}

.finding-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finding-card h3 {
  font-size: 1.12rem;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.results-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: var(--surface);
  font-variant-numeric: tabular-nums;
}

.results-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.results-table th,
.results-table td {
  padding: 0.72rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: right;
}

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

.results-table thead th {
  background: #eef3fa;
  color: #27344b;
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.results-table tbody th {
  color: #344159;
  font-size: 0.9rem;
  font-weight: 600;
}

.results-table td {
  color: var(--muted);
  font-size: 0.9rem;
}

.results-table .group-row th {
  padding: 0.55rem 1rem;
  background: var(--surface-alt);
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.results-table .best-row {
  background: var(--success-soft);
}

.table-note {
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.results-figures {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
  align-items: start;
  margin-top: 2rem;
}

.result-figure {
  margin: 0;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.result-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

abbr[title] {
  cursor: help;
  text-decoration: underline dotted;
  text-underline-offset: 2px;
}

.lifeagent-section {
  border-top: 1px solid #bfdbfe;
  border-bottom: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #f8fbff, #eff6ff);
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  position: relative;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #cfe0f8;
  border-radius: var(--radius);
  background: #fff;
}

.pipeline li:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 1.1rem;
  right: -0.67rem;
  z-index: 2;
  color: var(--primary);
  font-weight: 800;
}

.pipeline li > span {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  margin-bottom: 0.55rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.pipeline strong,
.pipeline small {
  display: block;
}

.pipeline strong {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.35;
}

.pipeline small {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.tool-grid {
  margin-top: 1rem;
}

.tool-grid article {
  border-color: #cfe0f8;
}

.construction-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 2rem;
  counter-reset: construction;
}

.construction-flow li {
  position: relative;
  padding: 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  counter-increment: construction;
}

.construction-flow li::before {
  content: counter(construction);
  display: block;
  margin-bottom: 0.4rem;
  color: var(--primary);
  font-size: 0.76rem;
  font-weight: 800;
}

.construction-flow strong,
.construction-flow span {
  display: block;
}

.construction-flow strong {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.92rem;
}

.construction-flow span {
  color: var(--muted);
  font-size: 0.8rem;
}

.structure-figure {
  margin: 0;
}

.agent-figure {
  max-width: 1060px;
  margin: 0 auto 2rem;
}

.quickstart-card {
  min-width: 0;
}

.code-block {
  position: relative;
  margin-top: 1rem;
}

pre {
  margin: 0 !important;
  padding: 1rem !important;
  overflow-x: auto;
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  background: #111827 !important;
  box-shadow: none !important;
  color: #e5edf8 !important;
  font-size: 0.78rem !important;
  line-height: 1.55 !important;
  white-space: pre;
}

pre code {
  padding: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace !important;
}

.code-block .copy-button {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  padding: 0.28rem 0.5rem;
  border: 1px solid #536079;
  border-radius: 6px;
  background: #243047;
  color: #e5edf8;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

.abstract-text {
  color: #3d4a60;
  font-size: 1.05rem;
  line-height: 1.85;
}

.abstract-text p {
  margin: 0;
}

.faq-list {
  display: grid;
  gap: 0.7rem;
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.faq-list summary {
  padding: 1rem 1.15rem;
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}

.faq-list details[open] summary {
  border-bottom: 1px solid var(--border);
}

.faq-list p {
  margin: 0;
  padding: 1rem 1.15rem 1.15rem;
  color: var(--muted);
}

.citation-section {
  border-top: 1px solid var(--border);
  background: #111827;
}

.citation-section .eyebrow {
  color: #93c5fd;
}

.citation-section .title.is-2 {
  color: #fff !important;
}

.bibtex-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.bibtex-header .title {
  margin-bottom: 0 !important;
}

.bibtex-header .copy-button {
  flex: 0 0 auto;
  border: 1px solid #71809a !important;
  background: #243047 !important;
  color: #fff !important;
  cursor: pointer;
}

.citation-section pre {
  border-color: #344159 !important;
  background: #0b1220 !important;
}

.citation-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  color: #71809a;
  font-size: 0.88rem;
}

.citation-links a {
  color: #bfdbfe;
}

.footer {
  padding: 2.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.footer p {
  margin: 0.3rem 0;
}

.scroll-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 900;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 3px;
}

@media (max-width: 1023px) {
  .pipeline {
    grid-template-columns: 1fr;
  }

  .pipeline li:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -0.83rem;
    transform: translateX(50%);
  }

  .construction-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .site-nav {
    min-height: 3.7rem;
    padding: 0 1rem;
  }

  .nav-links {
    gap: 0.8rem;
  }

  .nav-links a:nth-child(2),
  .nav-links a:nth-child(3),
  .nav-links a:nth-child(5) {
    display: none;
  }

  .project-hero .hero-body {
    padding: 3rem 1rem 2.75rem;
  }

  .publication-title {
    letter-spacing: -0.035em;
  }

  .affiliations {
    max-width: 34rem;
  }

  .section {
    padding: 3.75rem 1rem;
  }

  .results-figures {
    grid-template-columns: 1fr;
  }

  .gap-grid,
  .tool-grid,
  .quickstart-grid,
  .example-grid {
    grid-template-columns: 1fr;
  }

  .finding-grid {
    grid-template-columns: repeat(4, minmax(250px, 1fr));
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x proximity;
  }

  .finding-card {
    scroll-snap-align: start;
  }

  .example-card:last-child {
    grid-column: auto;
  }

  .gap-card:not(:last-child)::after {
    content: "↓";
    top: auto;
    right: 50%;
    bottom: -0.83rem;
    transform: translateX(50%);
  }

  .quickstart-card {
    padding: 1.2rem;
  }

  .bibtex-header {
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .site-mark {
    font-size: 0.92rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .resource-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }

  .resource-buttons .button {
    flex: 1;
    width: auto;
  }

  .stat-grid {
    flex-direction: column;
    align-items: stretch;
  }

  .stat-card {
    flex-basis: auto;
    width: 100%;
  }

  .construction-flow {
    grid-template-columns: 1fr;
  }

  .taxonomy-strip {
    justify-content: flex-start;
  }

  .bibtex-header {
    flex-direction: column;
  }

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

  .scroll-to-top {
    right: 0.85rem;
    bottom: 0.85rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .scroll-to-top,
  .copy-button,
  .resource-buttons {
    display: none !important;
  }

  .section,
  .project-hero .hero-body {
    padding: 1.5rem 0;
  }

  .alternate-section,
  .lifeagent-section,
  .citation-section {
    background: #fff !important;
  }

  .citation-section .title.is-2,
  .citation-section pre,
  .citation-section pre code {
    color: #000 !important;
  }
}
