:root {
  color-scheme: light;
  --ink: #15171a;
  --muted: #5c6470;
  --paper: #fbfaf7;
  --surface: #ffffff;
  --line: #d9ded7;
  --green: #287233;
  --green-soft: #edf6ec;
  --coral: #c93f32;
  --cyan: #167f9b;
  --gold: #b98219;
  --shadow: 0 18px 45px rgba(21, 23, 26, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.image-slot {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 32px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(40, 114, 51, 0.08), rgba(22, 127, 155, 0.08)),
    repeating-linear-gradient(45deg, #f7faf4 0 14px, #eef4eb 14px 28px);
  border-bottom: 1px solid var(--line);
}

.image-slot span,
.image-slot small {
  display: block;
}

.image-slot span {
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 900;
}

.image-slot small {
  max-width: 360px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-slot {
  min-height: 430px;
}

.compact-slot {
  min-height: 330px;
}

.gallery-slot {
  min-height: 420px;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid rgba(217, 222, 215, 0.85);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #ffffff;
  background: var(--green);
  border-radius: 8px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a {
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--green);
}

.section-pad {
  width: min(1180px, calc(100% - 44px));
  margin: 0 auto;
  padding: 72px 0;
}

.hero {
  min-height: calc(100vh - 60px);
  display: grid;
  align-content: center;
  gap: 34px;
  padding-top: 62px;
}

.hero-copy {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.venue,
.eyebrow {
  margin: 0 0 14px;
  color: var(--coral);
  font-size: 0.88rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: 3.35rem;
  line-height: 1.08;
  letter-spacing: 0;
}

.subtitle {
  max-width: 820px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.18rem;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 14px;
  margin-top: 24px;
  font-weight: 700;
}

.authors span,
.authors a {
  color: var(--ink);
}

.authors span:not(:last-child)::after,
.authors a::after {
  content: ",";
  color: var(--muted);
}

.affiliation {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.button {
  display: inline-flex;
  min-width: 94px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(21, 23, 26, 0.06);
}

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

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.hero-figure,
.wide-figure,
.figure-panel,
.gallery-grid figure,
.supplementary-grid figure {
  margin: 0;
}

.hero-figure {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-figure figcaption,
.wide-figure figcaption,
.figure-panel figcaption,
.gallery-grid figcaption {
  padding: 12px 16px 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  max-width: 1180px;
  margin: -18px auto 0;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics-strip div {
  min-height: 118px;
  padding: 22px;
  background: var(--surface);
}

.metric-value {
  display: block;
  color: var(--green);
  font-size: 2.15rem;
  line-height: 1;
  font-weight: 900;
}

.metric-label {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-weight: 700;
}

.section {
  border-top: 1px solid rgba(217, 222, 215, 0.85);
}

.section.alt {
  width: 100%;
  max-width: none;
  background: #f4f7f1;
}

.narrow {
  max-width: 900px;
}

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

h2 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.15;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.narrow p {
  color: var(--muted);
  font-size: 1.06rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.method-card {
  min-height: 250px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.method-card:nth-child(2) {
  border-top: 4px solid var(--cyan);
}

.method-card:nth-child(3) {
  border-top: 4px solid var(--coral);
}

.method-card:nth-child(4) {
  border-top: 4px solid var(--gold);
}

.method-card:first-child {
  border-top: 4px solid var(--green);
}

.step {
  display: block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 900;
}

.method-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.wide-figure,
.figure-panel,
.gallery-grid figure,
.supplementary-grid figure,
.table-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(21, 23, 26, 0.06);
}

.spaced {
  margin-top: 24px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 22px;
  align-items: start;
  margin-top: 24px;
}

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

.results-column {
  display: grid;
  justify-items: center;
  gap: 20px;
  margin-top: 24px;
}

.results-figure {
  width: min(100%, 820px);
  max-width: 820px;
}

.results-figure img {
  width: 100%;
  max-height: none;
  object-fit: contain;
  background: #ffffff;
}

.ablation-figure {
  width: 100%;
}

.ablation-figure img {
  max-height: none;
}

.results-figure figcaption {
  padding: 8px 12px 10px;
  font-size: 0.86rem;
}

.results-table {
  width: min(100%, 820px);
}

.results-table table {
  min-width: 0;
}

.results-table th,
.results-table td {
  padding: 10px 8px;
}

.table-panel {
  padding: 22px;
}

.table-panel h3 {
  margin-bottom: 16px;
}

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

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

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

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

td strong {
  color: var(--green);
}

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

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

.evidence-panel {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(21, 23, 26, 0.06);
}

.wide-panel {
  grid-column: 1 / -1;
}

.panel-note {
  margin: 10px 0 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.bar-table,
.scene-chart {
  display: grid;
  gap: 10px;
}

.bar-row,
.scene-chart div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(120px, 1fr) 56px;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

.bar-track,
.scene-chart i {
  height: 12px;
  overflow: hidden;
  background: #edf1ea;
  border-radius: 999px;
}

.bar-track i,
.scene-chart i {
  display: block;
  background: linear-gradient(90deg, var(--green), var(--cyan));
}

.bar-track i {
  height: 100%;
}

.bar-row strong,
.scene-chart strong {
  color: var(--green);
  text-align: right;
}

.compact-table {
  margin-top: 16px;
}

.compact-table table {
  min-width: 0;
  font-size: 0.9rem;
}

.compact-table th,
.compact-table td {
  padding: 9px 8px;
}

.delta-cards,
.stat-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.delta-cards div,
.stat-pair div {
  min-height: 104px;
  padding: 16px;
  background: var(--green-soft);
  border: 1px solid rgba(40, 114, 51, 0.16);
  border-radius: 8px;
}

.delta-cards span,
.stat-pair span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.delta-cards strong,
.stat-pair strong {
  display: block;
  margin-top: 8px;
  color: var(--green);
  font-size: 1.75rem;
  line-height: 1;
}

.delta-cards small,
.stat-pair small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.mask-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-height: 210px;
  align-items: end;
  padding-top: 8px;
}

.mask-chart div {
  display: grid;
  grid-template-rows: auto 150px auto;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.mask-chart i {
  align-self: end;
  width: 100%;
  background: linear-gradient(180deg, var(--green), rgba(40, 114, 51, 0.22));
  border-radius: 8px 8px 0 0;
}

.mask-chart strong {
  color: var(--green);
  font-size: 0.88rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 24px;
}

.supplementary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.supplementary-grid figcaption {
  padding: 12px 16px 16px;
  color: var(--muted);
  font-size: 0.94rem;
}

.citation-section h2 {
  margin-bottom: 20px;
}

.code-block {
  position: relative;
  overflow: hidden;
  background: #171b19;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

pre {
  margin: 0;
  padding: 24px;
  overflow-x: auto;
  color: #ecf4ec;
  font-size: 0.92rem;
  line-height: 1.55;
}

.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 70px;
  min-height: 36px;
  color: var(--ink);
  background: #ffffff;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 28px;
  color: var(--muted);
  background: #171b19;
}

.footer p {
  margin: 0;
}

.footer,
.footer a {
  color: #f2f6ef;
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 12px;
  }

  h1 {
    font-size: 2.45rem;
  }

  h2 {
    font-size: 1.85rem;
  }

  .metrics-strip,
  .method-grid,
  .result-layout,
  .result-layout.reverse,
  .gallery-grid,
  .supplementary-grid,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .wide-panel {
    grid-column: auto;
  }

  .bar-row,
  .scene-chart div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .bar-row strong,
  .scene-chart strong {
    text-align: left;
  }

  .metrics-strip {
    width: min(100% - 44px, 640px);
  }

  .method-card {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .section-pad {
    width: min(100% - 28px, 1180px);
    padding: 48px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 44px;
  }

  h1 {
    font-size: 2.05rem;
  }

  .subtitle {
    font-size: 1.02rem;
  }

  .button {
    width: calc(50% - 5px);
  }

  .metrics-strip {
    width: min(100% - 28px, 640px);
    margin-top: 0;
  }

  .metrics-strip div {
    min-height: 92px;
    padding: 18px;
  }

  .metric-value {
    font-size: 1.75rem;
  }

  .table-panel {
    padding: 16px;
  }

  .delta-cards,
  .stat-pair,
  .mask-chart {
    grid-template-columns: 1fr;
  }

  .mask-chart div {
    grid-template-rows: auto 96px auto;
  }

  pre {
    padding: 58px 16px 18px;
    font-size: 0.82rem;
  }
}
