/* Figures of "AI Agents Are Closer to Protein Folding Than They Appear".
   The plots are SVGs exported by figures/blog/export_blog.py in the foldbench repository; panel letters,
   titles, the colour key and the captions are set here in the page's own type. */

.article-content code {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  color: var(--fg1);
}

.article-content p a.fa-ref {
  text-decoration: none;
}

.article-content p a.fa-ref:hover {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--fg4) 38%, transparent);
  text-underline-offset: 2px;
}

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

.fa-fig figcaption {
  margin-top: 1rem;
  color: var(--fg4);
  font-family: var(--font-text-variant);
  font-size: 14px;
  line-height: 1.45;
}

.fa-fig figcaption b {
  color: var(--fg1);
  font-weight: 600;
}

/* wider than the text column on a screen that has the room, like the other posts' large figures */
@media (min-width: 1000px) {
  .article-content figure.fa-wide {
    width: min(920px, calc(100vw - 2rem));
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .fa-wide figcaption {
    max-width: var(--article-width);
    margin-right: auto;
    margin-left: auto;
  }
}

.fa-head {
  margin-bottom: 0.35rem;
  color: var(--fg1);
  font-family: var(--font-text-variant);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.fa-head b {
  margin-right: 0.5em;
  color: var(--fg);
  font-size: 16px;
  font-weight: 700;
}

/* ---------- Figure 1: six predictions ---------- */
.fa-structures {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.6rem 1.4rem;
}

.fa-structure img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.fa-structure .fa-head {
  margin-bottom: 0.15rem;
}

.fa-name {
  margin-top: 0.5rem;
  color: var(--fg);
  font-family: var(--font-text-variant);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.fa-detail {
  color: var(--fg4);
  font-family: var(--font-text-variant);
  font-size: 13px;
  line-height: 1.4;
}

/* ---------- Figure 2: results ---------- */
.fa-key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.4rem;
  justify-content: center;
  margin-bottom: 1.1rem;
  color: var(--fg1);
  font-family: var(--font-text-variant);
  font-size: 13px;
  line-height: 1.3;
}

.fa-key span {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  white-space: nowrap;
}

.fa-key i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
}

.fa-panels {
  display: grid;
  gap: 1.5rem 20px;
}

.fa-panels + .fa-panels {
  margin-top: 1.6rem;
}

.fa-panels-top {
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

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

.fa-panel img {
  width: 100%;
  height: auto;
}

/* ---------- Figure 3: one trial ---------- */
.fa-trial-scroll {
  overflow-x: auto;
}

/* the plot's proportions and the four boxes come from figures/trial-layout.css, written with the SVG */
.fa-trial {
  position: relative;
}

.fa-trial-plot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* each render rests on the bottom of its box, as in the paper's layout */
.fa-trial-frame {
  position: absolute;
  object-fit: contain;
  object-position: center bottom;
}

.fa-account {
  margin-top: 1.4rem;
  padding: 0.85rem 1.1rem 1rem;
  border-radius: 6px;
  background: #f3f2ef;
}

.fa-account .fa-head {
  margin-bottom: 0.5rem;
  color: var(--fg);
  font-weight: 600;
}

.article-content .fa-account p {
  margin: 0;
  color: var(--fg1);
  font-size: 14px;
  line-height: 1.55;
}

/* ---------- references, by author and year as in the paper ---------- */
.article-references ol.fa-reflist {
  padding-left: 0;
  list-style: none;
}

.article-references ol.fa-reflist li {
  padding-left: 0;
}

@media (max-width: 999px) {
  .fa-panels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .fa-structures {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.3rem 1rem;
  }

  .fa-panels-top,
  .fa-panels-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .fa-panels-grid .fa-panel {
    max-width: 340px;
  }

  /* the trial's timeline is too fine to shrink to a phone's width, so it scrolls sideways there */
  .fa-trial {
    width: 640px;
  }
}

@media print {
  .article-content figure.fa-wide {
    width: 100%;
    margin-left: 0;
    transform: none;
  }

  .fa-fig {
    break-inside: avoid;
  }
}

/* the Discussion's subsections, set in from the sections in the table of contents */
.toc-list .fa-toc-sub {
  padding-left: 0.9rem;
}

/* ---------- Explore the Results: not part of the paper's text, so it stands in a box of its own ---------- */
.article-content .fa-explore {
  margin: 3rem 0 2.8rem;
  padding: 1.5rem 1.7rem 1.7rem;
  border: 1px solid color-mix(in srgb, var(--fg4) 22%, transparent);
  border-radius: 12px;
  background: #f6f5f1;
}

.article-content .fa-explore h2 {
  margin-top: 0;
}

.fa-explore > p {
  max-width: 44rem;
}

/* what is picked out inside the box is a shade darker than the box */
.fa-explore .ab {
  --ab-tint: #e9e7e0;
}

@media (min-width: 1000px) {
  .article-content .fa-explore {
    width: min(980px, calc(100vw - 2rem));
    margin-left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 640px) {
  .article-content .fa-explore {
    padding: 1.1rem 1rem 1.2rem;
  }
}
