/* 3D course figures: rendered stills with numbered pins and a legend.
   Markup is written by scripts/add-course-figures.py from scripts/course-figures/manifest-*.json. */
.cf-figure {
  margin: 22px 0 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--border, #1c2a3a);
  border-radius: 12px;
  overflow: hidden;
  background: radial-gradient(circle at 58% 42%, #12303c 0%, #0a1824 58%, #070e18 100%);
}
.cf-stage {
  position: relative;
  min-width: 0;
  /* Pins are placed in % of this box, so it must be exactly the image's height,
     never stretched to a taller caption column. */
  align-self: center;
  background-image:
    linear-gradient(rgba(78, 205, 196, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78, 205, 196, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.cf-stage img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--cf-ratio, 16 / 10);
}
.cf-pin {
  position: absolute;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border-radius: 50%;
  background: #4ecdc4;
  color: #04121a;
  font: 700 13px/24px 'DM Sans', Arial, sans-serif;
  text-align: center;
  box-shadow: 0 0 0 3px rgba(6, 10, 18, 0.72), 0 0 14px rgba(78, 205, 196, 0.45);
  pointer-events: none;
}
.cf-figure figcaption {
  padding: 16px 18px 18px;
  border-top: 1px solid var(--border, #1c2a3a);
  background: rgba(6, 12, 20, 0.55);
  font-size: 0.94rem;
  line-height: 1.5;
  color: var(--text-secondary, #b6c3cf);
}
.cf-kicker {
  display: block;
  font: 600 0.72rem/1 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4ecdc4;
  margin-bottom: 8px;
}
.cf-figure figcaption strong {
  display: block;
  color: var(--text-primary, #eef4f8);
  font-size: 1.02rem;
  margin-bottom: 4px;
}
.cf-figure figcaption p {
  margin: 0 0 10px;
}
.cf-legend {
  list-style: none;
  counter-reset: cf;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}
.cf-legend li {
  counter-increment: cf;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}
.cf-legend li::before {
  content: counter(cf);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #4ecdc4;
  color: #04121a;
  font: 700 12px/22px 'DM Sans', Arial, sans-serif;
  text-align: center;
}
@media (min-width: 900px) {
  .cf-figure {
    grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  }
  .cf-figure figcaption {
    border-top: 0;
    border-left: 1px solid var(--border, #1c2a3a);
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}
@media (max-width: 520px) {
  .cf-pin {
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    font-size: 11px;
    line-height: 20px;
  }
}

/* Hub module cards and course cards: the 3D still replaces the line icon. */
.cf-thumbwrap,
.as-thumbnail.cf-has-thumb,
.su-thumbnail.cf-has-thumb {
  height: auto;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  display: block;
  background: radial-gradient(circle at 55% 45%, #14333f 0%, #0b1a26 60%, #08121c 100%);
  border-bottom: 1px solid var(--border, #1c2a3a);
}
.cf-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
a:hover .cf-thumb,
a:focus-visible .cf-thumb {
  transform: scale(1.035);
}
@media (prefers-reduced-motion: reduce) {
  .cf-thumb {
    transition: none;
  }
  a:hover .cf-thumb,
  a:focus-visible .cf-thumb {
    transform: none;
  }
}
/* Hub hero still (replaces a line drawing in the hero panel). */
.cf-hero-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}
/* /courses/ cards are padded; let the still run edge to edge at the top. */
.cr-card > .cr-thumb {
  margin: -22px -22px 6px;
  border-radius: 13px 13px 0 0;
}
