/* Project-specific styles on top of the template, in the paper's palette:
   green #2E6B4F (the benchmark as published), blue #2F64B5 (Sonnet 5), grey for honest code. */

:root {
  --green: #2E6B4F;
  --green-tint: #F1F6F2;
  --blue: #2F64B5;
  --ink: #232323;
  --mute: #6b6b6b;
  --edge: #D3DAD5;
}

body { color: var(--ink); }

.publication-title { line-height: 1.2; }

.publication-venue-line {
  color: var(--mute);
  font-size: 1rem;
}

.hf-icon { font-size: 1.05rem; line-height: 1; }

.publication-links .button.is-dark {
  background-color: var(--ink);
}
.publication-links .button.is-dark:hover {
  background-color: var(--green);
}

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

.teaser-caption {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: #444;
}

.figure-caption {
  margin-top: 0.9rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--mute);
  text-align: center;
}

/* Carousel images keep their aspect ratio on a white card */
.results-carousel .item {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 6px;
  padding: 1.5rem 3.75rem 0.75rem;
  min-height: 430px;
}
.results-carousel .item img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: contain;
}
.results-carousel .subtitle {
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 0.75rem;
  color: #444;
}

.section .content ol li { margin-bottom: 0.5rem; }

.content a, .footer a { color: var(--green); }
.content a:hover, .footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
  .publication-title { font-size: 2rem !important; }
  .results-carousel .item { padding: 1rem 2.75rem 0.5rem; min-height: 0; }
  .results-carousel .item img { height: auto; }
}

.shaded-section { background-color: #f5f5f5; }
.results-carousel .item { padding-bottom: 2.75rem; }
.results-carousel .slider-pagination { bottom: 0.9rem; }

.btn-svg { width: 1em; height: 1em; vertical-align: -0.125em; }


/* Code cards: the three pairs, the loading snippet and the BibTeX entry */
.code-card {
  background: #fff;
  border: 1px solid var(--edge);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(20, 45, 32, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  background: #F7F9F8;
  border-bottom: 1px solid var(--edge);
  font-family: 'Google Sans', sans-serif;
  font-size: 0.82rem;
  line-height: 1.3;
}
.code-role { font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 0.45rem; }
.code-who { color: var(--mute); text-align: right; }
.code-card.honest .code-role::before,
.code-card.backdoored .code-role::before {
  content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #A3ABA6;
}
.code-card.backdoored .code-role::before { background: var(--green); }

.code-card pre,
.content .code-card pre {
  flex: 1;
  margin: 0;
  padding: 0.7rem 0;
  background: none;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  font-size: inherit;
}
.code-card pre code,
.code-card pre code.hljs {
  display: block;
  padding: 0;
  background: none;
  overflow: visible;
  white-space: pre-wrap;
  font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--ink);
  font-variant-ligatures: none;
}
.code-card .line { display: block; padding: 0 1rem; }
.code-card.numbered pre { counter-reset: ln; }
.code-card.numbered .line {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr);
  column-gap: 0.75rem;
  padding: 0 0.9rem 0 0.6rem;
  counter-increment: ln;
}
.code-card.numbered .line::before {
  content: counter(ln);
  text-align: right;
  color: #B4BCB7;
  user-select: none;
}
.code-card .line.hl {
  background: #E4EFE8;
  box-shadow: inset 3px 0 0 var(--green);
}

/* Syntax colours in the paper's palette */
.code-card .hljs-keyword,
.code-card .hljs-literal { color: var(--green); font-weight: 600; }
.code-card .hljs-built_in { color: var(--blue); }
.code-card .hljs-number,
.code-card .hljs-string { color: #9A6A1F; }
.code-card .hljs-comment { color: var(--mute); font-style: italic; }
.code-card .hljs-title,
.code-card .hljs-params,
.code-card .hljs-attr,
.code-card .hljs-variable { color: var(--ink); font-weight: normal; }

.code-card-foot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.9rem;
  border-top: 1px solid var(--edge);
  background: #FBFCFB;
  font-size: 0.82rem;
  color: var(--mute);
}
.code-card-foot code {
  margin-left: auto;
  background: none;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  font-variant-ligatures: none;
}
.io-ok, .io-no {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem; border-radius: 50%;
  color: #fff; font-size: 0.62rem; font-weight: 700; line-height: 1;
}
.io-ok { background: var(--green); }
.io-ok::after { content: "\2713"; }
.io-no { background: #D64545; }
.io-no::after { content: "\2715"; }

/* The three pairs */
.pairs-wrap { margin-top: 1.75rem; }
.pairs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 1.5rem;
}
.pair {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0.7rem;
  margin-bottom: 1.5rem;
  min-width: 0;
}
.pair-title {
  text-align: center;
  font-family: 'Google Sans', sans-serif;
  font-size: 1.08rem;
  color: var(--ink);
  margin: 0;
}
.pair-title sup { line-height: 0; }
.pair-input {
  margin: -0.35rem 0 0.1rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--mute);
}
.pair-input code {
  margin-left: 0.3rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--ink);
}
.pairs-caption { max-width: 960px; margin-left: auto; margin-right: auto; }

/* Loading snippet and BibTeX sit under their headings */
.content .code-card { margin-top: 1rem; }

@media (max-width: 768px) {
  .pairs { grid-template-columns: minmax(0, 1fr); }
}

.figure-one {
  padding: 3rem 1.5rem;
}
.figure-one .figure-caption {
  max-width: 760px;
  margin: 1.25rem auto 0;
}
