/* Webworks marquee: a strip of items that scrolls on its own. Items, type and
   colours are YOOtheme's (Grid items, theme classes); this handles the
   layout and the movement. Without marquee.js, or under reduced motion, it's
   a strip visitors can scroll. Only transform is animated.
   Custom properties for custom CSS: --ww-marquee-gap, --ww-marquee-max
   (widest item sized by its content), --ww-marquee-bar (progress bar
   height), --ww-marquee-fade (edge fade width), --ww-marquee-room (room for
   shadows around a fading strip). The others are set by the
   script and may change. */
.ww-marquee {
    --ww-marquee-gap: 30px;
    position: relative;
    container-type: inline-size; /* item widths are shares of the strip (cqi) */
}
/* The width blocks below and further down are for UIkit's default breakpoints. When the site's style changes one, Breakpoints::rewriteAll writes them again at the style's widths and the element gets ww-marquee-bp, which the :where(:not(.ww-marquee-bp)) in each selector skips (:where keeps their weight). */
@media (min-width: 1200px) {
    .ww-marquee:where(:not(.ww-marquee-bp)) { --ww-marquee-gap: 40px; }
}
/* Same steps as UIkit's grid gutters. Not uk-grid itself: its gutter is a
   negative margin with padding on each item, and the item widths below need
   the gap as a value to fit a number of items across exactly. */
.ww-marquee.ww-marquee-gap-small { --ww-marquee-gap: 15px; }
.ww-marquee.ww-marquee-gap-medium { --ww-marquee-gap: 40px; }
.ww-marquee.ww-marquee-gap-large { --ww-marquee-gap: 40px; }
@media (min-width: 1200px) {
    .ww-marquee.ww-marquee-gap-large:where(:not(.ww-marquee-bp)) { --ww-marquee-gap: 70px; }
}
.ww-marquee.ww-marquee-gap-collapse { --ww-marquee-gap: 0px; }

/* The strip: scrolls until the script takes over */
.ww-marquee-viewport {
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}
.ww-marquee-track {
    display: flex;
    width: max-content;
}
.ww-marquee-group {
    display: flex;
    flex: none;
    gap: var(--ww-marquee-gap);
    margin: 0;
    padding: 0;
    list-style: none;
}
.ww-marquee-item {
    flex: none;
    box-sizing: border-box;
    width: var(--ww-marquee-w, auto);
    max-width: var(--ww-marquee-wmax, none);
    margin: 0;
    scroll-snap-align: start;
}
/* Long text wraps rather than making one very wide item, and images in
   items sized by their content never overflow the item */
.ww-marquee-item img, .ww-marquee-item video, .ww-marquee-item svg { max-width: 100%; }

/* Vertical alignment */
.ww-marquee-align-top .ww-marquee-group { align-items: flex-start; }
.ww-marquee-align-middle .ww-marquee-group { align-items: center; }
.ww-marquee-align-bottom .ww-marquee-group { align-items: flex-end; }
.ww-marquee-align-stretch .ww-marquee-group { align-items: stretch; }
.ww-marquee-align-stretch .ww-marquee-item > * { height: 100%; box-sizing: border-box; }

/* Items in view, per breakpoint. "auto" is as wide as the content, up to a
   maximum; a number fits that many across, gaps included. */
.ww-marquee-w-auto { --ww-marquee-w: auto; --ww-marquee-wmax: min(var(--ww-marquee-max, 400px), 100cqi); }
.ww-marquee-w-1 { --ww-marquee-w: 100cqi; --ww-marquee-wmax: none; }
.ww-marquee-w-2 { --ww-marquee-w: calc((100cqi - var(--ww-marquee-gap)) / 2); --ww-marquee-wmax: none; }
.ww-marquee-w-3 { --ww-marquee-w: calc((100cqi - 2 * var(--ww-marquee-gap)) / 3); --ww-marquee-wmax: none; }
.ww-marquee-w-4 { --ww-marquee-w: calc((100cqi - 3 * var(--ww-marquee-gap)) / 4); --ww-marquee-wmax: none; }
.ww-marquee-w-5 { --ww-marquee-w: calc((100cqi - 4 * var(--ww-marquee-gap)) / 5); --ww-marquee-wmax: none; }
.ww-marquee-w-6 { --ww-marquee-w: calc((100cqi - 5 * var(--ww-marquee-gap)) / 6); --ww-marquee-wmax: none; }
@media (min-width: 640px) {
    .ww-marquee-w-auto\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: auto; --ww-marquee-wmax: min(var(--ww-marquee-max, 400px), 100cqi); }
    .ww-marquee-w-1\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: 100cqi; --ww-marquee-wmax: none; }
    .ww-marquee-w-2\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - var(--ww-marquee-gap)) / 2); --ww-marquee-wmax: none; }
    .ww-marquee-w-3\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 2 * var(--ww-marquee-gap)) / 3); --ww-marquee-wmax: none; }
    .ww-marquee-w-4\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 3 * var(--ww-marquee-gap)) / 4); --ww-marquee-wmax: none; }
    .ww-marquee-w-5\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 4 * var(--ww-marquee-gap)) / 5); --ww-marquee-wmax: none; }
    .ww-marquee-w-6\@s:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 5 * var(--ww-marquee-gap)) / 6); --ww-marquee-wmax: none; }
}
@media (min-width: 960px) {
    .ww-marquee-w-auto\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: auto; --ww-marquee-wmax: min(var(--ww-marquee-max, 400px), 100cqi); }
    .ww-marquee-w-1\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: 100cqi; --ww-marquee-wmax: none; }
    .ww-marquee-w-2\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - var(--ww-marquee-gap)) / 2); --ww-marquee-wmax: none; }
    .ww-marquee-w-3\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 2 * var(--ww-marquee-gap)) / 3); --ww-marquee-wmax: none; }
    .ww-marquee-w-4\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 3 * var(--ww-marquee-gap)) / 4); --ww-marquee-wmax: none; }
    .ww-marquee-w-5\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 4 * var(--ww-marquee-gap)) / 5); --ww-marquee-wmax: none; }
    .ww-marquee-w-6\@m:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 5 * var(--ww-marquee-gap)) / 6); --ww-marquee-wmax: none; }
}
@media (min-width: 1200px) {
    .ww-marquee-w-auto\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: auto; --ww-marquee-wmax: min(var(--ww-marquee-max, 400px), 100cqi); }
    .ww-marquee-w-1\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: 100cqi; --ww-marquee-wmax: none; }
    .ww-marquee-w-2\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - var(--ww-marquee-gap)) / 2); --ww-marquee-wmax: none; }
    .ww-marquee-w-3\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 2 * var(--ww-marquee-gap)) / 3); --ww-marquee-wmax: none; }
    .ww-marquee-w-4\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 3 * var(--ww-marquee-gap)) / 4); --ww-marquee-wmax: none; }
    .ww-marquee-w-5\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 4 * var(--ww-marquee-gap)) / 5); --ww-marquee-wmax: none; }
    .ww-marquee-w-6\@l:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 5 * var(--ww-marquee-gap)) / 6); --ww-marquee-wmax: none; }
}
@media (min-width: 1600px) {
    .ww-marquee-w-auto\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: auto; --ww-marquee-wmax: min(var(--ww-marquee-max, 400px), 100cqi); }
    .ww-marquee-w-1\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: 100cqi; --ww-marquee-wmax: none; }
    .ww-marquee-w-2\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - var(--ww-marquee-gap)) / 2); --ww-marquee-wmax: none; }
    .ww-marquee-w-3\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 2 * var(--ww-marquee-gap)) / 3); --ww-marquee-wmax: none; }
    .ww-marquee-w-4\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 3 * var(--ww-marquee-gap)) / 4); --ww-marquee-wmax: none; }
    .ww-marquee-w-5\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 4 * var(--ww-marquee-gap)) / 5); --ww-marquee-wmax: none; }
    .ww-marquee-w-6\@xl:where(:not(.ww-marquee-bp)) { --ww-marquee-w: calc((100cqi - 5 * var(--ww-marquee-gap)) / 6); --ww-marquee-wmax: none; }
}

/* Where the script will start the strip moving, clip it from the start, so
   the scrollbar doesn't show and then vanish (a layout shift) */
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    .ww-marquee-viewport { overflow: hidden; overflow: clip visible; }
}

/* Moving: clipped sideways only, so card shadows and focus rings above and
   below still show. Each list ends with a gap, so lists join seamlessly;
   the track moves left by one list (100% / number of lists) and loops. */
.ww-marquee-running .ww-marquee-viewport {
    overflow: hidden;
    overflow: clip visible;
    scroll-snap-type: none;
}
.ww-marquee-running:not(.ww-marquee-alternate) .ww-marquee-group { padding-inline-end: var(--ww-marquee-gap); }
.ww-marquee-running .ww-marquee-track {
    animation: ww-marquee-loop var(--ww-marquee-duration, 30s) linear infinite;
    will-change: transform;
}
.ww-marquee-end.ww-marquee-running .ww-marquee-track { animation-direction: reverse; }
/* Right-to-left pages lay the copies out leftwards, so the loop runs the other way */
.ww-marquee-track:dir(rtl) { --ww-marquee-sign: 1; }
@keyframes ww-marquee-loop {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(calc(var(--ww-marquee-sign, -1) * 100% / var(--ww-marquee-copies, 2)), 0, 0); }
}
/* Back and forth: to the end of the items and back, easing at each end */
.ww-marquee-alternate.ww-marquee-running .ww-marquee-track {
    animation-name: ww-marquee-swing;
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}
@keyframes ww-marquee-swing {
    to { transform: translate3d(var(--ww-marquee-travel, 0px), 0, 0); }
}

/* Edge fade: a mask, so it works on any background */
.ww-marquee-running.ww-marquee-fade-small { --ww-marquee-fade: min(40px, 8%); }
.ww-marquee-running.ww-marquee-fade-medium { --ww-marquee-fade: min(80px, 12%); }
.ww-marquee-running.ww-marquee-fade-large { --ww-marquee-fade: min(160px, 20%); }
.ww-marquee-running:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large) .ww-marquee-viewport {
    -webkit-mask-image: linear-gradient(to right, transparent, #000 var(--ww-marquee-fade), #000 calc(100% - var(--ww-marquee-fade)), transparent);
    mask-image: linear-gradient(to right, transparent, #000 var(--ww-marquee-fade), #000 calc(100% - var(--ww-marquee-fade)), transparent);
}
/* A mask hides everything outside the viewport's box, so card shadows and
   focus rings above and below would be cut off. The viewport takes room for
   them (padding, cancelled by a negative margin, so the layout doesn't
   move), and lets clicks through that room to whatever is under it. Not
   mask-clip: no-clip, which Safari ignores. Up and down take the room at
   the sides instead, as items scroll through the top and bottom. */
.ww-marquee-running:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large) {
    --ww-marquee-room: 80px;
}
.ww-marquee-running:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large):not(.ww-marquee-vertical) .ww-marquee-viewport {
    margin-block: calc(-1 * var(--ww-marquee-room));
    padding-block: var(--ww-marquee-room);
}
.ww-marquee-running.ww-marquee-vertical:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large) .ww-marquee-viewport {
    margin-inline: calc(-1 * var(--ww-marquee-room));
    padding-inline: var(--ww-marquee-room);
}
.ww-marquee-running:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large) .ww-marquee-viewport { pointer-events: none; }
.ww-marquee-running:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large) .ww-marquee-item { pointer-events: auto; }

/* Progress bar: the track is a faint version of its colour, the fill grows
   (scale, so only transform animates) in step with the strip */
.ww-marquee-progress {
    position: relative;
    height: var(--ww-marquee-bar, 3px);
    overflow: hidden;
}
.ww-marquee-viewport + .ww-marquee-progress { margin-top: 15px; }
.ww-marquee-progress:has(+ .ww-marquee-viewport) { margin-bottom: 15px; }
.ww-marquee-progress::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0.15;
}
.ww-marquee-progress-fill {
    position: absolute;
    inset: 0;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left center;
}
.ww-marquee-progress-fill:dir(rtl) { transform-origin: right center; }
.ww-marquee-running .ww-marquee-progress-fill { animation: ww-marquee-fill var(--ww-marquee-duration, 30s) linear infinite; }
.ww-marquee-alternate.ww-marquee-running .ww-marquee-progress-fill {
    animation-direction: alternate;
    animation-timing-function: ease-in-out;
}
@keyframes ww-marquee-fill { to { transform: scaleX(1); } }

/* Not moving (reduced motion, no JS): the bar follows the visitor's
   scrolling where browsers support it, and is left out where they don't or
   there's nothing to scroll */
.ww-marquee-fits .ww-marquee-progress { display: none; }
@supports (animation-timeline: scroll()) {
    .ww-marquee:not(.ww-marquee-running) { timeline-scope: --ww-marquee-scroll; }
    .ww-marquee:not(.ww-marquee-running) .ww-marquee-viewport { scroll-timeline: --ww-marquee-scroll x; }
    .ww-marquee:not(.ww-marquee-running) .ww-marquee-progress-fill {
        animation: ww-marquee-fill linear both;
        animation-timeline: --ww-marquee-scroll;
    }
}
@supports not (animation-timeline: scroll()) {
    .ww-marquee:not(.ww-marquee-running) .ww-marquee-progress { display: none; }
    /* Where the script will start the strip, keep the bar's space from first paint (hidden), so it doesn't shift the page when it shows */
    @media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
        .ww-marquee:not(.ww-marquee-running):not(.ww-marquee-fits) .ww-marquee-progress { display: block; visibility: hidden; }
    }
}

/* Pause button: the theme's icon button, at its own size. The script shows it
   (hidden attribute) only while the strip moves. In a corner it sits over the
   strip (UIkit's uk-position classes). Beside the strip (the default) it's a
   part of the layout, in a grid with the strip and the progress bar, so it
   never covers an item, whatever size the theme gives icon buttons:
   - Across: its own column at the strip's inline end (the left on a
     right-to-left page), centred on the strip rather than on the bar.
   - Up and down: centred below the strip.
   The space is kept from first paint, while the button is still hidden, by
   keeping it in the layout and hiding it with visibility, so showing it
   shifts nothing. That's only where the script will start the strip moving
   (the same media query as the clip above); with no script or under reduced
   motion there's no button, so no space either.
   On keyboard focus only is the exception: no space is kept for a button most
   visitors never see, so it shows over the strip's end (its bottom, up and
   down) while it has focus, where the fade is. */
.ww-marquee-button { z-index: 1; }
/* Size: UIkit's icon button has one size, set by the theme, so Small and Large
   are ours (Default sets nothing). The icon follows, as 20px in a button of
   48 is about the proportion the theme's own icons keep. Two classes outrank
   the theme's rule for the button. Beside the strip, the button sets the width
   of its column, so the space kept follows. */
.ww-marquee-button-size-small .ww-marquee-button { width: 32px; height: 32px; }
.ww-marquee-button-size-small .ww-marquee-button svg { width: 16px; height: 16px; }
.ww-marquee-button-size-large .ww-marquee-button { width: 56px; height: 56px; }
.ww-marquee-button-size-large .ww-marquee-button svg { width: 24px; height: 24px; }
/* Border: the icon's colour, so the edge keeps the icon's contrast against the
   strip's background (the theme's own border is a faint grey that vanishes on a
   muted section). Five classes outrank the theme's borders, including the ones it
   gives buttons in dark sections and on hover. */
.ww-marquee.ww-marquee-button-bordered .ww-marquee-button.ww-marquee-button.uk-icon-button { border: 1px solid currentColor; }
/* Middle Right and Middle Left: UIkit's centre positions put the button halfway
   up the whole element, and the progress bar (and its 15px gap) is a part of
   it, so move the centre back to the strip's */
.ww-marquee-button-middle.ww-marquee-has-progress { --ww-marquee-bar-space: calc(var(--ww-marquee-bar, 3px) + 15px); }
.ww-marquee-button-middle.ww-marquee-has-progress > .ww-marquee-button {
    top: calc(50% - var(--uk-position-margin-offset, 0px) - var(--ww-marquee-bar-space) / 2);
}
.ww-marquee-button-middle.ww-marquee-has-progress.ww-marquee-bar-top > .ww-marquee-button {
    top: calc(50% - var(--uk-position-margin-offset, 0px) + var(--ww-marquee-bar-space) / 2);
}
.ww-marquee-button-end { display: grid; grid-template-columns: minmax(0, 1fr); }
.ww-marquee-button-end > .ww-marquee-viewport { grid-column: 1; grid-row: 1; }
.ww-marquee-button-end > .ww-marquee-progress { grid-column: 1; grid-row: 2; }
.ww-marquee-button-end.ww-marquee-bar-top > .ww-marquee-viewport { grid-row: 2; }
.ww-marquee-button-end.ww-marquee-bar-top > .ww-marquee-progress { grid-row: 1; }
.ww-marquee-button-end > .ww-marquee-button {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    margin-inline-end: 15px;
}
.ww-marquee-button-end.ww-marquee-bar-top > .ww-marquee-button { grid-row: 2; }
/* On keyboard focus only, across: out of the flow, in the strip's grid area, so
   showing it never makes a strip shorter than the button taller. The spans
   end its area at the strip's row (an auto end would be the element's edge) */
.ww-marquee-button-end.ww-marquee-button-focus:not(.ww-marquee-vertical) > .ww-marquee-button {
    position: absolute;
    grid-row-end: span 1;
    grid-column-end: span 1;
    inset-block: 0;
    inset-inline-end: 15px;
    margin-block: auto;
    margin-inline-end: 0;
}
.ww-marquee-button-end.ww-marquee-vertical > .ww-marquee-button {
    justify-self: center;
    align-self: end;
    margin-inline-end: 0;
    margin-block-end: 15px;
}
/* In a space of its own: across, a column after the strip; up and down, a row below it */
.ww-marquee-button-end:not(.ww-marquee-button-focus):not(.ww-marquee-vertical) { grid-template-columns: minmax(0, 1fr) auto; container-type: normal; }
/* Item widths are shares of the strip, not of the strip and the button */
.ww-marquee-button-end:not(.ww-marquee-button-focus):not(.ww-marquee-vertical) > .ww-marquee-viewport { container-type: inline-size; }
.ww-marquee-button-end:not(.ww-marquee-button-focus):not(.ww-marquee-vertical) > .ww-marquee-button {
    grid-column: 2;
    margin-inline: 15px 0;
}
.ww-marquee-button-end.ww-marquee-vertical:not(.ww-marquee-button-focus) > .ww-marquee-button {
    grid-row: 3;
    align-self: start;
    margin-block: 15px 0;
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    .ww-marquee-button-end:not(.ww-marquee-button-focus) > .ww-marquee-button[hidden] {
        display: inline-flex !important; /* over UIkit's [hidden] */
        visibility: hidden;
    }
}
.ww-marquee-button svg { display: block; }
.ww-marquee-icon-play,
.ww-marquee-paused .ww-marquee-icon-pause { display: none !important; }
.ww-marquee-paused .ww-marquee-icon-play { display: block !important; }
@media (hover: hover) {
    .ww-marquee-button-hover .ww-marquee-button { opacity: 0; transition: opacity 0.2s; }
    .ww-marquee-button-hover:hover .ww-marquee-button,
    .ww-marquee-button-hover.ww-marquee-paused .ww-marquee-button,
    .ww-marquee-button-hover .ww-marquee-button:focus-visible { opacity: 1; }
}
.ww-marquee-button-focus:not(.ww-marquee-paused) .ww-marquee-button:not(:focus-visible) {
    opacity: 0;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .ww-marquee-button { transition: none !important; }
}

/* Up and down: a column of a set height, each item as wide as the column.
   Same loop turned on its side: lists stack, each ends with a gap, and the
   track moves up by one list. Not moving, it's a box visitors can scroll;
   scrolling past its end carries on with the page. */
.ww-marquee.ww-marquee-vertical .ww-marquee-viewport {
    height: var(--ww-marquee-height, 400px);
    overflow: hidden auto;
    overscroll-behavior: auto;
    scroll-snap-type: y proximity;
}
.ww-marquee-vertical .ww-marquee-track,
.ww-marquee-vertical .ww-marquee-group {
    flex-direction: column;
    width: auto;
}
.ww-marquee.ww-marquee-vertical .ww-marquee-group { align-items: stretch; }
.ww-marquee.ww-marquee-vertical .ww-marquee-item { width: auto; max-width: none; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
    .ww-marquee.ww-marquee-vertical .ww-marquee-viewport { overflow: hidden; }
}
.ww-marquee.ww-marquee-vertical.ww-marquee-running .ww-marquee-viewport { overflow: hidden; scroll-snap-type: none; }
.ww-marquee.ww-marquee-vertical.ww-marquee-running .ww-marquee-group { padding-inline-end: 0; padding-block-end: var(--ww-marquee-gap); }
.ww-marquee-vertical.ww-marquee-running .ww-marquee-track { animation-name: ww-marquee-rise; }
.ww-marquee-down.ww-marquee-running .ww-marquee-track { animation-direction: reverse; }
@keyframes ww-marquee-rise {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, calc(-100% / var(--ww-marquee-copies, 2)), 0); }
}
.ww-marquee-running.ww-marquee-vertical:is(.ww-marquee-fade-small, .ww-marquee-fade-medium, .ww-marquee-fade-large) .ww-marquee-viewport {
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--ww-marquee-fade), #000 calc(100% - var(--ww-marquee-fade)), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 var(--ww-marquee-fade), #000 calc(100% - var(--ww-marquee-fade)), transparent);
}
@supports (animation-timeline: scroll()) {
    .ww-marquee-vertical:not(.ww-marquee-running) .ww-marquee-viewport { scroll-timeline: --ww-marquee-scroll y; }
}

/* Stopped: by the pause button, while off screen, while an item has
   keyboard focus, and on hover if set (only with a real hover, so a tap on
   a phone doesn't leave it stuck). Last, and doubled up, so it wins over the
   animation shorthands above. */
.ww-marquee.ww-marquee-paused :is(.ww-marquee-track, .ww-marquee-progress-fill),
.ww-marquee.ww-marquee-offscreen :is(.ww-marquee-track, .ww-marquee-progress-fill),
.ww-marquee.ww-marquee:has(.ww-marquee-viewport:focus-within) :is(.ww-marquee-track, .ww-marquee-progress-fill) {
    animation-play-state: paused;
}
@media (hover: hover) {
    .ww-marquee.ww-marquee-hover-pause:hover :is(.ww-marquee-track, .ww-marquee-progress-fill) { animation-play-state: paused; }
}
