:root {
  --ink: #17202a;
  --muted: #5c6672;
  --line: #d8dee6;
  --surface: #ffffff;
  --accent: #1e5fcf;
  --accent-strong: #174ca6;
  --positive: #c72f2f;
  --negative: #195bd8;
  --success: #16794c;
  --warning: #8a5b00;
  --shadow: 0 16px 36px rgba(25, 33, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

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

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

.brand {
  font-weight: 800;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
}

.nav-links a {
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--ink);
  background: var(--surface);
}

.section {
  padding: 72px 0;
}

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

.narrow {
  width: min(820px, calc(100% - 32px));
}

.muted {
  background: var(--surface);
}

#abstract {
  background: #f5f5f5;
}

.hero {
  padding: 72px 0 42px;
}

.hero-simple {
  max-width: 1120px;
  text-align: center;
}

.venue,
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 22px;
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: 0;
}

#abstract h2 {
  text-align: center;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.05rem;
  line-height: 1.25;
}

.authors,
.affiliations {
  color: var(--ink);
  font-size: 0.98rem;
}

.affiliations {
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5em;
  padding: calc(0.5em - 1px) 1em;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #363636;
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
}

.button:hover {
  background: #2f2f2f;
  color: #ffffff;
}

.button:focus {
  outline: 0;
  box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25);
}

.button:active {
  background: #292929;
  color: #ffffff;
}

.button.primary {
  border-color: transparent;
  background: #363636;
  color: #ffffff;
}

.button.primary:hover {
  background: #2f2f2f;
}

.button.small {
  min-height: 2.25em;
  padding: calc(0.4em - 1px) 0.85em;
  font-size: 0.9rem;
}

.button .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5em;
  height: 1.5em;
  margin-left: calc(-0.5em - 1px);
  margin-right: 0.25em;
}

.button .icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.figure-band {
  padding: 48px 0 70px;
}

.teaser-opener {
  margin-top: 36px;
  display: grid;
  gap: 12px;
}

.teaser-opener p {
  margin-bottom: 0;
  color: var(--muted);
}

.positive-text {
  color: var(--positive);
  font-weight: 800;
}

.negative-text {
  color: var(--negative);
  font-weight: 800;
}

.paper-figure {
  margin: 0;
}

.paper-figure img {
  width: 100%;
  background: transparent;
}

.paper-figure.compact {
  margin-top: 18px;
}

.paper-figure figcaption {
  max-width: none;
  margin: 14px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.95rem;
}

.section p {
  color: var(--muted);
}

.equation-block {
  margin-top: 24px;
  padding: 22px 18px;
  overflow-x: auto;
  background: #ffffff;
}

.paper-table-block + .paper-table-block {
  margin-top: 42px;
}

.table-wrap {
  overflow-x: auto;
}

.result-task {
  max-width: none;
  margin: 34px 0 0;
}

.result-task:first-of-type {
  margin-top: 18px;
}

.result-task h3 {
  margin-bottom: 6px;
  font-size: 1.25rem;
}

.result-task p {
  margin-bottom: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 0.92rem;
}

.paper-table {
  margin: 22px 0 0;
  border-top: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  background: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.paper-table thead {
  border-bottom: 1.75px solid var(--ink);
}

.paper-table th,
.paper-table td {
  border-bottom: 1px solid #c7ccd3;
  text-align: center;
}

.paper-table td {
  white-space: nowrap;
}

.paper-table tbody tr:last-child td {
  border-bottom: 0;
}

.paper-table tbody tr {
  transition: background-color 120ms ease;
}

.paper-table tbody tr:hover td {
  background: #e8ebef;
}

.paper-table tbody td:first-child,
.paper-table thead tr:first-child th:first-child {
  text-align: left;
}

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

.highlight-row td {
  color: #0f3f88;
  font-weight: 800;
  background: #f4f8ff;
}

.paper-table .highlight-row td {
  color: var(--ink);
  background: #e2e5ea;
  font-weight: 800;
}

.paper-table .highlight-row:hover td {
  background: #d3d7de;
}

.gain {
  margin-left: 3px;
  color: #0f6b3d;
  font-size: 0.82em;
  font-weight: 700;
}

.analysis-intro {
  margin: 0 0 34px;
  display: grid;
  gap: 12px;
}

.analysis-intro p {
  margin-bottom: 0;
}

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

.analysis-layout article {
  min-width: 0;
}

.analysis-heading-offset {
  margin-top: 16px;
}

.traces-figure {
  transform: translateY(-8px);
}

.qualitative-copy {
  display: grid;
  gap: 12px;
}

.qualitative-copy p {
  margin-bottom: 0;
}

.qualitative-figure {
  margin-top: 28px;
}

.qualitative-figure figcaption {
  white-space: nowrap;
}

.design-section {
  margin: 0 auto 34px;
}

.design-section:last-child {
  margin-bottom: 0;
}

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

.paper-figure + .design-grid {
  margin-top: 34px;
}

.design-grid article {
  min-width: 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.repo-grid code {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

.citation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111820;
  color: #edf3fa;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .analysis-layout,
  .design-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  .hero {
    padding-top: 54px;
  }

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