:root {
  color-scheme: light;
  --ink: #17201d;
  --muted: #596863;
  --paper: #f7f4ed;
  --panel: #ffffff;
  --line: #d9ded8;
  --green: #2e7d5b;
  --green-dark: #155f43;
  --cyan: #128290;
  --amber: #c47a1f;
  --red: #b94f3e;
  --shadow: 0 18px 50px rgba(26, 40, 34, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(23, 32, 29, 0.1);
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(12px);
}

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

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

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

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

.section-band {
  border-bottom: 1px solid var(--line);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 48px;
  align-items: center;
  min-height: 660px;
  padding: 76px 48px 56px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.72), rgba(247,244,237,0.95)),
    radial-gradient(circle at top left, rgba(46,125,91,0.16), transparent 36%),
    var(--paper);
}

.hero-copy {
  min-width: 0;
  max-width: 920px;
}

.venue,
.section-kicker {
  margin: 0 0 12px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 18px;
  font-size: 54px;
  line-height: 1.02;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

h1 span {
  display: inline;
  white-space: normal;
}

h2 {
  margin-bottom: 18px;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 18px;
}

.subtitle {
  max-width: 760px;
  color: #31423d;
  font-size: 24px;
}

.paper-title {
  max-width: 820px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.paper-title span {
  color: #31423d;
  font-style: italic;
}

.authors {
  margin: 0;
  color: var(--muted);
  font-weight: 650;
}

.authors sup,
.affiliations sup {
  font-size: 0.62em;
  line-height: 0;
}

.affiliations,
.author-notes {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.author-notes {
  color: #64746e;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid #b8c4bd;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  font-weight: 750;
  text-decoration: none;
}

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

.hero-visual {
  min-width: 0;
  width: 100%;
}

.dashboard-shell {
  padding: 18px;
  border: 1px solid rgba(21, 95, 67, 0.22);
  border-radius: 8px;
  background: #fbfcf9;
  box-shadow: var(--shadow);
}

.dash-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

.pressure-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe5;
}

.pressure-fill {
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--amber), var(--red));
  transition: width 420ms ease;
}

.block-stack {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.context-block {
  display: grid;
  grid-template-columns: 86px 1fr 70px;
  gap: 12px;
  align-items: center;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.context-block.archived {
  color: #7d8580;
  background: #f1f3ef;
}

.block-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebe5;
}

.block-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--cyan);
}

.content-section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 80px 32px;
}

.abstract-text {
  max-width: 980px;
  font-size: 23px;
  line-height: 1.48;
}

.image-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px 42px;
}

.image-section img,
.case-study-section img,
.figure-grid img,
.figure-image {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.figure-image {
  height: auto;
}

.overview-section .figure-image {
  margin-top: 24px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 28px;
}

.feature-grid article,
.metric {
  min-height: 150px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.feature-grid p,
.case-study-section p,
.metric-label {
  color: var(--muted);
}

.split-section {
  display: grid;
  grid-template-columns: 0.78fr 1fr;
  gap: 36px;
  align-items: center;
}

.case-study-copy {
  max-width: 860px;
}

.case-study-image {
  margin-top: 24px;
}

.metric-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.9fr;
  gap: 16px;
  margin-top: 26px;
}

.metric-value {
  display: block;
  margin-bottom: 12px;
  color: var(--green-dark);
  font-size: 34px;
  font-weight: 850;
  line-height: 1.08;
}

.metric-label {
  display: block;
  font-weight: 650;
}

.figure-grid,
.results-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.results-figures {
  grid-template-columns: minmax(0, calc(62% - 9px)) minmax(0, calc(38% - 9px));
  align-items: stretch;
}

.main-result-figure {
  align-self: center;
}

.table-section {
  margin-top: 46px;
}

.table-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
}

.table-heading h3 {
  margin-bottom: 0;
  font-size: 22px;
}

.second-table {
  margin-top: 38px;
}

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

.result-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.35;
}

.compact-table .result-table {
  min-width: 720px;
}

.result-table th,
.result-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #e3e8e2;
  text-align: right;
  white-space: nowrap;
}

.result-table thead th {
  color: #34433e;
  background: #eef4ee;
  font-weight: 800;
}

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

.result-table tbody th {
  font-weight: 720;
}

.result-table tbody tr:last-child th,
.result-table tbody tr:last-child td {
  border-bottom: 0;
}

.group-row th {
  padding: 9px 12px;
  color: var(--green-dark);
  background: #f6f8f4;
  font-size: 12px;
  text-transform: uppercase;
}

.ours th,
.ours td {
  background: #f0f8f3;
  font-weight: 820;
}

.best {
  color: var(--green-dark);
  font-weight: 900;
}

.code-section pre,
.citation-section pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid #cdd7d0;
  border-radius: 8px;
  background: #17201d;
  color: #e9f2ed;
  font-size: 14px;
  line-height: 1.55;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

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

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 50px 22px 42px;
    overflow: hidden;
  }

  .hero-copy,
  .hero-visual,
  .subtitle,
  .paper-title,
  .authors,
  .affiliations,
  .author-notes {
    width: 100%;
    max-width: 22rem;
  }

  h1 {
    font-size: 36px;
    line-height: 1.06;
    width: 100%;
    max-width: 9.4em;
    overflow-wrap: anywhere;
  }

  h1 span {
    display: block;
    max-width: 100%;
  }

  .subtitle,
  .abstract-text {
    font-size: 19px;
  }

  .content-section {
    padding: 56px 22px;
  }

  .image-section {
    padding: 0 22px 32px;
  }

  .feature-grid,
  .metric-row,
  .figure-grid,
  .results-figures,
  .split-section {
    grid-template-columns: 1fr;
  }

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

  .context-block {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  .context-block > span:last-child {
    display: none;
  }

  .dashboard-shell {
    max-width: 100%;
    padding: 14px;
    overflow: hidden;
  }

  .dash-head {
    font-size: 12px;
  }
}

@media (max-width: 480px) {
  .hero-copy,
  .hero-visual,
  .subtitle,
  .paper-title,
  .authors,
  .affiliations,
  .author-notes {
    width: calc(100vw - 44px);
    max-width: 346px;
  }

  h1 {
    width: calc(100vw - 44px);
    max-width: 346px;
    font-size: 34px;
  }
}
