:root {
  --ink: #1f2937;
  --muted: #667085;
  --blue: #2f5fb3;
  --blue-dark: #244b8f;
  --soft-blue: #f1f5fb;
  --line: #e3e7ed;
  --paper: #ffffff;
  --off-white: #fafafa;
  --max: 1040px;
  --narrow: 820px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; width: 100%; }
a { color: inherit; }
h1, h2, h3, p, figure { margin-top: 0; }
.page-width { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.narrow { width: min(calc(100% - 40px), var(--narrow)); margin-inline: auto; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 max(22px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(31, 41, 55, .08);
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
}
.brand { color: var(--ink); font-size: .92rem; font-weight: 800; letter-spacing: .06em; text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a { color: var(--muted); font-size: .82rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--blue); }

.hero { padding: 74px 0 48px; text-align: center; }
.venue { margin-bottom: 16px; color: var(--blue); font-size: .84rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hero h1 {
  max-width: 1000px;
  margin: 0 auto 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.25rem, 4.8vw, 3.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.hero h1 span { color: var(--blue); }
.authors { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 15px; max-width: 930px; margin: 0 auto; font-size: 1rem; }
.authors span { white-space: nowrap; }
.authors sup, .author-note sup { color: var(--blue); font-weight: 700; }
.author-note { margin: 8px 0 22px; color: var(--muted); font-size: .78rem; }
.link-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.link-row a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: 999px;
  color: #fff;
  background: #252b36;
  font-size: .84rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.link-row a:hover, .link-row a:focus-visible { background: var(--blue); transform: translateY(-1px); }
.button-icon { color: #dce7fa; }

.teaser { padding-bottom: 70px; text-align: center; }
.teaser img { max-height: 720px; object-fit: contain; }
.lead-caption { max-width: 900px; margin: 24px auto 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.18rem, 2.3vw, 1.55rem); line-height: 1.48; text-wrap: balance; }
.lead-caption strong { color: var(--blue); }

.paper-section { padding: 72px 0; border-top: 1px solid var(--line); }
.paper-section h2, .section-intro h2, .feature-copy h2 {
  margin-bottom: 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -.025em;
}
#abstract { text-align: justify; }
#abstract h2, .citation h2 { text-align: center; }
#abstract > p { margin-bottom: 0; color: #3f4754; font-size: 1rem; }

.statement-band { padding: 38px 0; color: #fff; background: #243b64; }
.statement-band p { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2.4vw, 1.55rem); line-height: 1.5; text-align: center; text-wrap: balance; }
.statement-band span { color: #a9cbff; font-weight: 700; }

.section-intro { max-width: 760px; margin: 0 auto 34px; text-align: center; }
.section-intro > p:last-child { margin-bottom: 0; color: var(--muted); }
.kicker { margin-bottom: 7px; color: var(--blue); font-size: .73rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.figure-card { margin-bottom: 0; }
.figure-card img { background: #fff; }
.wide-figure img { border: 1px solid var(--line); }
.figure-card figcaption { max-width: 850px; margin: 11px auto 0; color: var(--muted); font-size: .82rem; line-height: 1.45; text-align: center; }

.method-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 34px; }
.method-steps article { display: flex; gap: 12px; padding-top: 17px; border-top: 2px solid var(--line); }
.method-steps article > span { color: var(--blue); font-family: Georgia, serif; font-size: 1.1rem; font-style: italic; }
.method-steps h3 { margin-bottom: 5px; font-size: .96rem; }
.method-steps p { margin-bottom: 0; color: var(--muted); font-size: .83rem; line-height: 1.5; }

.feature-row { display: grid; grid-template-columns: .78fr 1.22fr; gap: 56px; align-items: center; }
.feature-copy h2 { font-size: clamp(1.8rem, 3.1vw, 2.5rem); }
.feature-copy > p:last-child { margin-bottom: 0; color: var(--muted); }
.feature-row .figure-card img { border: 1px solid var(--line); }

#results { background: var(--off-white); width: 100%; max-width: none; padding-inline: max(20px, calc((100vw - var(--max)) / 2)); }
.metric-row { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 38px; border-block: 1px solid var(--line); }
.metric-row div { padding: 23px 18px; text-align: center; }
.metric-row div + div { border-left: 1px solid var(--line); }
.metric-row strong { display: block; color: var(--blue); font-family: Georgia, serif; font-size: clamp(1.9rem, 3.5vw, 2.7rem); line-height: 1; }
.metric-row span { display: block; margin-top: 8px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.result-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; align-items: start; }
.result-grid figure { padding: 14px; border: 1px solid var(--line); background: #fff; }
.result-grid img { aspect-ratio: 16 / 10; object-fit: contain; }

.video-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.video-grid figure { overflow: hidden; margin: 0; border: 1px solid var(--line); background: #fff; }
.video-grid video { aspect-ratio: 16 / 10; object-fit: contain; background: #05070b; }
.video-grid figcaption { padding: 15px 18px 18px; color: var(--muted); font-size: .84rem; }
.video-grid figcaption strong { color: var(--ink); }
.deployment { padding-top: 28px; }

.citation-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.citation-heading h2 { margin: 0; text-align: left; }
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: #2f66e8;
  font: 700 .82rem/1 Arial, Helvetica, sans-serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(47, 102, 232, .18);
  transition: background .18s ease, transform .18s ease;
}
.copy-button:hover, .copy-button:focus-visible { background: #2456ca; transform: translateY(-1px); }
.copy-button.is-copied { background: #16835c; }
.citation pre {
  overflow-x: auto;
  margin: 0;
  padding: 24px;
  border: 1px solid #dce3ec;
  border-radius: 12px;
  color: #273449;
  background: #f3f6fa;
  box-shadow: 0 2px 5px rgba(31, 41, 55, .04);
  font: .8rem/1.6 ui-monospace, SFMono-Regular, Consolas, monospace;
  white-space: pre-wrap;
}
footer { padding: 42px 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: .76rem; }
footer p { margin-bottom: 3px; }
footer a { color: var(--blue); }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .hero { padding-top: 56px; }
  .method-steps, .metric-row { grid-template-columns: 1fr 1fr; }
  .metric-row div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .metric-row div:nth-child(4) { border-top: 1px solid var(--line); }
  .feature-row, .result-grid { grid-template-columns: 1fr; gap: 30px; }
  .feature-copy { text-align: center; }
}

@media (max-width: 620px) {
  .page-width, .narrow { width: min(calc(100% - 28px), var(--max)); }
  .hero h1 { font-size: 2.05rem; }
  .authors { font-size: .91rem; }
  .paper-section { padding: 56px 0; }
  #results { padding: 56px 14px; }
  .method-steps, .video-grid { grid-template-columns: 1fr; }
  .method-steps { gap: 14px; }
  .method-steps article { padding-bottom: 4px; }
  .link-row a { padding: 8px 13px; }
  .lead-caption { font-size: 1.13rem; }
  #abstract { text-align: left; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
