/* gallery — expanding-slices media band. Three treatments on `data-variant`
 * (sidebar | spotlight | caption): each sets its own collapsed geometry,
 * media filter, spine reveal and copy. The AXIS is not theirs — which way
 * the section runs is `data-orientation`'s, resolved into `data-mode`.
 *
 * Each slice is a radio, so open state is pure CSS and holds scripts-off.
 * The section's script stamps the resolved posture (`data-mode`, `data-copy`) and, in
 * horizontal mode, replaces the flex rules with the track engine at the
 * sheet's end. Widths are cqw against the section's own container; the row
 * height stays viewport-clamped on purpose. Rules ride :where() so no axis
 * adds specificity. */

/* THE FLUSH-CONSTRUCT RAIL — the accordion gallery rests on the content rail
 * like gallery-wall's rather than bleeding. An authored data-inset="page"
 * still wins (the axis's (0,3,0) over this (0,2,0)). */
.sk-component[data-sk="gallery"] {
  padding-inline: var(--sk-page-rail-start) var(--sk-page-rail-end);
}
/* A flush row keeps the gutter for copy; a wall of pictures still bleeds. */
.sk-section[data-content="full"] .sk-component[data-sk="gallery"] {
  padding-inline: 0;
}

/* Registered so the script reads a resolved <time>, not raw token text. */
@property --sk-gallery-dur {
  syntax: "<time>";
  inherits: true;
  initial-value: 480ms;
}

.sk-gallery {
  /* Never past the rail, which a flush band zeroes, so both axes bleed with it. */
  padding-block: min(var(--sk-gutter), var(--sk-page-rail));
  /* Square unless the row is a bounded card; rounds by the media corner only
   * when boxed ([data-width] below). */
  --sk-media-radius: 0;
  container-type: inline-size;
  container-name: sk-gallery;

  /* The dark base a photo loads over, and what every scrim mixes from.
   * NEUTRAL on purpose: the scrim now carries the caption treatment across
   * the whole card foot, and at that coverage any hue in it reads as a cast
   * over the photography. */
  --sk-gallery-scrim: #141414;
  --sk-gallery-over-ink: var(--sk-overlay-ink, rgb(255 255 255 / 0.97));
  --sk-gallery-over-ink-muted: var(--sk-overlay-ink-muted, rgb(255 255 255 / 0.85));

  /* THE SIZE REGISTER — lockup's rungs, which slideshow also rests on. A
   * gallery card is smaller than a hero stage, so `smaller` is the default. */
  --sk-gallery-scale: 0.8;

  /* MOTION TOKENS — one clock, two curves. */
  --sk-gallery-dur: calc(480ms / max(abs(var(--sk-anim-intensity, 1)), 0.1));
  --sk-gallery-ease-spatial: cubic-bezier(0.2, 0, 0, 1);
  --sk-gallery-ease-effects: var(--sk-ease-out, cubic-bezier(0.22, 1, 0.36, 1));

  /* FIT-RULE GEOMETRY. The script MIRRORS the two marked below, plus the
   * copy widths and the caption tier ladder in their own blocks; change one
   * without the other and the two disagree. It READS gap/pad and never needs
   * the stacked heights. NOTE every cqw here resolves against the section, but
   * cqw takes the NEAREST container and .sk-crop is a size container,
   * so these must be consumed OUTSIDE the crop window. */
  --sk-gallery-gap: var(--kit-space-2, 0.65rem);
  --sk-gallery-collapsed: clamp(4rem, 9cqw, 7rem); /* mirrored */
  --sk-gallery-h: clamp(24rem, 46vw, 34rem); /* mirrored */
  --sk-gallery-collapsed-h: 5rem;
  /* The stacked open slot follows the size register — a bigger step needs a
   * taller band, or the copy runs off the card. */
  --sk-gallery-open-h: calc(22rem * max(1, var(--sk-gallery-scale)));
}

.sk-section:is([data-width="page"], [data-width="inset"]) .sk-gallery {
  --sk-media-radius: var(--kit-media-radius);
}
/* A flush band runs its slices to the viewport edge. The 4px the row keeps
 * for the focus ring goes with the gutter — the ring would be clipped by the
 * row's own `overflow: clip` either way — but the ring itself does not: it
 * moves INSIDE the slice, where a flush band still has room for it. */
.sk-section[data-content="full"] .sk-gallery-row {
  padding-inline: 0;
  margin-inline: 0;
}
/* Gated on the input's focus: the dial inherits to the slice's own CTA. */
.sk-section[data-content="full"] .sk-gallery .sk-gallery-item:has(.sk-gallery-input:focus) {
  --sk-focus-ring-offset: -2px;
}

.sk-gallery-row {
  display: flex;
  gap: var(--sk-gallery-gap);
  align-items: stretch;
  padding: 0;
  height: var(--sk-gallery-h);
  /* The ring's 4px: padding so the clip holds it, margin so the edge is the rail. */
  padding-inline: 4px;
  margin-inline: -4px;
  overflow: clip;
}
/* no rows: render nothing, not an empty dark band */
.sk-gallery-row:not(:has(.sk-gallery-item)) {
  display: none;
}

.sk-gallery[data-size="normal"] {
  --sk-gallery-scale: 1;
}
.sk-gallery[data-size="larger"] {
  --sk-gallery-scale: 1.2;
}

/* ── a slice (shared) ─────────────────────────────────────────────────── */
.sk-gallery-item {
  position: relative;
  overflow: clip;
  border-radius: var(--sk-media-radius);
  min-width: 0;
  background: var(--sk-gallery-scrim);
  cursor: pointer;
}
.sk-gallery-item:where(:has(.sk-gallery-input:checked)) {
  cursor: default;
}

/* ── the head: a <label> wrapping the radio, the media, the spine ─────── */
.sk-gallery-head {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: clip;
  cursor: inherit;
}
/* fills its label, so the whole slice is the hit target */
.sk-gallery-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}
/* The ITEM is the input's PROXY, since the input is opacity 0. `data-kbd` gates
 * :focus: WebKit withholds :focus-visible on arrow keys, and :focus rings clicks. */
/* NOT while arrowing. Arrow keys move AND select here, so the slice opens —
 * that expansion IS where-you-are, and a ring on top of it is noise. Tab is
 * the case that needs one: entering the group changes nothing on screen, so
 * without a ring there is no sign focus arrived. `data-arrow` is the
 * script's mark for "the last key was an arrow", cleared on Tab, on pointer,
 * and when focus leaves the group. */
.sk-gallery:not([data-arrow]) .sk-gallery-item:has(.sk-gallery-input:focus-visible),
.sk-gallery[data-kbd]:not([data-arrow]) .sk-gallery-item:has(.sk-gallery-input:focus) {
  outline: var(--sk-focus-ring-width) solid var(--sk-focus-ring-color);
  outline-offset: var(--sk-focus-ring-offset);
}

.sk-gallery-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  transition: filter var(--sk-gallery-dur) var(--sk-gallery-ease-spatial);
}

/* these variants keep collapsed photos bright, so the spine buys its own
 * contrast rather than dimming the artwork */
.sk-gallery:where([data-variant="spotlight"], [data-variant="caption"])
  .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
  .sk-gallery-head::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 9rem;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    color-mix(in oklab, var(--sk-gallery-scrim) 55%, transparent),
    transparent
  );
}

.sk-gallery-spine {
  position: relative;
  z-index: 2;
  max-height: 100%;
  padding-inline-start: var(--kit-space-3, 1rem);
  writing-mode: vertical-rl;
  white-space: nowrap;
  pointer-events: none;
  /* variants retune the resting alpha; hover lifts it */
  color: rgb(255 255 255 / var(--sk-gallery-spine-opacity, 0.85));
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.5);
}
/* text-overflow is inert in vertical writing modes, so the script stamps
 * data-clipped and the mask fades the tail instead */
.sk-gallery-spine[data-clipped] {
  mask-image: linear-gradient(to bottom, #000 calc(100% - 2ch), transparent);
}
/* every variant: a per-variant spelling lets touch's forced unhide print
 * the title over the open panel */
.sk-gallery .sk-gallery-item:where(:has(.sk-gallery-input:checked)) .sk-gallery-spine {
  opacity: 0;
}

/* ── the open panel (shared frame) ────────────────────────────────────── */
/* Only the copy box takes pointer events, and only while open — a
 * full-inset `auto` swallows every hover over the open photo. */
.sk-gallery-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  pointer-events: none;
  /* Scripts-off there is no `inert` (it is script-owned by contract), and
   * opacity removes neither hit-testing nor tab order — so a closed slice's
   * CTA would take clicks and a tab stop it has no visible presence for.
   *
   * DELAYED: visibility is discrete, so flipping it on close hides the panel
   * on the first frame and the copy's own close animates behind an already
   * invisible box. It waits out the close, and on open it flips at once. */
  visibility: hidden;
  transition: visibility 0s linear calc(var(--sk-gallery-dur) * 0.8);
}
.sk-gallery-item:where(:has(.sk-gallery-input:checked)) .sk-gallery-panel {
  visibility: visible;
  transition-delay: 0s;
}
.sk-gallery-item:where(:has(.sk-gallery-input:checked)) .sk-gallery-copy {
  pointer-events: auto;
}

.sk-gallery-title {
  margin: 0;
  text-wrap: balance;
}
/* Step and measure travel as a PAIR — the register lockup defines and
 * slideshow rests on. Two compounds so the sizing ties the base ramp and
 * wins on source order, and so the margin above stays a bare echo.
 *
 * The SPINE answers to the same step: it is the collapsed slice's title, so
 * a copy-size dial that moved the open title and left it behind would read
 * as a bug. Overrun is already handled — the clipped-fade mask horizontally,
 * ellipsis once the mode turns it. */
.sk-gallery .sk-gallery-title,
.sk-gallery .sk-gallery-spine {
  font-size: calc(var(--sk-text-h2-size) * var(--sk-gallery-scale));
}
.sk-gallery .sk-gallery-title {
  max-width: var(--sk-measure-title);
}
/* The row's actions, on the kit's shared register. They sit OUTSIDE the
 * label, so a click reaches the link rather than toggling the slice; the
 * panel only grants pointer events to the open copy box. */
.sk-gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--kit-space-2, 0.65rem);
  margin-block-start: var(--kit-space-2, 0.65rem);
}
.sk-gallery-actions :is(.sk-btn, .sk-btn-button, .sk-btn-outline, .sk-btn-link) {
  pointer-events: auto;
}

/* the box centres in a clipped slice, so unbounded copy loses its first
 * line as well as its last */
.sk-gallery-summary {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: clip;
  text-wrap: pretty;
}

/* ══ variant: sidebar ═══════════════════════════════════════════════════ */

.sk-gallery:where([data-variant="sidebar"]) {
  /* container-, not slice-relative, so text never reflows as it expands */
  /* Rides the size register, like --sk-gallery-open-h: the step grows the
   * type, so the box has to grow with it or the container's clip takes the
   * end off the title. */
  --sk-gallery-copy-w: clamp(
    16rem,
    calc(24cqw * var(--sk-gallery-scale)),
    calc(26rem * var(--sk-gallery-scale))
  );
}

/* SCRIPTS-OFF FALLBACK (the track engine supersedes it once JS binds).
 * The open slice absorbs free space in both signs — shrink 1 for oversum
 * (Flexbox 9.7 clamps grow only), grow 1 for the undersum a retargeted
 * close leaves. Shrink transitions and grow does not: a closing slice
 * needs its shrink while its basis is still large. Collapsed slices shrink
 * too: as the only shrinkable item the open slice absorbs the whole
 * oversum and floors at 0 once enough collapsed bases fill the track. */
.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-item {
  flex: 0 1 var(--sk-gallery-collapsed);
  transition:
    flex-basis var(--sk-gallery-dur) var(--sk-gallery-ease-spatial),
    flex-shrink var(--sk-gallery-dur) var(--sk-gallery-ease-spatial);
}
.sk-gallery:where([data-variant="sidebar"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked)) {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 100%;
}

/* No resting pre-zoom: a transform fighting cover's own re-crop reverses
 * the photo's direction mid-gesture. */
.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-media {
  filter: brightness(0.6) saturate(0.92);
}
.sk-gallery:where([data-variant="sidebar"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-media {
  filter: brightness(0.95) saturate(1);
}

.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-spine {
  rotate: 180deg;
  /* NEGATIVE: `translate` composes BEFORE `rotate`, so it moves the box in
   * its own upright space — a positive lift here would push the spine DOWN. */
  translate: 0 calc(var(--sk-gallery-spine-lift, 0) * -1);
  transition:
    opacity calc(var(--sk-gallery-dur) * 0.5) var(--sk-gallery-ease-effects),
    translate calc(var(--sk-gallery-dur) * 0.5) var(--sk-gallery-ease-effects),
    color calc(var(--sk-gallery-dur) * 0.5) var(--sk-gallery-ease-effects);
}
@media (hover: hover) {
  .sk-gallery:where([data-variant="sidebar"])
    .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked))):hover
    .sk-gallery-spine {
    --sk-gallery-spine-lift: 0.25rem;
    --sk-gallery-spine-opacity: 1;
  }
}
.sk-gallery:where([data-variant="sidebar"])
  .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
  .sk-gallery-head:has(.sk-gallery-input:focus-visible)
  .sk-gallery-spine {
  --sk-gallery-spine-lift: 0.25rem;
  --sk-gallery-spine-opacity: 1;
}

/* reveals by CLIPPING: the container animates its width over fixed copy */
.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-copy-container {
  flex: none;
  max-width: var(--sk-gallery-open-w, 100%);
  overflow: clip;
  width: 0;
  transition: width calc(var(--sk-gallery-dur) * 0.8) var(--sk-gallery-ease-spatial);
}
.sk-gallery:where([data-variant="sidebar"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-copy-container {
  width: var(--sk-gallery-copy-w);
  /* Starts WITH the slice — a delay here reads as two separate events — but
   * settles a beat after it. Exact lockstep makes the box and the slice edge
   * one rigid object, which is what reads as hard; the short overrun is
   * follow-through, and it is what makes the open feel soft. */
  transition-duration: calc(var(--sk-gallery-dur) * 1.15);
  transition-delay: 0s;
  transition-timing-function: var(--sk-gallery-ease-spatial);
}
/* Not on media, so it rides the theme's tokens, not the overlay recipe —
 * a fixed near-black box reads as a sixth slice on a light page. */
/* The clip edge alone is a hard vertical wipe; the copy fading up behind it
 * is what softens the arrival. Trails the box slightly, so the box lands and
 * the words settle into it. */
.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-title,
.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-summary {
  opacity: 0;
  transition: opacity calc(var(--sk-gallery-dur) * 0.55) var(--sk-gallery-ease-effects);
}
.sk-gallery:where([data-variant="sidebar"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  :is(.sk-gallery-title, .sk-gallery-summary) {
  opacity: 1;
  transition-duration: calc(var(--sk-gallery-dur) * 0.7);
  transition-delay: calc(var(--sk-gallery-dur) * 0.45);
}

.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-copy {
  box-sizing: border-box;
  /* A SOLID content panel: the section tone washes --sk-surface/--sk-ink
   * to a low-alpha tint (for cards that show the band through), but this
   * panel is opaque copy — reset to the theme's own surface + ink so a
   * toned band never makes it semi-transparent. */
  --sk-surface: var(--kit-surface);
  --sk-ink: var(--kit-foreground);
  --sk-ink-on-dark: var(--sk-theme-dark);
  --sk-ink-muted: var(--kit-muted);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--kit-space-2, 0.65rem);
  width: var(--sk-gallery-copy-w);
  /* Bounded by the slice's TARGET width, never its current one: capping
   * against the animating box re-wraps the copy on every frame, and this
   * reveal is a clip over fixed copy. Falls back to 100% when stacked,
   * where the band's width does not animate. */
  max-width: var(--sk-gallery-open-w, 100%);
  height: 100%;
  /* Even, and the whole room: a share would part it from the label on its line. */
  padding: calc(var(--sk-gutter) * var(--sk-air));
  background: var(--sk-surface);
  color: var(--sk-ink);
}
.sk-gallery:where([data-variant="sidebar"]) .sk-gallery-summary {
  max-width: var(--sk-measure);
  color: var(--sk-ink-muted);
}

/* ══ variant: spotlight ════════════════════════════════════════════════ */

/* SCRIPTS-OFF FALLBACK. Equal thin shares; the open slice grows to a
 * container-relative ratio, so a pane gets a pane-sized spotlight. The
 * shares carry a real BASIS, equal so they stay equal: off a zero basis
 * their share of the free space is what the gaps have already spent, and
 * every collapsed slice floors at nothing. */
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-item {
  flex: 1 1 var(--sk-gallery-collapsed);
  transition:
    flex-basis var(--sk-gallery-dur) var(--sk-gallery-ease-spatial),
    flex-grow var(--sk-gallery-dur) var(--sk-gallery-ease-spatial);
}
.sk-gallery:where([data-variant="spotlight"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked)) {
  flex-basis: 80cqw;
}

/* grayscale at rest, dark enough that a revealed spine holds its contrast
 * floor; hover returns colour */
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-media {
  /* Darker than the OPEN slice would invert the gesture — opening a slice
   * must brighten it, not dim it. */
  filter: grayscale(1) brightness(0.38);
}
@media (hover: hover) {
  .sk-gallery:where([data-variant="spotlight"])
    .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
    .sk-gallery-head:hover
    .sk-gallery-media {
    filter: grayscale(0) brightness(0.85);
  }
}
.sk-gallery:where([data-variant="spotlight"])
  .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
  .sk-gallery-head:has(.sk-gallery-input:focus-visible)
  .sk-gallery-media {
  filter: grayscale(0) brightness(0.85);
}
.sk-gallery:where([data-variant="spotlight"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-media {
  filter: grayscale(0) brightness(0.42);
}

/* Hover-capable pointers only. Without hover the collapsed spine simply
 * shows, so cards are never anonymous on touch. */
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-spine {
  /* A step below the shared one — these slivers are thin — but still on the
   * dial, so the prop means the same thing in every variant. Capped at the
   * sliver's own width: past that the glyphs are shaved on both sides. */
  font-size: min(
    calc(var(--sk-text-h4-size) * var(--sk-gallery-scale)),
    calc(var(--sk-gallery-collapsed) * 0.34)
  );
  rotate: 180deg;
  translate: 0.6rem 0;
  opacity: 0;
  --sk-gallery-spine-opacity: 0.96;
  transition:
    opacity calc(var(--sk-gallery-dur) * 0.55) var(--sk-gallery-ease-effects),
    translate calc(var(--sk-gallery-dur) * 0.55) var(--sk-gallery-ease-effects);
}
@media (hover: hover) {
  .sk-gallery:where([data-variant="spotlight"]:not([data-mode="vertical"]))
    .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
    .sk-gallery-head:hover
    .sk-gallery-spine {
    opacity: 1;
    translate: 0 0;
  }
}
@media (hover: none) {
  .sk-gallery:where([data-variant="spotlight"]:not([data-mode="vertical"]))
    .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
    .sk-gallery-spine {
    opacity: 1;
    translate: 0 0;
  }
}
.sk-gallery:where([data-variant="spotlight"]:not([data-mode="vertical"]))
  .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
  .sk-gallery-head:has(.sk-gallery-input:focus-visible)
  .sk-gallery-spine {
  opacity: 1;
  translate: 0 0;
}

.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-panel {
  align-items: center;
  justify-content: center;
  padding: var(--kit-space-4, 1.5rem);
  opacity: 0;
  transition:
    opacity calc(var(--sk-gallery-dur) * 0.65) var(--sk-gallery-ease-effects),
    visibility 0s linear calc(var(--sk-gallery-dur) * 0.65);
}
.sk-gallery:where([data-variant="spotlight"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-panel {
  opacity: 1;
  transition-duration: calc(var(--sk-gallery-dur) * 0.75);
  transition-delay: calc(var(--sk-gallery-dur) * 0.25);
}
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-copy-container {
  display: contents;
}
/* Container-relative, so a collapsing slice clips the copy instead of
 * re-wrapping it. */
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--kit-space-2, 0.65rem);
  flex: none;
  /* `ch` on the BOX resolves at the box's own font size, not the title's —
   * at 32ch that left a 58px display face about four characters per line.
   * The box is generous and container-relative (so a collapsing slice
   * clips rather than reflows); the MEASURES below do the shaping, each
   * resolving its ch against the type it governs. */
  box-sizing: border-box;
  width: min(72cqw, 46rem);
  max-width: var(--sk-gallery-open-w, 100%);
  /* A centred box stands on no rail, so this is its own air, not the room. */
  padding: var(--kit-space-3, 1rem) var(--kit-space-4, 1.5rem);
  border-radius: var(--sk-media-radius);
  text-align: center;
  color: var(--sk-gallery-over-ink);
  /* The overlay INK remap, the same one the shared tier gives a lockup whose copy
   * sits on a photo. The button pair alone is not enough: `.sk-btn:hover`
   * goes transparent and takes `--sk-ink`, so without this the hover state
   * is the page's near-black type on a photograph. */
  --sk-ink: var(--sk-gallery-over-ink);
  --sk-ink-on-dark: 1;
  --sk-ink-muted: var(--sk-gallery-over-ink-muted);
  --sk-selection-bg: var(--sk-selection-page-bg);
  --sk-selection-ink: var(--sk-selection-page-ink);
  --sk-btn-bg: var(--sk-gallery-over-ink);
  --sk-btn-ink: var(--sk-gallery-scrim);
  --sk-stroke: var(--sk-overlay-stroke, rgb(255 255 255 / 0.35));
  /* No backing SHAPE behind the copy: any gradient strong enough to carry
   * contrast still has to stop at the box, and that edge reads as a pasted
   * rectangle. This variant darkens its open media instead, which is its
   * whole idea, so the photo carries the copy. */
  text-shadow: 0 1px 12px rgb(0 0 0 / 0.55);
}
/* Step and measure travel as a PAIR, the register slideshow documents: a
 * gallery card is smaller than a hero stage, so it rests one step down. */
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-title {
  font-size: calc(var(--sk-text-h1-size) * var(--sk-gallery-scale));
  max-width: var(--sk-measure-title);
}
.sk-gallery:where([data-variant="spotlight"]) .sk-gallery-summary {
  max-width: var(--sk-measure);
  color: var(--sk-gallery-over-ink-muted);
}

/* ══ variant: caption ═══════════════════════════════════════════════════ */

/* Tiers widen the nearest neighbours on BOTH sides of the open card —
 * forward via `+`, backward via `:has()` carrying the checked-radio
 * compound (a nested :has is invalid). Scripts-off fallback, as above. */
.sk-gallery:where([data-variant="caption"]) .sk-gallery-item {
  --sk-gallery-strip: clamp(1.75rem, 3cqw, 3rem);
  flex: 0 1 var(--sk-gallery-strip);
  transition:
    flex-basis var(--sk-gallery-dur) var(--sk-gallery-ease-spatial),
    flex-shrink var(--sk-gallery-dur) var(--sk-gallery-ease-spatial);
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked)) {
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 100%;
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  + .sk-gallery-item {
  --sk-gallery-strip: clamp(8rem, 15cqw, 14rem);
  --sk-gallery-spine-reveal: 1;
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  + .sk-gallery-item
  + .sk-gallery-item {
  --sk-gallery-strip: clamp(4.5rem, 8cqw, 7rem);
  --sk-gallery-spine-reveal: 1;
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  + .sk-gallery-item
  + .sk-gallery-item
  + .sk-gallery-item {
  --sk-gallery-strip: clamp(2.75rem, 5cqw, 4.5rem);
}
/* …and the mirror: the same tiers BEFORE the open card */
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(+ .sk-gallery-item .sk-gallery-input:checked)) {
  --sk-gallery-strip: clamp(8rem, 15cqw, 14rem);
  --sk-gallery-spine-reveal: 1;
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(+ .sk-gallery-item + .sk-gallery-item .sk-gallery-input:checked)) {
  --sk-gallery-strip: clamp(4.5rem, 8cqw, 7rem);
  --sk-gallery-spine-reveal: 1;
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(
    :has(+ .sk-gallery-item + .sk-gallery-item + .sk-gallery-item .sk-gallery-input:checked)
  ) {
  --sk-gallery-strip: clamp(2.75rem, 5cqw, 4.5rem);
}

.sk-gallery:where([data-variant="caption"]) .sk-gallery-media {
  filter: brightness(0.84);
}
@media (hover: hover) {
  .sk-gallery:where([data-variant="caption"]) .sk-gallery-item:hover .sk-gallery-media {
    filter: brightness(1);
  }
}
.sk-gallery:where([data-variant="caption"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-media {
  filter: brightness(1);
}

/* Only the two wide tiers carry a title — a vertical title in a 3rem
 * sliver is clipped noise, so the narrow breaks stay text-free. */
.sk-gallery:where([data-variant="caption"]) .sk-gallery-spine {
  rotate: 180deg;
  opacity: 0;
  --sk-gallery-spine-opacity: 0.96;
  transition: opacity calc(var(--sk-gallery-dur) * 0.55) var(--sk-gallery-ease-effects);
}
@media (hover: hover) {
  .sk-gallery:where([data-variant="caption"]:not([data-mode="vertical"]))
    .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked))):hover
    .sk-gallery-spine {
    opacity: var(--sk-gallery-spine-reveal, 0);
  }
}
@media (hover: none) {
  .sk-gallery:where([data-variant="caption"]:not([data-mode="vertical"]))
    .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
    .sk-gallery-spine {
    opacity: var(--sk-gallery-spine-reveal, 0);
  }
}
.sk-gallery:where([data-variant="caption"]:not([data-mode="vertical"]))
  .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
  .sk-gallery-head:has(.sk-gallery-input:focus-visible)
  .sk-gallery-spine {
  opacity: var(--sk-gallery-spine-reveal, 0);
}

/* ── the CAPTION COPY TREATMENT: the caption variant, plus the sidebar
 *    variant wherever its side box will not fit (data-copy) ─────────── */
.sk-gallery:where([data-variant="caption"], [data-variant="sidebar"][data-copy="caption"])
  .sk-gallery-panel {
  align-items: flex-end;
  justify-content: flex-start;
  opacity: 0;
  transition:
    opacity calc(var(--sk-gallery-dur) * 0.65) var(--sk-gallery-ease-effects),
    visibility 0s linear calc(var(--sk-gallery-dur) * 0.65);
}
.sk-gallery:where([data-variant="caption"], [data-variant="sidebar"][data-copy="caption"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-panel {
  opacity: 1;
  transition-duration: calc(var(--sk-gallery-dur) * 0.75);
  transition-delay: calc(var(--sk-gallery-dur) * 0.25);
}
.sk-gallery:where([data-variant="caption"], [data-variant="sidebar"][data-copy="caption"])
  .sk-gallery-copy-container {
  display: contents;
}

/* The scrim is a bottom-up fade across the whole CARD, not a patch behind the
 * copy box: bound to the box it stops at the box's edges, and any strength
 * that survives to those edges paints them as a visible rectangle. Full
 * width, so it has no edges of its own; the contrast is bought with STRENGTH
 * over the band the copy occupies, not by covering more area. */
.sk-gallery:where([data-variant="caption"], [data-variant="sidebar"][data-copy="caption"])
  .sk-gallery-panel {
  /* The ramp has to still be carrying weight where the TOP line sits, not
   * just under the last one: a stacked card's copy box is over half the card,
   * and a cta row lifts the title higher again. */
  background: linear-gradient(
    to top,
    color-mix(in oklab, var(--sk-gallery-scrim) 90%, transparent) 0%,
    color-mix(in oklab, var(--sk-gallery-scrim) 84%, transparent) 38%,
    color-mix(in oklab, var(--sk-gallery-scrim) 60%, transparent) 64%,
    color-mix(in oklab, var(--sk-gallery-scrim) 24%, transparent) 84%,
    transparent 100%
  );
}
/* The copy box itself carries NO backing — the card's fade above is the whole
 * treatment. The reset matters: the sidebar variant's own box is an opaque
 * toned surface, and under data-copy="caption" that would leave white ink on
 * a light plate. */
.sk-gallery:where([data-variant="caption"], [data-variant="sidebar"][data-copy="caption"])
  .sk-gallery-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: calc(var(--kit-space-1, 0.35rem) * var(--sk-gallery-scale));
  flex: none;
  box-sizing: border-box; /* so the padding lives inside max-width */
  /* A flex item's min-width is auto, i.e. min-content — without this the
   * box refuses to shrink past its longest word and spills the slice. */
  min-width: 0;
  width: clamp(16rem, calc(44cqw * var(--sk-gallery-scale)), calc(40rem * var(--sk-gallery-scale)));
  max-width: var(--sk-gallery-open-w, 100%);
  height: auto;
  /* The room, yielding: a fixed inset is a floor a narrow slice cannot shrink past. */
  padding: var(--kit-space-5, 3rem) min(calc(var(--sk-gutter) * var(--sk-air)), 14%)
    var(--kit-space-4, 1.5rem);
  background: none;
  color: var(--sk-gallery-over-ink);
  /* Same overlay remap as the spotlight copy above, for the same reason:
   * this copy is on the photograph, hover included. */
  --sk-ink: var(--sk-gallery-over-ink);
  --sk-ink-on-dark: 1;
  --sk-ink-muted: var(--sk-gallery-over-ink-muted);
  --sk-selection-bg: var(--sk-selection-page-bg);
  --sk-selection-ink: var(--sk-selection-page-ink);
  --sk-btn-bg: var(--sk-gallery-over-ink);
  --sk-btn-ink: var(--sk-gallery-scrim);
  --sk-stroke: var(--sk-overlay-stroke, rgb(255 255 255 / 0.35));
  text-align: left;
}
.sk-gallery:where([data-variant="caption"], [data-variant="sidebar"][data-copy="caption"])
  .sk-gallery-summary {
  max-width: var(--sk-measure);
  color: var(--sk-gallery-over-ink-muted);
}
@media (prefers-contrast: more) {
  .sk-gallery .sk-gallery-copy {
    background: var(--sk-gallery-scrim);
    text-shadow: none;
  }
  .sk-gallery:where([data-variant="sidebar"]:not([data-copy="caption"])) .sk-gallery-copy {
    background: var(--sk-surface);
  }
}

/* ── the TRACK ENGINE (script-set) — horizontal mode makes the row a grid
 *    with one track list, so the gesture is a single interpolated property
 *    that sums to the track by construction. Hidden (.sk-gallery-off)
 *    items stay RENDERED at 0px: display:none breaks native radio
 *    traversal. Resizes recompute without the animate class. ────────── */
.sk-gallery-row:where(.sk-gallery-tracked) {
  display: grid;
  column-gap: 0;
  grid-template-columns: var(--sk-gallery-tracks, none);
}
.sk-gallery-row:where(.sk-gallery-tracked.sk-gallery-animate) {
  transition: grid-template-columns var(--sk-gallery-dur) var(--sk-gallery-ease-spatial);
}
.sk-gallery .sk-gallery-item:where(.sk-gallery-off) {
  pointer-events: none;
}
.sk-gallery .sk-gallery-item:where(.sk-gallery-off) .sk-crop {
  display: none;
}

/* the vertical cap's reveal */
.sk-gallery-more {
  display: block;
  margin: var(--kit-space-3, 1rem) auto var(--kit-space-2, 0.65rem);
}

/* ── VERTICAL (data-mode, script-resolved) — a height-based stack. The
 *    copy treatment is NOT decided here: data-copy owns it in both modes,
 *    so a wide stacked band keeps its side box. ─────────────────────── */
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-row {
  flex-direction: column;
  height: auto;
}
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-item {
  width: auto;
  flex: none;
  height: var(--sk-gallery-collapsed-h);
  transition: height var(--sk-gallery-dur) var(--sk-gallery-ease-spatial);
}
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-item:where(:has(.sk-gallery-input:checked)) {
  height: var(--sk-gallery-open-h);
}
/* …and an actions row is another line of copy to make room for. */
.sk-gallery:where([data-mode="vertical"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked)):has(.sk-gallery-actions) {
  height: calc(var(--sk-gallery-open-h) + 4rem);
}
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-item:where(.sk-gallery-capped) {
  display: none;
}
/* Stacked, every variant's band is the same shape, so the spine takes the
 * SHARED step. Spotlight's smaller face and its sliver cap are a horizontal
 * concession to a thin vertical strip — there is no strip here, and the cap
 * made its titles visibly smaller than the other variants' in the same box. */
.sk-gallery:where([data-mode="vertical"][data-variant="spotlight"]) .sk-gallery-spine {
  font-size: calc(var(--sk-text-h2-size) * var(--sk-gallery-scale));
}

/* Horizontal now, and always shown: it is the only label a band has. */
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-spine {
  writing-mode: horizontal-tb;
  rotate: none;
  translate: none;
  padding-inline-start: 0;
  max-width: 100%;
  overflow: clip;
  text-overflow: ellipsis;
}
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-spine[data-clipped] {
  mask-image: none;
}
.sk-gallery:where([data-mode="vertical"]) .sk-gallery-head {
  justify-content: center;
}
.sk-gallery:where([data-mode="vertical"])
  .sk-gallery-item:where(:not(:has(.sk-gallery-input:checked)))
  .sk-gallery-spine {
  opacity: 1;
}
.sk-gallery:where(
    [data-mode="vertical"][data-variant="sidebar"],
    [data-mode="vertical"][data-variant="caption"]
  )
  .sk-gallery-head {
  align-items: flex-start;
}
.sk-gallery:where(
    [data-mode="vertical"][data-variant="sidebar"],
    [data-mode="vertical"][data-variant="caption"]
  )
  .sk-gallery-spine {
  padding-inline-start: calc(var(--sk-gutter) * var(--sk-air));
}
.sk-gallery:where([data-mode="vertical"][data-variant="caption"]) .sk-gallery-item {
  --sk-gallery-spine-reveal: 1;
}
.sk-gallery:where([data-mode="vertical"][data-variant="spotlight"]) .sk-gallery-media {
  filter: grayscale(0) brightness(0.8);
}
.sk-gallery:where([data-mode="vertical"][data-variant="spotlight"])
  .sk-gallery-item:where(:has(.sk-gallery-input:checked))
  .sk-gallery-media {
  filter: grayscale(0) brightness(0.42);
}

/* ── the sheet's OWN fallback, for when the section script never spoke:
 *    scripts off, blocked, or the asset simply missing. The gate is the
 *    absence of a script, decided BEFORE first paint. Gating on the absence
 *    of `data-mode` instead reads truer — it means this section's script
 *    never spoke — but that stamp lands at the end of body, so the fallback
 *    would be live for the whole parse and every narrow load would stack and
 *    then jump to a strip (the fit rule flips around 408-544, not 640).
 *    A narrow box stacks off the CONTAINER, since the geometry above is
 *    container-keyed and a viewport gate strands a gallery in a narrow
 *    pane on a wide screen. The vertical block's SHAPE, not its twin —
 *    the rest stays with the scripted path. ─────────────────────────── */
@container sk-gallery (max-width: 640px) {
  html:not([data-sk-js]) .sk-gallery:not([data-orientation="horizontal"]) .sk-gallery-row {
    flex-direction: column;
    height: auto;
  }
  html:not([data-sk-js]) .sk-gallery:not([data-orientation="horizontal"]) .sk-gallery-item {
    flex: none;
    height: var(--sk-gallery-collapsed-h);
  }
  html:not([data-sk-js])
    .sk-gallery:not([data-orientation="horizontal"])
    .sk-gallery-item:has(.sk-gallery-input:checked) {
    height: var(--sk-gallery-open-h);
  }
  html:not([data-sk-js])
    .sk-gallery:not([data-orientation="horizontal"])
    .sk-gallery-item:not(:has(.sk-gallery-input:checked))
    .sk-gallery-spine {
    writing-mode: horizontal-tb;
    rotate: none;
    translate: none;
    opacity: 1;
    padding-inline-start: calc(var(--sk-gutter) * var(--sk-air));
  }
  html:not([data-sk-js]) .sk-gallery:not([data-orientation="horizontal"]) .sk-gallery-head {
    justify-content: center;
    align-items: flex-start;
  }
  /* …and the side box becomes the caption foot here too: the real rule
   * keys on data-copy, which only the script stamps. */
  html:not([data-sk-js])
    .sk-gallery:not([data-orientation="horizontal"]):where([data-variant="sidebar"])
    .sk-gallery-panel {
    align-items: flex-end;
  }
  html:not([data-sk-js])
    .sk-gallery:not([data-orientation="horizontal"]):where([data-variant="sidebar"])
    .sk-gallery-copy-container {
    display: contents;
  }
  html:not([data-sk-js])
    .sk-gallery:not([data-orientation="horizontal"]):where([data-variant="sidebar"])
    .sk-gallery-copy {
    width: 100%;
    height: auto;
    justify-content: flex-end;
    background: linear-gradient(
      to top,
      color-mix(in oklab, var(--sk-gallery-scrim) 88%, transparent) 0%,
      color-mix(in oklab, var(--sk-gallery-scrim) 74%, transparent) 45%,
      transparent 100%
    );
    color: var(--sk-gallery-over-ink);
  }
  /* The summary carries the sidebar's own ink, written for its LIGHT side
   * box — on this scrim that is white-on-light and measures 1.00:1. */
  html:not([data-sk-js])
    .sk-gallery:not([data-orientation="horizontal"]):where([data-variant="sidebar"])
    .sk-gallery-summary {
    color: var(--sk-gallery-over-ink-muted);
  }
}

/* An authored `vertical` stacks at any width, exactly as the script would
 * have resolved it. Only the stacking essentials: a wide box still holds
 * the side copy, so the caption foot above stays narrow-container-only. */
html:not([data-sk-js]) .sk-gallery[data-orientation="vertical"] .sk-gallery-row {
  flex-direction: column;
  height: auto;
}
html:not([data-sk-js]) .sk-gallery[data-orientation="vertical"] .sk-gallery-item {
  flex: none;
  height: var(--sk-gallery-collapsed-h);
}
html:not([data-sk-js])
  .sk-gallery[data-orientation="vertical"]
  .sk-gallery-item:has(.sk-gallery-input:checked) {
  height: var(--sk-gallery-open-h);
}
html:not([data-sk-js])
  .sk-gallery[data-orientation="vertical"]
  .sk-gallery-item:not(:has(.sk-gallery-input:checked))
  .sk-gallery-spine {
  writing-mode: horizontal-tb;
  rotate: none;
  translate: none;
  opacity: 1;
  padding-inline-start: calc(var(--sk-gutter) * var(--sk-air));
}
html:not([data-sk-js]) .sk-gallery[data-orientation="vertical"] .sk-gallery-head {
  justify-content: center;
  align-items: flex-start;
}

@media (forced-colors: active) {
  /* The input is opacity 0, so the UA's own indicator is invisible and the
   * ring is the only one — and it must be an outline, which forced colors
   * preserves. */
  .sk-gallery:not([data-arrow]) .sk-gallery-item:has(.sk-gallery-input:focus-visible),
  .sk-gallery[data-kbd]:not([data-arrow]) .sk-gallery-item:has(.sk-gallery-input:focus) {
    outline: 3px solid Highlight;
    outline-offset: -3px;
  }
  .sk-gallery .sk-gallery-copy {
    background: Canvas;
    color: CanvasText;
  }
}

/* ── print: copy in PAGE ink below the photo — overlay white prints
 *    invisibly once backgrounds are dropped ──────────────────────────── */
@media print {
  .sk-gallery .sk-gallery-row {
    display: block;
    height: auto;
  }
  .sk-gallery .sk-gallery-item {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    margin-block-end: var(--kit-space-3, 1rem);
    break-inside: avoid;
    background: none;
  }
  .sk-gallery .sk-gallery-head {
    position: relative;
    inset: auto;
    height: 12rem;
  }
  .sk-gallery .sk-gallery-head::after {
    display: none;
  }
  .sk-gallery .sk-gallery-spine {
    display: none;
  }
  .sk-gallery .sk-gallery-media {
    position: relative;
    inset: auto;
    height: 100%;
    filter: none;
  }
  .sk-gallery .sk-gallery-panel {
    position: static;
    opacity: 1;
    background: none;
  }
  .sk-gallery .sk-gallery-item .sk-gallery-copy-container {
    display: block;
    width: auto;
    overflow: visible;
    transition: none;
  }
  .sk-gallery .sk-gallery-copy {
    width: auto;
    height: auto;
    padding: var(--kit-space-2, 0.65rem) 0;
    background: none;
    color: #000;
    text-shadow: none;
    text-align: left;
  }
  .sk-gallery .sk-gallery-summary {
    color: #333;
  }
  .sk-gallery-more {
    display: none;
  }
  .sk-gallery .sk-gallery-row:where(.sk-gallery-tracked) {
    display: block;
  }
  .sk-gallery .sk-gallery-item:where(.sk-gallery-off, .sk-gallery-capped) {
    display: block;
    pointer-events: auto;
  }
  .sk-gallery .sk-gallery-item:where(.sk-gallery-off) .sk-crop {
    display: block;
  }
}
