:root {
  --ink: #202124;
  --muted: #5f6368;
  --line: #dfe3e8;
  --paper: #ffffff;
  --soft: #f6f8fb;
  --blue: #315fbd;
  --blue-soft: #eaf1ff;
  --green: #2e7d52;
  --amber: #a86a00;
  --red: #a64242;
  --shadow: 0 12px 32px rgba(32, 33, 36, 0.08);
}

* {
  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", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(18px, calc((100vw - 1120px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: flex;
  align-items: center;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-icon {
  width: 22px;
  height: 22px;
  margin-right: 6px;
  object-fit: contain;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.hero {
  padding: 72px 0 28px;
  text-align: center;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin: 0 auto;
  font-size: clamp(22px, 3.2vw, 36px);
  font-weight: 800;
}

.hero-icon {
  display: block;
  width: 120px;
  height: 120px;
  margin: 0 auto 2px;
  object-fit: contain;
}

.subtitle {
  max-width: 830px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 20px;
}

.authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 4px 12px;
  margin: 28px auto 0;
  max-width: 980px;
  font-size: 16px;
  line-height: 1.35;
}

.authors span {
  display: inline-block;
  min-height: 1.35em;
  transition: color 0.15s ease;
}

.authors sup {
  line-height: 0;
}

.authors a {
  color: var(--ink);
  text-decoration: none;
}

.authors a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.affiliations {
  max-width: 960px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 14px;
}

.affiliations p {
  margin: 4px 0;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 700;
  background: var(--paper);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(32, 33, 36, 0.1);
  text-decoration: none;
}

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

.teaser {
  margin-top: 10px;
}

.teaser.paper-width {
  width: min(820px, calc(100% - 36px));
}

.teaser img,
.paper-figure img {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.teaser img:hover {
  transform: scale(1.02);
}

.teaser figcaption {
  max-width: 980px;
  margin: 14px auto 0;
  text-align: left;
}

.paper-figure {
  margin: 28px 0 0;
}

.results-figure {
  grid-column: 1 / -1;
  margin: 0;
}

figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.section {
  padding: 54px 0;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 16px;
  font-size: 30px;
  padding-left: 14px;
  border-left: 4px solid var(--blue);
}

.section > p {
  max-width: 1040px;
  margin: 0 0 14px;
  color: #34383d;
}

.note,
.disclaimer {
  color: var(--muted) !important;
  font-size: 14px;
}

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

.contrib-grid article,
.result-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  background: var(--soft);
}

.result-card.wide {
  grid-column: 1 / -1;
}

.contrib-grid h3,
.result-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.contrib-grid p,
.result-card p {
  margin: 0;
  color: var(--muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 22px 0 4px;
}

.stat-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--blue-soft);
  text-align: center;
}

.stat-grid strong {
  display: block;
  color: var(--blue);
  font-size: 28px;
  line-height: 1;
}

.stat-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.table-scroll {
  width: 100%;
  margin-top: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.results-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.metric-table {
  min-width: 500px;
}

.category-table {
  min-width: 860px;
}

.external-table {
  min-width: 500px;
}

.results-table th,
.results-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
}

.results-table th {
  color: var(--muted);
  font-weight: 700;
  background: var(--soft);
  white-space: nowrap;
}

.results-table th:first-child,
.results-table td:first-child {
  min-width: 160px;
  text-align: left;
  white-space: normal;
}

.category-table th:first-child,
.category-table td:first-child {
  min-width: 175px;
}

.external-table th:first-child,
.external-table td:first-child {
  min-width: 190px;
}

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

.results-table tr.highlight td {
  color: var(--blue);
  font-weight: 800;
  background: rgba(49, 95, 189, 0.06);
}

.results-table tbody tr:hover td {
  background: rgba(49, 95, 189, 0.03);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}

.filter-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.filter-button.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.case-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgba(32, 33, 36, 0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.case-card:hover {
  box-shadow: 0 12px 32px rgba(32, 33, 36, 0.12);
  transform: translateY(-2px);
}

.case-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--soft);
}

.case-body {
  padding: 14px;
}

.case-body h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.case-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.prompt-details {
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.prompt-details summary {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.prompt-details p {
  max-height: 180px;
  overflow: auto;
  padding-right: 4px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.resource-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.resource-list span,
.resource-list a {
  display: block;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
}

.resource-list a:hover {
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
}

pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f3f4f6;
  font-size: 13px;
}

.footer {
  padding: 32px 0 54px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 860px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    flex-wrap: wrap;
    gap: 10px 14px;
  }

  .contrib-grid,
  .results-grid,
  .gallery-grid,
  .resource-list {
    grid-template-columns: 1fr;
  }

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

  .hero {
    padding-top: 44px;
  }
}

@media (max-width: 560px) {
  .paper-width {
    width: min(100% - 24px, 1120px);
  }

  h1 {
    font-size: 32px;
  }

  .subtitle {
    font-size: 17px;
  }

  .result-card {
    padding: 14px;
  }

  .results-table {
    font-size: 13px;
  }

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

  .stat-grid {
    grid-template-columns: 1fr;
  }
}
