/* Match the source marquee; equal sets include their trailing gap for a seamless loop. */
.certificate-section {
  --certificate-height: clamp(88px, 9.5vw, 128px);
  --certificate-gap: 12px;
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 1200px;
  min-width: 0;
  margin-top: 4px;
}
.certificate-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  margin-bottom: 8px;
}
.certificate-heading h2 {
  color: #8193a7;
  font-size: .75rem;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-align: center;
}
.certificate-frame {
  position: relative;
  isolation: isolate;
}
/* The veil stays outside the scroller: it never travels with either set. */
.certificate-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: rgba(5, 7, 8, .32);
}
.certificate-window {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 0 8px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.certificate-window:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.certificate-track { display: flex; width: max-content; }
.certificate-set {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: var(--certificate-gap);
  margin: 0;
  padding: 0 var(--certificate-gap) 0 0;
  list-style: none;
}
.certificate-card {
  flex: 0 0 auto;
  margin: 0;
  overflow: hidden;
  border: 1px solid #1b2630;
  border-radius: 8px;
  background: var(--bg, #050708);
}
.certificate-card img {
  display: block;
  width: auto;
  height: var(--certificate-height);
  max-width: none;
  object-fit: contain;
  filter: saturate(.45);
  opacity: .85;
}
.certificate-section[data-ready=true] .certificate-window { overflow-x: hidden; }
.certificate-section[data-ready=true] .certificate-track {
  animation: certificate-marquee 32s linear infinite;
}
.certificate-section[data-suspended=true] .certificate-track { animation-play-state: paused; }
@keyframes certificate-marquee { to { transform: translateX(-50%); } }
@media (max-width: 790px) {
  /* On phones the certificates follow the graph, before the workflow column. */
  .certificate-section { grid-row: 2; margin-top: 0; }
  .showcase > .workflow-panel { grid-row: 3; }
}
@media (max-width: 540px) {
  .certificate-section { --certificate-gap: 10px; }
  .certificate-card { border-radius: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .certificate-section[data-ready=true] .certificate-track { animation: none; }
  .certificate-section[data-ready=true] .certificate-window {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .certificate-set[aria-hidden=true] { display: none; }
}
