:root {
  --bg: #f7f8f6;
  --panel: #ffffff;
  --panel-soft: #eef3ef;
  --text: #15201b;
  --muted: #5d6b65;
  --line: #d9e0dc;
  --accent: #23695b;
  --accent-dark: #164a40;
  --accent-soft: #dbe9e4;
  --ink-soft: #26342f;
  --warn: #8c5b1c;
  --shadow: 0 18px 45px rgba(22, 42, 34, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(217, 224, 220, 0.9);
  background: rgba(247, 248, 246, 0.92);
  backdrop-filter: blur(14px);
}

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

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--accent-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  padding: 8px 0;
}

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

.section {
  padding: 64px 0;
  scroll-margin-top: 78px;
}

.section.hero {
  padding-top: 92px;
  padding-bottom: 54px;
}

.alt {
  background: var(--panel-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

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

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 44px;
  align-items: start;
}

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

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

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: clamp(34px, 5.2vw, 62px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.14;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 12px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.authors {
  max-width: 860px;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.45;
}

.authors sup,
.affiliations sup,
.author-notes sup {
  font-size: 0.66em;
  line-height: 0;
  vertical-align: super;
}

.affiliations {
  max-width: 840px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.affiliations span {
  display: inline-block;
  margin-right: 14px;
}

.affiliations sup {
  margin-right: 2px;
}

.author-notes {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--accent-dark);
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 1px 0 rgba(22, 42, 34, 0.04);
}

.button:hover {
  border-color: rgba(35, 105, 91, 0.4);
  background: #fdfefd;
}

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

.button.primary:hover {
  background: var(--accent-dark);
}

.metrics {
  display: grid;
  gap: 12px;
}

.metric {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric-value {
  display: block;
  margin-bottom: 6px;
  color: var(--accent-dark);
  font-size: 31px;
  font-weight: 850;
  line-height: 1;
}

.metric-label {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.teaser {
  padding-top: 24px;
}

.figure-frame {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.figure-medium {
  width: min(680px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.figure-wide {
  width: min(936px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.figure-small {
  width: min(600px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.figure-frame img {
  width: 100%;
  height: auto;
  background: #ffffff;
}

.figure-frame figcaption {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.method-caption {
  text-align: left;
}

.method-caption p {
  margin-bottom: 8px;
}

.method-caption p:last-child {
  margin-bottom: 0;
}

.equation {
  margin: 6px 0 10px;
  overflow-x: auto;
  color: var(--ink-soft);
}

.method-caption mjx-container {
  color: var(--ink-soft);
}

.method-caption mjx-container[display="true"] {
  margin: 0.25em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.figure-frame.compact {
  box-shadow: none;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

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

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

.figures {
  margin-top: 20px;
}

.figure-pair {
  width: min(900px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.table-block {
  width: min(900px, 100%);
  margin: 28px auto 0;
}

.table-block:first-of-type {
  margin-top: 0;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

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

thead th {
  background: #edf4f1;
  color: var(--accent-dark);
  font-weight: 800;
}

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

tbody tr:nth-child(even):not(.ours) {
  background: #fafcfa;
}

.ours {
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 750;
}

.video-grid {
  margin-top: 24px;
  width: min(980px, 100%);
  margin-right: auto;
  margin-left: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.demo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.demo-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #101a16;
}

.demo-card h3 {
  margin: 14px 16px 6px;
  color: var(--accent-dark);
  font-size: 17px;
}

.demo-card p {
  margin: 0 16px 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

pre {
  margin: 22px 0 0;
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101714;
  color: #e5f0ea;
  font-size: 13px;
  line-height: 1.55;
}

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

.footer {
  padding: 30px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: #ffffff;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

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

  .two-column,
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .section {
    padding: 52px 0;
  }

  .section.hero {
    padding-top: 62px;
  }

  .nav {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    gap: 14px;
    padding-bottom: 2px;
    font-size: 13px;
  }

  .authors {
    font-size: 16px;
  }

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

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

  .button {
    width: 100%;
  }

  th,
  td {
    padding: 10px 12px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
