/* ==========================================================================
   CAROUSEL (.carousel), Peter, 3 Nov 2026, on the first proposal's opening:
   "Let's put a carousel in"; "a little carousel of nice designed images";
   "the cards are gone, so I don't know where I am".
   One slide at a time: a drawing on the soft panel, then a short title and
   one line. It moves on by itself, pauses while the pointer or the keyboard
   is on it, and Back, Forward, the dots and the arrow keys all work. Built
   from the card parts (surface, hairline, --radius-lg) and the icon button.
   Behaviour: src/js/carousel.js ([data-carousel]). Reduced motion: no glide
   and no moving on by itself.
   ========================================================================== */
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--color-border); background: var(--color-surface); }
.carousel__track { display: flex; margin: 0; padding: 0; list-style: none; transition: transform .5s cubic-bezier(0.16, 1, 0.3, 1); will-change: transform; }
.carousel__slide { flex: 0 0 100%; min-width: 0; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-8); align-items: center; padding: var(--space-8); box-sizing: border-box; }
.carousel__art { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: var(--radius-md); background: var(--color-bg-subtle); color: var(--color-text); }
.carousel__art svg { width: 78%; height: auto; overflow: visible; }
.carousel__step { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.carousel__title { margin: 0 0 var(--space-3); font-size: var(--text-section); font-weight: var(--weight-medium); line-height: 1.3; color: var(--color-text); }
.carousel__line { margin: 0; font-size: var(--text-base); line-height: 1.5; color: var(--color-text); }
.carousel__nav { display: flex; align-items: center; justify-content: center; gap: var(--space-3); margin-top: var(--space-3); }
.carousel__dots { display: flex; align-items: center; gap: var(--space-2); }
.carousel__dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--radius-full); background: var(--color-border-strong); cursor: pointer; }
.carousel__dot[aria-current="true"] { width: 24px; background: var(--color-text); }
.carousel__dot:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
@media (max-width: 700px) {
  .carousel__slide { grid-template-columns: 1fr; gap: var(--space-4); padding: var(--space-4); }
  .carousel__art { aspect-ratio: 16 / 9; }
  .carousel__art svg { width: 56%; }
}
@media (prefers-reduced-motion: reduce) { .carousel__track { transition: none; } }
/* the drawings: paper is white, the soft fill is the app's highlighter yellow, a dot is solid */
.carousel__art .carousel__paper { fill: var(--color-surface); }
.carousel__art .carousel__fill { fill: var(--color-hilite); }
.carousel__art .carousel__dot-fill { fill: currentColor; }
