/* Classes page: the stem drawing, its three notes, and the h1's second line. */

/* caf-sub = sub-line: the shelf label inside the h1, under the question */
.caf-ttl .caf-sub {
  display: block;
  margin-block-start: 0.375rem;
  font-size: var(--size-of-a-section-heading);
}

/* caf-stm = stem scene: the drawing on the left, its notes on the right (sits on a caf-rim) */
.caf-stm {
  display: grid;
  grid-template-columns: clamp(6rem, 28%, 9rem) 1fr;
  gap: 1rem clamp(1.25rem, 5vw, 2.5rem);
  align-items: center;
}

/* caf-svg = the drawing: ivory line, no fill, round joins */
.caf-svg {
  inline-size: 100%;
  overflow: visible;
  fill: none;
  stroke: var(--colour-of-the-type);
  stroke-width: 3;
  stroke-linejoin: round;
}

/* caf-drw = a line that draws itself: path length is 1, so one dash covers the whole line; --place-in-the-turn staggers the run */
.caf-drw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--time-to-settle) var(--ease-with-weight);
  transition-delay: calc(var(--place-in-the-turn, 0) * 200ms);
}

/* caf-bare-on = state: the lines wait undrawn until the scene enters the window (script adds it, only below the fold) */
.caf-bare-on .caf-drw { stroke-dashoffset: 1; }

/* caf-nts = notes: the three captions beside the drawing, real text in the column flow */
.caf-nts {
  display: grid;
  align-self: stretch;
  align-content: space-between;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  line-height: 1.25;
}
.caf-nts li {
  padding-block-end: 0.875rem;
  border-block-end: var(--thickness-of-an-outline) dotted currentColor;
}
.caf-nts li:last-child { padding-block-end: 0; border-block-end: 0; }

/* the private-class panel and the ask list keep their own breathing room */
.caf-pan .caf-sh { margin-block-end: 0.75rem; }
.caf-rim .caf-dl > div:last-child { border-block-end: 0; }
.caf-rim .caf-dl > div:first-child { padding-block-start: 0; }

@media (prefers-reduced-motion: reduce) {
  .caf-drw { transition: none; }
  .caf-bare-on .caf-drw { stroke-dashoffset: 0; }
}
