/**
 * SRD Carousel — front-end.
 *
 * Every tunable value is a --srdc-* custom property with a fallback baked into
 * the var() call. Settings are serialised into a scoped <style> block that
 * declares only the properties which differ from the fallbacks here, so a
 * carousel left on defaults emits no per-instance CSS at all.
 *
 * Embla ships zero CSS. Everything below is ours.
 */

/* ---------------------------------------------------------------- Palette */

/*
 * The default palette. **Its values are not here** - they live in
 * SRDC_Palette and arrive as an inline style on this handle, because the
 * admin has to be able to name them too: a placeholder telling an author what
 * an empty colour field is currently drawing cannot read a stylesheet. One
 * table, two consumers, and they cannot disagree.
 *
 * Every colour fallback below therefore reads a token this file does not
 * declare. That was previously twenty-odd literals which had already drifted
 * into two slates (#1d2327 and #2c3338) and two scrims (.55 and .6) saying the
 * same thing twice, and it is nine tokens now.
 *
 * Reading an undeclared token is safe in the one direction that matters: a
 * var() with no declaration falls through to nothing, so a palette that failed
 * to arrive leaves these properties unset rather than wrong. palette.php
 * asserts every token named below is one SRDC_Palette actually defines.
 *
 * **These are fallbacks, not schema defaults, and the distinction is the whole
 * design.** Every colour field still defaults to the empty string, so
 * css_vars() still omits the lot and an untouched carousel still emits no
 * scoped <style> and no id at all - the invariant render.php, gallery.php and
 * _phase2.inc.php each assert. A hex in defaults() would paint the same pixels
 * and break all three.
 *
 * An author's own colour still wins: css_vars() writes --srdc-arrow-color and
 * its siblings onto the carousel's id, which outranks :root, and each chain
 * below keeps the setting as its first link.
 *
 * The tokens land on :root rather than on .srdc-carousel because PhotoSwipe
 * appends its root to <body>, outside every carousel - .pswp__srdc-caption
 * could not read a token scoped to the component. The --srdc-color-*
 * namespace is what makes writing to :root safe.
 */

/* ---------------------------------------------------------------- Wrapper */

.srdc-carousel {
	position: relative;
}

/*
 * Max Width's default (3.7.0): the full width of whatever holds the carousel,
 * not the theme's content column. The `:not()`s are not decoration — they lift
 * this to (0,3,0), over a block theme's constrained-layout
 * `max-width: var(--wp--style--global--content-size)` at (0,1,0), and they
 * leave Wide and Full to the theme, which sizes those itself. A Max Width an
 * author sets is `#srdc-N{max-width:…}` and outranks this.
 */
.srdc-carousel:not(.alignwide):not(.alignfull) {
	max-width: 100%;
}

/*
 * Max Width centres the box it caps. The width is `#srdc-N{max-width:…}`,
 * written only when set; this class rides along with it. Block themes already
 * centre constrained children with auto margins — this is for classic themes,
 * which do not. A floated (left/right aligned) block keeps the theme's float
 * margins.
 */
.srdc-carousel--max-width:not(.alignleft):not(.alignright) {
	margin-left: auto;
	margin-right: auto;
}

/*
 * The block's Left and Right alignments float the root, and a float shrinks to
 * fit its content — which for a track sized in percentages of itself is close
 * to nothing. Full width, so Max Width is what decides how narrow it floats.
 */
.srdc-carousel.alignleft,
.srdc-carousel.alignright {
	width: 100%;
}

/*
 * The box the arrows are centred on: the track, and nothing above or below it.
 *
 * `position: relative` here is the whole fix for arrows that sat off-centre.
 * They are `top: 50%` of their containing block, and through 2.7.4 that was
 * `.srdc-carousel` — which also holds the heading, the standfirst and the
 * dots. The arrows therefore centred on all of it, sitting
 * `( header − controls ) / 2` too high: some sixty pixels above the pictures
 * on a carousel with a title and a description, and dead centre only on one
 * with neither a header nor pagination, which is the coincidence that let it
 * ship.
 *
 * The root keeps `position: relative` too. Nothing in a carousel resolves
 * against it any more, but a gallery's cards do, and it has been a positioned
 * ancestor since 1.0.0 — a theme or a plugin may be positioning something
 * against a carousel root, and removing it to tidy up would break that
 * silently.
 */
.srdc-carousel__frame {
	position: relative;
}

.srdc-carousel *,
.srdc-carousel *::before,
.srdc-carousel *::after {
	box-sizing: border-box;
}

/*
 * The no-JS / failed-script fallback. Before the script mounts, the viewport
 * is a native scroll container with snap points, so a blocked or broken
 * bundle degrades to a horizontally scrollable strip rather than a column of
 * full-width images. The script adds .is-embla only after a successful mount,
 * which is what hands control over to Embla.
 */
.srdc-carousel__viewport {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.srdc-carousel__viewport::-webkit-scrollbar {
	display: none;
}

.srdc-carousel.is-embla .srdc-carousel__viewport {
	overflow: hidden;
	scroll-snap-type: none;
}

/* ------------------------------------------------------------------ Track */

.srdc-carousel__container {
	display: flex;
	gap: var( --srdc-gap, 16px );

	/*
	 * Mandatory. Without it a drag gesture that starts vertically is captured
	 * by the carousel and the page stops scrolling on touch devices.
	 */
	touch-action: pan-y pinch-zoom;
}

.srdc-carousel__slide {
	/*
	 * The entire responsive model. --srdc-per-view and --srdc-gap are
	 * redeclared per breakpoint in the instance's scoped <style>; Embla
	 * re-measures on resize and is never told a slide count.
	 */
	flex: 0 0 calc(
		( 100% - var( --srdc-peek, 0px ) - ( var( --srdc-per-view, 3 ) - 1 ) * var( --srdc-gap, 16px ) )
		/ var( --srdc-per-view, 3 )
	);
	min-width: 0;
	scroll-snap-align: start;
}

/* Multi-row: PHP chunks items N-per-slide, CSS stacks them. No JS involved. */
.srdc-carousel--multirow .srdc-carousel__slide {
	display: grid;
	grid-auto-flow: row;

	/*
	 * The nested fallback is the whole of "leave it empty to match the slide
	 * gap": row_gap emits no custom property until someone sets one, so a
	 * multi-row carousel saved before the field existed keeps using its own
	 * gap for both jobs rather than snapping to a new default.
	 */
	gap: var( --srdc-row-gap, var( --srdc-gap, 16px ) );
}

/* ------------------------------------------------------------- Gallery */

/*
 * Every card at once, no track. Grid rather than a wrapping flex row on
 * purpose: `repeat( var( --srdc-per-view ), minmax( 0, 1fr ) )` needs no
 * calc and cannot wrap a column early on a sub-pixel rounding error, which
 * a percentage flex-basis minus gaps can. The responsive model is unchanged
 * either way - --srdc-per-view is redeclared per tier in the scoped style,
 * and this reads it exactly as the track does.
 *
 * The cells keep .srdc-carousel__slide so nothing about a card had to learn
 * where it is; its `flex` declaration is simply inert on a grid item, which
 * is also what makes a stored `peek` unable to leak into a gallery.
 */
/*
 * **Two values since 2.11.0, and the nested fallback is the whole of "leave
 * Vertical empty to match Horizontal".** `row_gap` emits no custom property
 * until somebody sets one, so every gallery saved before this release keeps
 * one gap doing both jobs — which is exactly what `gap: var( --srdc-gap )`
 * resolved to, character for character.
 *
 * The same construction the multirow track has used since 1.13.0, read onto
 * the other family rather than invented here.
 */
.srdc-carousel__grid {
	display: grid;
	grid-template-columns: repeat( var( --srdc-per-view, 3 ), minmax( 0, 1fr ) );
	gap: var( --srdc-row-gap, var( --srdc-gap, 16px ) ) var( --srdc-gap, 16px );
}

/*
 * Under `ratio: original` a cell must hug its own content instead of
 * stretching to the tallest in its row.
 *
 * A grid item stretches by default, and with a fixed ratio that is what
 * you want - equal boxes, captions of different lengths lining up. With
 * original ratios it means a card carrying `shadow`, `radius` or a
 * caption background draws that box the full height of the row, so a
 * landscape picture beside a portrait one sits at the top of a tall empty
 * rectangle. Found in a browser at 1.26.0; every PHP assertion passed it,
 * because the markup was never wrong.
 *
 * It does NOT close the gaps between rows, and cannot: the row track is
 * still sized by its tallest item. Packing rows by height is what masonry
 * is for, and why masonry is costed as a layout of its own rather than as
 * a variant of this one.
 *
 * Scoped to __grid, so the track is untouched - a flex item stretching to
 * the track height is what makes a carousel's slides equal.
 */
.srdc-carousel--ratio-original .srdc-carousel__grid {
	align-items: start;
}

/* -------------------------------------------------------- Gallery: masonry */

/*
 * Columns that pack by height. Multi-column rather than a grid, and rather
 * than the JS masonry WordPress core already ships as the `masonry` handle -
 * three reasons, in order of weight:
 *
 * 1. **A gallery ships no script**, which is the property 1.24.0 established
 *    and 1.25.0's paging was written not to cost. A JS masonry would cost it
 *    unconditionally, for every masonry, paged or not.
 * 2. **Heights are content, and layer 3 does not know about content.**
 *    SRDC_Renderer is handed pre-rendered strings; a packer has to measure
 *    cards after their images decode, which is the one thing the arrangement
 *    layer is built not to need. Column packing is a property set on a
 *    container, which is exactly the shape __grid already is.
 * 3. With JavaScript off this is still a working masonry, where an absolutely
 *    positioned one is a stack. Same floor the rest of the family has.
 *
 * **The cost is reading order, and it is real: columns fill top to bottom.**
 * Twelve items in three columns read 1-4 down the left, 5-8 down the middle,
 * 9-12 down the right - not across. That is what every CSS masonry does, and
 * the lightbox inherits it consistently, because the lightbox is a view of
 * the gallery in DOM order and DOM order is what the eye now follows down a
 * column. An author who needs items read across wants Grid, which is one
 * tile away and says so.
 *
 * `grid-template-rows: masonry` / `item-pack` would give row order with no
 * script at all. It is the upgrade to make when it is universal; shipping it
 * behind @supports today would mean two different reading orders depending
 * on the browser, which is worse than one order that is merely not the one
 * you would have picked.
 */
.srdc-carousel--layout-masonry .srdc-carousel__grid {
	display: block;
	column-count: var( --srdc-per-view, 3 );
	column-gap: var( --srdc-gap, 16px );
}

/*
 * The vertical gap. `column-gap` is the horizontal one only, so the space
 * between stacked cards has to come from the cell - which means the last
 * cell in each column carries a trailing margin the container's height
 * includes.
 *
 * That is left alone deliberately. Cancelling it wants a negative bottom
 * margin on __grid, and .srdc-carousel is `position: relative` and nothing
 * else - no BFC - so that margin collapses straight through the root and
 * pulls the *next block on the page* up by a gap. Buying 16px under a photo
 * wall by reaching into the theme's layout is not a trade worth making. The
 * one place it would have shown is handled below instead.
 */
.srdc-carousel--layout-masonry .srdc-carousel__slide {
	margin-bottom: var( --srdc-row-gap, var( --srdc-gap, 16px ) );

	/*
	 * A card must not be split across a column boundary. `break-inside` is
	 * the standard property; the -webkit- form is the one older Safari reads
	 * for multicol specifically, and a card sawn in half is bad enough to be
	 * worth the extra line.
	 */
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
}

/*
 * The cells above already contribute one gap of trailing margin, so the
 * surface only owes the difference - and the two together come to the same
 * 30px a grid gets. The subtraction is exact rather than approximate because
 * what the cells contribute is precisely the expression taken off here, and
 * **the two must be edited together or the exactness quietly becomes an
 * approximation**. 2.11.0 is the release that had to: the cells' trailing
 * margin became the vertical gap, so this became the vertical gap too. The
 * nested fallback keeps both at `--srdc-gap` until somebody sets a vertical
 * one, which is why a masonry saved before that release is unchanged.
 *
 * It goes negative once the gap passes 30px, and that is correct rather than
 * a bug to guard: the trailing region is that gap tall, so a -10px pull at a
 * 40px gap still leaves 30px of clear space and overlaps nothing. Only the
 * top needs it. The bottom margin has no trailing anything to share with, so
 * it is the base rule's 30px untouched.
 */
.srdc-carousel--layout-masonry .srdc-carousel__paging {
	margin-top: calc( 30px - var( --srdc-row-gap, var( --srdc-gap, 16px ) ) );
}

/* ------------------------------------------------------ Gallery: justified */

/*
 * Rows flush to both edges, each picture keeping its own shape. This is the
 * one layout that has to *compute* — a row's height is the width divided
 * among the aspect ratios on it — and the whole of the computing is done by
 * flexbox, from one number per cell that PHP already had.
 *
 * The arithmetic, because it is worth being able to check rather than
 * believe. A cell's basis is `ar * H`, its grow factor is `ar`, so free space
 * F is handed out as `F * ar / sum(ar)` and the final width is
 *
 *     w = ar * H + F * ar / sum(ar) = ar * ( H + F / sum(ar) )
 *
 * Every item on the row is therefore scaled by the *same* factor: the row
 * comes out at a single height `H' = H + F / sum(ar)` with every aspect ratio
 * exactly preserved. Not an approximation, and not a tolerance — the row is
 * flush because the algebra says so.
 *
 * Three consequences to know:
 *
 * 1. **The row height is a target, never a maximum.** Which items share a row
 *    is decided by wrapping against the basis, and the row is then grown to
 *    fill the width, so H' >= H always. A row that wrapped early — one wide
 *    panorama and nothing else that fit beside it — comes out noticeably
 *    taller. Every CSS-only justified layout has this; a JS one trims rows
 *    by re-flowing them, which is the script this family does not ship.
 * 2. **--srdc-ar is the item's own ratio, from PHP.** It is on the cell, and
 *    inherits down to the media, so the frame and the fitting cannot end up
 *    disagreeing about a row's height. See SRDC_Renderer::aspect_of().
 * 3. **`per_view` does nothing here**, which is why the control hides: how
 *    many pictures land on a row is the row height's business.
 */
/*
 * Two values since 2.11.0, as the grid has. The **column** half must stay
 * `--srdc-gap` on its own: the `::after` spacer below cancels one column gap
 * with a negative `margin-inline-start`, and the two are the same length by
 * construction rather than by coincidence.
 */
.srdc-carousel--layout-justified .srdc-carousel__grid {
	display: flex;
	flex-wrap: wrap;
	gap: var( --srdc-row-gap, var( --srdc-gap, 16px ) ) var( --srdc-gap, 16px );
}

.srdc-carousel--layout-justified .srdc-carousel__slide {
	flex: var( --srdc-ar, 1.5 ) 1 calc( var( --srdc-ar, 1.5 ) * var( --srdc-justified-row-height, 220px ) );
	min-width: 0;
}

/*
 * The last row, and the reason it needs anything at all: it is the one row
 * with nothing to be flush against, so left alone its images would grow to
 * fill a width they were never meant to. This pseudo-element is a flex item
 * with no size and an enormous grow factor, so it swallows the leftover
 * space and the row stays at its target height.
 *
 * A pseudo-element rather than markup: one spacer is enough however many
 * items are on the last row, so there was nothing for PHP to emit and no
 * empty <div> for a screen reader to walk into.
 *
 * `flex-basis: 0` is what keeps it off its own line — an item with no basis
 * always fits, so it can never be the thing that causes a wrap. The negative
 * margin cancels the `gap` it would otherwise introduce before itself, which
 * matters in the `justify` case: without it the last row would stop one gap
 * short of the edge and look like a rounding error.
 *
 * --srdc-justified-fill is `justified_last_row`: 999999 keeps the height, 0
 * lets the row stretch. The default emits nothing, so the fallback here is
 * the default's own value.
 */
.srdc-carousel--layout-justified .srdc-carousel__grid::after {
	content: '';
	flex: var( --srdc-justified-fill, 999999 ) 0 0;
	min-width: 0;
	margin-inline-start: calc( -1 * var( --srdc-gap, 16px ) );
}

/*
 * The frame is the shape the row was fitted against, not the shape of
 * whichever file `image_size` picked — `thumbnail` is hard-cropped square on
 * a default install, and a square picture in a cell sized for a landscape one
 * would break every row it landed on.
 *
 * The extra `__slide` in the selector is load-bearing rather than decorative:
 * resolve() forces `original` here, so `.srdc-carousel--ratio-original
 * .srdc-card__media` is also matching this element with the same specificity.
 * Three classes beats two whatever order the two blocks end up in.
 */
.srdc-carousel--layout-justified .srdc-carousel__slide .srdc-card__media {
	aspect-ratio: var( --srdc-ar, 1.5 );
}

.srdc-carousel--layout-justified .srdc-carousel__slide .srdc-card__image {
	height: 100%;
	object-fit: var( --srdc-object-fit, cover );
}

/* --------------------------------------------------------- Gallery paging */

/*
 * The surface is emitted empty by PHP and filled by srdc-gallery.js, exactly
 * as the dots are. :empty hides it, which is what makes the script's absence
 * cost nothing: with JavaScript off there is no stray box under a gallery
 * that is simply showing all of its items.
 */
.srdc-carousel__paging:empty {
	display: none;
}

/*
 * Two rows since 1.27.0: the controls, then the page count under them. The
 * alignment setting drives align-items here and justify-content on the row,
 * which works unchanged because its values - flex-start / center / flex-end -
 * are valid for both.
 */
.srdc-carousel__paging {
	display: flex;
	flex-direction: column;
	align-items: var( --srdc-paging-align, center );
	gap: 8px;

	/*
	 * 30px above and below, a flat literal rather than the slide gap it used
	 * to inherit. The strip is a control an author reaches for, not another
	 * row of the grid, so spacing it by the same number that spaces the cells
	 * made it read as part of them - and on a tight gallery it sat close
	 * enough to the last row to look attached.
	 *
	 * A literal and not a var(). There is no schema field behind it, and a
	 * custom property consumed here with nothing emitting it is exactly the
	 * drift --srdc-caption-padding was: read by the stylesheet from 1.0.0 with
	 * no PHP ever writing it, so the setting was unreachable from every
	 * surface. If this ever becomes an author's choice, the field lands in the
	 * same commit as the var.
	 */
	margin-top: 30px;
	margin-bottom: 30px;
}

.srdc-carousel__pagelist {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	justify-content: var( --srdc-paging-align, center );
}

/*
 * Previous / Next. Its colour nests inside the control colour, so setting only
 * one of the two still looks deliberate - the same fallback shape row_gap uses
 * to reach the slide gap.
 */
.srdc-carousel__nav {
	align-items: center;
	background: var( --srdc-paging-bg, transparent );
	border: var( --srdc-paging-border-width, 1px ) solid var( --srdc-paging-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-paging-radius, 4px );
	color: var( --srdc-paging-nav-color, var( --srdc-paging-color, var( --srdc-color-accent ) ) );
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	gap: 4px;
	line-height: 1.2;
	padding: 8px 12px;
}

/*
 * Hover falls back to the resting background, so a gallery that sets no
 * hover colour keeps the opacity shift it has always had rather than
 * flashing to transparent. Both halves are declared because a hover colour
 * with nothing to hover *from* only works downhill.
 */
.srdc-carousel__nav:hover:not( :disabled ) {
	background: var( --srdc-paging-hover-bg, var( --srdc-paging-bg, transparent ) );
	border-color: var( --srdc-paging-border-color, var( --srdc-color-hover ) );
	color: var( --srdc-paging-nav-color, var( --srdc-paging-color, var( --srdc-color-hover ) ) );
	opacity: .75;
}

/*
 * Disabled at the ends rather than removed. A control that vanishes shifts
 * every button beside it, so the row a visitor is aiming at moves under the
 * pointer - the same reason the carousel's arrows are disabled rather than
 * unmounted at the ends of a non-looping track.
 */
.srdc-carousel__nav:disabled {
	cursor: default;
	opacity: .4;
}

.srdc-carousel__nav-icon {
	display: block;
	flex: 0 0 auto;
	height: 1em;
	width: 1em;
}

/*
 * The ellipsis standing in for skipped pages. Padded to roughly a button's
 * width so the strip does not visibly tighten where a run was dropped, and
 * self-aligned to centre because the buttons beside it are taller.
 */
.srdc-carousel__pagegap {
	align-self: center;
	color: var( --srdc-paging-color, var( --srdc-color-accent ) );
	line-height: 1.2;
	opacity: .6;
	padding: 0 4px;
	user-select: none;
}

/*
 * "Page 2 of 5". Inherits the control colour when none of its own is set, so a
 * gallery that has only been given one colour still reads as one component.
 */
.srdc-carousel__pagecount {
	color: var( --srdc-paging-status-color, var( --srdc-paging-color, var( --srdc-color-accent ) ) );
	font-size: .875em;
	margin: 0;
	opacity: .85;
}

.srdc-carousel__page,
.srdc-carousel__more {
	background: var( --srdc-paging-bg, transparent );
	border: var( --srdc-paging-border-width, 1px ) solid var( --srdc-paging-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-paging-radius, 4px );
	color: var( --srdc-paging-color, var( --srdc-color-accent ) );
	cursor: pointer;
	font: inherit;
	line-height: 1.2;
	padding: 8px 14px;
}

.srdc-carousel__page:hover,
.srdc-carousel__more:hover {
	background: var( --srdc-paging-hover-bg, var( --srdc-paging-bg, transparent ) );
	border-color: var( --srdc-paging-border-color, var( --srdc-color-hover ) );
	color: var( --srdc-paging-color, var( --srdc-color-hover ) );
	opacity: .75;
}

/*
 * Load more's own colours, each nested over the shared one it overrides, so
 * with none set every value below resolves to what the two rules above drew.
 * Declared after them at the same specificity, which is the whole override.
 *
 * `background-color` rather than the shorthand, because that is the property
 * the Background Color field moves. The hover colour falls through the
 * resting one before the shared chain, the shape every hover colour here has.
 */
.srdc-carousel__more {
	margin: var( --srdc-more-margin-top, 0 ) var( --srdc-more-margin-right, 0 ) var( --srdc-more-margin-bottom, 0 ) var( --srdc-more-margin-left, 0 );
	/*
	 * border-box so a percentage means the button's outer edge, whatever a
	 * theme has done to box-sizing; max-width so a pixel width wider than the
	 * gallery stops at its edge rather than overflowing it.
	 */
	box-sizing: border-box;
	max-width: 100%;
	width: var( --srdc-more-width, auto );
	background-color: var( --srdc-more-bg, var( --srdc-paging-bg, transparent ) );
	color: var( --srdc-more-color, var( --srdc-paging-color, var( --srdc-color-accent ) ) );
	/*
	 * The four properties the hover moves, named rather than `all`, so a
	 * duration never animates a font or a margin the theme changes. Empty is
	 * 0s: an untimed button snaps, as it always did.
	 */
	transition-property: color, background-color, border-color, opacity;
	transition-duration: var( --srdc-more-transition-duration, 0s );
}

.srdc-carousel__more:hover {
	background-color: var( --srdc-more-hover-bg, var( --srdc-more-bg, var( --srdc-paging-hover-bg, var( --srdc-paging-bg, transparent ) ) ) );
	color: var( --srdc-more-hover-color, var( --srdc-more-color, var( --srdc-paging-color, var( --srdc-color-hover ) ) ) );
}

/*
 * The row holding Load more spans the gallery, so Load More Width has a real
 * box to be a percentage of. Its justify-content still places the button, so
 * a button nobody sized sits exactly where Pagination alignment put it before.
 */
.srdc-carousel__pagelist--more {
	align-self: stretch;
}

/*
 * **The narrow-screen rule that fills a button across its row is not here
 * any more.** It was a fixed `@media ( max-width: 549.98px )` block in this
 * file from 2.16.0 to 2.16.x; since 2.17.0 the width that counts as narrow is
 * a site setting, so the query is built by `SRDC_Options::button_css()` and
 * printed on this stylesheet's own handle.
 *
 * It could not stay here beside the setting. A second copy of the rule at a
 * fixed 550 would go on filling the button between an admin's 400 and 550 —
 * a control that only ever widens its own effect, which is the dead control
 * this plugin refuses. One rule, one number.
 *
 * The declarations moved with it unchanged, and the reasoning with them:
 * Load more **grows** rather than taking `width: 100%`, because a grown flex
 * item fills the row less its own margins where 100% plus a side margin runs
 * past the edge; the card button **stretches**, because it is an item in a
 * column flex container where growing would make it taller rather than wider.
 * Both reset `width` to `auto`, without which a definite width stops either
 * from filling anything.
 */

/* A hover colour somebody chose is drawn at full strength. */
.srdc-carousel--more-hover .srdc-carousel__more:hover {
	opacity: 1;
}

/* The current page is not a target, so it does not react to the pointer. */
.srdc-carousel__page.is-current:hover {
	background: var( --srdc-paging-active-color, var( --srdc-paging-color, var( --srdc-color-ink ) ) );
	opacity: 1;
}

/*
 * The current page is a state, not a link, so it reads as pressed rather than
 * merely tinted - a colour alone would be the only signal for a reader who
 * cannot distinguish it. --srdc-paging-active-color falls back to the control
 * colour, so setting one and not the other still looks deliberate.
 *
 * **The chain must end in a real colour, never currentColor.** It did until
 * 1.27.0, and `currentColor` in `background` resolves against the element's
 * OWN computed `color` - which this very rule sets to #fff. So a gallery with
 * neither colour set painted a white button with white text and a white
 * border: the current page was invisible, and every page but the one you were
 * on appeared in the strip. Correct markup, correct custom properties, and
 * nothing to see. Only a browser could find it.
 */
.srdc-carousel__page.is-current {
	background: var( --srdc-paging-active-color, var( --srdc-paging-color, var( --srdc-color-ink ) ) );
	border-color: var( --srdc-paging-active-color, var( --srdc-paging-color, var( --srdc-color-ink ) ) );
	color: var( --srdc-paging-active-text, var( --srdc-color-on-ink ) );
	cursor: default;
}

/* --------------------------------------------------------------- Entrance */

/*
 * Items animate in the first time they scroll into view — galleries 3.2.0,
 * the carousel family 3.3.0.
 *
 * **Hidden only under `.srdc-entrance-armed`**, which the inline script after
 * the carousel adds and takes back if srdc-entrance.js does not claim it in
 * time. Nothing here hides anything on its own, so a carousel or gallery
 * whose scripts never ran is an ordinary one.
 *
 * **Keyframes with no `to`, and a backwards fill.** Each animation starts
 * from its own offset state and ends at whatever the cell's own styles are,
 * so nothing is left overriding them when it finishes, and the backwards fill
 * holds the start state through the stagger delay. The script swaps
 * `is-entering` for `is-entered` on `animationend`, so a finished cell
 * carries no animation at all.
 *
 * **`translate` and `scale`, never `transform`** (3.3.0). On a looping
 * carousel Embla writes an inline `transform` on each slide to wrap it round,
 * and an animation on `transform` outranks an inline style, so a wrapped
 * slide would jump to its unwrapped place for the length of the animation.
 * The individual properties compose with `transform` instead of replacing
 * it. Center mode's dim and scale sit on `.srdc-card` inside the slide, and
 * the hover effects on the picture, so neither meets this either.
 */
.srdc-entrance-armed .srdc-carousel__slide:not( .is-entering ):not( .is-entered ) {
	opacity: 0;
}

.srdc-carousel--entrance .srdc-carousel__slide.is-entering {
	animation-duration: var( --srdc-entrance-duration, 600ms );
	animation-timing-function: var( --srdc-entrance-easing, ease-out );
	animation-delay: calc( var( --srdc-i, 0 ) * var( --srdc-entrance-stagger, 100ms ) );
	animation-fill-mode: backwards;
}

.srdc-carousel--entrance-fade .srdc-carousel__slide.is-entering {
	animation-name: srdc-entrance-fade;
}

.srdc-carousel--entrance-fade-up .srdc-carousel__slide.is-entering {
	animation-name: srdc-entrance-fade-up;
}

.srdc-carousel--entrance-fade-left .srdc-carousel__slide.is-entering {
	animation-name: srdc-entrance-fade-left;
}

.srdc-carousel--entrance-fade-right .srdc-carousel__slide.is-entering {
	animation-name: srdc-entrance-fade-right;
}

.srdc-carousel--entrance-zoom .srdc-carousel__slide.is-entering {
	animation-name: srdc-entrance-zoom;
}

/*
 * A sideways start pushes the outermost cells past the gallery's edge, and on
 * a full-width gallery past the window's — a horizontal scrollbar that blinks
 * in and out as each row arrives. Clipped on the x axis only, and only while
 * something is entering: `clip`, unlike `hidden`, leaves the other axis alone,
 * and the class is gone as soon as the last cell lands, so card shadows at the
 * edges are cut only while they are still fading in.
 */
.srdc-carousel--entrance-fade-left.is-entrance-running .srdc-carousel__grid,
.srdc-carousel--entrance-fade-right.is-entrance-running .srdc-carousel__grid {
	overflow-x: clip;
}

@keyframes srdc-entrance-fade {
	from {
		opacity: 0;
	}
}

@keyframes srdc-entrance-fade-up {
	from {
		opacity: 0;
		translate: 0 24px;
	}
}

/* "Fade left" moves left, so it starts to the right — Site Suite's naming. */
@keyframes srdc-entrance-fade-left {
	from {
		opacity: 0;
		translate: 24px 0;
	}
}

@keyframes srdc-entrance-fade-right {
	from {
		opacity: 0;
		translate: -24px 0;
	}
}

@keyframes srdc-entrance-zoom {
	from {
		opacity: 0;
		scale: 0.92;
	}
}

/*
 * Reduced motion takes the movement, not the effect — the rule the image
 * hover keeps. Every effect becomes the plain fade: nothing travels, and the
 * items still arrive rather than all being there at once. Same specificity as
 * the effect rules and later in the sheet, so it wins.
 */
@media ( prefers-reduced-motion: reduce ) {
	.srdc-carousel--entrance .srdc-carousel__slide.is-entering {
		animation-name: srdc-entrance-fade;
	}
}

/* ------------------------------------------------------------- Vertical */

.srdc-carousel--axis-y .srdc-carousel__viewport {
	height: var( --srdc-viewport-height, 400px );
	overflow-x: hidden;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
}

.srdc-carousel--axis-y.is-embla .srdc-carousel__viewport {
	overflow: hidden;
}

.srdc-carousel--axis-y .srdc-carousel__container {
	flex-direction: column;
	height: 100%;
	touch-action: pan-x pinch-zoom;
}

.srdc-carousel--axis-y .srdc-carousel__slide {
	flex: 0 0 calc(
		( 100% - var( --srdc-peek, 0px ) - ( var( --srdc-per-view, 3 ) - 1 ) * var( --srdc-gap, 16px ) )
		/ var( --srdc-per-view, 3 )
	);
	scroll-snap-align: start;
}

/* ------------------------------------------------- Carousel: thumbnail strip */

/*
 * A thumbs slider is the carousel above plus a second track beside it, and
 * every declaration here is scoped to `--layout-thumbs` so no other carousel
 * gains one. That is the additive bargain the whole stylesheet keeps, and it
 * matters more than usual here because the strip reuses `.srdc-card`'s
 * neighbours: the root, the arrows and the dots are all shared.
 *
 * The root becomes the box that arranges the two, which is why the track and
 * its chrome had to gain a wrapper. `__stage` is the pane the track and its
 * dots share, so the strip can sit to one side of the slides without the dots
 * going with it.
 *
 * **It was the arrows' positioning context until 2.7.5 and is not any more.**
 * `__frame` — inside this, holding the track and the arrows and not the dots —
 * is what `top: 50%` measures now, and every carousel emits one. This box
 * could never have done that job: it is as tall as the track plus a dot row,
 * so an arrow centred on it sat half a row low. It is still the one the strip
 * sits beside, which the frame cannot be.
 *
 * Four positions, one flex-direction each, and the two reversed ones are why
 * the strip is always last in the markup: one DOM order, no `order` property,
 * and a screen reader meets the slides before the index of them either way.
 */
.srdc-carousel--layout-thumbs {
	display: flex;
	gap: var( --srdc-thumbs-gap, 8px );
}

/*
 * Each position declares its own direction, the default included. Leaving
 * `bottom` to the base rule would be a class the renderer emits with nothing
 * behind it, which is exactly the kind of hook that later turns out to have
 * been doing nothing all along.
 */
.srdc-carousel--thumbs-bottom {
	flex-direction: column;
}

.srdc-carousel--thumbs-top {
	flex-direction: column-reverse;
}

.srdc-carousel--thumbs-left {
	flex-direction: row-reverse;
}

.srdc-carousel--thumbs-right {
	flex-direction: row;
}

/*
 * **The header is not part of the strip arrangement, and only this layout has
 * to say so.**
 *
 * Thumbs Slider is the one layout whose *root* is the layout box — every other
 * one arranges `.srdc-carousel__grid` or the track, leaving the root a plain
 * block the header sits above without being told to. Here the root is a flex
 * container, so the title and description became flex items and lined up beside
 * the slides. Three of the four strip positions drew them in the wrong place:
 * `column-reverse` put them underneath, and the two row directions put them to
 * one side. `bottom` was right only by accident.
 *
 * Fixed per direction rather than by restructuring the markup, because the
 * alternative is a second wrapper inside the root and a new class for every
 * thumbs carousel already on a site — a large change to a shipped layout to
 * carry two elements that are new.
 */

/*
 * `column-reverse` stacks upward, so the first child lands at the bottom.
 * Ordering it last is what puts it back on top. No width rule: in a column
 * container the cross size already stretches.
 */
.srdc-carousel--thumbs-top .srdc-carousel__header {
	order: 1;
}

/*
 * The two row directions need the header on a line of its own. `wrap` plus a
 * full-width basis is what makes one; without the wrap the basis is simply
 * ignored and the header stays in the row.
 *
 * Wrapping is safe to add unconditionally here: `.srdc-carousel__stage` carries
 * `min-width: 0`, so the track shrinks beside the strip rather than overflowing
 * — which means nothing else in this layout was relying on `nowrap` to hold a
 * line together.
 *
 * `column` is deliberately absent from both rules. A flex basis in a column
 * container is a *height*, so `0 0 100%` there would make the header as tall as
 * the whole carousel.
 */
.srdc-carousel--thumbs-left,
.srdc-carousel--thumbs-right {
	flex-wrap: wrap;
}

.srdc-carousel--thumbs-left .srdc-carousel__header,
.srdc-carousel--thumbs-right .srdc-carousel__header {
	flex: 0 0 100%;
}

.srdc-carousel__stage {
	/* Kept, though the frame inside now wins every arrow: a positioned
	 * ancestor here has been part of this layout's markup since 1.41.0 and
	 * removing it is a change with no fix attached to it. */
	position: relative;
	flex: 1 1 auto;

	/* Both, or a wide track refuses to shrink beside the strip and a tall
	 * one refuses to shrink above it. A flex item's automatic minimum size
	 * is its content, which for a carousel is every slide laid end to end. */
	min-width: 0;
	min-height: 0;
}

/*
 * Hidden until the script mounts, exactly as the arrows are and for exactly
 * the same reason: every button in the strip calls scrollTo() on an Embla
 * instance, so without one they are controls that do nothing. What is left is
 * the track's own no-JS fallback — a natively scrollable strip of the real
 * slides — which reaches every picture without anything on screen claiming to
 * be clickable when it is not.
 */
.srdc-carousel:not( .is-embla ) .srdc-carousel__thumbs {
	display: none;
}

.srdc-carousel__thumbs {
	flex: 0 0 auto;
	min-width: 0;
	min-height: 0;
}

/*
 * The strip's own length is the carousel's width when it runs along the
 * bottom or the top, and `--srdc-thumbs-width` when it stands beside the
 * track. Those are the two orientations, and each has exactly one field
 * describing it — see thumbs_per_view and thumbs_width in the schema.
 */
.srdc-carousel--thumbs-left .srdc-carousel__thumbs,
.srdc-carousel--thumbs-right .srdc-carousel__thumbs {
	flex: 0 0 var( --srdc-thumbs-width, 88px );
	align-self: stretch;
}

/*
 * The same no-JS fallback the main viewport has, for the same reason: a
 * blocked or broken bundle leaves a scrollable strip rather than a column of
 * full-width thumbnails. `.is-embla` here is on the strip, not the root — the
 * two instances mount independently and either can fail without the other.
 */
.srdc-carousel__thumbs-viewport {
	height: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

.srdc-carousel__thumbs-viewport::-webkit-scrollbar {
	display: none;
}

.srdc-carousel__thumbs.is-embla .srdc-carousel__thumbs-viewport {
	overflow: hidden;
	scroll-snap-type: none;
}

.srdc-carousel--thumbs-left .srdc-carousel__thumbs-viewport,
.srdc-carousel--thumbs-right .srdc-carousel__thumbs-viewport {
	overflow-x: hidden;
	overflow-y: auto;
	scroll-snap-type: y mandatory;
}

.srdc-carousel--thumbs-left .srdc-carousel__thumbs.is-embla .srdc-carousel__thumbs-viewport,
.srdc-carousel--thumbs-right .srdc-carousel__thumbs.is-embla .srdc-carousel__thumbs-viewport {
	overflow: hidden;
}

.srdc-carousel__thumbs-container {
	display: flex;
	gap: var( --srdc-thumbs-gap, 8px );

	/* Mandatory, as on the track: without it a vertical drag starting on a
	 * thumbnail is captured by the strip and the page stops scrolling. */
	touch-action: pan-y pinch-zoom;
}

.srdc-carousel--thumbs-left .srdc-carousel__thumbs-container,
.srdc-carousel--thumbs-right .srdc-carousel__thumbs-container {
	flex-direction: column;
	height: 100%;
	touch-action: pan-x pinch-zoom;
}

/*
 * One thumbnail. A horizontal strip divides its width by the count, exactly
 * as the track divides its width by --srdc-per-view; a vertical one takes the
 * strip's full width instead and lets the ratio decide the height, because
 * its length is the track's height and no setting here knows what that is.
 */
.srdc-carousel__thumb {
	position: relative;
	display: block;
	flex: 0 0 calc(
		( 100% - ( var( --srdc-thumbs-per-view, 5 ) - 1 ) * var( --srdc-thumbs-gap, 8px ) )
		/ var( --srdc-thumbs-per-view, 5 )
	);
	min-width: 0;
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: var( --srdc-radius-tl, 0 ) var( --srdc-radius-tr, 0 ) var( --srdc-radius-br, 0 ) var( --srdc-radius-bl, 0 );
	background: none;
	overflow: hidden;
	cursor: pointer;
	scroll-snap-align: start;
	aspect-ratio: var( --srdc-thumbs-ratio, 1/1 );
	opacity: var( --srdc-thumbs-opacity, 55% );
	transition: opacity 0.2s ease;
}

.srdc-carousel--thumbs-left .srdc-carousel__thumb,
.srdc-carousel--thumbs-right .srdc-carousel__thumb {
	flex: 0 0 auto;
	width: 100%;
}

/*
 * `original` is not a valid aspect-ratio value, so it is a class exactly as
 * it is for the slide's own ratio, and SRDC_Renderer unsets the custom
 * property it would otherwise emit. The image goes back to deciding its own
 * height, which is what the word means.
 */
.srdc-carousel--thumbs-ratio-original .srdc-carousel__thumb {
	aspect-ratio: auto;
}

.srdc-carousel--thumbs-ratio-original .srdc-carousel__thumb-image {
	height: auto;
}

.srdc-carousel__thumb:hover {
	opacity: 1;
}

/*
 * The current thumbnail is fully opaque and ringed. The ring is an inset
 * pseudo-element rather than a border, so it cannot change the box the flex
 * basis just calculated — a 2px border would make the current thumbnail 4px
 * narrower than its neighbours and the whole strip would shuffle on every
 * slide change.
 */
.srdc-carousel__thumb.is-current {
	opacity: 1;
}

.srdc-carousel__thumb.is-current::after {
	content: '';
	position: absolute;
	inset: 0;
	border: 2px solid var( --srdc-thumbs-active-color, var( --srdc-color-ink ) );
	border-radius: inherit;
	pointer-events: none;
}

.srdc-carousel__thumb:focus-visible {
	outline: 2px solid var( --srdc-color-on-scrim );
	outline-offset: -2px;
	box-shadow: 0 0 0 2px var( --srdc-color-ink ) inset;
	opacity: 1;
}

.srdc-carousel__thumb-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/*
 * The fallback for a slide with no picture in it — an authored content slide,
 * or an image whose watermarking failed closed. The button is never dropped,
 * because a strip missing one has every button after it pointing at the wrong
 * slide; it carries the slide's number instead.
 *
 * aria-hidden, because the button around it already says "Go to slide 3" and
 * the digit would otherwise be announced twice.
 */
.srdc-carousel__thumb-index {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	min-height: 44px;
	background: var( --srdc-color-muted );
	color: var( --srdc-color-ink );
	font-size: 0.875em;
	line-height: 1;
}

@media ( prefers-reduced-motion: reduce ) {
	.srdc-carousel__thumb {
		transition: none;
	}
}

/*
 * **The stage is 16 / 9, and the layout owns it outright.**
 *
 * 1.43.0 wrote this as `var( --srdc-ratio, 16 / 9 )` — a fallback, so an
 * author could still override it. 1.45.0 hid the Image aspect ratio control
 * for this layout and resolve() settles the value back to its default, so
 * --srdc-ratio can no longer be emitted on a thumbs slider at all. A `var()`
 * nothing is able to write is precisely the --srdc-caption-padding drift this
 * project chases everywhere else, so the property is gone and the number is
 * simply here.
 *
 * 16 / 9 because the strip stacks under the stage by default, which makes the
 * pair's total height the thing this layout gets wrong first: a 4/3 stage over
 * an 88px strip is a very tall block and 3/4 is unusable. It pairs with
 * `thumbs_ratio`'s own 1/1, so square thumbnails under a wide slide is what
 * the layout draws untouched.
 *
 * **Two classes, and it stays above the --ratio-original rule below.** That
 * rule is two classes as well, so a tie is broken by source order. It cannot
 * match on a slider today — `original` is a class emitted from the ratio, and
 * the ratio is settled — but the ordering is kept and asserted so that a
 * future release un-settling it finds the guard already in place rather than
 * a silent 1/1.
 */
.srdc-carousel--layout-thumbs .srdc-card__media {
	aspect-ratio: 16 / 9;
}

/* ------------------------------------------------------------------- Card */

/*
 * The card is the box holding a picture and its text together, and since
 * 1.51.0 it is what Item Styles draws on. `.srdc-card--content` is the same
 * element on a written slide — it carries both classes — so these three
 * declarations reach it here and it declares none of its own.
 *
 * Every fallback is nothing: `--srdc-card-border-width` resolves to 0 and
 * `--srdc-card-shadow` to none, so a card that has never been touched draws
 * exactly what it drew before this rule existed. That is the same additive
 * bargain the picture's box below strikes, and it is what let the eleven
 * settings above move without an image carousel moving a pixel.
 *
 * There is deliberately no `overflow: hidden` here. A rounded card does not
 * clip the picture inside it, and the field's help says so — adding the clip
 * would crop an outset shadow on `.srdc-card__media`, which is a live
 * setting on every carousel that predates this one.
 */
.srdc-card {
	display: flex;
	flex-direction: column;
	gap: var( --srdc-card-gap, 8px );
	height: 100%;
	margin: 0;
	border: var( --srdc-card-border-width, 0 ) var( --srdc-card-border-style, solid ) var( --srdc-card-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-card-radius, 0 );
	box-shadow: var( --srdc-card-shadow, none );
}

/*
 * `width` and the two lines under it are one setting — `image_width` — and the
 * two lines are why it is usable rather than merely applied.
 *
 * The fallback is `100%`, which is what this box has always been: a block child
 * of the card, stretched. So an unset width renders byte-identical CSS, and
 * `box-sizing: border-box` on `.srdc-carousel *` means the 100% still includes
 * the border rather than overflowing by it.
 *
 * `margin-inline: auto` does nothing at all until a width is set — auto margins
 * have no free space to divide — and centres the picture the moment one is.
 * Without it a 100px logo pins to the start of a 300px card and reads as the
 * setting being broken, which is the lesson the header's `justify-self` pairing
 * records in docs/header.md. One control, both outcomes, neither surprising.
 *
 * `max-width` is the guard against a width wider than the slide: the author
 * gets their number up to the point where it would overflow the track, which
 * a carousel cannot show them any of.
 */
.srdc-card__media {
	display: block;
	position: relative;
	overflow: hidden;
	width: var( --srdc-image-width, 100% );
	max-width: 100%;
	margin-inline: auto;
	aspect-ratio: var( --srdc-ratio, 4 / 3 );
	border: var( --srdc-border-width, 0 ) var( --srdc-border-style, solid ) var( --srdc-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-radius-tl, 0 ) var( --srdc-radius-tr, 0 ) var( --srdc-radius-br, 0 ) var( --srdc-radius-bl, 0 );
	box-shadow: var( --srdc-shadow, none );
}

.srdc-card__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: var( --srdc-object-fit, cover );
}

/*
 * The stand-in for a cover that was never rendered — a PDF uploaded to a host
 * with no Ghostscript delegate. SRDC_Card::render_pdf() emits it in place of
 * the <img> so the slide keeps its shape, its title, its body and its link
 * instead of vanishing.
 *
 * **It fills the media box and paints nothing of its own beyond a tint.** The
 * frame, the ratio, the radius, the border and the shadow are all
 * `.srdc-card__media`'s already, so every Cover Styles setting reaches this
 * exactly as it reaches a real cover — which is the whole reason this is a
 * child of the media box rather than a card modifier.
 *
 * `currentColor` at low alpha rather than a fixed grey: it follows whatever
 * the card's text colour is, so it reads as a quiet empty slot on a light
 * theme and on a dark one without a second custom property to set.
 */
.srdc-card__frame {
	display: block;
	width: 100%;
	height: 100%;
	background: rgba( 128, 128, 128, 0.08 );
	background: color-mix( in srgb, currentColor 8%, transparent );
}

/*
 * ratio="original" has no intrinsic size to be original *to* when the cover is
 * missing, so the frame keeps a shape rather than collapsing to nothing. 4 / 3
 * is the same fallback `--srdc-ratio` carries above.
 */
.srdc-carousel--ratio-original .srdc-card__frame {
	aspect-ratio: 4 / 3;
}

/*
 * ratio="original" cannot be a custom property — 'original' is not a valid
 * aspect-ratio value — so it arrives as a class instead.
 */
.srdc-carousel--ratio-original .srdc-card__media {
	aspect-ratio: auto;
}

.srdc-carousel--ratio-original .srdc-card__image {
	height: auto;
	object-fit: unset;
}

/* -------------------------------------------------------------------- Video */

/*
 * A video slide is a poster card with two controls on it, and every rule here
 * is scoped to `.srdc-card__video` — so an image card gains not one
 * declaration and a carousel with no videos in it is untouched. Same additive
 * bargain the hover effects and the shadow each keep.
 *
 * The frame itself is `.srdc-card__media`, unchanged, which is why the aspect
 * ratio, the border, the radius, the shadow, the six hover effects and
 * `object-fit` all reach a video poster with nothing written for them.
 */

/*
 * The player replaces the poster in the same box rather than resizing it, so a
 * 16/9 video in a 4/3 carousel letterboxes inside the frame the author chose.
 * That is the honest result: the alternative is a slide that changes shape
 * mid-carousel and shoves its neighbours around.
 */
.srdc-card__video .srdc-card__player {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: contain;
}

/* The poster and both controls step aside together once a player is in. */
.srdc-card__video.is-playing .srdc-card__image,
.srdc-card__video.is-playing .srdc-card__play,
.srdc-card__video.is-playing .srdc-card__expand {
	display: none;
}

/*
 * The play button. Centred, and deliberately not using the hover overlay's
 * `place-items` property: this is not a hover affordance, it is the slide's
 * primary control and it is visible at rest.
 */
.srdc-card__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --srdc-video-play-bg, var( --srdc-color-scrim ) );
	color: var( --srdc-video-play-color, var( --srdc-color-on-scrim ) );
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.srdc-card__play svg {
	display: block;
	width: 28px;
	height: 28px;
	/* The glyph's own bounding box leans left of centre; nudge it back. */
	margin-left: 3px;
}

.srdc-card__play:hover,
.srdc-card__play:focus-visible {
	background: var( --srdc-color-hover );
	transform: translate( -50%, -50% ) scale( 1.08 );
}

/*
 * The corner link out to the lightbox. Small on purpose — the play button is
 * the thing most visitors want, and this is the way out for somebody on a
 * narrow slide who wants it bigger.
 */
.srdc-card__expand {
	position: absolute;
	right: 10px;
	bottom: 10px;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 4px;
	background: var( --srdc-video-play-bg, var( --srdc-color-scrim ) );
	color: var( --srdc-video-play-color, var( --srdc-color-on-scrim ) );
	transition: background-color 0.2s ease;
}

.srdc-card__expand svg {
	display: block;
	width: 18px;
	height: 18px;
}

.srdc-card__expand:hover,
.srdc-card__expand:focus-visible {
	background: var( --srdc-color-hover );
}

/*
 * Reduced motion takes the movement and leaves the colour, which is this
 * plugin's standing position — somebody who asked for less movement did not
 * ask for less feedback.
 */
@media ( prefers-reduced-motion: reduce ) {
	.srdc-card__play,
	.srdc-card__expand {
		transition: none;
	}

	.srdc-card__play:hover,
	.srdc-card__play:focus-visible {
		transform: translate( -50%, -50% );
	}
}

/*
 * A ground for the frame, so a video whose poster never arrived is a dark
 * panel with a play button on it rather than a transparent hole.
 *
 * Unconditional rather than scoped to the missing-poster case with `:has()`.
 * A poster covers this completely, so the rule is invisible whenever there is
 * one — and the version that tested for the picture would have been a second
 * statement of a fact the markup already carries.
 */
.srdc-card__video {
	background: var( --srdc-color-scrim );
}

/* The lightbox's player, which is not inside a card at all. */
.pswp__srdc-video {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.pswp__srdc-video iframe,
.pswp__srdc-video video {
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	border: 0;
	background: #000;
}

/* --------------------------------------------------------------- Box shadow */

/*
 * The shadow is seven settings and one declaration, and the split between
 * them is the whole design.
 *
 * `shadow` itself is a **class** — `inset` is a keyword at the head of the
 * value rather than a value a var() could hold, and `none` has to switch the
 * declaration off rather than set it to something. Its six values are ordinary
 * custom properties, so they arrive through css_vars() like every other
 * setting and an author's own number still wins on the carousel's id.
 *
 * **The two rules that paint are untouched.** `.srdc-card__media` and
 * `.srdc-card--content` still read `box-shadow: var( --srdc-shadow, none )`,
 * exactly as they have since 1.0.0 — what changed is who declares that
 * property. Nothing does on an untouched carousel, so the fallback stands and
 * a carousel that never had a shadow still computes to `none`, with no new
 * declaration anywhere. That is the same additive bargain the hover effects
 * below strike, and it is why the composition lives here rather than in the
 * card rules.
 *
 * The fallbacks are the placeholders the schema shows in the empty fields —
 * 0, 0, 10px, 0 and the palette's shadow colour — so switching the shadow on
 * and touching nothing else draws exactly what the screen said it would.
 */
.srdc-carousel--shadow-outset {
	--srdc-shadow:
		var( --srdc-shadow-x, 0 )
		var( --srdc-shadow-y, 0 )
		var( --srdc-shadow-blur, 10px )
		var( --srdc-shadow-spread, 0 )
		var( --srdc-shadow-color, var( --srdc-color-shadow ) );

	/*
	 * The hover colour falls back to the resting colour before it falls back
	 * to the token, so a carousel that sets one and not the other does not
	 * jump on hover. Same chain, same reason, as --srdc-paging-hover-bg.
	 */
	--srdc-shadow-hover:
		var( --srdc-shadow-x, 0 )
		var( --srdc-shadow-y, 0 )
		var( --srdc-shadow-blur, 10px )
		var( --srdc-shadow-spread, 0 )
		var( --srdc-shadow-hover-color, var( --srdc-shadow-color, var( --srdc-color-shadow ) ) );
}

.srdc-carousel--shadow-inset {
	--srdc-shadow:
		inset
		var( --srdc-shadow-x, 0 )
		var( --srdc-shadow-y, 0 )
		var( --srdc-shadow-blur, 10px )
		var( --srdc-shadow-spread, 0 )
		var( --srdc-shadow-color, var( --srdc-color-shadow ) );

	--srdc-shadow-hover:
		inset
		var( --srdc-shadow-x, 0 )
		var( --srdc-shadow-y, 0 )
		var( --srdc-shadow-blur, 10px )
		var( --srdc-shadow-spread, 0 )
		var( --srdc-shadow-hover-color, var( --srdc-shadow-color, var( --srdc-color-shadow ) ) );
}

/*
 * The transition is declared inside the switch, never once on the card. That
 * is the bargain the hover effects make below and for the same reason: written
 * on .srdc-card__media it would put a transition on every card in every
 * carousel on every site to serve the ones that asked for a shadow.
 */
.srdc-carousel--shadow-outset .srdc-card__media,
.srdc-carousel--shadow-inset .srdc-card__media {
	transition: box-shadow 0.3s ease;
}

/*
 * :focus-within beside :hover, exactly as the hover effects have it — a
 * keyboard reaching a slide is the same event as a pointer arriving on it, and
 * a colour that only a mouse can see is a setting half the visitors do not get.
 */
.srdc-carousel--shadow-outset .srdc-card:hover .srdc-card__media,
.srdc-carousel--shadow-outset .srdc-card:focus-within .srdc-card__media,
.srdc-carousel--shadow-inset .srdc-card:hover .srdc-card__media,
.srdc-carousel--shadow-inset .srdc-card:focus-within .srdc-card__media {
	box-shadow: var( --srdc-shadow-hover );
}

/* --------------------------------------------------------- Card box shadow */

/*
 * The card's shadow, and it is the block above rewritten one element out.
 * Two switches rather than one with more values, because a card and the
 * picture inside it can each want a shadow the other does not — and because
 * `inset` and `none` are the two things a var() cannot express, which is why
 * either of them is a class at all.
 *
 * `.srdc-card--content` is `.srdc-card`, so a written slide is reached by
 * these selectors and needs none of its own. That is the whole 1.51.0 repair:
 * one set of properties for one box, rather than `--srdc-shadow` meaning the
 * picture on one row type and the card on the other.
 */
.srdc-carousel--card-shadow-outset {
	--srdc-card-shadow:
		var( --srdc-card-shadow-x, 0 )
		var( --srdc-card-shadow-y, 0 )
		var( --srdc-card-shadow-blur, 10px )
		var( --srdc-card-shadow-spread, 0 )
		var( --srdc-card-shadow-color, var( --srdc-color-shadow ) );

	/*
	 * Falls through the resting colour before the token, so a card that sets
	 * one and not the other does not jump on hover. Same chain, same reason,
	 * as the picture's and as --srdc-paging-hover-bg before it.
	 */
	--srdc-card-shadow-hover:
		var( --srdc-card-shadow-x, 0 )
		var( --srdc-card-shadow-y, 0 )
		var( --srdc-card-shadow-blur, 10px )
		var( --srdc-card-shadow-spread, 0 )
		var( --srdc-card-shadow-hover-color, var( --srdc-card-shadow-color, var( --srdc-color-shadow ) ) );
}

.srdc-carousel--card-shadow-inset {
	--srdc-card-shadow:
		inset
		var( --srdc-card-shadow-x, 0 )
		var( --srdc-card-shadow-y, 0 )
		var( --srdc-card-shadow-blur, 10px )
		var( --srdc-card-shadow-spread, 0 )
		var( --srdc-card-shadow-color, var( --srdc-color-shadow ) );

	--srdc-card-shadow-hover:
		inset
		var( --srdc-card-shadow-x, 0 )
		var( --srdc-card-shadow-y, 0 )
		var( --srdc-card-shadow-blur, 10px )
		var( --srdc-card-shadow-spread, 0 )
		var( --srdc-card-shadow-hover-color, var( --srdc-card-shadow-color, var( --srdc-color-shadow ) ) );
}

.srdc-carousel--card-shadow-outset .srdc-card,
.srdc-carousel--card-shadow-inset .srdc-card {
	transition: box-shadow 0.3s ease;
}

.srdc-carousel--card-shadow-outset .srdc-card:hover,
.srdc-carousel--card-shadow-outset .srdc-card:focus-within,
.srdc-carousel--card-shadow-inset .srdc-card:hover,
.srdc-carousel--card-shadow-inset .srdc-card:focus-within {
	box-shadow: var( --srdc-card-shadow-hover );
}

/*
 * The body's own shadow (3.15.0) — the card's composition above, part for
 * part, under its own switch class, so a carousel that never sets it carries
 * neither the class nor a declaration.
 */
.srdc-carousel--content-shadow-outset {
	--srdc-content-shadow:
		var( --srdc-content-shadow-x, 0 )
		var( --srdc-content-shadow-y, 0 )
		var( --srdc-content-shadow-blur, 10px )
		var( --srdc-content-shadow-spread, 0 )
		var( --srdc-content-shadow-color, var( --srdc-color-shadow ) );
	--srdc-content-shadow-hover:
		var( --srdc-content-shadow-x, 0 )
		var( --srdc-content-shadow-y, 0 )
		var( --srdc-content-shadow-blur, 10px )
		var( --srdc-content-shadow-spread, 0 )
		var( --srdc-content-shadow-hover-color, var( --srdc-content-shadow-color, var( --srdc-color-shadow ) ) );
}

.srdc-carousel--content-shadow-inset {
	--srdc-content-shadow:
		inset
		var( --srdc-content-shadow-x, 0 )
		var( --srdc-content-shadow-y, 0 )
		var( --srdc-content-shadow-blur, 10px )
		var( --srdc-content-shadow-spread, 0 )
		var( --srdc-content-shadow-color, var( --srdc-color-shadow ) );
	--srdc-content-shadow-hover:
		inset
		var( --srdc-content-shadow-x, 0 )
		var( --srdc-content-shadow-y, 0 )
		var( --srdc-content-shadow-blur, 10px )
		var( --srdc-content-shadow-spread, 0 )
		var( --srdc-content-shadow-hover-color, var( --srdc-content-shadow-color, var( --srdc-color-shadow ) ) );
}

.srdc-carousel--content-shadow-outset .srdc-card__body,
.srdc-carousel--content-shadow-inset .srdc-card__body {
	box-shadow: var( --srdc-content-shadow );
	transition: box-shadow 0.3s ease;
}

.srdc-carousel--content-shadow-outset .srdc-card:hover .srdc-card__body,
.srdc-carousel--content-shadow-outset .srdc-card:focus-within .srdc-card__body,
.srdc-carousel--content-shadow-inset .srdc-card:hover .srdc-card__body,
.srdc-carousel--content-shadow-inset .srdc-card:focus-within .srdc-card__body {
	box-shadow: var( --srdc-content-shadow-hover );
}

/*
 * **An outset body shadow on a written slide would be invisible without
 * this.** The body fills a content card, and `.srdc-card--content` clips with
 * `overflow: hidden` so the body's background follows Card radius — which cuts
 * off everything outside the body, i.e. the whole shadow. Under an outset body
 * shadow the card stops clipping, and the body takes over the rounding: its own
 * Content Border Radius when set, otherwise the card's, so the corners look as
 * they did. Inset needs neither: it is drawn inside the body.
 */
.srdc-carousel--content-shadow-outset .srdc-card--content {
	overflow: visible;
}

.srdc-carousel--content-shadow-outset .srdc-card--content > .srdc-card__body {
	border-radius: var( --srdc-content-radius, var( --srdc-card-radius, 0 ) );
}

/*
 * Reduced motion takes the transition and leaves the colour, which is this
 * plugin's standing position: somebody who asked for less movement did not ask
 * for less feedback. A shadow changing colour is not movement.
 */
@media ( prefers-reduced-motion: reduce ) {
	.srdc-carousel--shadow-outset .srdc-card__media,
	.srdc-carousel--shadow-inset .srdc-card__media,
	.srdc-carousel--card-shadow-outset .srdc-card,
	.srdc-carousel--card-shadow-inset .srdc-card,
	.srdc-carousel--content-shadow-outset .srdc-card__body,
	.srdc-carousel--content-shadow-inset .srdc-card__body {
		transition: none;
	}
}

/* ------------------------------------------------------- Hover on the image */

/*
 * Six effects, each one a class on the root rather than a custom property,
 * because they do not all change the same declaration: three are a transform,
 * three are a filter, and two of them change the *resting* state as well as
 * the hovered one. A var() fallback cannot switch between those.
 *
 * The transition is declared per effect rather than once on .srdc-card__image,
 * and that is the whole additive bargain: a carousel with no effect chosen
 * gains not one declaration, so nothing already on a site moves. The class is
 * only emitted when the setting is not 'none'.
 *
 * :focus-within as well as :hover, matching the caption overlay above — a
 * keyboard user tabbing onto the link sees what a pointer user sees.
 */
.srdc-carousel--hover-zoom-in .srdc-card__image,
.srdc-carousel--hover-zoom-out .srdc-card__image,
.srdc-carousel--hover-rotate .srdc-card__image,
.srdc-carousel--hover-blur .srdc-card__image,
.srdc-carousel--hover-grayscale .srdc-card__image,
.srdc-carousel--hover-sepia .srdc-card__image {
	transition: transform 0.45s ease, filter 0.45s ease;
}

.srdc-carousel--hover-zoom-in .srdc-card:hover .srdc-card__image,
.srdc-carousel--hover-zoom-in .srdc-card:focus-within .srdc-card__image {
	transform: scale( 1.1 );
}

/* Starts at 110% so hover has something to settle back from. */
.srdc-carousel--hover-zoom-out .srdc-card__image {
	transform: scale( 1.1 );
}

.srdc-carousel--hover-zoom-out .srdc-card:hover .srdc-card__image,
.srdc-carousel--hover-zoom-out .srdc-card:focus-within .srdc-card__image {
	transform: scale( 1 );
}

/*
 * Tilt is paired with a scale and cannot be unpaired: rotating a rectangle
 * inside its own box exposes the corners, so the zoom is what keeps the frame
 * covered. That is why the option is named "Zoom and tilt" rather than
 * "Rotate" — the label describes what it does, not what the transform is.
 */
.srdc-carousel--hover-rotate .srdc-card:hover .srdc-card__image,
.srdc-carousel--hover-rotate .srdc-card:focus-within .srdc-card__image {
	transform: scale( 1.14 ) rotate( 4deg );
}

.srdc-carousel--hover-blur .srdc-card:hover .srdc-card__image,
.srdc-carousel--hover-blur .srdc-card:focus-within .srdc-card__image {
	filter: blur( 3px );
}

.srdc-carousel--hover-grayscale .srdc-card__image {
	filter: grayscale( 1 );
}

.srdc-carousel--hover-grayscale .srdc-card:hover .srdc-card__image,
.srdc-carousel--hover-grayscale .srdc-card:focus-within .srdc-card__image {
	filter: grayscale( 0 );
}

.srdc-carousel--hover-sepia .srdc-card:hover .srdc-card__image,
.srdc-carousel--hover-sepia .srdc-card:focus-within .srdc-card__image {
	filter: sepia( 1 );
}

/*
 * Reduced motion takes the movement away, not the effect.
 *
 * The transition goes for all six, and the three transforms are dropped
 * outright — an instant jump-scale is still motion, and this file's standing
 * position is that a reduce request is honoured rather than shortened (the
 * autoplay plugin is never added at all). Blur, grey and sepia are colour, so
 * they stay: a visitor who asked for less movement did not ask for less
 * feedback.
 */
@media ( prefers-reduced-motion: reduce ) {
	.srdc-carousel--hover-zoom-in .srdc-card__image,
	.srdc-carousel--hover-zoom-out .srdc-card__image,
	.srdc-carousel--hover-rotate .srdc-card__image,
	.srdc-carousel--hover-blur .srdc-card__image,
	.srdc-carousel--hover-grayscale .srdc-card__image,
	.srdc-carousel--hover-sepia .srdc-card__image {
		transition: none;
	}

	.srdc-carousel--hover-zoom-in .srdc-card:hover .srdc-card__image,
	.srdc-carousel--hover-zoom-in .srdc-card:focus-within .srdc-card__image,
	.srdc-carousel--hover-zoom-out .srdc-card__image,
	.srdc-carousel--hover-rotate .srdc-card:hover .srdc-card__image,
	.srdc-carousel--hover-rotate .srdc-card:focus-within .srdc-card__image {
		transform: none;
	}
}

/* ------------------------------------------------------------ Hover overlay */

/*
 * A tinted panel and an icon, inside the anchor and only when there is one —
 * SRDC_Card::overlay() decides that, so there is no CSS here for a slide that
 * opens nothing.
 *
 * .srdc-card__media is already position:relative and overflow:hidden, so the
 * panel needs no help from either. It is a later sibling of the image and an
 * earlier one than the caption, which is what puts an overlay caption on top
 * of the scrim rather than under it — the two are meant to be readable
 * together.
 *
 * The colour chain keeps the author's setting first and ends at the caption
 * scrim, deliberately the same token: one tinted panel over a photograph
 * should not differ from another by a few percent.
 */
.srdc-card__overlay {
	position: absolute;
	inset: 0;
	/*
	 * Grid rather than flex, and only so the icon's position can be one
	 * custom property: place-items takes <align> <justify> in a single value,
	 * which is what lets nine anchors be a values map on one field instead
	 * of nine modifier classes. The default resolves to plain 'center', so a
	 * gallery that never touched the setting emits nothing at all.
	 */
	display: grid;
	place-items: var( --srdc-hover-icon-place, center );
	/* Room for a corner anchor to sit in rather than against the edge. */
	padding: 14px;
	opacity: 0;
	background: var( --srdc-hover-overlay-bg, var( --srdc-color-scrim ) );
	color: var( --srdc-hover-icon-color, var( --srdc-color-on-scrim ) );
	transition: opacity 0.3s ease;
}

.srdc-card:hover .srdc-card__overlay,
.srdc-card:focus-within .srdc-card__overlay {
	opacity: 1;
}

@media ( prefers-reduced-motion: reduce ) {
	.srdc-card__overlay {
		transition: none;
	}
}

/*
 * A fixed 34px rather than an em: the icon sits on a photograph, not in a run
 * of text, so inheriting the caption's font size would make it grow on a
 * carousel whose captions happen to be large.
 *
 * The span is what is sized, and the SVG inside it fills that — which is the
 * whole reason a built-in glyph and a pasted one are wrapped the same way. An
 * author's SVG usually carries width and height attributes of its own, and
 * without this rule those would decide how big the icon is.
 */
.srdc-card__icon {
	display: block;
	width: 34px;
	height: 34px;
}

.srdc-card__icon svg {
	display: block;
	width: 100%;
	height: 100%;
}

.srdc-card__link {
	color: inherit;
	text-decoration: none;
}

.srdc-card__link:focus-visible {
	outline: 2px solid var( --srdc-dot-active-color, var( --srdc-color-ink ) );
	outline-offset: 3px;
}

/* --------------------------------------------------------- Content slides */

/*
 * A content slide is authored text, not an image with a caption, so it gets
 * its own box rather than reusing the caption rules. It still has to sit at
 * the same height as an image card beside it, which the flex column plus
 * height:100% on .srdc-card already guarantees — no JS measurement anywhere.
 */
.srdc-card--content {
	gap: 0;
	overflow: hidden;
}

/*
 * Normal flow, not flex. The body holds prose the author wrote, and a flex
 * column would strip the margin collapsing that makes paragraphs and headings
 * space themselves correctly.
 *
 * All four Content Body settings are declared here rather than split between
 * the card and the body, and that is what 1.52.0 changed: this element is now
 * *also* what an image slide renders for a body written on it, so a written
 * body is one kind of thing wherever it was typed. The colour and background
 * were on `.srdc-card--content` until then, which is a box an image slide has
 * not got.
 *
 * On a content slide the two are visually identical — the body is the only
 * child of a gap:0 flex column with height:100%, so it fills the card — and
 * `.srdc-card--content`'s own `overflow: hidden` still clips this background
 * to the card radius.
 */
.srdc-card__body {
	flex: 1 1 auto;
	padding: var( --srdc-content-padding, 20px );
	text-align: var( --srdc-content-align, start );
	color: var( --srdc-content-color, var( --srdc-color-ink ) );
	background: var( --srdc-content-bg, transparent );

	/*
	 * 3.14.0. Every fallback is nothing — width 0, radius 0 — so a body
	 * nobody has bordered draws exactly what it drew before. The overlay
	 * body's own bottom-corner radius rule is more specific and still wins.
	 */
	border: var( --srdc-content-border-width, 0 ) var( --srdc-content-border-style, solid ) var( --srdc-content-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-content-radius, 0 );
}

/*
 * The body is whatever the author wrote, so this styles element types rather
 * than plugin classes — and only enough to keep a slide tidy. Anything more
 * opinionated would fight the theme, which is what should be styling prose.
 */
.srdc-card__body > :first-child {
	margin-top: 0;
}

.srdc-card__body > :last-child {
	margin-bottom: var( --srdc-caption-title-margin, 0 );
}

.srdc-card__body img {
	max-width: 100%;
	height: auto;
}

.srdc-card__body h1,
.srdc-card__body h2,
.srdc-card__body h3,
.srdc-card__body h4,
.srdc-card__body h5,
.srdc-card__body h6 {
	margin: 0 0 0.4em;
	line-height: 1.25;
}

.srdc-card__body p {
	margin: 0 0 0.8em;
	line-height: 1.55;
}

/*
 * Opt-in button styling for a link the author marks up as one — the class the
 * 1.1/1.2 upgrade path writes when it turns a stored button into markup.
 */
.srdc-card__body a.srdc-button {
	display: inline-block;
	margin-top: 4px;
	padding: 10px 18px;
	border-radius: var( --srdc-card-radius, 3px );
	color: var( --srdc-color-on-ink );
	background: var( --srdc-content-color, var( --srdc-color-ink ) );
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

/*
 * The label was a hard-coded #fff over a settable background - the same shape
 * as the current page number before 1.29.0, and wrong the moment an author
 * picks a pale content colour. A token pairs it correctly on the defaults;
 * a carousel that sets --srdc-content-color pale still needs a text colour of
 * its own, and no field offers one yet.
 */
.srdc-card__body a.srdc-button:hover {
	background: var( --srdc-color-hover );
}

/*
 * Clamping needs display:-webkit-box, which changes how the block lays out, so
 * it is switched on by a class rather than left to a var() fallback.
 * -webkit-line-clamp is unprefixed nowhere yet but is supported everywhere
 * that matters; without support the text simply shows in full.
 */
.srdc-carousel--clamp .srdc-card__body {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var( --srdc-text-clamp, 3 );
	line-clamp: var( --srdc-text-clamp, 3 );
	overflow: hidden;
}

/* ---------------------------------------------------------------- Caption */

.srdc-card__caption {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: var( --srdc-caption-color, var( --srdc-color-ink ) );
	background: var( --srdc-caption-bg, transparent );

	/*
	 * One box, one alignment. This element holds the Media Library title and
	 * description *and* a body written on an image slide, which takes the same
	 * slot — so aligning it here is what stops two slides in one carousel
	 * sitting differently depending on which kind of text they carry.
	 *
	 * A flex item is blockified and stretches the cross axis, so each child is
	 * full width and text-align does the work; nothing here needs align-items.
	 *
	 * `start` is the field's own default, which css_vars() omits — so a
	 * carousel that has never been opened declares nothing and goes on
	 * inheriting whatever the theme aligned its captions to.
	 */
	text-align: var( --srdc-caption-align, start );
}

.srdc-card__caption:not( :empty ) {
	padding: var( --srdc-caption-padding-top, 0 ) var( --srdc-caption-padding-right, 0 ) var( --srdc-caption-padding-bottom, 0 ) var( --srdc-caption-padding-left, 0 );
}

/*
 * Every fallback below is the value this file hard-coded before 1.17.0, and
 * css_vars() omits a setting equal to its default — so a carousel nobody has
 * opened emits none of these properties and computes exactly what it always
 * did. The typography section is additive or it is a regression.
 *
 * These two selectors are the Media Library title and description, and only
 * those. A slide carrying an authored body renders .srdc-card__body instead —
 * since 1.52.0 the identical element a content slide uses — which deliberately
 * sets no type of its own: it is the author's markup, and the rule that
 * authored text and library text never write into each other holds for the
 * font as much as for the words.
 */
/*
 * **Text colour has to be taken, not inherited.**
 *
 * `.srdc-card__caption` sets `color` and its children inherited it, which held
 * for as long as they were all `<span>`s. Since 1.56.0 a video slide's title is
 * an `<h2>`, and **inheritance loses to any rule at all** — every theme colours
 * its headings, so `h2 { color: … }` beat the caption colour and the setting
 * appeared to do nothing. Reported as exactly that.
 *
 * Two classes rather than one, deliberately: a carousel dropped into post
 * content is inside whatever the theme calls its content wrapper, so
 * `.entry-content h2` is the realistic competitor and a single class would lose
 * to it. `inherit` rather than the custom property, so the overlay caption's
 * own fallback (on-scrim, not ink) still reaches these children — reading the
 * property directly here would pin them to the ink chain and put dark text on
 * a dark scrim.
 *
 * The `<span>` gains nothing and loses nothing: it was already inheriting.
 */
.srdc-card__caption .srdc-card__caption-title,
.srdc-card__caption .srdc-card__caption-text {
	color: inherit;
}

/*
 * The post title's anchor, which a card renders **only** when the post has no
 * featured image — with one, the picture carries the link and a second anchor
 * to the same place would be announced twice per slide.
 *
 * It is here rather than folded into the rule above because it is a different
 * competitor. That rule stops `.entry-content h2` winning; this stops
 * `.entry-content a` winning, and a theme's link colour is a far more
 * aggressive default than its heading colour — every one of them sets it, most
 * with an underline. `inherit` and not the custom property, for the reason the
 * rule above gives: the overlay caption's on-scrim fallback has to keep
 * reaching these children.
 */
.srdc-card__caption .srdc-card__caption-link {
	color: inherit;
	text-decoration: none;
}

.srdc-card__caption .srdc-card__caption-link:hover,
.srdc-card__caption .srdc-card__caption-link:focus-visible {
	text-decoration: underline;
}

/*
 * **Two classes, for the reason the colour rule above gives, and 2.11.1 is
 * the release that found the colour was not the only property at stake.**
 * Since 1.56.0 the title can be an `<h2>`, and a theme sizes its headings with
 * one class and an element — `.sr_section h2`, `.entry-content h2` — which is
 * 0,1,1 and beats a lone class. Font size and line height were the two
 * reported, because those are the two every theme sets on a heading; the rest
 * of this block was losing the same way wherever a theme happened to set it.
 * Every element carrying either class sits inside `.srdc-card__caption`, so
 * the prefix narrows nothing.
 */
.srdc-card__caption .srdc-card__caption-title {
	font-family: var( --srdc-caption-title-family, inherit );
	font-size: var( --srdc-caption-title-size, inherit );
	font-weight: var( --srdc-caption-title-weight, 600 );
	line-height: var( --srdc-caption-title-leading, 130% );
	letter-spacing: var( --srdc-caption-title-tracking, normal );
	text-transform: var( --srdc-caption-title-transform, none );

	/*
	 * Additive: the fallback is the 0 a span in a flex column already had, so
	 * an unset field emits no custom property and nothing moves. It stacks
	 * with .srdc-card__caption's own 2px gap rather than replacing it, which
	 * is what the field's help text says.
	 */
	margin-bottom: var( --srdc-caption-title-margin, 0 );

	/*
	 * Since 1.56.0 this class is on an <h2> as well as a <span> — a video
	 * slide's typed title, which is a heading rather than a remark under a
	 * picture. A heading arrives with a UA top margin and most themes add
	 * their own, so it is cleared here rather than in a video-only rule:
	 * one class, one set of type settings, and a span had no top margin to
	 * lose. `font-size: inherit` above already overrides the UA's 1.5em.
	 */
	margin-top: 0;
}

/*
 * Title Lines. The .srdc-carousel--clamp arrangement applied to the title: the
 * class switches display:-webkit-box on, the property carries the count. The
 * title is a stretched item of the caption's flex column, so it is already
 * the card's width and the ellipsis lands at the card's edge.
 *
 * `overflow-wrap: anywhere` because product codes and file names are often
 * one unbroken token, which would otherwise run past the edge and be clipped
 * with no ellipsis. It applies only while clamped; Wrap is untouched.
 *
 * **`padding-block: 0` is what makes the clamp a clamp**, found at 2.12.1 on a
 * theme giving every heading `padding-bottom: 10px`. `overflow: hidden` clips
 * at the padding edge, not the content edge, so the next line showed through
 * the theme's padding under the ellipsis. Cleared here only, so an unclamped
 * title keeps whatever spacing the theme gave it; a clamped one takes its
 * space from Bottom margin, which sits outside the clip.
 */
.srdc-carousel--title-clamp .srdc-card__caption .srdc-card__caption-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var( --srdc-caption-title-lines, 1 );
	line-clamp: var( --srdc-caption-title-lines, 1 );
	overflow: hidden;
	overflow-wrap: anywhere;
	padding-block: 0;
}

/*
 * The caption's text shadow, on the title and the description only. A class
 * rather than a var() fallback of `none`, so an untouched carousel leaves
 * `text-shadow` undeclared and a theme's own still applies.
 */
.srdc-carousel--caption-text-shadow .srdc-card__caption .srdc-card__caption-title,
.srdc-carousel--caption-text-shadow .srdc-card__caption .srdc-card__caption-text {
	text-shadow:
		var( --srdc-caption-text-shadow-x, 0 )
		var( --srdc-caption-text-shadow-y, 1px )
		var( --srdc-caption-text-shadow-blur, 3px )
		var( --srdc-caption-text-shadow-color, var( --srdc-color-shadow ) );
}

.srdc-card__caption .srdc-card__caption-text {
	font-family: var( --srdc-caption-desc-family, inherit );
	font-size: var( --srdc-caption-desc-size, 0.9em );
	font-weight: var( --srdc-caption-desc-weight, inherit );
	line-height: var( --srdc-caption-desc-leading, 145% );
	letter-spacing: var( --srdc-caption-desc-tracking, normal );
	text-transform: var( --srdc-caption-desc-transform, none );
	opacity: 0.85;
}

/*
 * Post meta — the date, author, categories and tags under a post card's
 * excerpt. Three rows since 1.61.0, four independently painted boxes.
 *
 * **The comment that stood here said this line had no settings of its own and
 * that adding a role would be "seven more fields for a line that is a smaller,
 * quieter version of the description above it". It has sixty-four now.** The
 * reasoning was sound about a *typographic role* and wrong about what was
 * being asked for: the four parts are not one line in one voice, they are four
 * different kinds of thing that happen to sit together, and a site that wants
 * its tags as grey pills and its date as plain text cannot say so with a role.
 *
 * Kept as the record rather than deleted, because "one role would do" is the
 * obvious first answer and it is the wrong one here.
 *
 * `em` on the wrapper still, so the whole line scales with whatever the
 * description was set to. Each part can override it.
 */
.srdc-card__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var( --srdc-meta-gap, 0.35em );
	font-size: 0.8em;
	line-height: 1.4;
}

/*
 * **`opacity: 0.7` was here and is deliberately gone.**
 *
 * Opacity fades an element and everything inside it, which was harmless while
 * the meta was bare inherited text and is a lie the moment it has a colour
 * picker: an author choosing pure black would be handed grey, with the markup,
 * the custom property and every assertion correct — 1.56.1's failure exactly,
 * in the one form the palette cannot see. It would have faded the new borders
 * and backgrounds too.
 *
 * So the quietness is now the author's to set and the line renders at the
 * card's own colour by default. It is still 0.8em, which is what carries
 * "secondary" on its own. Recorded in readme.txt as a visible change.
 */

/*
 * A row is a line, and nothing else. It holds no colour, no border and no
 * padding — those belong to the parts inside it, which is what makes
 * `.srdc-card__meta-tags` a box rather than a row of text.
 *
 * `flex-wrap` here rather than on the wrapper: a long author name should wrap
 * within its own row, never onto the categories' line.
 */
.srdc-card__meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.5em;
}

.srdc-card__meta-item {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5em;
}

/*
 * The separator, between the date and the author and nowhere else — the only
 * two parts that share a row.
 *
 * It is a real element now. Until 1.61.0 it was drawn by
 * `.srdc-card__meta-item + .srdc-card__meta-item::before` from an inline
 * `--srdc-meta-sep`, so a trailing one was impossible by construction. That
 * was the right trade while the parts were bare text and the wrong one the
 * moment a part became a box: a `::before` on the author belongs to the
 * author, so it would render inside that box's border and background.
 *
 * The property it bought is kept in PHP instead — the byline is joined with
 * implode(), and a one-item join emits nothing. See SRDC_Card::post_meta().
 */
.srdc-card__meta-sep {
	opacity: 0.6;
}

/*
 * The four boxes.
 *
 * Every declaration is a `var()` with the resting value as its fallback, so an
 * untouched carousel emits none of the hundred properties and draws exactly
 * what it drew — the arrangement every other custom property in this file has.
 *
 * `padding`, `margin` and `border-radius` are written as four-value shorthands
 * rather than as four longhand declarations each, because that is one line per
 * property instead of four.
 *
 * **All three emit in CSS order, which is deliberately not the order the fields
 * are declared in.** The screen pairs them by axis — top | bottom, then left |
 * right — so each of its two-column lines holds one decision; the shorthands
 * walk clockwise, and the corners are `border-radius`' own top left, top right,
 * bottom right, bottom left. The two orders disagree on purpose, every wrong
 * permutation is silent, and `captions.php` pins both so nobody tidies them
 * into agreement.
 *
 * A width of `0` with a style of `solid` draws nothing, so the style and the
 * colour can be declared unconditionally and a part with no border width draws
 * no border.
 *
 * The transition sits on the resting rule rather than on `:hover`, so it
 * governs the way *out* of the hover state as well as the way in — declared on
 * the hover rule alone, a box eases in and snaps back. Its duration defaults to
 * `0s`, so a carousel nobody has touched animates nothing and the colours snap
 * exactly as they did.
 *
 * **Deliberately not wrapped in `prefers-reduced-motion`.** That query is
 * honoured elsewhere in this plugin for autoplay, which is movement; a colour
 * fade on a hovered box is not, and killing it would be applying the rule past
 * what it is for. Nothing here translates, scales or rotates.
 *
 * Padding is safe on these boxes because `.srdc-carousel *` is already
 * `box-sizing: border-box` — the one place this plugin sets it, and the reason
 * a padded meta box cannot overflow the cell it is in.
 */
.srdc-card__meta-date {
	font-size: var( --srdc-meta-date-size, inherit );
	font-weight: var( --srdc-meta-date-weight, inherit );
	text-transform: var( --srdc-meta-date-transform, none );
	color: var( --srdc-meta-date-color, inherit );
	background: var( --srdc-meta-date-bg, transparent );
	padding: var( --srdc-meta-date-padding-top, 0 ) var( --srdc-meta-date-padding-right, 0 ) var( --srdc-meta-date-padding-bottom, 0 ) var( --srdc-meta-date-padding-left, 0 );
	margin: var( --srdc-meta-date-margin-top, 0 ) var( --srdc-meta-date-margin-right, 0 ) var( --srdc-meta-date-margin-bottom, 0 ) var( --srdc-meta-date-margin-left, 0 );
	transition-property: var( --srdc-meta-date-transition-property, all );
	transition-duration: var( --srdc-meta-date-transition-duration, 0s );
	transition-timing-function: var( --srdc-meta-date-transition-easing, ease );
	border-width: var( --srdc-meta-date-border-width, 0 );
	border-style: var( --srdc-meta-date-border-style, solid );
	border-color: var( --srdc-meta-date-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-meta-date-radius-tl, 0 ) var( --srdc-meta-date-radius-tr, 0 ) var( --srdc-meta-date-radius-br, 0 ) var( --srdc-meta-date-radius-bl, 0 );
}

.srdc-card__meta-author {
	font-size: var( --srdc-meta-author-size, inherit );
	font-weight: var( --srdc-meta-author-weight, inherit );
	text-transform: var( --srdc-meta-author-transform, none );
	color: var( --srdc-meta-author-color, inherit );
	background: var( --srdc-meta-author-bg, transparent );
	padding: var( --srdc-meta-author-padding-top, 0 ) var( --srdc-meta-author-padding-right, 0 ) var( --srdc-meta-author-padding-bottom, 0 ) var( --srdc-meta-author-padding-left, 0 );
	margin: var( --srdc-meta-author-margin-top, 0 ) var( --srdc-meta-author-margin-right, 0 ) var( --srdc-meta-author-margin-bottom, 0 ) var( --srdc-meta-author-margin-left, 0 );
	transition-property: var( --srdc-meta-author-transition-property, all );
	transition-duration: var( --srdc-meta-author-transition-duration, 0s );
	transition-timing-function: var( --srdc-meta-author-transition-easing, ease );
	border-width: var( --srdc-meta-author-border-width, 0 );
	border-style: var( --srdc-meta-author-border-style, solid );
	border-color: var( --srdc-meta-author-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-meta-author-radius-tl, 0 ) var( --srdc-meta-author-radius-tr, 0 ) var( --srdc-meta-author-radius-br, 0 ) var( --srdc-meta-author-radius-bl, 0 );
}

.srdc-card__meta-categories {
	font-size: var( --srdc-meta-categories-size, inherit );
	font-weight: var( --srdc-meta-categories-weight, inherit );
	text-transform: var( --srdc-meta-categories-transform, none );
	color: var( --srdc-meta-categories-color, inherit );
	background: var( --srdc-meta-categories-bg, transparent );
	padding: var( --srdc-meta-categories-padding-top, 0 ) var( --srdc-meta-categories-padding-right, 0 ) var( --srdc-meta-categories-padding-bottom, 0 ) var( --srdc-meta-categories-padding-left, 0 );
	margin: var( --srdc-meta-categories-margin-top, 0 ) var( --srdc-meta-categories-margin-right, 0 ) var( --srdc-meta-categories-margin-bottom, 0 ) var( --srdc-meta-categories-margin-left, 0 );
	transition-property: var( --srdc-meta-categories-transition-property, all );
	transition-duration: var( --srdc-meta-categories-transition-duration, 0s );
	transition-timing-function: var( --srdc-meta-categories-transition-easing, ease );
	border-width: var( --srdc-meta-categories-border-width, 0 );
	border-style: var( --srdc-meta-categories-border-style, solid );
	border-color: var( --srdc-meta-categories-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-meta-categories-radius-tl, 0 ) var( --srdc-meta-categories-radius-tr, 0 ) var( --srdc-meta-categories-radius-br, 0 ) var( --srdc-meta-categories-radius-bl, 0 );
}

.srdc-card__meta-chip {
	font-size: var( --srdc-meta-tags-size, inherit );
	font-weight: var( --srdc-meta-tags-weight, inherit );
	text-transform: var( --srdc-meta-tags-transform, none );
	color: var( --srdc-meta-tags-color, inherit );
	background: var( --srdc-meta-tags-bg, transparent );
	padding: var( --srdc-meta-tags-padding-top, 0 ) var( --srdc-meta-tags-padding-right, 0 ) var( --srdc-meta-tags-padding-bottom, 0 ) var( --srdc-meta-tags-padding-left, 0 );
	margin: var( --srdc-meta-tags-margin-top, 0 ) var( --srdc-meta-tags-margin-right, 0 ) var( --srdc-meta-tags-margin-bottom, 0 ) var( --srdc-meta-tags-margin-left, 0 );
	transition-property: var( --srdc-meta-tags-transition-property, all );
	transition-duration: var( --srdc-meta-tags-transition-duration, 0s );
	transition-timing-function: var( --srdc-meta-tags-transition-easing, ease );
	border-width: var( --srdc-meta-tags-border-width, 0 );
	border-style: var( --srdc-meta-tags-border-style, solid );
	border-color: var( --srdc-meta-tags-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-meta-tags-radius-tl, 0 ) var( --srdc-meta-tags-radius-tr, 0 ) var( --srdc-meta-tags-radius-br, 0 ) var( --srdc-meta-tags-radius-bl, 0 );
}


/*
 * The hover state, and the fall-through is the whole of it.
 *
 * `var( hover, var( resting, … ) )` — the chain `shadow_hover_color` has had
 * since 1.47.0 — so a part with a text colour and no hover colour keeps that
 * colour on hover rather than dropping to the theme's. Setting a hover value is
 * opting into a *change*, never into a second complete definition, which is
 * what stops "I set the tags red" turning into "and now they go black when you
 * point at them".
 *
 * `:focus-within` beside `:hover` because the author and the term boxes hold
 * links: a keyboard user tabbing to one should see what a mouse user sees. The
 * date box has no link inside it, so the selector is inert there rather than
 * wrong.
 *
 * The transition lives on the resting rule above, not here, so it governs the
 * way *out* of the hover state as well as the way in. Declared on `:hover`
 * only, a box would ease in and snap back.
 */
.srdc-card__meta-date:hover,
.srdc-card__meta-date:focus-within {
	color: var( --srdc-meta-date-hover-color, var( --srdc-meta-date-color, inherit ) );
	background: var( --srdc-meta-date-hover-bg, var( --srdc-meta-date-bg, transparent ) );
}

.srdc-card__meta-author:hover,
.srdc-card__meta-author:focus-within {
	color: var( --srdc-meta-author-hover-color, var( --srdc-meta-author-color, inherit ) );
	background: var( --srdc-meta-author-hover-bg, var( --srdc-meta-author-bg, transparent ) );
}

.srdc-card__meta-categories:hover,
.srdc-card__meta-categories:focus-within {
	color: var( --srdc-meta-categories-hover-color, var( --srdc-meta-categories-color, inherit ) );
	background: var( --srdc-meta-categories-hover-bg, var( --srdc-meta-categories-bg, transparent ) );
}

.srdc-card__meta-chip:hover,
.srdc-card__meta-chip:focus-within {
	color: var( --srdc-meta-tags-hover-color, var( --srdc-meta-tags-color, inherit ) );
	background: var( --srdc-meta-tags-hover-bg, var( --srdc-meta-tags-bg, transparent ) );
}

/*
 * **The tags box is each tag, not the row of them** — 1.65.0.
 *
 * Every one of the twenty-five `--srdc-meta-tags-*` properties is read by
 * `.srdc-card__meta-chip` above, so a background, a border and a radius make a
 * pill of each tag rather than one frame around the lot. Categories are still
 * one box: a post has one or two of those and a dozen tags, and the shapes
 * people build the two as differ for that reason.
 *
 * The container keeps nothing but the row. `gap` is what separates the chips,
 * which is why SRDC_Card::post_meta() joins them on nothing — a comma sitting
 * in the gap between two pills is a stray mark. The gap is `em`, so it tracks
 * whatever size the chips were set to.
 *
 * **`.srdc-card__meta-chip`, not `.srdc-card__meta-tag`.** One letter from the
 * container's own class is a typo neither file would report: the properties
 * would resolve, the rule would apply to nothing, and the tags would simply
 * look unstyled.
 */
.srdc-card__meta-tags {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.35em 0.5em;
}

/*
 * Meta links inherit rather than taking the theme's link colour, for the reason
 * `.srdc-card__caption-link` does — and it matters more here, because a line of
 * three categories in a theme's accent blue on an overlay caption's scrim is
 * the unreadable case. The underline arrives on hover so the links are still
 * discoverable as links — which is now the *default* of a real setting rather
 * than a rule with no way out of it. See the decoration pair below.
 *
 * `inherit` and not a custom property of its own: a link inside the tags box
 * inherits the colour that box was set to, so `post_meta_tags_color` reaches
 * the term names without a second field naming the same thing.
 */
.srdc-card__meta a {
	color: inherit;
	text-decoration: none;
}

/*
 * **The link underline, as one setting for the whole meta line.**
 *
 * 1.66.0 gave each part a resting and a hover decoration — eight fields — and
 * **not one of them drew anything.** The declarations went on
 * `.srdc-card__meta-{part}`, which is `inline-flex` through
 * `.srdc-card__meta-item`, and a text decoration set on a flex container is not
 * propagated into its items. The comment that stood here reasoned about that
 * exclusion in as many words and then put the declaration on the wrong side of
 * it, which is worth recording: knowing the rule is not the same as applying it.
 *
 * So the decoration lives on the **anchor**, where it works, and is one setting
 * rather than four — the author's own framing, that all of this line is either
 * a link underline or none. `post_meta_link_decoration` emits a class, because
 * `always` turns the resting declaration on and `none` turns the hover one off,
 * and neither is a value a `var()` fallback could hold.
 *
 * The two rules below are the default and are unchanged from 1.60.0: no
 * underline at rest, one on hover.
 */
.srdc-card__meta a:hover,
.srdc-card__meta a:focus-visible {
	text-decoration: underline;
}

/*
 * Each modifier out-specifies the pair above by one class, so the base rules
 * stay the default rather than being replaced — and `none` has to name the
 * hover and focus states as well, or the base rule would go on underlining the
 * thing the author has just said should never be underlined.
 */
.srdc-carousel--meta-links-always .srdc-card__meta a {
	text-decoration: underline;
}

.srdc-carousel--meta-links-none .srdc-card__meta a,
.srdc-carousel--meta-links-none .srdc-card__meta a:hover,
.srdc-carousel--meta-links-none .srdc-card__meta a:focus-visible {
	text-decoration: none;
}

/* ---------------------------------------------------- Product meta line */

/*
 * **A second namespace, not a second stylesheet.**
 *
 * A product card's meta line is the post card's structure — a column of rows,
 * each holding one or more boxes, each box painted by sixteen settings of its
 * own. What could not be shared is the custom properties: `categories` is a
 * part in both sets, so one namespace would have a product card's category box
 * reading a post carousel's `--srdc-meta-categories-*`. See
 * SRDC_Card::meta_base(), which is where the `pmeta` infix is decided for the
 * class and the property together.
 *
 * **So the rules below are written out rather than grouped with the post set's,
 * and that is a deliberate choice against the obvious one.** Adding
 * `.srdc-card__pmeta` to each of the post line's selectors would share five
 * structural rules and save perhaps twenty lines — at the price of every future
 * change to either line having to be read as a change to both. The per-part
 * blocks could not be shared at all, since each names its own eight properties
 * and this plugin has no preprocessor, so grouping the structure would leave
 * one set half-shared and half-copied: the arrangement that is worse than
 * either.
 *
 * PHP is where the sharing happens instead, and it is real there —
 * SRDC_Card::meta_rows(), meta_box(), meta_separator() and meta_link() are one
 * implementation each, taking a kind. Two stylesheets' worth of selectors
 * against four shared functions is the right side of that trade.
 */
.srdc-card__pmeta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var( --srdc-pmeta-gap, 0.35em );
	font-size: 0.8em;
	line-height: 1.4;
}

.srdc-card__pmeta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0 0.5em;
}

.srdc-card__pmeta-item {
	display: inline-flex;
	align-items: baseline;
	gap: 0.5em;
}

/* Between the price and the rating, the only two parts that share a row. */
.srdc-card__pmeta-sep {
	opacity: 0.6;
}

.srdc-card__pmeta-price {
	font-size: var( --srdc-pmeta-price-size, inherit );
	font-weight: var( --srdc-pmeta-price-weight, inherit );
	text-transform: var( --srdc-pmeta-price-transform, none );
	color: var( --srdc-pmeta-price-color, inherit );
	background: var( --srdc-pmeta-price-bg, transparent );
	padding: var( --srdc-pmeta-price-padding-top, 0 ) var( --srdc-pmeta-price-padding-right, 0 ) var( --srdc-pmeta-price-padding-bottom, 0 ) var( --srdc-pmeta-price-padding-left, 0 );
	margin: var( --srdc-pmeta-price-margin-top, 0 ) var( --srdc-pmeta-price-margin-right, 0 ) var( --srdc-pmeta-price-margin-bottom, 0 ) var( --srdc-pmeta-price-margin-left, 0 );
	transition-property: var( --srdc-pmeta-price-transition-property, all );
	transition-duration: var( --srdc-pmeta-price-transition-duration, 0s );
	transition-timing-function: var( --srdc-pmeta-price-transition-easing, ease );
	border-width: var( --srdc-pmeta-price-border-width, 0 );
	border-style: var( --srdc-pmeta-price-border-style, solid );
	border-color: var( --srdc-pmeta-price-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-pmeta-price-radius-tl, 0 ) var( --srdc-pmeta-price-radius-tr, 0 ) var( --srdc-pmeta-price-radius-br, 0 ) var( --srdc-pmeta-price-radius-bl, 0 );
}

.srdc-card__pmeta-rating {
	font-size: var( --srdc-pmeta-rating-size, inherit );
	font-weight: var( --srdc-pmeta-rating-weight, inherit );
	text-transform: var( --srdc-pmeta-rating-transform, none );
	color: var( --srdc-pmeta-rating-color, inherit );
	background: var( --srdc-pmeta-rating-bg, transparent );
	padding: var( --srdc-pmeta-rating-padding-top, 0 ) var( --srdc-pmeta-rating-padding-right, 0 ) var( --srdc-pmeta-rating-padding-bottom, 0 ) var( --srdc-pmeta-rating-padding-left, 0 );
	margin: var( --srdc-pmeta-rating-margin-top, 0 ) var( --srdc-pmeta-rating-margin-right, 0 ) var( --srdc-pmeta-rating-margin-bottom, 0 ) var( --srdc-pmeta-rating-margin-left, 0 );
	transition-property: var( --srdc-pmeta-rating-transition-property, all );
	transition-duration: var( --srdc-pmeta-rating-transition-duration, 0s );
	transition-timing-function: var( --srdc-pmeta-rating-transition-easing, ease );
	border-width: var( --srdc-pmeta-rating-border-width, 0 );
	border-style: var( --srdc-pmeta-rating-border-style, solid );
	border-color: var( --srdc-pmeta-rating-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-pmeta-rating-radius-tl, 0 ) var( --srdc-pmeta-rating-radius-tr, 0 ) var( --srdc-pmeta-rating-radius-br, 0 ) var( --srdc-pmeta-rating-radius-bl, 0 );
}

.srdc-card__pmeta-stock {
	font-size: var( --srdc-pmeta-stock-size, inherit );
	font-weight: var( --srdc-pmeta-stock-weight, inherit );
	text-transform: var( --srdc-pmeta-stock-transform, none );
	color: var( --srdc-pmeta-stock-color, inherit );
	background: var( --srdc-pmeta-stock-bg, transparent );
	padding: var( --srdc-pmeta-stock-padding-top, 0 ) var( --srdc-pmeta-stock-padding-right, 0 ) var( --srdc-pmeta-stock-padding-bottom, 0 ) var( --srdc-pmeta-stock-padding-left, 0 );
	margin: var( --srdc-pmeta-stock-margin-top, 0 ) var( --srdc-pmeta-stock-margin-right, 0 ) var( --srdc-pmeta-stock-margin-bottom, 0 ) var( --srdc-pmeta-stock-margin-left, 0 );
	transition-property: var( --srdc-pmeta-stock-transition-property, all );
	transition-duration: var( --srdc-pmeta-stock-transition-duration, 0s );
	transition-timing-function: var( --srdc-pmeta-stock-transition-easing, ease );
	border-width: var( --srdc-pmeta-stock-border-width, 0 );
	border-style: var( --srdc-pmeta-stock-border-style, solid );
	border-color: var( --srdc-pmeta-stock-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-pmeta-stock-radius-tl, 0 ) var( --srdc-pmeta-stock-radius-tr, 0 ) var( --srdc-pmeta-stock-radius-br, 0 ) var( --srdc-pmeta-stock-radius-bl, 0 );
}

/*
 * **The two stock states, and this is the one place a colour is shipped rather
 * than inherited.**
 *
 * A green *In stock* and a red *Out of stock* is the entire reason anybody
 * switches the row on; drawn in the card's own ink both ways it is a line of
 * text that happens to change wording. So the two literals live here, in the
 * `var()` fallback where the palette's own defaults live — which is invariant 2
 * holding exactly: `defaults()` carries `''` for both fields, `css_vars()`
 * emits neither, and an untouched carousel still emits no scoped style at all.
 *
 * The chain falls through the part's own colour first, so an author who set one
 * colour for the whole Stock box and nothing here keeps that colour in both
 * states — the rule every hover pair in this file follows. Set the state colour
 * and it wins; set neither and the shipped pair arrives.
 *
 * Each modifier out-specifies the base rule above by one class, so the base
 * stays the default rather than being replaced.
 *
 * **On backorder is deliberately absent.** It is neither good news nor bad, so
 * it keeps the box's own colour and needs no field — a third picker for the
 * rarest of the three statuses is a control most shops would never open.
 */
.srdc-card__pmeta-stock--instock {
	color: var( --srdc-pmeta-stock-in-color, var( --srdc-pmeta-stock-color, #1a7f37 ) );
}

.srdc-card__pmeta-stock--outofstock {
	color: var( --srdc-pmeta-stock-out-color, var( --srdc-pmeta-stock-color, #b32d2e ) );
}

/*
 * **The two states have to name `:hover` as well, and this is the one rule in
 * the block that is not symmetrical with the post set.**
 *
 * The shared hover rule below is `.srdc-card__pmeta-stock:hover` — one class
 * and a pseudo-class, which is the same specificity as the resting modifier
 * above and comes later in the file. Left alone it therefore wins on hover, and
 * a status painted green at rest drops to the card's own ink the moment a
 * pointer crosses the card: the colour is set correctly, the property resolves
 * correctly, and it disappears anyway. Nothing in PHP could see it.
 *
 * Two classes plus the pseudo-class out-specifies that, so the state survives.
 * The chain keeps every setting in the right order — a hover colour the author
 * set wins, then the state colour, then the box colour, then the shipped pair —
 * so this restores the fall-through rather than freezing the state.
 */
.srdc-card__pmeta-stock--instock:hover,
.srdc-card__pmeta-stock--instock:focus-within {
	color: var( --srdc-pmeta-stock-hover-color, var( --srdc-pmeta-stock-in-color, var( --srdc-pmeta-stock-color, #1a7f37 ) ) );
}

.srdc-card__pmeta-stock--outofstock:hover,
.srdc-card__pmeta-stock--outofstock:focus-within {
	color: var( --srdc-pmeta-stock-hover-color, var( --srdc-pmeta-stock-out-color, var( --srdc-pmeta-stock-color, #b32d2e ) ) );
}

.srdc-card__pmeta-categories {
	font-size: var( --srdc-pmeta-categories-size, inherit );
	font-weight: var( --srdc-pmeta-categories-weight, inherit );
	text-transform: var( --srdc-pmeta-categories-transform, none );
	color: var( --srdc-pmeta-categories-color, inherit );
	background: var( --srdc-pmeta-categories-bg, transparent );
	padding: var( --srdc-pmeta-categories-padding-top, 0 ) var( --srdc-pmeta-categories-padding-right, 0 ) var( --srdc-pmeta-categories-padding-bottom, 0 ) var( --srdc-pmeta-categories-padding-left, 0 );
	margin: var( --srdc-pmeta-categories-margin-top, 0 ) var( --srdc-pmeta-categories-margin-right, 0 ) var( --srdc-pmeta-categories-margin-bottom, 0 ) var( --srdc-pmeta-categories-margin-left, 0 );
	transition-property: var( --srdc-pmeta-categories-transition-property, all );
	transition-duration: var( --srdc-pmeta-categories-transition-duration, 0s );
	transition-timing-function: var( --srdc-pmeta-categories-transition-easing, ease );
	border-width: var( --srdc-pmeta-categories-border-width, 0 );
	border-style: var( --srdc-pmeta-categories-border-style, solid );
	border-color: var( --srdc-pmeta-categories-border-color, var( --srdc-color-muted ) );
	border-radius: var( --srdc-pmeta-categories-radius-tl, 0 ) var( --srdc-pmeta-categories-radius-tr, 0 ) var( --srdc-pmeta-categories-radius-br, 0 ) var( --srdc-pmeta-categories-radius-bl, 0 );
}

/*
 * The hover state, with the same fall-through the post set has:
 * `var( hover, var( resting, … ) )`, so setting a hover colour is opting into a
 * *change* rather than into a second complete definition.
 *
 * `:focus-within` beside `:hover` because the categories box holds links. The
 * price, rating and stock boxes hold none, so the selector is inert on those
 * three rather than wrong.
 */
.srdc-card__pmeta-price:hover,
.srdc-card__pmeta-price:focus-within {
	color: var( --srdc-pmeta-price-hover-color, var( --srdc-pmeta-price-color, inherit ) );
	background: var( --srdc-pmeta-price-hover-bg, var( --srdc-pmeta-price-bg, transparent ) );
}

.srdc-card__pmeta-rating:hover,
.srdc-card__pmeta-rating:focus-within {
	color: var( --srdc-pmeta-rating-hover-color, var( --srdc-pmeta-rating-color, inherit ) );
	background: var( --srdc-pmeta-rating-hover-bg, var( --srdc-pmeta-rating-bg, transparent ) );
}

.srdc-card__pmeta-stock:hover,
.srdc-card__pmeta-stock:focus-within {
	color: var( --srdc-pmeta-stock-hover-color, var( --srdc-pmeta-stock-color, inherit ) );
	background: var( --srdc-pmeta-stock-hover-bg, var( --srdc-pmeta-stock-bg, transparent ) );
}

.srdc-card__pmeta-categories:hover,
.srdc-card__pmeta-categories:focus-within {
	color: var( --srdc-pmeta-categories-hover-color, var( --srdc-pmeta-categories-color, inherit ) );
	background: var( --srdc-pmeta-categories-hover-bg, var( --srdc-pmeta-categories-bg, transparent ) );
}

/*
 * Meta links inherit rather than taking the theme's link colour, for the reason
 * the post line's do: a category name in a theme's accent blue on an overlay
 * caption's scrim is the unreadable case. The underline arrives on hover so
 * they are still discoverable as links, which is the default of
 * `product_meta_link_decoration` rather than a rule with no way out of it.
 *
 * `inherit` and not a property of its own: a link inside the categories box
 * inherits the colour that box was set to, so `product_meta_categories_color`
 * reaches the term names with no second field naming the same thing.
 */
.srdc-card__pmeta a {
	color: inherit;
	text-decoration: none;
}

.srdc-card__pmeta a:hover,
.srdc-card__pmeta a:focus-visible {
	text-decoration: underline;
}

.srdc-carousel--pmeta-links-always .srdc-card__pmeta a {
	text-decoration: underline;
}

.srdc-carousel--pmeta-links-none .srdc-card__pmeta a,
.srdc-carousel--pmeta-links-none .srdc-card__pmeta a:hover,
.srdc-carousel--pmeta-links-none .srdc-card__pmeta a:focus-visible {
	text-decoration: none;
}

/*
 * The stars.
 *
 * `letter-spacing` rather than a gap, because they are characters in one string
 * — SRDC_Card::stars() builds "★★★★☆" as text so a screen reader meets one
 * `role="img"` with a label rather than five glyphs. A flex gap would need five
 * elements to sit between.
 *
 * No colour of its own: the stars take whatever the Rating box was set to,
 * which is what stops a second field meaning the same thing as
 * `product_meta_rating_color`. A shop wanting gold stars sets that.
 *
 * `font-family` is deliberately not declared — the two glyphs are in every
 * system font stack, and naming one here would be this plugin picking a
 * typeface on a card the theme is setting the type for.
 */
.srdc-card__stars {
	letter-spacing: 0.08em;
	white-space: nowrap;
	line-height: 1;
}

/*
 * The review count, quieter than the stars beside it. `opacity` is safe here in
 * a way it explicitly is not on the meta line as a whole — see the note on
 * `.srdc-card__meta` — because there is no colour picker pointed at this
 * element for it to lie about. It has no setting of its own at all: what it is
 * is a parenthesis after the stars.
 */
.srdc-card__stars-count {
	margin-left: 0.35em;
	opacity: 0.7;
}

/*
 * The box holding a post card's excerpt and its button.
 *
 * A column, so the button sits under the text — and `align-items: flex-start`
 * is what stops the button stretching to the box's width. The button already
 * declares `align-self` for itself; this makes the box agree rather than
 * relying on one child to defend itself, which is the arrangement that breaks
 * the day a second child is added.
 *
 * **The gap falls back to `2px`, and that is the one fallback here that is not
 * zero.** Wrapping two children takes them out of the caption's own
 * `gap: 2px` flow, so any other default would silently close up two pixels on
 * every post card already published.
 *
 * The shorthands emit clockwise while the fields are declared as opposite
 * pairs; see the meta parts for why the two orders disagree on purpose.
 *
 * **`text-align` falls back to `inherit`, which is a declaration that changes
 * nothing.** The box is inside `.srdc-card__caption` and text-align inherits
 * anyway, so with no custom property emitted a post card aligns exactly as it
 * always has — under `caption_align`. The schema's default is `inherit` for
 * the same reason and the two agree on purpose; a fallback of `start` here
 * would re-align the excerpt on every post card already published.
 *
 * It reaches the excerpt and the label inside the button. Where the button
 * sits is its own `align-self`, below.
 */
.srdc-card__post-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: var( --srdc-post-body-align, inherit );
	gap: var( --srdc-post-body-gap, 2px );
	padding: var( --srdc-post-body-padding-top, 0 ) var( --srdc-post-body-padding-right, 0 ) var( --srdc-post-body-padding-bottom, 0 ) var( --srdc-post-body-padding-left, 0 );
	margin: var( --srdc-post-body-margin-top, 0 ) var( --srdc-post-body-margin-right, 0 ) var( --srdc-post-body-margin-bottom, 0 ) var( --srdc-post-body-margin-left, 0 );
}

/*
 * The excerpt is a flex item here and would otherwise size to its content;
 * full width is what the caption's own alignment expects to be laying out.
 */
.srdc-card__post-body .srdc-card__caption-text {
	align-self: stretch;
}

/*
 * The post card's button — a link that looks like one.
 *
 * `align-self` **falls back** to `flex-start` so it takes its own width rather
 * than stretching to the caption's. A flex item is blockified and stretches
 * the cross axis, which would give a "Read more" the full width of the card
 * and stop it reading as a button at all — the same fact the caption's own
 * note records from the other side, where stretching is what makes
 * `text-align` work.
 *
 * The property is *Button alignment* now, and that fallback is why the field
 * needs three options where the post body's needs four: `start` and
 * `flex-start` are the same rule in a flex container, so the default emits
 * nothing and *Left* is honestly what an untouched button already does.
 *
 * Every declaration is a `var()` with the resting value as its fallback, so a
 * button with nothing set is a plain inline link in the card's own colour: no
 * fill, no padding, nothing to undo. The palette hints propose `ink` on `on-ink`
 * for the two backgrounds, which is the one place in this schema a background
 * hint is not `transparent` — a picker opened on an unset button background
 * should propose the button somebody is about to make.
 *
 * The shorthands emit clockwise while the fields are declared as opposite
 * pairs; see the meta parts for why the two orders disagree on purpose.
 *
 * `text-decoration: none` unconditionally: a filled button with an underline
 * through it is nobody's design, and the meta line's underline setting is about
 * the meta line.
 */
.srdc-card__button {
	align-self: var( --srdc-post-button-align, flex-start );
	display: inline-block;
	/*
	 * The box before the paint. `auto` is the width the label gives it,
	 * which is what an untouched button has always been, and `max-width`
	 * keeps a pixel width wider than the card inside it rather than pushing
	 * the slide out of the track. `.srdc-carousel *` is already border-box,
	 * so a percentage means the button's outer edge.
	 */
	max-width: 100%;
	width: var( --srdc-post-button-width, auto );
	color: var( --srdc-post-button-color, inherit );
	background: var( --srdc-post-button-bg, transparent );
	padding: var( --srdc-post-button-padding-top, 0 ) var( --srdc-post-button-padding-right, 0 ) var( --srdc-post-button-padding-bottom, 0 ) var( --srdc-post-button-padding-left, 0 );
	margin: var( --srdc-post-button-margin-top, 0 ) var( --srdc-post-button-margin-right, 0 ) var( --srdc-post-button-margin-bottom, 0 ) var( --srdc-post-button-margin-left, 0 );
	text-decoration: none;
	transition-property: var( --srdc-post-button-transition-property, all );
	transition-duration: var( --srdc-post-button-transition-duration, 0s );
	transition-timing-function: var( --srdc-post-button-transition-easing, ease );
}

/*
 * The hover pair falls through to the resting pair — `shadow_hover_color`'s
 * chain — so a button with a background and no hover background keeps it rather
 * than dropping to nothing. Setting one is opting into a *change*.
 *
 * `:focus-visible` beside `:hover` because this is a link somebody tabs to, and
 * unlike the meta boxes it *is* the focusable element, so both go on it.
 */
.srdc-card__button:hover,
.srdc-card__button:focus-visible {
	color: var( --srdc-post-button-hover-color, var( --srdc-post-button-color, inherit ) );
	background: var( --srdc-post-button-hover-bg, var( --srdc-post-button-bg, transparent ) );
}

/*
 * Caption placement relative to the image.
 *
 * **Not on a content card (3.13.2).** These describe text beside a picture, and
 * a written slide has none. `classes()` emits the position modifier whatever
 * the rows hold, so left/right turned a content card into a row with
 * `align-items: center` holding its one child, the body. The body shrank to
 * its own height and floated mid-card, so slides in one row ended at
 * different lines. It happened on a Content carousel, where Text position
 * is hidden but still stored (invariant 3), and it would happen to the
 * content slides on a Mix carousel. The body rules below already make the same
 * distinction with `.srdc-card__media ~`.
 */
.srdc-carousel--caption-top .srdc-card:not( .srdc-card--content ) {
	flex-direction: column-reverse;
}

.srdc-carousel--caption-right .srdc-card:not( .srdc-card--content ),
.srdc-carousel--caption-left .srdc-card:not( .srdc-card--content ) {
	flex-direction: row;
	align-items: center;
}

.srdc-carousel--caption-left .srdc-card:not( .srdc-card--content ) {
	flex-direction: row-reverse;
}

.srdc-carousel--caption-right .srdc-card__media,
.srdc-carousel--caption-left .srdc-card__media {
	flex: 0 0 50%;
}

/*
 * The text side of a split card is whichever element carries the text: a
 * <figcaption> for the Media Library's title and description, or
 * `.srdc-card__body` for a body the author wrote. Both are named here, because
 * 1.52.0 made them two elements and Text position is a statement about the
 * *layout* of a slide rather than about which record filled it.
 *
 * `.srdc-card__media ~` is load-bearing, not decoration. A **content slide**
 * renders `.srdc-card__body` as its whole card with no picture beside it, and
 * `classes()` emits the position modifier for every carousel whatever its
 * rows hold — so an unscoped selector would absolutely position a written
 * slide's only child on a Mix-Content carousel set to Over the image. The
 * sibling combinator says "a body that sits next to a picture", which is
 * exactly the case these rules are about.
 */
.srdc-carousel--caption-right .srdc-card__caption,
.srdc-carousel--caption-left .srdc-card__caption,
.srdc-carousel--caption-right .srdc-card__media ~ .srdc-card__body,
.srdc-carousel--caption-left .srdc-card__media ~ .srdc-card__body {
	flex: 1 1 auto;
	min-width: 0;
}

/* Overlay: sits on the image, revealed on hover or keyboard focus. */
.srdc-carousel--caption-overlay .srdc-card {
	position: relative;
}

/*
 * The positioning is shared; the paint is not. Each element keeps the settings
 * that name it — the caption reads the Image Text colours, a written body the
 * Content Body ones — and both fall back to the scrim, because one tinted
 * panel over a photograph should not differ from another by a few percent.
 * That is the chain the hover overlay already has.
 */
.srdc-carousel--caption-overlay .srdc-card__caption,
.srdc-carousel--caption-overlay .srdc-card__media ~ .srdc-card__body {
	position: absolute;
	inset: auto 0 0 0;
	border-radius: 0 0 var( --srdc-radius-br, 0 ) var( --srdc-radius-bl, 0 );
	opacity: 0;
	transform: translateY( 6px );
	transition: opacity 0.25s ease, transform 0.25s ease;
}

/*
 * **Card body padding reaches the overlay since 2.13.1.** The shared rule
 * above carried a literal `padding: 12px 14px`, which ties the base
 * `.srdc-card__caption:not( :empty )` rule at 0,2,0 and comes later — so on an
 * overlay the four fields were stored, emitted and beaten, and the setting
 * looked dead. The 12px/14px is now each side's fallback: an overlay nobody
 * has padded is the panel it always was, and a side somebody set wins.
 *
 * A written body keeps the literal; it has Content padding of its own and
 * the caption's four were never its settings.
 */
.srdc-carousel--caption-overlay .srdc-card__caption {
	padding: var( --srdc-caption-padding-top, 12px ) var( --srdc-caption-padding-right, 14px ) var( --srdc-caption-padding-bottom, 12px ) var( --srdc-caption-padding-left, 14px );
	background: var( --srdc-caption-bg, var( --srdc-color-scrim ) );
	color: var( --srdc-caption-color, var( --srdc-color-on-scrim ) );
}

.srdc-carousel--caption-overlay .srdc-card__media ~ .srdc-card__body {
	padding: 12px 14px;
	background: var( --srdc-content-bg, var( --srdc-color-scrim ) );
	color: var( --srdc-content-color, var( --srdc-color-on-scrim ) );
}

.srdc-carousel--caption-overlay .srdc-card:hover .srdc-card__caption,
.srdc-carousel--caption-overlay .srdc-card:focus-within .srdc-card__caption,
.srdc-carousel--caption-overlay .srdc-card:hover .srdc-card__media ~ .srdc-card__body,
.srdc-carousel--caption-overlay .srdc-card:focus-within .srdc-card__media ~ .srdc-card__body {
	opacity: 1;
	transform: none;
}

/*
 * Or on screen from the start. The panel, the paint, the padding and the
 * rounded bottom corners are all the overlay's above; this undoes the two
 * declarations that hide it and nothing else, which is what keeps "always
 * shown" the same design as "shown on hover" rather than a second one.
 *
 * **Placed after the base rule, not written with more specificity than it.**
 * Both are `0,2,0`, so source order is what decides — and that is on purpose:
 * the hover rule above is `0,3,0` and stays the stronger of the three, so a
 * carousel set to Always still resolves identically while a pointer is on the
 * card. Out-specifying the base instead would have left three rules competing
 * for one declaration.
 *
 * The `~` combinator is not optional. A content slide renders
 * `.srdc-card__body` as its only child, and the bare selector would pin a
 * written slide's whole card to the bottom of itself on a Mix-Content
 * carousel. `captions.php` asserts the scoped form present and the bare form
 * absent; see the note in docs/text.md.
 */
.srdc-carousel--caption-always .srdc-card__caption,
.srdc-carousel--caption-always .srdc-card__media ~ .srdc-card__body {
	opacity: 1;
	transform: none;
}

/* ------------------------------------------------- Selected-slide emphasis */

/*
 * Driven by Embla's class-names plugin, which puts .is-snapped on the
 * currently snapped slide. This is what approximates the "3D" and "triple
 * carousel" looks — it is a scale and a dim, not a perspective transform.
 */
.srdc-carousel.is-embla .srdc-carousel__slide .srdc-card {
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.srdc-carousel.is-embla .srdc-carousel__slide:not( .is-snapped ) .srdc-card {
	opacity: var( --srdc-inactive-opacity, 100% );
	transform: scale( calc( var( --srdc-inactive-scale, 100% ) / 100% ) );
}

/* ----------------------------------------------------------------- Arrows */

.srdc-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY( -50% );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var( --srdc-arrow-size, 40px );
	height: var( --srdc-arrow-size, 40px );
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	background: var( --srdc-arrow-bg, var( --srdc-color-chrome ) );
	color: var( --srdc-arrow-color, var( --srdc-color-on-scrim ) );
	cursor: pointer;
	z-index: 2;
	transition: opacity 0.2s ease, color 0.2s ease;

	/*
	 * The chip is gone, so the glyph itself has to survive whatever is behind
	 * it. drop-shadow() follows the SVG's alpha rather than the button's box,
	 * which is why the box-shadow could not stay: over a transparent
	 * background it drew a soft rectangle with nothing casting it.
	 */
	filter: drop-shadow( 0 1px 2px var( --srdc-color-shadow ) );
}

.srdc-carousel__arrow:hover:not( :disabled ) {
	color: var( --srdc-color-hover );
}

/*
 * The glyph fills the button, and that is not a cosmetic choice.
 *
 * The chip has been `transparent` since 1.31.0, so the box `--srdc-arrow-size`
 * names is invisible — the arrow an author sees is the chevron and nothing
 * else. At 55% the drawn chevron was 32% of the declared size (the path
 * spans 14 of the viewBox's 24 units once its stroke is counted, so the
 * fraction compounds), which meant "Arrow size 50px" painted a 16px chevron
 * and moving 40 → 50 moved it three pixels. The setting was applying; it was
 * describing a box nobody could see.
 *
 * 100% keeps the box as the hit target, the background a chosen `arrow_bg`
 * paints, and the length every placement rule below measures against — so
 * `--arrows-outside` reserves the same gutter it always did and nothing about
 * the layout moves. Only the glyph grows.
 */
.srdc-carousel__arrow svg {
	width: 100%;
	height: 100%;
}

.srdc-carousel__arrow:disabled {
	opacity: 0.35;
	cursor: default;
}

/*
 * A two-tone ring, and it has to be: the glyph is white now, so the
 * currentColor ring this rule used to draw was white-on-white the moment the
 * arrow sat over a bright image. The white ring keeps it legible on a dark
 * photograph and the ink ring wrapped around it keeps it legible on a pale
 * one, so neither background can swallow the focus indicator. The box-shadow
 * here is a ring hugging the outline, not the stray chip shadow removed above.
 */
.srdc-carousel__arrow:focus-visible {
	outline: 2px solid var( --srdc-arrow-color, var( --srdc-color-on-scrim ) );
	outline-offset: 2px;
	box-shadow: 0 0 0 6px var( --srdc-color-ink );
}

/* Arrows are inert until the script mounts — they do nothing without Embla. */
.srdc-carousel:not( .is-embla ) .srdc-carousel__arrow {
	display: none;
}

.srdc-carousel--arrows-inside .srdc-carousel__arrow--prev {
	left: 8px;
}

.srdc-carousel--arrows-inside .srdc-carousel__arrow--next {
	right: 8px;
}

/*
 * Outside needs room, so the wrapper reserves it rather than overflowing.
 *
 * **The gutter stays on the root and the arrows reach into it**, which is the
 * one place the frame is not the answer. The reserved strip has to indent the
 * heading and the dots as well as the track, or a carousel with outside arrows
 * would set its title against the page edge and its slides 52px in. So the
 * padding is the root's, the frame sits inside it flush with the track, and
 * each arrow is pulled back out by exactly what was reserved: it spans from
 * `-( size + 12 )` to `-12`, which lands its outer edge on the root's padding
 * edge and leaves the same 12px gap to the first slide as before.
 */
.srdc-carousel--arrows-outside {
	padding-inline: calc( var( --srdc-arrow-size, 40px ) + 12px );
}

.srdc-carousel--arrows-outside .srdc-carousel__arrow--prev {
	left: calc( -1 * ( var( --srdc-arrow-size, 40px ) + 12px ) );
}

.srdc-carousel--arrows-outside .srdc-carousel__arrow--next {
	right: calc( -1 * ( var( --srdc-arrow-size, 40px ) + 12px ) );
}

/*
 * Except with the strip beside the track, where there is no gutter to reach
 * into on the inner side — the thumbnails are there. Both arrows go back to
 * the frame's own edge, which is where a thumbs slider has always drawn them:
 * `__stage` was their containing block before 2.7.5 and the frame shares its
 * left edge, so this rule restores that exactly rather than inventing a
 * placement for the combination.
 */
.srdc-carousel--thumbs-left.srdc-carousel--arrows-outside .srdc-carousel__arrow--prev,
.srdc-carousel--thumbs-right.srdc-carousel--arrows-outside .srdc-carousel__arrow--prev {
	left: 0;
}

.srdc-carousel--thumbs-left.srdc-carousel--arrows-outside .srdc-carousel__arrow--next,
.srdc-carousel--thumbs-right.srdc-carousel--arrows-outside .srdc-carousel__arrow--next {
	right: 0;
}

/*
 * Top-right pairs the two buttons above the track — and the band is the
 * frame's, not the root's, which is the second half of the centring fix.
 * Reserved on the root it sat above the *heading*, so a carousel with a title
 * drew its arrows level with the words and a clear gap below them. Above the
 * track is what the option says.
 */
.srdc-carousel--arrows-top-right .srdc-carousel__frame {
	padding-top: calc( var( --srdc-arrow-size, 40px ) + 12px );
}

.srdc-carousel--arrows-top-right .srdc-carousel__arrow {
	top: 0;
	transform: none;
}

.srdc-carousel--arrows-top-right .srdc-carousel__arrow--prev {
	right: calc( var( --srdc-arrow-size, 40px ) + 8px );
	left: auto;
}

.srdc-carousel--arrows-top-right .srdc-carousel__arrow--next {
	right: 0;
}

/* ------------------------------------------------------------- Pagination */

.srdc-carousel__dots {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 14px;
}

.srdc-carousel__dot {
	width: var( --srdc-dot-size, 10px );
	height: var( --srdc-dot-size, 10px );
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var( --srdc-dot-color, var( --srdc-color-muted ) );
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

/* The selected dot is a state, not a target, so it does not react. */
.srdc-carousel__dot:hover:not( [aria-current="true"] ) {
	background: var( --srdc-color-hover );
}

.srdc-carousel__dot[aria-current="true"] {
	background: var( --srdc-dot-active-color, var( --srdc-color-ink ) );
	transform: scale( 1.25 );
}

.srdc-carousel__dot:focus-visible {
	outline: 2px solid var( --srdc-dot-active-color, var( --srdc-color-ink ) );
	outline-offset: 3px;
}

.srdc-carousel__progress {
	height: 3px;
	margin-top: 14px;
	border-radius: 999px;
	background: var( --srdc-dot-color, var( --srdc-color-muted ) );
	overflow: hidden;
}

.srdc-carousel__progress-bar {
	display: block;
	width: 100%;
	height: 100%;
	background: var( --srdc-dot-active-color, var( --srdc-color-ink ) );
	transform-origin: left center;
}

/* -------------------------------------------------------------- Lightbox */

/*
 * PhotoSwipe builds this class from the registerElement name 'srdc-caption'.
 * The name is namespaced so it cannot collide with SRD Toolkit's own
 * 'srd-caption' element if both plugins are active.
 */
.pswp__srdc-caption {
	position: absolute;
	inset: auto 0 0 0;
	/*
	 * Every first link is set inline on the .pswp root by srdc-lightbox.js
	 * from the lightbox_caption_* settings — never by css_vars(), whose
	 * #srdc-N scope this element sits outside.
	 */
	padding: var( --srdc-lightbox-caption-padding-top, 16px ) var( --srdc-lightbox-caption-padding-right, 20px ) var( --srdc-lightbox-caption-padding-bottom, 16px ) var( --srdc-lightbox-caption-padding-left, 20px );
	text-align: center;
	font-size: var( --srdc-lightbox-caption-font-size, 14px );
	line-height: 1.5;
	color: var( --srdc-lightbox-caption-color, var( --srdc-color-on-scrim ) );
	background: var( --srdc-lightbox-caption-bg, var( --srdc-color-scrim ) );
	pointer-events: none;
}

/* Added to the .pswp root by srdc-lightbox.js when the switch is on. */
.srdc-lightbox--caption-shadow .pswp__srdc-caption {
	text-shadow:
		var( --srdc-lightbox-caption-text-shadow-x, 0 )
		var( --srdc-lightbox-caption-text-shadow-y, 1px )
		var( --srdc-lightbox-caption-text-shadow-blur, 3px )
		var( --srdc-lightbox-caption-text-shadow-color, var( --srdc-color-shadow ) );
}

/* ------------------------------------------------------- Reduced motion */

@media ( prefers-reduced-motion: reduce ) {

	.srdc-carousel .srdc-card,
	.srdc-carousel__dot,
	.srdc-carousel__arrow,
	.srdc-carousel--caption-overlay .srdc-card__caption {
		transition: none;
	}
}

/* ==========================================================================
   Carousel title and description
   ========================================================================== */

/*
 * The carousel's own heading and standfirst, above the slides and inside the
 * root so a scoped `#srdc-N` rule reaches them.
 *
 * **Nothing here styles the text, and that is the whole design since 3.5.0.**
 * The title is an h2 and the description a p, and the theme already has an
 * opinion about both. Padding, margin, max width, alignment, font size,
 * weight, transform and colour come only from a value somebody set: the
 * renderer writes `#srdc-N .srdc-carousel__title{…}` for a carousel's own
 * settings and the site-wide tab writes `.srdc-carousel .srdc-carousel__title
 * {…}`, each holding only the properties that were chosen. A setting left
 * blank declares nothing and the theme's rule stands.
 *
 * Through 3.4.x these were `var( --srdc-title-size, inherit )` and friends,
 * and a var() with a fallback is still a declaration: at (0,1,0) it beat the
 * theme's `h2` rule, so every blank setting handed the heading its parent's
 * size, colour and weight and zeroed its margin. **Do not put a themed
 * property back here**, with a fallback or without.
 *
 * The wrapper is only emitted when there is something in it, so `:empty` cases
 * do not arise and no rule guards against them.
 */
.srdc-carousel__header {
	/*
	 * Grid, and the reason is `justify-self` on the parts: it is the one
	 * alignment property that accepts the same `left | center | right`
	 * keywords `text-align` does, which is what lets the Alignment setting
	 * write both from one value.
	 */
	display: grid;
}

.srdc-carousel__title,
.srdc-carousel__description {
	/*
	 * Full width by default with the author's Max Width as a cap. The pair is
	 * what makes alignment behave sensibly in both cases: with no width the
	 * box already fills the carousel and `justify-self` has nothing to do, so
	 * `text-align` alone moves the words; with a width set, the box shrinks
	 * and `justify-self` moves it. Layout scaffolding, not styling — no theme
	 * sizes an h2 by its width.
	 */
	box-sizing: border-box;
	width: 100%;
}

/*
 * No rule for links in the description either: they keep the theme's link
 * colour unless the description is given a Color, in which case the renderer
 * writes `… .srdc-carousel__description a{color:currentColor}` beside it (the
 * `declare_also` descriptor). Until 3.5.0 that rule was here, unconditional,
 * and overrode the theme's link colour on every carousel.
 */
