:root {
  --text: #000000;
  --muted: #000000;
  --heading: #000000;
  --link: #000000;
  --border: #dedede;
  --soft: #f7f7f7;
  --softer: #fbfbfb;
  --dark: #000000;
  --violet: #6d4aa4;
  --brand-purple: #9b2fa4;
  --brand-blue: #1579d6;
  --max: 980px;
  --wide: 980px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
}

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

.container {
  width: 100%;
  max-width: var(--max);
  min-width: 0;
  margin: 0 auto;
  padding: 0 24px;
}

.wide-container {
  max-width: var(--max);
}

.narrow-container {
  max-width: var(--max);
}

.hero {
  padding: 58px 0 26px;
  text-align: center;
  background: #ffffff;
}

.hero-container {
  max-width: 1060px;
}

.publication-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 1000px;
  margin: 0 auto;
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  overflow-wrap: break-word;
}

.title-icon {
  flex-shrink: 0;
  align-self: center;
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.title-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
}

.title-brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.title-divider {
  width: 100%;
  height: 2px;
  margin: 6px 0;
  border: none;
  background: #333;
}

.title-subtitle {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text);
}

.brand-m {
  color: var(--brand-purple);
}

.brand-bench {
  color: var(--brand-blue);
}

.publication-status {
  margin: 14px 0 16px;
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
}

.publication-authors {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 14px;
  max-width: 930px;
  margin: 0 auto;
  color: var(--text);
  font-size: 18px;
  line-height: 1.55;
  text-align: center;
}

.publication-authors span {
  display: inline-block;
  margin: 0;
  white-space: nowrap;
}

.publication-affiliations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 18px;
  max-width: var(--max);
  margin: 10px auto 0;
  color: var(--text);
  font-size: 15px;
}

.contribution-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.external-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 8px 15px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--dark);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.external-link:hover {
  background: #222222;
  text-decoration: none;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: currentColor;
  flex: 0 0 auto;
}

.button-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-icon-text {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.section {
  padding: 46px 0;
}

.section + .section {
  border-top: 1px solid #eeeeee;
}

.section-title {
  margin: 0 0 18px;
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  letter-spacing: 0;
}

.section-intro {
  max-width: var(--max);
  margin: -4px auto 24px;
  color: var(--muted);
  text-align: center;
}

.content {
  color: var(--text);
  font-size: 17px;
  text-align: justify;
}

.content p {
  margin: 0 0 16px;
}

.compact-content {
  max-width: 900px;
  margin: 22px auto 0;
}

.teaser-section {
  padding-top: 24px;
}

.teaser-images-wrap {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  width: 100%;
}

.teaser-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.teaser-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.teaser-label {
  margin-top: auto;
  padding-top: 10px;
  font-size: 15px;
  color: var(--heading);
  font-weight: 500;
}

.teaser-figure,
.taxonomy-figure,
.example-card {
  margin: 0;
}

.teaser-figure img,
.taxonomy-figure img,
.example-card img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.teaser-figure figcaption,
.taxonomy-figure figcaption,
.example-card figcaption {
  max-width: 1000px;
  margin: 12px auto 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
  text-align: center;
}

.taxonomy-figure {
  max-width: 900px;
  margin: 0 auto 26px;
}

.dimension-grid,
.example-grid,
.protocol-grid,
.finding-grid {
  display: grid;
  gap: 18px;
}

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

.dimension-card,
.protocol-grid article,
.finding-grid article,
.code-panel,
.bibtex-panel {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.dimension-card,
.finding-grid article {
  padding: 20px 22px;
}

.dimension-card h3,
.protocol-grid h3,
.finding-grid h3 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

.dimension-card:nth-child(1) h3,
.dimension-card:nth-child(2) h3,
.dimension-card:nth-child(3) h3 {
  color: var(--violet);
}

.dimension-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text);
}

.dimension-card li + li {
  margin-top: 6px;
}

.dimension-card p,
.finding-grid p {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

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

.example-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.example-card img {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.example-card figcaption {
  padding: 12px 14px 16px;
  margin: 0;
  text-align: left;
}

.tab-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--dark);
  background: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.tab.active {
  color: #ffffff;
  border-color: var(--dark);
  background: var(--dark);
}

/* Model Type Toggle */
.model-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.model-toggle {
  display: inline-flex;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 4px;
}

.model-toggle .toggle-btn {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.model-toggle .toggle-btn.active {
  background: #fff;
  color: var(--heading);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.model-toggle .toggle-btn:hover:not(.active) {
  color: var(--heading);
  background: rgba(255,255,255,0.5);
}

.table-wrap {
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 8px 9px;
  border-bottom: 1px solid #eeeeee;
  text-align: left;
}

th {
  color: var(--heading);
  background: var(--soft);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

th.sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.18s ease, background-color 0.18s ease;
}

th.sortable:hover {
  color: var(--violet);
  background: #f8f3ff;
}

th.sorted-asc,
th.sorted-desc {
  color: var(--violet);
  background: #f4ecff;
}

.sort-label {
  pointer-events: none;
}

.sort-indicator {
  display: inline-block;
  min-width: 0.8em;
  margin-left: 4px;
  color: #9b7bd1;
  font-size: 0.9em;
  font-weight: 800;
  pointer-events: none;
}

td {
  color: var(--text);
  font-size: 12px;
}

td.rank-1 {
  background-color: #e6ccff;
  font-weight: 600;
}

td.rank-2 {
  background-color: #f7e6ff;
}

tbody tr:hover td.rank-1 {
  background-color: #d9b3ff;
}

tbody tr:hover td.rank-2 {
  background-color: #f0d9ff;
}

/* Disable rank colors when "All Models" is selected */
table.hide-ranks td.rank-1,
table.hide-ranks td.rank-2 {
  background-color: transparent;
  font-weight: normal;
}

table.hide-ranks tbody tr:hover td.rank-1,
table.hide-ranks tbody tr:hover td.rank-2 {
  background-color: transparent;
}

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

td:first-child,
td:nth-child(2) {
  font-weight: 700;
}

.table-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.qualitative-section {
  background: #ffffff;
}

.axis-tabs {
  display: flex;
  width: fit-content;
  flex-wrap: wrap;
  justify-content: center;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 4px;
  margin: 0 auto 12px;
  max-width: var(--max);
}

.axis-tab {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--muted);
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.axis-tab.active {
  background: #fff;
  color: var(--heading);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.axis-tab:hover:not(.active) {
  color: var(--heading);
  background: rgba(255,255,255,0.5);
}

.sub-tabs {
  display: flex;
  width: fit-content;
  flex-wrap: wrap;
  justify-content: center;
  background: #f1f3f5;
  border-radius: 8px;
  padding: 4px;
  margin: 0 auto 20px;
  max-width: var(--max);
}

.sub-tab {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.sub-tab.active {
  background: #fff;
  color: var(--heading);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sub-tab:hover:not(.active) {
  color: var(--heading);
  background: rgba(255,255,255,0.5);
}

.qualitative-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.axis-label {
  margin: 0 0 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.case-header {
  padding: 22px 22px 18px;
}

.case-header h3 {
  margin: 0;
  color: var(--heading);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.case-header p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
}

.case-visual {
  margin: 0;
  padding: 0 22px 18px;
}

/* Carousel */
.carousel-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px;
}

.carousel-viewport {
  flex: 1;
  overflow: hidden;
  border-radius: 8px;
}

.carousel-slides {
  display: flex;
  transition: transform 0.35s ease;
}

.carousel-slide {
  min-width: 100%;
}

.carousel-btn {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #ffffff;
  color: var(--heading);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: #f1f3f5;
  border-color: #ccc;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 12px 0 4px;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border: 1px solid #ccc;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.carousel-dot.active {
  background: var(--heading);
  border-color: var(--heading);
}

.carousel-dot:hover:not(.active) {
  background: #e0e0e0;
}

.video-comparison-container {
  display: flex;
  gap: 16px;
  width: 100%;
}

.video-wrapper {
  flex: 1 1 0; /* Ensures both sides are exactly equal width */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.video-wrapper video {
  width: 100%;
  height: 100%;         /* Ensures it stretches vertically to match the other video */
  object-fit: cover;    /* Completely fills the space without black padding */
  background: transparent;
  display: block;
}

.video-score {
  width: 100%;
  text-align: center;
  padding: 8px 12px;
  font-weight: 500;
  color: var(--heading);
  background-color: #fcfcfc;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.case-visual figcaption,
.dataset-figure figcaption {
  padding: 11px 4px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

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

.protocol-grid article {
  padding: 18px;
}

.protocol-grid span {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--violet);
  font-size: 13px;
  font-weight: 800;
}

.protocol-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.formula {
  margin: 22px auto 0;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--heading);
  background: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  line-height: 1.5;
  text-align: center;
  overflow-x: auto;
}

.dataset-layout {
  display: grid;
  gap: 22px;
  max-width: var(--max);
}

.dataset-layout .content {
  max-width: var(--max);
  margin: 0 auto;
}

.dataset-stack {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.dataset-figure {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: none;
}

.dataset-figure img {
  width: auto;
  max-width: 100%;
  max-height: 380px;
  margin: 0 auto;
  border-radius: 6px;
  object-fit: contain;
}

.code-panel,
.bibtex-panel {
  padding: 16px;
}

.panel-title {
  margin: 0 0 10px;
  color: var(--heading);
  font-weight: 700;
}

pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: #1f2937;
  background: #f7f7f7;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.copy-button {
  margin-top: 12px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--dark);
  border-radius: 999px;
  color: #ffffff;
  background: var(--dark);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.copy-button:hover {
  background: #222222;
}

.footer {
  padding: 38px 0 52px;
  color: var(--muted);
  background: var(--soft);
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 14px;
}

.footer p + p {
  margin-top: 10px;
}

@media (max-width: 900px) {
  .publication-title {
    font-size: 34px;
  }

  .dimension-grid,
  .example-grid,
  .protocol-grid,
  .finding-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .hero {
    padding-top: 38px;
  }

  .publication-title {
    font-size: 21px;
    line-height: 1.2;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .publication-status {
    font-size: 18px;
  }

  .publication-authors {
    gap: 3px 9px;
    max-width: 100%;
    font-size: 15px;
  }

  .publication-affiliations {
    max-width: 100%;
    gap: 2px 12px;
    font-size: 14px;
  }

  .section {
    padding: 36px 0;
  }

  .section-title {
    font-size: 26px;
  }

  .content {
    font-size: 16px;
    text-align: left;
  }

  .publication-links,
  .tab-row {
    align-items: stretch;
    flex-direction: column;
  }

  /* .axis-tabs will automatically wrap its items natively due to flex-wrap; removed flex-direction override */

  .case-header,
  .case-visual {
    padding-left: 14px;
    padding-right: 14px;
  }

  .external-link,
  .tab {
    justify-content: center;
  }

  .external-link {
    width: 100%;
    max-width: 320px;
    align-self: center;
  }

  .formula {
    font-size: 17px;
    text-align: left;
  }
}
