:root {
  --ink: #14212b;
  --muted: #5d6d7a;
  --quiet: #f5f8f9;
  --line: #dbe5e8;
  --panel: #ffffff;
  --teal: #1f6f78;
  --teal-dark: #174f59;
  --wine: #8a3142;
  --amber: #b76e20;
  --mint: #eff8f5;
  --rose: #fbf1f2;
  --sky: #eef6fa;
  --lavender: #f4f2fa;
  --shadow: 0 18px 45px rgba(19, 33, 43, 0.09);
}

html {
  scroll-behavior: smooth;
}

body {
  background: #ffffff;
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--teal-dark);
}

a:hover {
  color: var(--wine);
}

.top-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 1rem;
  justify-content: center;
  min-height: 52px;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.top-nav a:hover {
  color: var(--teal-dark);
}

.publication-hero {
  background: linear-gradient(180deg, #f8fbfb 0%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
}

.publication-hero .hero-body {
  padding: 5rem 1.5rem 3rem;
}

.venue-line {
  color: var(--wine);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.publication-title {
  color: var(--ink);
  font-size: clamp(2.05rem, 4.75vw, 3.95rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.04;
  margin-bottom: 1.5rem;
}

.publication-authors {
  color: var(--ink);
  display: flex;
  flex-direction: column;
  font-size: 1.08rem;
  gap: 0.35rem;
  justify-content: center;
  margin: 0 auto 0.65rem;
  max-width: 940px;
}

.author-line {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  justify-content: center;
}

.publication-authors span {
  white-space: nowrap;
}

.affiliation-line,
.note-line {
  color: var(--muted);
  margin: 0.15rem 0;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1.7rem;
}

.button.is-dark {
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 700;
  min-width: 108px;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button.is-dark:hover {
  background: var(--teal-dark);
  box-shadow: 0 10px 24px rgba(31, 111, 120, 0.22);
  color: #ffffff;
  transform: translateY(-1px);
}

.visual-lead {
  padding-top: 2.5rem;
}

.visual-lead .container {
  display: grid;
  gap: 1.4rem;
  max-width: 1050px;
}

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

.figure-panel img {
  display: block;
  height: auto;
  width: 100%;
}

.figure-panel figcaption {
  color: var(--muted);
  font-size: 0.96rem;
  padding: 0.9rem 1rem 1rem;
  text-align: center;
}

.section {
  padding: 4rem 1.5rem;
}

.title.is-3 {
  color: var(--ink);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 1.25rem;
  text-align: center;
}

.abstract-section {
  background: var(--quiet);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.abstract-section .content {
  color: #2d3c46;
  font-size: 1.06rem;
}

.metrics-band {
  background: #ffffff;
  padding-bottom: 2.5rem;
  padding-top: 2.5rem;
}

.metric-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 116px;
  padding: 1.15rem;
}

.metric-value {
  color: var(--teal-dark);
  display: block;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.15;
}

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

.method-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.method-item {
  border-left: 4px solid var(--teal);
  padding: 0.2rem 1rem 0.2rem 1.1rem;
}

.method-icon {
  align-items: center;
  background: var(--sky);
  border-radius: 50%;
  color: var(--teal-dark);
  display: inline-flex;
  height: 40px;
  justify-content: center;
  margin-bottom: 0.8rem;
  width: 40px;
}

.method-item h3 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.method-item p {
  color: var(--muted);
  margin: 0;
}

.resource-section {
  background: var(--quiet);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

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

.resource-drawer,
.appendix-drawer {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.resource-drawer summary,
.appendix-drawer summary {
  align-items: center;
  background: #f4f8f9;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 1.25rem 1.5rem;
}

.resource-drawer summary::-webkit-details-marker,
.appendix-drawer summary::-webkit-details-marker {
  display: none;
}

.resource-drawer summary span,
.appendix-drawer summary span {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
}

.resource-drawer summary small,
.appendix-drawer summary small {
  color: var(--muted);
  font-weight: 700;
}

.resource-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 1.5rem;
}

.resource-content {
  padding: 1.5rem;
}

.resource-panel h3 {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.8rem;
}

.resource-panel p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.card-kicker {
  color: var(--wine);
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.fact-list {
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1.1rem;
}

.fact-list div {
  border-top: 1px solid var(--line);
  padding-top: 0.55rem;
}

.fact-list dt {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.fact-list dd {
  color: var(--muted);
  margin: 0.1rem 0 0;
}

.text-link {
  font-weight: 800;
}

.case-section {
  background: #ffffff;
}

.gallery-block + .gallery-block {
  margin-top: 2.25rem;
}

.gallery-heading {
  align-items: baseline;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.gallery-heading h3,
.appendix-group h3 {
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0;
}

.page-gallery {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.page-gallery figure,
.appendix-grid figure {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  overflow: hidden;
}

.page-gallery img,
.deck-strip img,
.appendix-grid img {
  display: block;
  height: auto;
  width: 100%;
}

.appendix-grid figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.7rem 0.85rem;
}

.page-gallery figure {
  aspect-ratio: 16 / 9;
}

.page-gallery img {
  height: 100%;
  object-fit: cover;
}

.deck-gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

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

.deck-strip img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.deck-card h4 {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
  padding: 0.9rem 1rem 0.15rem;
}

.deck-card p {
  color: var(--muted);
  margin: 0;
  padding: 0 1rem 1rem;
}

.section-copy {
  color: var(--muted);
  margin: -0.4rem auto 1.5rem;
  max-width: 760px;
  text-align: center;
}

.results-section .container,
.meta-section .container {
  max-width: 1320px !important;
}

.table-shell {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow-x: auto;
  width: 100%;
}

.table-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin: 0 0 1rem;
}

.legend-item {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #263b46;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.7rem;
}

.legend-proprietary,
.row-proprietary .group-cell {
  background: var(--rose);
}

.legend-base,
.row-base .group-cell {
  background: #fff6dc;
}

.legend-agent,
.row-agent .group-cell {
  background: var(--mint);
}

.legend-model-reward,
.row-model-reward .group-cell {
  background: var(--sky);
}

.legend-verifiable,
.row-verifiable .group-cell {
  background: var(--lavender);
}

.results-table {
  background: #ffffff;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 1260px;
  width: 100%;
}

.results-table th,
.results-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.72rem 0.78rem;
  text-align: left;
  vertical-align: middle;
}

.results-table th {
  background: #f1f6f7;
  color: #20343d;
  font-size: 0.78rem;
  font-weight: 800;
  position: sticky;
  text-transform: uppercase;
  top: 0;
  white-space: nowrap;
}

.sortable-table th[data-key] {
  cursor: pointer;
}

.sortable-table th.sorted {
  color: var(--wine);
}

.results-table td.numeric,
.results-table th.numeric,
.meta-table td:not(:first-child),
.meta-table th:not(:first-child) {
  text-align: right;
}

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

.results-table tbody tr:hover {
  background: #fbfdfd;
}

.results-table .model-cell {
  font-weight: 800;
  min-width: 320px;
}

.results-table .group-cell {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.row-proprietary td:first-child {
  border-left: 5px solid #c87a84;
}

.row-base td:first-child {
  border-left: 5px solid #d8a33c;
}

.row-agent td:first-child {
  border-left: 5px solid #61a987;
}

.row-model-reward td:first-child {
  border-left: 5px solid #69a9c8;
}

.row-verifiable td:first-child {
  border-left: 5px solid #8e7cc3;
}

.results-table tr.highlight {
  background: var(--lavender);
}

.results-table tr.highlight td {
  font-weight: 800;
}

.better {
  color: var(--muted);
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.table-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.75rem;
}

.meta-section {
  background: var(--quiet);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}

.meta-table {
  font-size: 0.82rem;
  min-width: 1140px;
}

.meta-table th,
.meta-table td {
  padding: 0.62rem 0.46rem;
}

.meta-table tbody tr.highlight {
  background: var(--mint);
}

.appendix-section {
  background: #ffffff;
}

.appendix-content {
  display: grid;
  gap: 2rem;
  padding: 1.5rem;
}

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

.insight-card {
  border-left: 4px solid var(--teal);
  padding: 0.2rem 1rem 0.2rem 1.1rem;
}

.insight-card h3 {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
}

.insight-card p {
  color: var(--muted);
  margin: 0;
}

.appendix-group {
  display: grid;
  gap: 1rem;
}

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

.appendix-grid.four-up,
.appendix-grid.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.appendix-grid.analysis-grid {
  align-items: stretch;
}

.appendix-grid.analysis-grid figure {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.appendix-grid.analysis-grid img {
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: #ffffff;
}

.appendix-grid.analysis-grid figcaption {
  min-height: 3.4em;
}

.appendix-grid.four-up figcaption,
.appendix-grid.compact-grid figcaption {
  font-size: 0.82rem;
}

.bibtex-header {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.copy-bibtex-btn {
  align-items: center;
  background: var(--teal-dark);
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  gap: 0.5rem;
  min-height: 42px;
  padding: 0 0.9rem;
}

.copy-bibtex-btn:hover {
  background: var(--wine);
}

.copy-bibtex-btn.copied {
  background: #257a4a;
}

pre {
  background: #f3f6f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 0.9rem;
  overflow-x: auto;
  overflow-wrap: anywhere;
  padding: 1rem;
  white-space: pre-wrap;
}

code {
  background: transparent;
  color: inherit;
}

.footer {
  background: #ffffff;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 2.5rem 1.5rem;
}

.scroll-to-top {
  align-items: center;
  background: var(--teal-dark);
  border: 0;
  border-radius: 50%;
  bottom: 1.25rem;
  box-shadow: 0 10px 22px rgba(20, 33, 43, 0.2);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  height: 46px;
  justify-content: center;
  opacity: 0;
  position: fixed;
  right: 1.25rem;
  transition: opacity 160ms ease, transform 160ms ease;
  visibility: hidden;
  width: 46px;
  z-index: 30;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-2px);
}

@media screen and (max-width: 1024px) {
  .metric-grid,
  .method-grid,
  .resource-grid,
  .page-gallery,
  .deck-gallery,
  .appendix-grid.four-up,
  .appendix-grid.compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 768px) {
  .top-nav {
    gap: 0.75rem;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .publication-hero .hero-body {
    padding: 3.2rem 1rem 2rem;
  }

  .publication-title {
    font-size: 2.1rem;
  }

  .publication-authors {
    font-size: 0.98rem;
  }

  .publication-links .button {
    flex: 1 1 142px;
  }

  .section {
    padding: 3rem 1rem;
  }

  .metric-grid,
  .method-grid,
  .resource-grid,
  .page-gallery,
  .deck-gallery,
  .insight-grid,
  .appendix-grid,
  .appendix-grid.four-up,
  .appendix-grid.compact-grid {
    grid-template-columns: 1fr;
  }

  .figure-panel figcaption,
  .section-copy {
    text-align: left;
  }

  .gallery-heading,
  .appendix-drawer summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .bibtex-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
