:root {
  --ink: #18202d;
  --muted: #5f6876;
  --soft: #f4f7fb;
  --line: #dbe3ee;
  --blue: #2358a8;
  --teal: #0f766e;
  --coral: #b85042;
  --plum: #6f4aa5;
  --gold: #8a6900;
  --white: #ffffff;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--white);
  font-family: "Inter", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  letter-spacing: 0;
}

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button {
  font: inherit;
}

sup {
  color: var(--blue);
  font-size: 0.68em;
  font-weight: 700;
}

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

.container.narrow {
  width: min(930px, calc(100% - 48px));
}

.text-column {
  width: min(850px, calc(100% - 48px));
}

.center {
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 227, 238, 0.9);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  min-height: 62px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--blue);
  font-weight: 800;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}

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

.hero {
  padding: 76px 0 38px;
}

.venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  margin: 16px auto 0;
  padding: 5px 12px;
  border: 1px solid rgba(35, 88, 168, 0.22);
  border-radius: var(--radius);
  background: #eef4fc;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 880px;
  margin: 0 auto;
  font-size: 3.65rem;
  line-height: 1.06;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.28;
  letter-spacing: 0;
}

.subtitle {
  max-width: 760px;
  margin: 20px auto 22px;
  color: var(--muted);
  font-size: 1.1rem;
}

.authors,
.affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 16px;
}

.authors {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
}

.authors a {
  border-bottom: 1px solid transparent;
}

.authors a:hover {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.affiliations {
  max-width: 880px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.action,
.copy-button,
.gallery-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.action {
  gap: 10px;
  min-width: 150px;
  padding: 10px 18px 10px 12px;
  border-color: transparent;
  box-shadow: 0 12px 28px rgba(24, 32, 45, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.copy-button:hover,
.gallery-tab.is-active {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.action i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  font-size: 1.08rem;
}

.action span {
  line-height: 1;
}

.action.resource-arxiv {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.action.resource-arxiv i {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
}

.action.resource-pdf {
  border-color: #e4beb8;
  background: #fff3f0;
  color: #5c2119;
}

.action.resource-pdf i {
  background: var(--coral);
  color: var(--white);
}

.action.resource-appendix {
  border-color: #b8d8d4;
  background: #eef7f6;
  color: #164a45;
}

.action.resource-appendix i {
  background: var(--teal);
  color: var(--white);
}

.action.resource-code {
  border-color: #111827;
  background: #111827;
  color: var(--white);
}

.action.resource-code i {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 1.18rem;
}

.action:hover,
.gallery-tab:hover {
  border-color: var(--blue);
}

.action:hover {
  box-shadow: 0 16px 34px rgba(24, 32, 45, 0.13);
  transform: translateY(-1px);
}

.action.resource-pdf:hover {
  border-color: var(--coral);
}

.action.resource-appendix:hover {
  border-color: var(--teal);
}

.action.resource-code:hover {
  border-color: #111827;
  background: #0b1220;
}

.teaser-section {
  padding: 0 0 56px;
}

.paper-figure {
  margin: 0;
}

.paper-figure.wide {
  max-width: 1030px;
  margin: 0 auto;
}

.paper-figure img,
.gallery-panel img {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.regime-explainer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1030px;
  margin: 18px auto 0;
}

.regime-note {
  min-height: 164px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.regime-note span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
}

.regime-note h3 {
  font-size: 1rem;
}

.regime-note p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.48;
}

.regime-note.active {
  border-color: rgba(15, 118, 110, 0.38);
  background: #eef7f6;
}

.regime-note.active span,
.regime-note.active h3 {
  color: var(--teal);
}

figcaption {
  max-width: 980px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: left;
}

.tldr {
  max-width: 920px;
  margin: 20px auto 0;
  padding: 16px 18px;
  border-left: 4px solid var(--teal);
  background: #eef7f6;
  color: #244d49;
  font-size: 1.02rem;
}

.section {
  padding: 68px 0;
}

.section.light {
  background: var(--soft);
}

.section h2 + p,
.section-copy {
  color: var(--muted);
  font-size: 1rem;
}

.section-heading {
  max-width: 800px;
  margin: 0 auto 28px;
  text-align: center;
}

.section-copy {
  max-width: 860px;
  margin: -8px auto 22px;
  text-align: center;
}

.method-grid,
.finding-grid,
.stat-grid {
  display: grid;
  gap: 16px;
}

.method-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

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

.stat-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.step-card,
.finding-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.step-card,
.finding-card {
  padding: 18px;
}

.step-card p,
.finding-card p {
  margin: 9px 0 0;
  color: var(--muted);
}

.step-index {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--coral);
  font-size: 0.86rem;
  font-weight: 800;
}

.finding-card:nth-child(2) h3 {
  color: var(--plum);
}

.finding-card:nth-child(3) h3 {
  color: var(--teal);
}

.finding-card:nth-child(4) h3 {
  color: var(--coral);
}

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

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

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

th:first-child,
td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: inherit;
  text-align: left;
  font-weight: 700;
}

thead th {
  background: #edf2f8;
  color: #2b3748;
  font-weight: 800;
}

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

.highlight {
  background: #eaf5ff;
  color: #123b67;
  font-weight: 800;
}

.highlight.secondary {
  background: #f1effb;
  color: #463174;
}

.stat-card {
  padding: 16px;
}

.stat-card strong {
  display: block;
  color: var(--blue);
  font-size: 1.35rem;
  line-height: 1.2;
}

.stat-card:nth-child(2) strong {
  color: var(--teal);
}

.stat-card:nth-child(3) strong {
  color: var(--gold);
}

.stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}

.gallery-tab {
  padding: 9px 14px;
}

.gallery-panels {
  max-width: 1030px;
  margin: 0 auto;
}

.gallery-panel {
  margin: 0;
}

.gallery-panel.compact-figure {
  max-width: 560px;
  margin: 0 auto;
}

.bibtex-wrap {
  margin-top: 18px;
}

pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111827;
  color: #edf2f7;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.copy-button {
  gap: 9px;
  margin-top: 12px;
  padding: 10px 16px;
}

.copy-button.is-copied {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

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

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer p {
  margin: 0;
}

section,
#citation {
  scroll-margin-top: 76px;
}

@media (max-width: 900px) {
  .method-grid,
  .finding-grid,
  .stat-grid,
  .regime-explainer {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 1.9rem;
  }
}

@media (max-width: 680px) {
  .container,
  .container.narrow,
  .text-column,
  .topbar {
    width: min(100% - 32px, 1120px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    gap: 10px 14px;
    font-size: 0.9rem;
  }

  .hero {
    padding: 52px 0 28px;
  }

  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.62rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .action,
  .gallery-tab,
  .copy-button {
    width: 100%;
  }

  .section {
    padding: 52px 0;
  }

  figcaption {
    font-size: 0.92rem;
  }
}
