/* ── Big buttons ──────────────────────────────────────────────────────────
   Large tap targets over the ordinary answer rows.

   Its own tokens, each deferring to the poll's own setting where the author
   has made one. The geometry is not borrowed: `--yop-ans-pt` is the padding of
   one row in a list and every shipped preset sets it to 0, so the 18px
   fallback below never applied and the buttons drew as thin bars on every
   poll nobody had hand-padded. The same trap this file fell into for the two
   cards of a head-to-head.
   ───────────────────────────────────────────────────────────────────────── */
.yop-poll-blocks {
	--yop-blk-text: var(--yop-ans-tc, #172033);
	--yop-blk-surface: var(--yop-ans-bg, #fff);
	/* The poll's Answer boxes part first, then what this file drew before it
	   existed. One box serves big buttons, large cards, the head-to-head and
	   the dropdown, and each of them carried its own literal -- so a poll
	   holding two of them had no way to make them agree. The vote button stays
	   in the chain under it: an author who coloured their button and never
	   opened Answer boxes keeps the poll they have. */
	--yop-blk-border: var(--yop-box-edge, #dce2e8);
	--yop-blk-accent: var(--yop-box-acc, var(--yop-btn-bg, #2271b1));
	/* Mixed from the accent above rather than hand-picked, which is what the
	   two of them were: a poll whose picked colour is dark green drew a green
	   border on a pale blue wash, because the border followed the colour and
	   the wash did not. Over white rather than over `transparent`, so the tint
	   stays opaque the way the literals it replaces were. */
	--yop-blk-accent-subtle: color-mix( in srgb, var(--yop-blk-accent) 10%, #fff );
	/* Lighter than the picked tint on purpose. The radio is visually hidden
	   on this type, so the tint is the only thing saying which answer is
	   chosen — a hover that painted the same wash would read as a second
	   selection for as long as the pointer sat there. Two steps of the same
	   blue: a hint under the pointer, the answer under the vote. */
	--yop-blk-accent-wash: color-mix( in srgb, var(--yop-blk-accent) 4%, #fff );

	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* `box-sizing` is not inherited and wp-admin sets it per-selector rather than
   universally, so a full-width tap target with side padding hung 34px past the
   preview card. Themes that normalise to border-box hid this on the front end;
   the rule belongs here either way. */
.yop-poll-block {
	display: block;
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 13px 16px;
	font: inherit;
	/* Layered over the shorthand rather than replacing it: `font: inherit`
	   still has to reset a form control's UA font, and the size then takes the
	   author's Answers setting on top of it. Declaration order inside the rule
	   is what makes that work, so it must stay below.

	   The weight is the component's own: 600 is what makes a button read as
	   one, and the answers weight is written for a row in a list. */
	font-size: var(--yop-ans-ts, 15px);
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	cursor: pointer;
	border: 1px solid var(--yop-blk-border);
	border-radius: var(--yop-box-radius, 8px);
	background: var(--yop-blk-surface);
	color: var(--yop-blk-text);
	transition: border-color 0.15s ease, background-color 0.15s ease,
		box-shadow 0.15s ease;
}

/* A pointer over a button says so, in the poll's accent and a wash of it.
   Only where hovering is a thing that happens: a finger has no hover state and
   the picked tint is what tells a phone anything.

   `--result` is excluded because a results row carries no input and no
   `--checked` unless it was the voter's own, so it satisfied both `:not()`s
   and lit up under the pointer -- a row that cannot be pressed inviting a
   press, and a wash laid over the bar it is meant to be showing. */
@media ( hover: hover ) {

	.yop-poll-block:not( .yop-poll-block--result ):not(
			.yop-poll-block--checked
		):not( :has( .yop-poll-tap-input:checked ) ):hover {
		border-color: var(--yop-blk-accent);
		background: var(--yop-blk-accent-wash);
	}
}

/* The results view: the same button, with the share drawn behind it.

   A big button that becomes a label over a thin rule once the votes arrive is
   a different component, not the same one showing its numbers -- so the shape
   stays and the fill goes behind the text rather than under it. `--yop-res-bar`
   carries the colour the author set beside that answer, the same one Core's
   own rows use, and defaults to the poll's accent when they set none.

   Not a `<label>` and no input: nothing here is selectable, and a label with
   nothing to label is a control a screen reader announces and a pointer
   invites you to press. */
.yop-poll-blocks--results,
.yop-poll-answer-cards--results {
	--yop-res-bar: var(--yop-blk-accent);
}

/* Both families `Element_Tap_Styling` draws results for. What they share is
   everything except where the text sits: a big button centres its label
   because that is what it does on the ballot, and a card keeps its text at the
   start because that is where the mark left it. */
.yop-poll-block--result,
.yop-poll-answer-card--result {
	position: relative;
	overflow: hidden;
	display: flex;
	align-items: center;
	gap: 10px;
	cursor: default;
}

.yop-poll-block--result {
	justify-content: center;
}

/* Behind everything, and out of the flow so it cannot move the text.

   40%, not the 14% this shipped with first. The answer's text sits on top of
   the fill, so it cannot be the colour at full strength the way Core's own
   bars are -- but a wash faint enough to be safe was also faint enough that an
   author who had just typed #ed561b into the colour field saw pale pink and
   reasonably said the colours did not match.

   Measured over white across the whole palette, the answer text keeps between
   5.6:1 (#990000) and 9.3:1 (#f28f43) -- comfortably past the 4.5:1 SC 1.4.3
   asks of it. What 40% does not buy is 3:1 between the filled part and the
   rest of the button: a light orange is not dark enough against white at any
   strength, and darkening it far enough would take the text with it. That is
   the trade this shape makes. The share is stated as text beside the label,
   so the fill is a picture of a figure the row already gives you -- the
   position `.claude/rules/accessibility.md` takes when it says a bar's width
   is decoration. The 2px edge at full strength is what marks where it ends. */
.yop-poll-block__fill,
.yop-poll-answer-card__fill {
	position: absolute;
	inset-block: 0;
	inset-inline-start: 0;
	z-index: 0;
	background: color-mix( in srgb, var(--yop-res-bar) 40%, transparent );
	border-inline-end: 2px solid var(--yop-res-bar);
}

/* The tints, for a browser that cannot mix them. The literals are the ones
   this file drew before the mix above existed, so an older browser gets the
   poll it always got rather than no tint at all. */
@supports not ( background: color-mix( in srgb, red 50%, transparent ) ) {

	.yop-poll-blocks {
		--yop-blk-accent-subtle: #eaf4fb;
		--yop-blk-accent-wash: #f3f9fd;
	}

	.yop-poll .yop-poll-versus,
	.yop-poll-versus {
		--yop-tot-accent-subtle: #eaf4fb;
	}
}

/* `@supports` rather than a blanket fallback: a browser without `color-mix()`
   gets the same strength through `opacity`, which is not identical -- it fades
   the edge along with the fill -- but is the same colour at the same weight,
   which is what matters. */
@supports not ( background: color-mix( in srgb, red 50%, transparent ) ) {

	.yop-poll-block__fill,
	.yop-poll-answer-card__fill {
		background: var(--yop-res-bar);
		opacity: 0.4;
	}
}

/* The fill grows in, the way Core's own bars do.

   A keyframe and not a transition: the results view arrives as markup already
   at its final width -- `results_html` replacing the ballot on the site, a
   fresh render in the pane -- and a transition needs a value to change after
   the element is in the document. Nothing changes, so nothing transitions,
   which is why this was still until now.

   `width` rather than Core's `scaleX`, for two reasons this shape has and
   Core's row does not: the fill carries a 2px edge at full strength, and
   scaling the box would draw that edge thin and let it thicken over the
   animation; and `transform-origin` has no logical keyword, so a transform
   would need an RTL rule of its own and this addon ships no RTL stylesheet.
   Six short bars laying out per frame is a cost worth paying to avoid both.

   Same 0.6s ease-out Core uses, so bars of different types on one poll move
   together rather than nearly together. */
@media ( prefers-reduced-motion: no-preference ) {

	/* Declared where motion is welcome rather than switched off where it is
	   not, so the animation cannot be left on by forgetting to turn it off
	   and the default is the safe one. Core's shape, for the same reason. */
	@keyframes yop-poll-fill-in {

		from {
			width: 0;
		}
	}

	.yop-poll-block__fill,
	.yop-poll-answer-card__fill,
	.yop-poll-versus__fill {
		animation: yop-poll-fill-in 0.6s ease-out;
	}
}

.yop-poll-block__label,
.yop-poll-block__figure,
.yop-poll-answer-card__label,
.yop-poll-answer-card__figure {
	position: relative;
	z-index: 1;
}

/* Lighter than the answer, because it is the annotation and the answer is the
   content. Tabular figures so a column of them does not jitter. */
.yop-poll-block__figure,
.yop-poll-answer-card__figure {
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
}

/* Picked: the poll's accent on the border and a wash of it behind, rather than
   the button palette painted over the whole row. A solid fill needed white
   text to stay legible, which meant an author whose vote button is white on a
   white poll got a white row on white — the failure the inset ring further
   down was added to paper over. A tint and a border need no such rescue.

   But a tint and a 1px border were all colour, and barely there (QA L10). The
   ring takes the edge to 3px and the text goes a weight up, so the pick reads
   by shape and weight too. Inset, so the box keeps its size. */
.yop-poll-block--checked,
.yop-poll-block:has( .yop-poll-tap-input:checked ) {
	border-color: var(--yop-blk-accent);
	background: var(--yop-blk-accent-subtle);
	box-shadow: inset 0 0 0 2px var(--yop-blk-accent);
	font-weight: 700;
}

/* ── What the Answer boxes part's two state rows ask for ──────────────────
   Classes rather than variables, because these decide which rules apply
   rather than what a colour is: "Nothing" on hover is the absence of a hover
   rule, and no colour means absence. Core puts them on `.yop-poll` and on its
   preview's own root, so each selector here is written once and reaches both.

   Unset is every rule above this comment, which is why there is no `--tint`
   or `--outline` block: those are what this file already drew, and an author
   who has said nothing keeps the poll they have.
   ───────────────────────────────────────────────────────────────────────── */

/* Every selector below repeats the `:not()` chain of the rule it overrides,
   and that is not copy-and-paste: `:not()` and `:has()` each take their
   argument's specificity, so the rules above are (0,6,0) and (0,5,1) rather
   than the (0,2,0) they look like. A shorter selector with a container class
   in front of it loses, silently and only on hover — which is the one state
   nobody checks. Adding the container class to the full chain is what puts
   these one step above. */
@media ( hover: hover ) {

	/* Nothing on hover. A box still says it is pressable by being a label
	   round a real control — the cursor, the focus ring and the picked state
	   are untouched — so this removes an affordance rather than the only one.
	   Touch devices have been in this state all along. */
	.yop-poll--box-hover-none
		.yop-poll-block:not( .yop-poll-block--result ):not(
			.yop-poll-block--checked
		):not( :has( .yop-poll-tap-input:checked ) ):hover {
		border-color: var(--yop-blk-border);
		background: var(--yop-blk-surface);
		box-shadow: none;
	}

	.yop-poll--box-hover-none
		.yop-poll-answer-card:not( .yop-poll-answer-card--result ):not(
			.yop-poll-answer-card--checked
		):not( :has( input:checked ) ):hover {
		border-color: var(--yop-box-edge, var(--yop-btn-bc, #2271b1));
		background: var(--yop-ans-bg, transparent);
		box-shadow: none;
	}

	/* Lift: the box comes forward instead of colouring. A shadow *and* a
	   darker edge, because a shadow alone is invisible against a dark poll and
	   1.4.11 has nothing to measure in it. */
	.yop-poll--box-hover-lift
		.yop-poll-block:not( .yop-poll-block--result ):not(
			.yop-poll-block--checked
		):not( :has( .yop-poll-tap-input:checked ) ):hover,
	.yop-poll--box-hover-lift
		.yop-poll-answer-card:not( .yop-poll-answer-card--result ):not(
			.yop-poll-answer-card--checked
		):not( :has( input:checked ) ):hover {
		border-color: #9aa2ab;

		/* The surface, restated. Without it the tint rule above still wins
		   this property -- the two rules override each other declaration by
		   declaration, not rule by rule -- and Lift came out as lift *and*
		   tint, which is neither of the two things the control offers.

		   The chain covers both stylings from one declaration:
		   `--yop-blk-surface` is defined on the big-button list and not on the
		   card list, and a `var()` naming an undefined property with no
		   fallback makes the whole declaration invalid rather than falling
		   back to anything -- so the card would have lost its background
		   entirely. */
		background: var(--yop-blk-surface, var(--yop-ans-bg, transparent));
		box-shadow: 0 5px 14px -7px rgb( 20 25 30 / 40% );
	}
}

/* Both rules below name `--yop-box-acc` rather than the `--yop-blk-*` token
   that means the same thing three rules up, and that is not a style
   preference. `--yop-blk-accent` is declared on `.yop-poll-blocks`, so it is
   undefined on a card and on a head-to-head side -- and a `var()` naming an
   undefined property with no fallback makes the whole declaration invalid
   rather than falling back, so those rules dropped their colour entirely and
   the card drew a black outline on nothing. `--yop-box-acc` comes from Core on
   `.yop-poll` itself, so it is inherited by all three. */

/* Filled when picked, for the stylings that outline by default.

   The ink comes from Core beside the colour: only the renderer that knows the
   colour can say whether black or white survives it, and this is the same
   `--yop-box-acc-text` the large answer card has always read. Without it a
   pale accent would put white text on a pale fill, which is the 1.4.3 failure
   the outline default exists to avoid. */
.yop-poll--box-selected-fill .yop-poll-block--checked,
.yop-poll--box-selected-fill
	.yop-poll-block:has( .yop-poll-tap-input:checked ),
.yop-poll--box-selected-fill .yop-poll-versus__side--checked,
.yop-poll--box-selected-fill
	.yop-poll-versus__side:has( .yop-poll-tap-input:checked ) {
	border-color: var(--yop-box-acc, var(--yop-btn-bg, #2271b1));
	background: var(--yop-box-acc, var(--yop-btn-bg, #2271b1));
	color: var(--yop-box-acc-text, var(--yop-btn-tc, #fff));
}

/* ...and outlined when picked, for the card, which fills by default. */
.yop-poll--box-selected-outline .yop-poll-answer-card--checked,
.yop-poll--box-selected-outline
	.yop-poll-answer-card:has( input:checked ) {
	border-color: var(--yop-box-acc, var(--yop-btn-bg, #2271b1));
	background: color-mix(
		in srgb,
		var(--yop-box-acc, var(--yop-btn-bg, #2271b1)) 10%,
		#fff
	);
	color: var(--yop-ans-tc, inherit);
}

/* The tint, for a browser that cannot mix it. Pale enough to read as a wash
   and dark enough to be visible, which is all a fallback owes here -- the
   border beside it is what says the card is picked. */
@supports not ( background: color-mix( in srgb, red 50%, transparent ) ) {

	.yop-poll--box-selected-outline .yop-poll-answer-card--checked,
	.yop-poll--box-selected-outline
		.yop-poll-answer-card:has( input:checked ) {
		background: #eaf4fb;
	}
}

/* A video or a clip the poll shows but nobody votes on.

   `<figure>` carries no margin of its own here: the space around an element is
   the author's, set through the spacing band, and a browser default would add
   to it invisibly.

   The embed is held in an aspect-ratio box because the sanitizer strips the
   width and height the provider supplied — which it does so the poll stays
   readable at 320px, and which leaves the iframe with no intrinsic size at
   all. 16/9 is what every provider this accepts hands out. */
.yop-poll-media-figure {
	margin: 0;
	max-width: 100%;
	min-width: 0;
}

/* A width in pixels, not a percentage. The figure sits in a flex row that
   centres it, so the figure is shrink-to-fit and a percentage inside it has
   nothing to resolve against — the embed collapsed to a few pixels and the
   audio player to a circle. A real width gives the figure something to be as
   wide as, and `max-width` hands the room back on a narrow screen. */
/* The three content items take the poll's Media tiles corner, so a medium a
   visitor votes on and a medium they only look at are shaped alike. `overflow`
   is what makes it visible on the embed: a corner on a box holding an iframe
   does nothing unless the box clips it.

   A content image is the exception that keeps its own: `border_radius` on that
   item writes an inline style on the `<img>`, and an item beats a poll. */
.yop-poll-video-embed {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	width: 560px;
	max-width: 100%;
	border-radius: var(--yop-media-radius, 0);
}

.yop-poll-video-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.yop-poll-audio-player {
	width: 420px;
	max-width: 100%;
	border-radius: var(--yop-media-radius, 0);
}

.yop-poll-image-content img {
	border-radius: var(--yop-media-radius, 0);
}

.yop-poll-media-caption {
	margin-top: 0.4em;
	font-size: 0.9em;
	opacity: 0.85;
}

/* Large answer cards — a big button that keeps its radio.

   Everything about the box is the block's; what differs is that the control
   stays visible and the row lays out around it, so the text is flush against
   the mark rather than centred in the row. `align-items: flex-start` keeps the
   mark on the first line when the text runs to two.

   `min-height` rather than `height`, and the mark is the template's own input
   rather than a drawn stand-in: it inherits whatever the author picked in Mark
   style, the same as an ordinary answer row. */
.yop-poll-answer-cards {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* The geometry is the card's own, not the answer list's.

   It read `padding: var(--yop-ans-pt, 14px) ...`, and `--yop-ans-pt` is the
   padding of one row in a list: every shipped preset sets it to 0, so the 14px
   fallback never applied and a card drew 24px tall -- a thin pill with its
   text touching both edges, on every poll nobody had hand-padded. Big buttons
   and the two sides of a head-to-head each hit this and each stopped borrowing
   it; this is the third and last.

   `min-height` and not `height`, so the box grows with a wrapped answer and
   with text scaled to 200% (1.4.4). Roomier than a big button because that is
   what the type is for -- the picker calls it "roomy cards, one per row". */
.yop-poll-answer-card {
	display: flex;
	box-sizing: border-box;
	align-items: center;
	gap: 12px;
	width: 100%;
	min-height: 52px;
	padding: 15px 16px;
	font: inherit;
	font-size: var(--yop-ans-ts, inherit);
	font-weight: var(--yop-ans-tw, inherit);
	cursor: pointer;
	border: 1px solid var(--yop-box-edge, var(--yop-btn-bc, #2271b1));
	border-radius: var(--yop-box-radius, var(--yop-btn-br, 4px));
	background: var(--yop-ans-bg, transparent);
	color: var(--yop-ans-tc, inherit);
}

.yop-poll-answer-card__text {
	flex: 1 1 auto;
}

/* The picked state is the block's, and it is not carried by the border alone:
   the visible radio inside says which one it is, which is what keeps this off
   1.4.1. */
.yop-poll-answer-card--checked,
.yop-poll-answer-card:has( input:checked ) {
	/* The one styling in this family that fills rather than tints, which is
	   why it is the one that reads `--yop-box-acc-text`: the label sits on the
	   picked colour, and only the renderer that knows that colour can say
	   whether black or white survives it. */
	background: var(--yop-box-acc, var(--yop-btn-bg, #2271b1));
	color: var(--yop-box-acc-text, var(--yop-btn-tc, #fff));
}

/* The card's ballot rule indents its text by the mark's width and a gap. The
   mark is gone here -- nothing in a results view is selectable -- so the text
   would otherwise sit in a hole where a radio used to be. */
.yop-poll-answer-card--result {
	justify-content: flex-start;
	align-items: center;
}

/* Picked, in results. The ballot paints the whole card in the vote button's
   palette with its text reversed out, which works there and cannot work here:
   a solid fill is drawn over the bar, so the voter's own answer would be the
   one card with no figure on it. The accent on the border says the same thing
   and leaves the fill visible -- the same answer Big buttons already gives. */
.yop-poll-answer-card--result.yop-poll-answer-card--checked {
	background: var(--yop-blk-surface, #fff);
	color: var(--yop-blk-text, #172033);
	border-color: var(--yop-blk-accent, var(--yop-btn-bg, #2271b1));
}

/* Everything above sits after `.yop-poll-answer-card` on purpose. The shared
   `--result` rule lives up with Big buttons, and both selectors are one class,
   so for any property the base card rule also sets the base wins on order
   alone -- the results rows were still `cursor: pointer`, inviting a press on
   a row that cannot take one. Order is the fix rather than a heavier selector:
   a results card is a card first and these are the few things it is not. */
.yop-poll-answer-card--result {
	gap: 10px;
	cursor: default;
}

/* A pointer over a card says so.

   The border is already the accent at rest -- that is this type's resting look
   and not a state -- so the border cannot be what changes. The fill is, and it
   is mixed from the author's own button colour rather than a literal: on a
   card whose border is already their blue, a hover in some other blue would
   read as a second colour rather than as the same one responding.

   Excluded: a picked card, which is painted solid and has nothing a wash could
   say; and a results row, which is not pressable at all. */
@media ( hover: hover ) {

	.yop-poll-answer-card:not( .yop-poll-answer-card--result ):not(
			.yop-poll-answer-card--checked
		):not( :has( input:checked ) ):hover {
		background: color-mix( in srgb, var(--yop-btn-bg, #2271b1) 8%, transparent );
	}
}

@supports not ( background: color-mix( in srgb, red 50%, transparent ) ) {

	@media ( hover: hover ) {

		.yop-poll-answer-card:not( .yop-poll-answer-card--result ):not(
				.yop-poll-answer-card--checked
			):not( :has( input:checked ) ):hover {
			background: #f3f9fd;
		}
	}
}

/* ...and the mark has to survive the card being painted, which is the whole
   claim this type makes over Big buttons. It did not, in two different ways.

   On the site the input is the browser's own -- Core styles answer marks under
   `.yop-poll .yop-poll-answer input`, and a card is not an answer row, so none
   of that reaches here and the control draws at `appearance: auto`. Its dot is
   then whatever the UA picked, on a card painted in the author's button
   colour. `accent-color` is the one property that steers a native control's
   checked paint, and the value is the token the card's own picked rule paints
   its text with, so the mark and the words beside it stay the same colour
   whatever the author chose. Not `currentColor`: a form control does not
   inherit the label's `color`, so on the input that resolves to the UA's own
   black and the mark came out darker than the card.

   In the pane the mark is a bordered `<span>` with no fill, so on a painted
   card it disappeared completely. Core ships the `--checked` modifiers in its
   own admin stylesheet and draws them in its admin blue, which is right for an
   answer row on white and wrong inside a filled card. Named from here rather
   than changed there: the card is this addon's, and Core's mark is correct
   everywhere Core draws it. */
.yop-poll-answer-card--checked input,
.yop-poll-answer-card:has( input:checked ) input {
	accent-color: var(--yop-btn-tc, #fff);
}

.yop-poll-answer-card--checked .yop-poll-poll-preview__radio--checked,
.yop-poll-answer-card--checked .yop-poll-poll-preview__checkbox--checked {
	border-color: currentColor;
	background: transparent;
}

.yop-poll-answer-card--checked .yop-poll-poll-preview__radio--checked::after {
	background: currentColor;
}

/* The tick is two borders on a rotated box, so it is the border that carries
   its colour -- and it needs the card's fill behind it now that the box it sat
   on is no longer painted. */
.yop-poll-answer-card--checked .yop-poll-poll-preview__checkbox--checked {
	background: currentColor;
}

.yop-poll-answer-card--checked .yop-poll-poll-preview__checkbox--checked::after {
	border-color: var(--yop-btn-bg, #2271b1);
}

/* One image answer in the builder's answer list: the picture at the head of
   the row, and the picker inside the panel under it.

   Both are this addon's, drawn into seams Core offers by name -- `answerRowLead`
   and `answerSettingsFields` -- so the rules live here rather than in Core's
   admin stylesheet, which has no business knowing what an image answer is. */
.yop-poll-pro-answer-thumb {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	overflow: hidden;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #f0f0f1;
	color: #a7aaad;
	cursor: pointer;
}

.yop-poll-pro-answer-thumb:hover {
	border-color: #2271b1;
}

.yop-poll-pro-answer-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yop-poll-pro-answer-image {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.yop-poll-pro-answer-image__thumb {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 44px;
	overflow: hidden;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #f0f0f1;
}

.yop-poll-pro-answer-image__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.yop-poll-pro-answer-image__name {
	flex-basis: 100%;
	color: #646970;
	font-size: 12px;
}

/* ─────────────────────────────────────────────────────────────────────────
   Image Choice in the builder's preview pane.

   The same card the ballot draws, in a second spelling, because the pane is
   not inside `.yop-poll` and `classic-elements.css` scopes every one of those
   rules to it. Two drawings of one design is the cost of a pane that shows
   real markup for the site and React markup for itself; what keeps them
   honest is that both are read from the same three answer fields, and a
   Jest test compares the classes the preview emits against the ones the
   renderer emitted.

   Deliberately not styled onto Core's `__image-wrap` and `__image-text`.
   Those classes still describe Core's own drawing — a 200px picture with a
   centred caption — and other things use them.
   ───────────────────────────────────────────────────────────────────────── */
/* The pane's copy of the cards' grid — same shape, second spelling, because
   the pane is not inside `.yop-poll`. */
.yop-poll-media-preview-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 150px, 1fr ) );
	gap: 12px;
	align-items: stretch;
}

/* And its copy of Per row, with the same floors -- see
   `.yop-poll-media-tiles--per-row-2` in classic-elements.css. The pane is
   narrower than most posts, so a ceiling of four can show three here; that
   is the poll at this width, not a disagreement. */
.yop-poll-media-preview-grid--per-row-2 {
	grid-template-columns: repeat( auto-fit, minmax( max( 120px, calc( ( 100% - 12px ) / 2 ) ), 1fr ) );
}

.yop-poll-media-preview-grid--per-row-3 {
	grid-template-columns: repeat( auto-fit, minmax( max( 120px, calc( ( 100% - 24px ) / 3 ) ), 1fr ) );
}

.yop-poll-media-preview-grid--per-row-4 {
	grid-template-columns: repeat( auto-fit, minmax( max( 120px, calc( ( 100% - 36px ) / 4 ) ), 1fr ) );
}

.yop-poll-media-preview {
	position: relative;
	display: flex;
	flex-direction: column;
	align-self: stretch;
	min-width: 0;
	padding: 10px;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	background: #fff;
	transition: transform 0.15s ease, box-shadow 0.15s ease,
		border-color 0.15s ease;
}

.yop-poll-media-preview__frame {
	position: relative;
	display: block;
	/* The tile is a column flex box, so this is a flex child and takes its
	   width from its contents unless told otherwise. With a picture in it that
	   looked fine -- the `<img>` filled it. With no picture chosen yet it
	   collapsed to the width of the words "No image", which is the state every
	   image question is in the moment an author adds one. */
	width: 100%;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #eceff1;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.yop-poll-media-preview__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* What an answer with no picture yet shows. A glyph rather than a line of
   text, so it reads the same at 44px as it does at 250px -- the words it used
   to say wrapped to two lines inside the beside layout's thumbnail and sat
   against the border on every side. */
.yop-poll-media-preview__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: #8c8f94;
	font-size: 22px;
	line-height: 1;
}

.yop-poll-media-preview-grid--beside .yop-poll-media-preview__placeholder {
	font-size: 16px;
}

.yop-poll-media-preview--video .yop-poll-media-preview__frame {
	aspect-ratio: 16 / 9;
}

/* The pasted markup keeps whatever the provider asked for until something
   says otherwise, and every provider asks for a fixed pixel width. */
.yop-poll-media-preview--video .yop-poll-media-preview__frame iframe {
	display: block;
	width: 100%;
	max-width: none;
	height: 100%;
	border: 0;
}

.yop-poll-media-preview__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 3px;
	padding: 10px 2px 2px;
	text-align: start;
}

.yop-poll-media-preview__name {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

.yop-poll-media-preview__note {
	font-size: 13px;
	color: #646970;
}

/* The three layouts, in the pane. Same shapes as the ballot's, second
   spelling — the pane is not inside `.yop-poll`. */
/* A tile: nothing drawn round it at rest, but the card's padding kept -- it is
   the room the picked ring and the hover shadow need to sit in, and having it
   only on hover would move the grid every time a pointer crossed it. */
.yop-poll-media-preview-grid--grid
	.yop-poll-media-preview:not( .yop-poll-media-preview--checked ) {
	border-color: transparent;
	background: none;
}

.yop-poll-media-preview-grid--grid .yop-poll-media-preview__body {
	padding: 8px 0 0;
}

.yop-poll-media-preview-grid--grid .yop-poll-media-preview__name {
	font-weight: normal;
}

.yop-poll-media-preview-grid--beside {
	display: flex;
	flex-direction: column;
}

.yop-poll-media-preview-grid--beside .yop-poll-media-preview {
	flex-direction: row;
	align-items: center;
	gap: 12px;
	padding: 10px;
}

/* Same as the ballot's: the mark keeps its own positioning context, or the
   tick inside it resolves against the row. */
.yop-poll-media-preview-grid--beside .yop-poll-media-preview__mark {
	position: relative;
	inset: auto;
	flex: 0 0 auto;
	order: 1;
	box-shadow: none;
}

.yop-poll-media-preview-grid--beside .yop-poll-media-preview__frame {
	flex: 0 0 auto;
	width: 44px;
	aspect-ratio: 1;
	border-radius: 4px;
}

.yop-poll-media-preview-grid--beside .yop-poll-media-preview__body {
	flex: 1 1 auto;
	padding: 0;
}

/* The caption over the picture. Held flat behind the words — see the ballot's
   copy in `classic-elements.css` for why the opacity behind the glyphs may not
   thin, and why the feather is a layer of its own rather than part of this
   box. The pane draws what the ballot draws; the numbers are the ballot's. */
.yop-poll-media-preview__overlay {
	position: absolute;
	inset-inline-start: 0;
	inset-block-end: 0;
	width: 100%;
	box-sizing: border-box;
	padding: 8px 12px;
	background: rgba( 0, 0, 0, 0.6 );
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.yop-poll-media-preview__overlay::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	inset-block-end: 100%;
	height: 18px;
	background: linear-gradient(
		to top,
		rgba( 0, 0, 0, 0.6 ) 0,
		rgba( 0, 0, 0, 0 ) 100%
	);
}

.yop-poll-media-preview-grid--label-above .yop-poll-media-preview__body {
	padding-block-end: 10px;
}

.yop-poll-media-preview-grid--grid.yop-poll-media-preview-grid--label-above
	.yop-poll-media-preview__body {
	padding: 0 0 8px;
}

/* And its copy of Label alignment -- see `.yop-poll-media-tiles--caption-center`
   in classic-elements.css. */
.yop-poll-media-preview-grid--caption-center .yop-poll-media-preview__body,
.yop-poll-media-preview-grid--caption-center .yop-poll-media-preview__overlay {
	text-align: center;
}

.yop-poll-media-preview-grid--caption-right .yop-poll-media-preview__body,
.yop-poll-media-preview-grid--caption-right .yop-poll-media-preview__overlay {
	text-align: end;
}

/* An image answer in the pane's results view: its picture, then its label.

   Core's row names an answer with its text, and for this type that is a word
   an author chose for a picture -- so a results view came out as a list of
   words about images nobody could see. The renderer has answered this since
   the type existed, through `yop_poll_result_answer_content`; this is the
   same answer in the pane's own spelling.

   Small, because the row it names is a bar: the thumbnail is there to say
   which picture won, not to be looked at. */
.yop-poll-image-result,
.yop-poll-video-result {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.yop-poll-image-result__thumb {
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	object-fit: cover;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #eceff1;
}

/* The two colours a star rating is drawn in, side by side so they can be
   compared -- which is the only way to tell whether chosen and unchosen are
   far enough apart to read at a glance. */
.yop-poll-pro-star-colours {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

/* Core hands its own colour control down to this section, and it draws its
   label above the swatch. The two below are for the fallback -- a Core too old
   to hand the component over -- which draws a plain label and input inline. */
.yop-poll-pro-star-colours label {
	display: flex;
	align-items: center;
	gap: 6px;
}

.yop-poll-pro-star-colours input[type="color"] {
	width: 42px;
	height: 30px;
	padding: 0;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	background: none;
	cursor: pointer;
}

/* An emoji scale: a face and a word per point.
 *
 * The greyscale filter the shared rule applies is right here and nowhere else
 * on these scales -- these genuinely are colour emoji, the font carries their
 * hue, and draining it is the only way to say "not this one". A star is
 * monochrome text and gets a colour instead; see the note further up.
 *
 * `yop-poll-scale--faces-lit` is the opt-out: full colour throughout, for an
 * author who would rather the row stayed cheerful. */
.yop-poll-face {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 5px;
}

.yop-poll-face__mark {
	font-size: 30px;
	line-height: 1;
}

.yop-poll-face__word {
	font-size: 12px;
	line-height: 1.25;
	text-align: center;
}

.yop-poll-scale--faces-lit .yop-poll-scale__point {
	filter: none;
	opacity: 1;
}

/* Only the chosen one's word.
 *
 * The words are all rendered and all but one hidden, rather than only the
 * chosen one being rendered: the row would otherwise change height the moment
 * a visitor picked, which is a layout shift on the click that caused it in
 * the one place a poll can least afford one. `visibility` keeps the space. */
.yop-poll-scale--faces-words-chosen .yop-poll-face__word {
	visibility: hidden;
}

.yop-poll-scale--faces-words-chosen
	.yop-poll-face:has( .yop-poll-tap-input:checked )
	.yop-poll-face__word,
.yop-poll-scale--faces-words-chosen
	.yop-poll-scale__point--on
	.yop-poll-face__word {
	visibility: visible;
}

.yop-poll-scale--faces.yop-poll-scale--size-small .yop-poll-face__mark {
	font-size: 24px;
}

.yop-poll-scale--faces.yop-poll-scale--size-large .yop-poll-face__mark {
	font-size: 38px;
}

/* Five faces on one line on a phone.
 *
 * Each face is its mark or word plus 7px either side, and the row of five
 * needed 272px: at 390px wide "Great" went to a second line on its own (QA
 * L34). In a narrow poll the padding gives way first, which brings the row
 * to about 222px -- one line down to a 320px screen -- while every face
 * stays wider than the 24px a target needs. On the poll's own width rather
 * than the screen's, so a poll in a narrow sidebar gets it too. */
@container yop-poll (max-width: 400px) {

	.yop-poll-scale--faces .yop-poll-scale__point {
		padding-inline: 2px;
	}
}

/* The face beside its word in the results, at the size of the words it sits
   with rather than the size the ballot drew it. */
.yop-poll-result-label .yop-poll-face__mark,
.yop-poll-answer-row .yop-poll-face__mark {
	font-size: 1.1em;
	margin-inline-end: 6px;
}

/* One emoji answer in the builder's answer list: the face at the head of the
   row, beside the word it labels.

   The image question's thumbnail next door is a button because choosing a
   picture needs the media library; a face is ten fixed choices, so the control
   itself sits in the row and there is nothing in front of it.

   `min-height` and a 24px box, never a fixed height: this is a target, and
   2.5.8 asks for 24x24 CSS px. The emoji sets the width, which varies by
   platform, so the width is left to the select. */
.yop-poll-pro-answer-face {
	flex: none;
	min-height: 24px;
	padding: 2px 4px;
	font-size: 18px;
	line-height: 1.2;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
}

.yop-poll-pro-answer-face:hover {
	border-color: #2271b1;
}

/* A thumbs question: two opposite marks, each a card.
 *
 * A card rather than a bare glyph because the two are opposites and a visitor
 * is choosing between them, not picking a point along a row. Each says
 * "chosen" with its own border and its own tint rather than by repainting the
 * poll behind it, which is the same rule This or That and Big buttons follow.
 *
 * The tint is the mark's own colour mixed with the page, so the two can never
 * disagree: there is one colour setting per mark, not a colour and a paler
 * copy of it that an author would have to keep in step. `color-mix()` is
 * Chrome 111, Safari 16.2, Firefox 113; where it is missing the declaration is
 * dropped and the card keeps its white background, which is the state it has
 * before anything is chosen -- so the border still says which one it is. */
.yop-poll-scale--thumbs {
	gap: 12px;
}

/* Scoped to the row, and it has to be.
 *
 * `.yop-poll-scale__point` sets a padding, a transparent border, an opacity
 * and a greyscale filter on every point of every scale, and it is written
 * further down this file -- so at one class each it won all four, and a thumbs
 * card drew with no padding, no visible border and drained of colour. The
 * chosen card looked right because the rules that paint it are worth three and
 * four classes, which is the shape this kind of bug always has: one state
 * correct, the rest quietly not.
 *
 * Two classes, not `!important`, and the three rules below stay above it: the
 * size variants are worth three and the chosen states three and four. */
.yop-poll-scale--thumbs .yop-poll-thumb {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 7px;
	box-sizing: border-box;
	min-width: 92px;

	/* min-height, never height: these hold a word that can be any length and
	   has to survive 200% zoom (1.4.4) and the reader's own text spacing
	   (1.4.12). */
	min-height: 0;
	padding: 12px 16px;
	border: 1.5px solid #c9ced4;
	border-radius: 10px;
	opacity: 1;
	filter: none;
}

.yop-poll-thumb__mark {
	font-size: 30px;
	line-height: 1;
}

.yop-poll-thumb__word {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
}

/* Chosen. `:has()` for the ballot, where a real radio carries the state, and
   the `--on` class for the pane, which has no inputs. The class is written
   second: `:has( … :checked )` counts its argument and is a class more
   specific, so a class written before it would lose -- the bug the hover
   preview shipped with. */
.yop-poll-scale--thumbs .yop-poll-thumb--up:has( .yop-poll-tap-input:checked ),
.yop-poll-scale--thumbs .yop-poll-thumb--up.yop-poll-scale__point--on {
	border-color: var(--yop-thumb-up, #1e7e34);
	background: color-mix( in srgb, var(--yop-thumb-up, #1e7e34) 8%, transparent );
}

.yop-poll-scale--thumbs .yop-poll-thumb--down:has( .yop-poll-tap-input:checked ),
.yop-poll-scale--thumbs .yop-poll-thumb--down.yop-poll-scale__point--on {
	border-color: var(--yop-thumb-down, #b32d2e);
	background: color-mix( in srgb, var(--yop-thumb-down, #b32d2e) 8%, transparent );
}

.yop-poll-scale--thumbs .yop-poll-thumb--up:has( .yop-poll-tap-input:checked ) .yop-poll-thumb__word,
.yop-poll-scale--thumbs .yop-poll-thumb--up.yop-poll-scale__point--on .yop-poll-thumb__word {
	color: var(--yop-thumb-up, #1e7e34);
	font-weight: 600;
}

.yop-poll-scale--thumbs .yop-poll-thumb--down:has( .yop-poll-tap-input:checked ) .yop-poll-thumb__word,
.yop-poll-scale--thumbs .yop-poll-thumb--down.yop-poll-scale__point--on .yop-poll-thumb__word {
	color: var(--yop-thumb-down, #b32d2e);
	font-weight: 600;
}

/* The three sizes change the mark and the card, not the word: a word has to
   stay readable whatever size the icon is. */
.yop-poll-scale--thumbs.yop-poll-scale--size-small .yop-poll-thumb__mark {
	font-size: 24px;
}

.yop-poll-scale--thumbs.yop-poll-scale--size-small .yop-poll-thumb {
	min-width: 74px;
	padding: 10px 13px;
}

.yop-poll-scale--thumbs.yop-poll-scale--size-large .yop-poll-thumb__mark {
	font-size: 38px;
}

.yop-poll-scale--thumbs.yop-poll-scale--size-large .yop-poll-thumb {
	min-width: 115px;
	padding: 15px 20px;
}

/* With the words hidden the card has nothing under the mark, so it stops
   being a card and becomes the mark with room around it. */
.yop-poll-scale--thumbs-quiet .yop-poll-thumb {
	min-width: 0;
}

/* The 0-10 score's results: the number, then the three groups.
 *
 * The score is the headline because it is what gets compared between
 * quarters, and the three shares are printed as text beside their colours --
 * a split bar carrying the finding only in its colours is a 1.4.1 failure,
 * and the one colour here that is not conventional is whichever the author
 * picked. The dot is `aria-hidden`: it repeats what the words say. */
.yop-poll-nps__score {
	margin: 0;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.1;
}

.yop-poll-nps__note {
	margin: 2px 0 10px;
	font-size: 0.85em;
	opacity: 0.8;
}

/* The three segments fill the track exactly, whatever the rounding did --
   each carries its own `flex-grow` and none has a width. */
.yop-poll-nps__bar {
	display: flex;
	overflow: hidden;

	/* min-height, not height: a fixed bar clips when text is scaled to 200%
	   and fails 1.4.4. */
	min-height: 10px;
	border-radius: 5px;
}

/* No minimum width: a part with no votes draws nothing, as 6.5 drew no bar for
   an answer with none (QA L12). Its legend entry still says 0%. */
.yop-poll-nps__seg {
	display: block;
}

.yop-poll-nps__legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 16px;
	margin-top: 8px;
	font-size: 0.85em;
}

.yop-poll-nps__group {
	display: flex;
	align-items: center;
	gap: 6px;
}

.yop-poll-nps__dot {
	display: block;
	flex: none;
	width: 9px;
	height: 9px;
	border-radius: 2px;
}

.yop-poll-nps__share {
	opacity: 0.8;
}

/* The three anchor fields in the 0-10 panel, side by side rather than stacked:
   they are one setting read left to right, and the row they describe is read
   left to right too. */
.yop-poll-pro-nps-labels {
	display: grid;
	grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	gap: 9px;
}

.yop-poll-pro-nps-labels label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

/* A note that is a warning rather than a description. Colour is not the only
   signal -- the words say what is wrong -- so this only reinforces them. */
.yop-poll-pro-note--warn {
	color: #8a6d1f;
}

/* Whether an answer in the list has a clip in it yet.

   A glyph in a small box, not a player: this draws once per answer in a list
   the author scrolls, and a row of embeds is a row of third-party requests to
   answer a question about ordering. Hidden from a screen reader -- the row's
   own text names the answer, and the box under it says in words whether the
   embed is usable. */
.yop-poll-pro-answer-video,
.yop-poll-pro-answer-clip {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 24px;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	background: #f0f0f1;
	color: #a7aaad;
	font-size: 10px;
	line-height: 1;
}

/* The clip's mark is a button -- it opens the Media Library, the way the
   picture's thumbnail does -- where the video's is a span that only reports.
   A native button is `border-box` with padding and a font of its own, so the
   shared box above resolves differently on the two tags unless it is told
   not to. */
.yop-poll-pro-answer-clip {
	box-sizing: border-box;
	padding: 0;
	font: inherit;
	cursor: pointer;
}

.yop-poll-pro-answer-clip:hover {
	border-color: #2271b1;
}

/* Set apart from empty by colour and by fill, never by colour alone. */
.yop-poll-pro-answer-video.is-set,
.yop-poll-pro-answer-clip.is-set {
	border-color: #2271b1;
	background: #2271b1;
	color: #fff;
}

/* A clip naming its answer above a bar, in the pane.

   A real player rather than a glyph: it is the same control the site draws and
   the only thing that says which answer this is. `preload="none"` so a results
   view with six answers is not six downloads before anyone presses play. */
.yop-poll-audio-result {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.yop-poll-audio-result__player {
	flex: 0 0 auto;
	width: 170px;
	height: 32px;
}

.yop-poll-audio-result__placeholder {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 170px;
	height: 32px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #eceff1;
	color: #8c8f94;
	font-size: 16px;
	line-height: 1;
}

.yop-poll-audio-result__label {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* The file behind an answer, in the answer list. */
.yop-poll-pro-answer-audio {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

.yop-poll-pro-answer-audio__name {
	overflow-wrap: anywhere;
	font-size: 11px;
}

/* A clip naming its answer above a bar.

   In the shape a video actually is -- a 16:9 frame cropped square is a
   thumbnail of nothing, the same reasoning the ballot's tiles follow -- and
   bigger than a picture's 30px square rather than smaller.

   It was 48x27, chosen to keep the row short. That is the size of a play
   button and nothing else: a provider's thumbnail at that scale is the badge
   with a few pixels of video around it, so the row named every answer
   identically. A frame has to be large enough to tell two clips apart, which
   is the whole job it is here to do. */
.yop-poll-video-result__frame,
.yop-poll-video-result__placeholder {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 54px;
	overflow: hidden;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #eceff1;
	color: #8c8f94;
	font-size: 18px;
	line-height: 1;
}

/* The pasted markup asks for the provider's own pixel size until something
   says otherwise. */
.yop-poll-video-result__frame iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

/* The same box as the thumbnail, so a row with no picture yet is the height
   a row with one will be -- and so the column of labels stays a column rather
   than stepping left on every answer the author has not filled in. */
.yop-poll-image-result__placeholder {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #eceff1;
	color: #8c8f94;
	font-size: 16px;
	line-height: 1;
}

.yop-poll-image-result__label,
.yop-poll-video-result__label {
	min-width: 0;
	overflow-wrap: anywhere;
}

/* A pointer over an answer, in the pane — the same lift as the ballot's, in
   the pane's own spelling. The border does not change, because picked uses
   the border: motion says "pressable", colour says "pressed". */
@media ( hover: hover ) {

	.yop-poll-media-preview-grid--lift
		.yop-poll-media-preview:not( .yop-poll-media-preview--checked ):hover {
		transform: translateY( -2px );
		box-shadow: 0 4px 12px -6px rgba( 20, 25, 30, 0.35 );
	}
}

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

	.yop-poll-media-preview,
	.yop-poll-media-preview__frame {
		transition: none;
	}

	.yop-poll-media-preview-grid--lift .yop-poll-media-preview:hover {
		transform: none;
	}
}

/* The mark, as a badge on the picture, and only once there is something to
   mark -- the same rule the ballot follows, for the same reason. */
.yop-poll-media-preview__mark {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 10px;
	/* Stated, not inherited from `position: absolute`. It is a `<span>`, and
	   absolute positioning blockifies one -- so the width and height below
	   applied only for as long as it stayed absolute. The beside layout puts
	   it back in the flow, where it fell to `display: inline` and drew 4px
	   wide: an inline box takes neither. */
	display: block;
	width: 22px;
	height: 22px;
	box-sizing: border-box;
	border: 2px solid #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
	opacity: 0;
	background: transparent;
}

.yop-poll-media-preview__mark--checkbox {
	border-radius: 6px;
}

.yop-poll-media-preview--checked {
	border-color: #2271b1;
	box-shadow: inset 0 0 0 1px #2271b1;
	background: color-mix( in srgb, #2271b1 8%, transparent );
}

.yop-poll-media-preview--checked .yop-poll-media-preview__mark {
	opacity: 1;
	background: #2271b1;
}

.yop-poll-media-preview--checked .yop-poll-media-preview__mark::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translate( -50%, -60% ) rotate( 45deg );
}

/* A video or audio answer's caption is that answer's text -- it is the only
   part of the row a reader can actually read -- so it takes the Answers
   settings like every other answer label. Its picture-picker counterpart,
   `.yop-poll-image-caption`, is wired the same way by each template's own
   stylesheet; this one has no such rule anywhere, which is why it is here. */
.yop-poll-media-caption {
	display: block;
	margin-top: 4px;
	font-size: var(--yop-ans-ts, inherit);
	font-weight: var(--yop-ans-tw, inherit);
	color: var(--yop-ans-tc, inherit);
}

/* ─────────────────────────────────────────────────────────────────────────
   This or that.

   A comparison, drawn as a comparison: two cards of equal weight with the
   word between them, and the same two cards again once the votes are in, so
   the answer arrives where the question was asked rather than in a different
   shape below it.

   Everything here is scoped to `.yop-poll-versus*`. The panel rules reach the
   element wrapper through `:has()` rather than through `.yop-poll`, so a poll
   carrying one of these and three ordinary questions styles the one.

   The tokens below are this component's own, and every one of them falls back
   through the poll's existing setting first: an author who has chosen an
   answer colour or a button colour still decides, and these only answer where
   nothing has been chosen. Nothing here is declared on `:root` or on
   `.yop-poll`, so no other template can inherit them.
   ───────────────────────────────────────────────────────────────────────── */
.yop-poll .yop-poll-versus,
.yop-poll .yop-poll-element:has( .yop-poll-versus__row--results ),
.yop-poll-versus,
.yop-poll-element:has( .yop-poll-versus__row--results ) {
	--yop-tot-text: var(--yop-ans-tc, #172033);
	--yop-tot-muted: #667085;
	--yop-tot-surface: var(--yop-ans-bg, #fff);
	--yop-tot-surface-subtle: #f6f8fa;
	--yop-tot-border: var(--yop-box-edge, #dce2e8);
	--yop-tot-accent: var(--yop-box-acc, var(--yop-btn-bg, #2271b1));
	--yop-tot-accent-subtle: color-mix( in srgb, var(--yop-tot-accent) 10%, #fff );
	--yop-tot-other-result: #8d9baa;

	/* The bar's colour, overwritten per card by the renderer with whatever the
	   author set beside that answer. Unset it falls to the neutral, which is
	   what a poll whose answers carry no colour has always drawn. */
	--yop-tot-bar: var(--yop-tot-other-result);
	--yop-tot-success: #1e8e5a;
	--yop-tot-radius: 16px;

	/* Wide enough for two propositions side by side and no wider. Left to
	   grow, a full-width poll put 570px of card either side of a two-word
	   answer. */
	max-width: 860px;
	margin-inline: auto;
	box-sizing: border-box;
	color: var(--yop-tot-text);

	/* No frame of its own, and this is worth stating because it was drawn
	   here once. The poll is already a card: every shipped style paints
	   `.yop-poll` with a 1px border, a 12px radius and 28px of padding, so a
	   panel painting the same thing inside it gave the question two rounded
	   boxes, one inside the other, a few pixels apart. The card the design
	   shows is the poll's — this element only decides what sits in it. The
	   corner radius and the border colour stay declared as tokens above,
	   because the two answer cards are drawn from them. */
}

/* The question is the anchor. Its size is the poll's own where the author has
   set one; the floor is this component's, because 16px over two 180px cards
   reads as a caption.

   Centred outright, not `var( --yop-el-ta, center )`. The two cards and the
   badge between them are symmetrical about the middle of the row, and the
   shipped preset sets the poll's questions left — which hung the question off
   the edge of that. This is the one type where the alignment belongs to the
   component rather than to the poll's style. The results element is the same
   question in a panel that is not `.yop-poll-versus`, hence the second
   selector. */
.yop-poll-versus .yop-poll-question,
.yop-poll-element:has( .yop-poll-versus__row--results ) .yop-poll-question {
	font-size: max(24px, var(--yop-q-ts, 24px));
	line-height: 1.25;
	text-align: center;

	/* 8px when there was an instruction under this carrying the other 24. It
	   is the whole gap to the cards now. */
	margin-block-end: 24px;
}

/* And in the card the author types it into, which is neither of the above:
   the builder's own editor, reached through the element type Core now prints
   on the card. Centred there for the same reason and so that what is typed
   and what is previewed are not two different questions. */
.yop-v2-item[data-yop-type="question-versus"] .yop-v2-item__text-field
	.yop-poll-inline-rte__field {
	text-align: center;
}

/* Two columns of equal width, and the word floating in the gap between them
   rather than taking a column of its own — which is what a third grid track
   would make it, and what made the cards unequal to it. */
.yop-poll-versus__row {
	position: relative;
	display: grid;
	grid-template-columns: 1fr 1fr;

	/* Wider than the design's 32-40px, deliberately. The badge is 40px and the
	   connector behind it is drawn in the same space, so at a 40px gap the
	   badge covers the whole line and "connected to both cards" renders as
	   nothing at all. 52px leaves six pixels of hairline reaching each card,
	   which is the thing the line is there to do. */
	gap: 52px;
	align-items: stretch;
}

/* A hairline behind the badge, so the gap reads as something the two cards
   share rather than as the space where a third thing is missing. */
.yop-poll-versus__row::before {
	content: "";
	position: absolute;
	inset-inline: 0;
	top: 50%;
	height: 1px;
	background: var(--yop-tot-border);
	pointer-events: none;
}

.yop-poll-versus__label {
	position: absolute;
	inset-inline-start: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--yop-tot-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* RTL puts the badge back on the centre line: `translate(-50%)` moves it left
   in both directions, and `inset-inline-start` has already flipped which edge
   the 50% is measured from. */
[dir="rtl"] .yop-poll-versus__label {
	transform: translate(50%, -50%);
}

/* The card. Its own geometry, not the answer row's: `--yop-ans-pt` is the
   padding of one row in a list and every shipped preset sets it to 0, which
   drew these as two thin pills. */
.yop-poll-versus__side {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	padding: 24px 20px;
	box-sizing: border-box;
	font: inherit;
	text-align: center;
	cursor: pointer;
	border: 1px solid var(--yop-tot-border);
	border-radius: var(--yop-box-radius, 14px);
	background: var(--yop-tot-surface);
	color: var(--yop-tot-text);
	transition: box-shadow 0.15s ease, transform 0.15s ease,
		border-color 0.15s ease, background-color 0.15s ease;
}

.yop-poll-versus__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	width: 100%;
}

.yop-poll-versus__title {
	font-size: 19px;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

/* Two lines at most: a third turns the card into a paragraph and the two
   cards stop being comparable at a glance. */
.yop-poll-versus__note {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	font-size: 14px;
	line-height: 1.45;
	color: var(--yop-tot-muted);
	overflow-wrap: anywhere;
}

/* ── The card's states ────────────────────────────────────────────────────
   Hover and keyboard focus paint the same thing, because a card that can be
   clicked has to be operable and understandable without a pointer. Focus adds
   a ring of its own outside all of it, so the two read together.

   The edge is a 1px border plus a 1px ring rather than a 2px border: a border
   that grows on hover grows the card with it and the answer moves a pixel.

   The tint is paler than the picked card's and carries neither the tick nor
   "your choice" — those are what having chosen looks like. */
@media ( hover: hover ) {

	.yop-poll-versus__side:not( .yop-poll-versus__side--result ):hover {
		border-color: var(--yop-tot-accent);
		background: var(--yop-tot-accent-subtle);
		box-shadow: 0 0 0 1px var(--yop-tot-accent),
			0 4px 14px rgba(23, 32, 51, 0.1);
		transform: translateY(-2px);
	}

	.yop-poll-versus__side:not( .yop-poll-versus__side--result ):hover
		.yop-poll-versus__choose {
		opacity: 1;
	}
}

.yop-poll-versus__side:not( .yop-poll-versus__side--result ):has( .yop-poll-tap-input:focus-visible ) {
	border-color: var(--yop-tot-accent);
	background: var(--yop-tot-accent-subtle);
	box-shadow: 0 0 0 1px var(--yop-tot-accent),
		0 4px 14px rgba(23, 32, 51, 0.1);
	transform: translateY(-2px);
}

.yop-poll-versus__side:not( .yop-poll-versus__side--result ):has( .yop-poll-tap-input:focus-visible )
	.yop-poll-versus__choose {
	opacity: 1;
}

/* Pressed: the lift collapses and the card gives. Brief by construction — the
   pick is the vote, so the next thing on screen is the result. */
.yop-poll-versus__side:not( .yop-poll-versus__side--result ):active {
	transform: translateY(0) scale(0.985);
	box-shadow: 0 0 0 1px var(--yop-tot-accent);
}

/* Locked while the vote is on its way. `data-yop-busy` is what
   `src/frontend/submit.ts` puts on the container for exactly this window and
   removes again if the vote fails, so a refused sign-in leaves a ballot that
   can still be voted. Opacity only: nothing here changes a box, so the wait
   costs no layout. */
.yop-poll[data-yop-busy] .yop-poll-versus__side {
	pointer-events: none;
	cursor: default;
}

.yop-poll[data-yop-busy] .yop-poll-versus__side:not( .yop-poll-versus__side--checked ):not( :has( .yop-poll-tap-input:checked ) ) {
	opacity: 0.55;
}

/* "Choose", waiting in the corner for a pointer or a keyboard. Drawn always so
   it has something to fade, and inline-end so it follows the reading
   direction; the arrow turns with it.

   Not hidden on a narrow poll, which is what it used to do. A narrow poll is
   not a touch device — a 500px sidebar on a desktop is narrow and has a
   pointer — and conflating the two hid the affordance on every stacked poll
   while the builder's Desktop stage went on showing it, which is two pictures
   of one thing. Whether the pointer can hover is already asked, once, by the
   `@media ( hover: hover )` the reveal lives in; nothing else needs to ask. */
.yop-poll-versus__choose {
	position: absolute;
	inset-inline-end: 16px;
	bottom: 14px;
	opacity: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	color: var(--yop-tot-accent);
	transition: opacity 0.15s ease;
}

.yop-poll-versus__choose::after {
	content: "→";
	margin-inline-start: 5px;
}

[dir="rtl"] .yop-poll-versus__choose::after {
	content: "←";
}

/* The mark of a picked card, and the two spellings of picked: the class is the
   builder preview's and `:has()` is the ballot's. */
.yop-poll-versus__side--checked,
.yop-poll-versus__side:has( .yop-poll-tap-input:checked ) {
	border-color: var(--yop-tot-accent);
	border-width: 2px;
	padding: 23px 19px;
	background: var(--yop-tot-accent-subtle);
}

.yop-poll-versus__tick {
	position: absolute;
	top: 12px;
	inset-inline-end: 12px;
	display: none;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--yop-tot-accent);
	color: #fff;
}

/* Two borders of a box turned 45°. Turn its six corners about the box centre
   and the ink spans -4.95 to 4.95 across, which is centred, and -2.83 to 4.95
   down, which is not — its middle is 1.06px low. So the box is centred by the
   flex and the ink is lifted back by that. Read the transform right to left:
   the shape is turned first, then moved in the circle's own axes. */
.yop-poll-versus__tick::after {
	content: "";
	box-sizing: border-box;
	width: 5px;
	height: 9px;
	border: solid currentcolor;
	border-width: 0 2px 2px 0;
	transform: translateY(-1.06px) rotate(45deg);
}

.yop-poll-versus__side--checked .yop-poll-versus__tick,
.yop-poll-versus__side:has( .yop-poll-tap-input:checked ) .yop-poll-versus__tick {
	display: flex;
}

/* ── Results ──────────────────────────────────────────────────────────────
   The same two cards, so the answer arrives where the question was asked.
   Neither is inflated: the figures differ, the boxes do not. */
.yop-poll-versus__side--result,
.yop-poll-versus__side--figures {
	min-height: 196px;
	justify-content: flex-start;
	gap: 12px;
	cursor: default;
}

/* The figures belong to the bar, so they sit on it rather than floating in
   the middle of the card with the answer. The body takes the free height and
   the title takes an auto margin either side of itself inside it — which
   centres the answer in whatever is left over and leaves the share and the
   count at the foot, a gap above the track they describe.

   `start`, not `left`: the bar fills from the inline start and the numbers
   are read off it, so in an RTL poll both turn together. */
.yop-poll-versus__side--result .yop-poll-versus__body,
.yop-poll-versus__side--figures .yop-poll-versus__body {
	flex: 1 1 auto;
	gap: 4px;
}

/* An auto margin either side of the answer, so the free height splits evenly
   between them: the answer sits in the middle of what is left over and the
   figures are pushed flush to the foot of the body, a gap above the bar.

   `margin-block`, not one `margin-block-start` here and another on the share.
   That is what this said for a while, and it drew the same thing only while a
   share was there to carry the second margin — a poll showing vote counts
   alone had one auto margin, which took the whole of the free height above the
   answer and left it sitting on its own vote count. */
.yop-poll-versus__side--result .yop-poll-versus__title,
.yop-poll-versus__side--figures .yop-poll-versus__title {
	margin-block: auto;
}

.yop-poll-versus__side--result .yop-poll-versus__inline,
.yop-poll-versus__side--figures .yop-poll-versus__inline {
	text-align: start;
}

/* ── Figures before the vote ──────────────────────────────────────────────
   A ballot card for a poll that shows its results early. It takes the result
   card's geometry — answer in the middle, figures at the foot, bar under them
   — because it is the same information in the same places, and a card that
   rearranged itself the moment a vote landed would read as two designs.

   The boxes are empty until `versus-figures.ts` fills them from the state
   request. `min-height` on each, so they stand at their final height while
   empty and nothing below them moves when the numbers arrive: `1.1em` is the
   share's own line-height and `1.5em` the count's.

   The card is still the thing being picked, so it keeps every state the plain
   card has. "Choose" is the exception: the foot of the card is the bar's now,
   and the affordance would sit on top of it. */
/* One line, in the wording Core uses inline: `63% (13 votes)`. Both cards draw
   it: a 30px share with the count stacked under it gave one poll two shapes
   for one figure, and the ballot and the results are the same number. */
.yop-poll-versus__side--result .yop-poll-versus__inline,
.yop-poll-versus__side--figures .yop-poll-versus__inline {
	display: block;
	font-size: 14px;
	line-height: 1.5;
	color: var(--yop-tot-muted);

	/* Empty until the state request lands, so it stands at its own height
	   meanwhile and nothing below it moves when the numbers arrive. */
	min-height: 1.5em;
}

.yop-poll-versus__side--figures .yop-poll-versus__choose {
	display: none;
}

/* Said in words, because the tick beside it is a picture and a picture is not
   a sentence. */
.yop-poll-versus__yours {
	position: absolute;
	top: 14px;
	inset-inline-start: 16px;
	padding: 3px 8px;
	border-radius: 10px;
	background: var(--yop-tot-accent-subtle);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--yop-tot-accent);
}

.yop-poll-versus__side--result.yop-poll-versus__side--checked {
	padding-top: 47px;
}

.yop-poll-versus__side--result:not( .yop-poll-versus__side--checked ):not( :has( .yop-poll-tap-input:checked ) ) {
	padding-top: 48px;
}

/* The bar is the picture of a number already written above it, which is the
   order 1.4.1 asks for — and why the percentage is never the bar's only
   telling. A track the full width of the card, so two shares compare by length
   as well as by number. */
.yop-poll-versus__bar {
	display: block;
	width: 100%;
	height: 11px;
	margin-top: auto;
	border-radius: 999px;
	overflow: hidden;

	/* The track is the bar's own colour, washed out — the same relationship
	   Core's rows draw with `hex_to_rgba( $color, '0.15' )`. The flat neutral
	   first, so a browser without `color-mix()` keeps the track it had rather
	   than losing the background altogether. */
	background: var(--yop-tot-surface-subtle);
	background: color-mix(in srgb, var(--yop-tot-bar) 15%, transparent);
}

.yop-poll-versus__fill {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: var(--yop-tot-bar);
}

/* The visitor's own bar, where the author set no colour. It is the token and
   not the fill's background, so an authored colour on the card still wins. */
.yop-poll-versus__side--checked {
	--yop-tot-bar: var(--yop-tot-accent);
}

/* Core's own message sits at the top of the poll and is left alone here. It
   was clipped for a while, on the grounds that the inline "Your vote was
   recorded" said the same thing lower down — that line is gone now, and this
   type says nothing at all about the vote landing without it. Both the
   success and the error message are Core's to place: the author picks which
   end of the ballot they sit at, and this type is not a reason to override
   them. */

/* A footer with nothing in it still reserved 12px. A one-tap poll with no
   consent, captcha, totals or results link has exactly that. */
.yop-poll:has( .yop-poll-versus ) .yop-poll-footer:empty {
	display: none;
}

/* ── Narrow ───────────────────────────────────────────────────────────────
   One card above the other with the word between them. Asked of the poll's
   own box rather than the screen: a poll in a 400px sidebar on a desktop has
   this problem and a wide poll on a phone does not.

   520px, and the number is measured rather than chosen. A container query is
   evaluated against the container's *content* box, so the poll's own padding
   is already off it — at 640 the switch happened at 698px of poll with the
   shipped 28px padding, which stacked polls in an ordinary desktop column
   while two 285px cards would have fitted with room to spare. Two cards want
   about 240px each and the gap between them is 52, so 520 is where they stop
   fitting rather than where they stop being roomy.

   The badge leaves the centre of the row and sits in the gap between the two
   cards, and the hairline behind it turns with the layout. */
@container yop-poll ( max-width: 520px ) {

	.yop-poll-versus .yop-poll-question {
		font-size: max(21px, var(--yop-q-ts, 21px));
	}

	.yop-poll-versus__row {
		grid-template-columns: 1fr;

		/* The badge is a track of its own here, so the gap is counted twice
		   around it: 12 + 40 + 12 reads as the 64px the design puts between
		   two stacked cards. */
		gap: 12px;
	}

	/* Out of absolute positioning and into the flow. Centred on 50% of the
	   row only works while both cards are the same height, and stacked they
	   are not — at 320px a two-line answer pushed the badge down onto the
	   card above it. In the grid it sits between them whatever they measure. */
	.yop-poll-versus__row .yop-poll-versus__label,
	[dir="rtl"] .yop-poll-versus__row .yop-poll-versus__label {
		position: static;
		transform: none;
		justify-self: center;
	}

	/* No hairline stacked. A vertical line through a 44px gap reads as a
	   divider between two unrelated things, which is the opposite of what it
	   says side by side. The badge alone carries the relationship here. */
	.yop-poll-versus__row::before {
		display: none;
	}

	.yop-poll-versus__side {
		min-height: 160px;
	}

	.yop-poll-versus__side--result {
		min-height: 172px;
	}

}

/* ── The same layout, for the builder's device stages ─────────────────────
   A twin of the block above and not a refactor of it, because there is no
   way to write one. The builder's preview is not inside `.yop-poll`, so the
   container it would be measured against does not exist there and the query
   never matches however narrow the stage gets. The stages are 480px (Tablet)
   and 320px (Mobile) — both below the 640px the front end turns at — so both
   take the stacked layout, and an author switching to Mobile sees what a
   visitor on a phone sees. Keep the two in step by hand. */
.yop-v2-preview__stage--tablet .yop-poll-versus .yop-poll-question,
.yop-v2-preview__stage--mobile .yop-poll-versus .yop-poll-question {
	font-size: max(21px, var(--yop-q-ts, 21px));
}

.yop-v2-preview__stage--tablet .yop-poll-versus__row,
.yop-v2-preview__stage--mobile .yop-poll-versus__row {
	grid-template-columns: 1fr;
	gap: 12px;
}

.yop-v2-preview__stage--tablet .yop-poll-versus__row .yop-poll-versus__label,
.yop-v2-preview__stage--mobile .yop-poll-versus__row .yop-poll-versus__label {
	position: static;
	transform: none;
	justify-self: center;
}

.yop-v2-preview__stage--tablet .yop-poll-versus__row::before,
.yop-v2-preview__stage--mobile .yop-poll-versus__row::before {
	display: none;
}

.yop-v2-preview__stage--tablet .yop-poll-versus__side,
.yop-v2-preview__stage--mobile .yop-poll-versus__side {
	min-height: 160px;
}

.yop-v2-preview__stage--tablet .yop-poll-versus__side--result,
.yop-v2-preview__stage--mobile .yop-poll-versus__side--result {
	min-height: 172px;
}

/* Nothing that moves, for anyone who has asked for less of it. The paint
   stays: it is the part carrying the meaning. */
@media ( prefers-reduced-motion: reduce ) {

	.yop-poll-versus__side,
	.yop-poll-versus__choose {
		transition: none;
	}

	.yop-poll-versus__side:not( .yop-poll-versus__side--result ):hover,
	.yop-poll-versus__side:not( .yop-poll-versus__side--result ):has( .yop-poll-tap-input:focus-visible ),
	.yop-poll-versus__side:not( .yop-poll-versus__side--result ):active {
		transform: none;
	}
}

/* Rating scales. The points sit in a row that wraps; the 0-10 score is the
   one that needs to, at eleven points on a phone. */
/* A scale is one row of points by nature -- five stars stacked in a column read
   as a list of five things, not as a rating. flex-direction is spelled out
   rather than left to the initial value because this element also carries
   Core's .yop-poll-answers, which sets column for the ordinary answer list; the
   initial value never applies and the points stack. Core's own way out is the
   --horizontal modifier, but that is the author's layout choice over their
   answers, and a scale's axis is not theirs to pick. */
/* The Answers settings land on the row, not on each point: a point sizes itself
   in `em` so that one declaration scales every star, face and thumb together,
   and the 0-10 score's numerals pick up the weight and colour by inheriting
   them. A fill is deliberately not wired here -- see the note beside
   SURFACE_TYPES in assets/admin.js. */
.yop-poll-scale {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 0.25em;
	align-items: center;
	font-size: var(--yop-ans-ts, inherit);
	font-weight: var(--yop-ans-tw, inherit);
	color: var(--yop-ans-tc, inherit);
}

/* The Alignment row moves the whole row of points. The shared
   `--align-*` classes the templates ship set `align-items`, which is a
   column's main axis but a scale's cross axis, so on their own they would
   nudge the glyphs up and down and never sideways -- hence `justify-content`
   here, and `align-items: center` restated so the bootstrap template's
   `flex-end` cannot drop the points to the bottom of the row. This file is
   registered with the poll's template stylesheet as a dependency, so it prints
   last and an equal-specificity rule wins. `left` needs nothing: it is what
   `.yop-poll-scale` already does. */
.yop-poll .yop-poll-scale.yop-poll-answers--align-center,
.yop-poll .yop-poll-scale.yop-poll-answers--align-right {
	align-items: center;
}

.yop-poll .yop-poll-scale.yop-poll-answers--align-center {
	justify-content: center;
}

.yop-poll .yop-poll-scale.yop-poll-answers--align-right {
	justify-content: flex-end;
}

.yop-poll-scale__point {
	background: none;
	border: 1px solid transparent;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1.5em;
	line-height: 1;
	padding: var(--yop-ans-pt, 0.15em) var(--yop-ans-pr, 0.25em)
		var(--yop-ans-pb, 0.15em) var(--yop-ans-pl, 0.25em);
	filter: grayscale( 1 );
	opacity: 0.55;
	transition: opacity 0.12s ease, filter 0.12s ease;
}

/* Each point is a `label`, and a theme's label margin is not ours: Blocksy
   gives every label but the last a bottom margin, and in a row that centres
   its items the last star then sat 7px lower than the rest, the last 0–10
   box 3.7px lower (QA L41). */
.yop-poll .yop-poll-scale__point {
	margin: 0;
}

.yop-poll-scale__point:hover {
	filter: none;
	opacity: 1;
}

/* A star rating's mark, which is a shape rather than a character.
 *
 * Sized in `em` so the three Size choices keep working by setting a font size
 * on the point, exactly as they did when this was text -- the shape simply
 * reads that size instead of a font doing it.
 *
 * `block`, because an inline box holding a block child builds anonymous boxes
 * around it and the row stops lining up. The box is square and the viewBox is
 * 24x24, so the shape's middle is the box's middle, which is what makes a half
 * mark exactly half a mark.
 *
 * The fill is `currentColor` on the path itself, so `--yop-mark-on` and
 * `--yop-mark-off`, the hover preview and the checked state all reach it
 * through `color` without any of them knowing this stopped being text. */
.yop-poll-scale__mark {
	display: block;
	width: 1em;
	height: 1em;
}

.yop-poll-scale__glyph {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

/* ── A star rating's marks ─────────────────────────────────────────────────

   Three sizes, and two colours the author picks.

   The colours arrive as custom properties on the element, because there is no
   class for `#e0a01f`. They replace what the shared rule above does with
   opacity: dimming a mark says "not chosen" only if you can see both at once,
   and on a row where every mark is the same glyph that is the whole message.
   Two real colours say it at a glance and survive a screenshot.

   `--yop-mark-off` still carries a default here as well as in PHP, so a
   question saved before these settings existed draws the same row it always
   did rather than an unset colour.
   ───────────────────────────────────────────────────────────────────────── */
/* Filled up to the mark that was chosen, not just on it.
 *
 * A rating of four is four filled stars. One bright star with four grey ones
 * around it is what a row of radio buttons looks like when the radio has been
 * replaced by a star, and it reads as "the fourth star" rather than "four".
 *
 * `:has( ~ … :checked )` is the whole mechanism: a mark fills when a *later*
 * mark is checked. No sibling combinator reaches backwards, and this is the
 * one that does it without reversing the DOM -- which would have put the marks
 * in the wrong order for a screen reader and for the keyboard.
 */
.yop-poll-scale--stars .yop-poll-scale__point:has( .yop-poll-tap-input:checked ),
.yop-poll-scale--stars
	.yop-poll-scale__point:has(
		~ .yop-poll-scale__point .yop-poll-tap-input:checked
	) {
	color: var( --yop-mark-on, #e0a01f );
}

/* And previewed under the pointer, for the question that asks for it.
 *
 * `hover: hover` because a finger has no hover: on a phone the rule latches
 * after a tap and leaves the row showing a rating nobody chose.
 *
 * The reset has to come first and lose to the fill, because the pointer wins
 * over what is already chosen -- otherwise hovering the second mark of a
 * four-star rating shows four filled, which is the opposite of a preview.
 *
 * It loses on specificity, not on order, and that distinction is the bug this
 * shape is written around. `:has()` counts its argument, so the reset's
 * `:has( .yop-poll-scale__point:hover )` is worth two on its own and the
 * whole selector is five classes. The fill for the hovered mark used to be
 * four -- two classes, the point, and `:hover` -- so the reset beat it
 * outright and the mark under the pointer was the one mark that never lit.
 * The marks *before* it did, because their selector carries a `:has()` of its
 * own and reached five, which is why the row still looked like it previewed
 * and was simply one mark short. Half marks made it obvious: the pointer on
 * the right half of a mark drew the left half filled and the right half grey.
 *
 * So both fills now carry the same `:has()` guard the reset does. That is not
 * decoration -- it is what puts them at six and seven against the reset's
 * five, so neither depends on being written afterwards.
 */
@media ( hover: hover ) {

	.yop-poll-scale--stars.yop-poll-scale--hover:has(
			.yop-poll-scale__point:hover
		)
		.yop-poll-scale__point {
		color: var( --yop-mark-off, #d6dae0 );
	}

	.yop-poll-scale--stars.yop-poll-scale--hover:has(
			.yop-poll-scale__point:hover
		)
		.yop-poll-scale__point:hover,
	.yop-poll-scale--stars.yop-poll-scale--hover:has(
			.yop-poll-scale__point:hover
		)
		.yop-poll-scale__point:has( ~ .yop-poll-scale__point:hover ) {
		color: var( --yop-mark-on, #e0a01f );
	}
}

/* The marks and their two end labels, in a box only as wide as the marks.
 *
 * The labels belong to the first and last mark, not to the poll: spread across
 * the full width they sat at the poll's edges, with "Excellent" a good way
 * past the last star. So both live in a box sized by its content, and
 * `space-between` inside it reaches exactly the two marks it should.
 *
 * `fit-content` rather than `inline-block`, so the alignment below can move
 * the whole box with a margin and the marks and their labels travel together.
 */
.yop-poll-scale__rated {
	width: fit-content;
	max-width: 100%;
}

.yop-poll-scale__rated--center {
	margin-inline: auto;
}

.yop-poll-scale__rated--right {
	margin-inline-start: auto;
}

/* The picture, clip or track a rating is about, above its marks.
 *
 * Capped rather than full-bleed: the thing being rated is the subject of the
 * question, and a photograph at its own width pushes the marks off the first
 * screen -- at which point the question is a picture and the answer is
 * somewhere below it.
 *
 * The medium keeps the classes it has elsewhere in this addon, so its own
 * rules reach it and only the box around it is stated here.
 */
.yop-poll-scale__media {
	max-width: min( 420px, 100% );
	margin: 0 0 10px;
}

.yop-poll-scale__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.yop-poll-scale__media .yop-poll-video-embed {
	display: block;
	position: relative;
	width: 100%;
	max-width: none;
	aspect-ratio: 16 / 9;
}

.yop-poll-scale__media .yop-poll-audio-player {
	width: 100%;
}

/* And it goes where the marks go.
 *
 * Its own modifier rather than a `:has()` on an ancestor, because the pane has
 * no `.yop-poll-element` to hang one off -- the preview draws the addon's
 * markup inside Core's ballot chrome. Both renderers emit the class, so one
 * rule serves both. */
.yop-poll-scale__media--center {
	margin-inline: auto;
}

.yop-poll-scale__media--right {
	margin-inline-start: auto;
}

/* Offered only once there is a rating to clear./* What the first and last mark mean, at the two ends of the marks. *//* What the first and last mark mean, at the two ends of the marks. */
.yop-poll-scale__ends {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 4px 0 0;
	font-size: 12px;
	line-height: 1.4;
	color: var( --yop-ans-tc, inherit );
	opacity: 0.85;
}

/* Above the marks, the spacing goes the other way. */
.yop-poll-scale__rated .yop-poll-scale__ends:first-child {
	margin: 0 0 4px;
}

/* Half marks: twice as many points, each showing half a glyph.
 *
 * The pair is one mark to look at and two radios to use, which is what lets a
 * visitor give 3.5 without a script and without a control anyone has to learn.
 * The left half of each mark is its own point, exactly as the design says.
 *
 * Every point is still a real radio in document order, so the keyboard walks
 * the scale in the order it is drawn, and the fill rule needs nothing new: a
 * half fills because a later half is chosen, the same sentence as a whole mark.
 *
 * The glyph keeps a full mark's width inside a box half that wide, and the
 * right-hand point slides it back by the same amount -- so the two clipped
 * halves meet and read as one glyph. The inline padding goes, or it would open
 * a gap down the middle of every mark; the space between marks is put back on
 * the right-hand half instead.
 */
/* The row's own gap goes, because it sits between every point -- including
   the two that are one mark, which is where it shows as a split down the
   middle of every star. The space between marks is put back on the right-hand
   half below. */
.yop-poll-scale--halves {
	gap: 0;
}

/* The border and the corner radius go with it.
 *
 * `.yop-poll-scale__point` carries `border: 1px solid transparent` and
 * `border-radius: 4px`, and the box is `content-box` -- wp-admin ships no
 * universal border-box reset and neither does a theme, reliably. So a point
 * asked for `width: 0.5em` was drawn 0.5em *plus two borders* wide, while the
 * right-hand half slides its glyph back by exactly 0.5em: the two halves of
 * every mark were therefore taken from glyphs 2px apart, and each mark read
 * as two mismatched fragments with a seam down it. Measured at 28px: the
 * boxes stepped 16px and the glyph stepped 14px.
 *
 * `box-sizing: border-box` would line the centres up and is the wrong fix --
 * it keeps the 2px, taking it out of the clip window instead, so a 2px slice
 * is cut from the middle of every mark rather than opened between the halves.
 * The border has nothing to do here: it is painted only by the worded and
 * numeric scales further down this file, never by a star, and halves are a
 * star's setting alone.
 *
 * The radius goes for the same reason. `overflow: hidden` clips to the
 * rounded corner, so a 4px curve on a 14px-wide box takes bites out of the
 * glyph's corners -- and the rounding is a target affordance for a point that
 * is a whole mark, not half of one. */
.yop-poll-scale--halves .yop-poll-scale__point {
	width: 0.5em;
	padding-inline: 0;
	border-inline-width: 0;
	border-radius: 0;
	overflow: hidden;
}

.yop-poll-scale--halves .yop-poll-scale__point > span[aria-hidden="true"] {
	display: block;
	width: 1em;
	text-align: center;
}

.yop-poll-scale--halves
	.yop-poll-scale__point:nth-child( even )
	> span[aria-hidden="true"] {
	margin-inline-start: -0.5em;
}

.yop-poll-scale--halves .yop-poll-scale__point:nth-child( even ) {
	margin-inline-end: 0.3em;
}

.yop-poll-scale--size-small .yop-poll-scale__point {
	font-size: 20px;
}

.yop-poll-scale--size-medium .yop-poll-scale__point {
	font-size: 28px;
}

.yop-poll-scale--size-large .yop-poll-scale__point {
	font-size: 36px;
}

/* The greyscale above is written for the faces and the thumbs. Those are
   colour emoji: the font carries their hue, `color` cannot reach them, and
   draining that hue is the only way this file can draw an unpicked one. A
   star is not one of them -- `★` is U+2605, monochrome text, and `color` is
   the only thing that paints it. So the filter was throwing the author's
   Answers colour away: every colour picked in the panel arrived on the page
   as the same grey, because greyscale maps every hue onto one.

   Opacity is left alone, so an unpicked star is still dimmer than a picked
   one; what changes is that it is now a dimmer version of the author's colour
   rather than of grey. The 0-10 score opts out the same way further down this
   file, and for the same reason: its points are numerals. */

.yop-poll-scale--stars .yop-poll-scale__point {
	filter: none;

	/* An unchosen mark is its own colour rather than a dimmed one. Opacity
	   says "not chosen" only while both are on screen together, and on a row
	   where every mark is the same glyph that is the whole message -- so the
	   two states are two colours, which survives a screenshot and does not
	   depend on the reader noticing a difference in weight. */
	color: var( --yop-mark-off, #d6dae0 );
	opacity: 1;
}

/* The pane's own filled state.
 *
 * The ballot fills from `:has()` on a checked input, which is what lets it work
 * with no scripting. The preview has no inputs to check -- it draws the marks
 * and nothing collects a vote -- so it says the same thing with a class.
 *
 * It sits *after* the rule below rather than beside the `:has()` ones above,
 * and the difference is specificity. `:has( … :checked )` counts its argument,
 * so those selectors are a class more specific than the unchosen colour and
 * win wherever they appear. A plain class ties with it, and a tie is settled by
 * source order -- placed above, it lost every time and the pane drew a rating
 * nobody could see.
 */
.yop-poll-scale--stars .yop-poll-scale__point--on {
	color: var( --yop-mark-on, #e0a01f );
}

/* Kept for a point that is focusable in its own right; React's <button> was,
   and this rule was written for it. A <label> never is, so on its own this
   rule no longer fires anywhere -- see the blocks below. */
.yop-poll-scale__point:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Where the focus actually lands, now that every tap target is a <label>
   wrapping a visually-hidden input: on the input. That input is transparent,
   so its focus ring is invisible and a keyboard voter tabbing through a
   rating scale, a pill list, a block list, a head-to-head or a picture
   picker sees nothing at all move. React's <button> targets carried the
   browser's own outline; these have to be given one, drawn on the label the
   voter can see.

   All eight <label> families that wrap a .yop-poll-tap-input are listed, the
   three media rows included -- a nine-image picker with no visible focus is
   the worst of the lot to tab through. The social card is deliberately
   absent: its input is a real, visible control and is given its own ring
   further up this file, on the input rather than on the row.
   Audio's row carries .yop-poll-media-answer as well as its --audio
   modifier, so the modifier is redundant today and named anyway, against the
   day that row class is changed and the ring quietly stops reaching it.

   `:has()` where it is available, so a mouse click does not leave an outline
   behind -- which is what `:focus-visible` gave the buttons. It is a block of
   its own rather than merged with the rule above because an unknown selector
   invalidates every selector beside it in a list.

   `:has()` is not old: Safari 15.4, Chrome 105, Firefox 121. An iPad capped
   below iOS 15.4 and an ESR Firefox a year behind are both real visitors of a
   WordPress poll, so the `@supports` block below gives them `:focus-within`
   instead. That fires on a mouse click as well, which is why it is scoped to
   browsers that cannot do better rather than used as the baseline: nobody who
   can have the click-free ring should be given the noisy one. `@supports
   selector()` is itself far older than `:has()` (Chrome 83, Safari 14.1,
   Firefox 69), so the fallback lands where it is needed and nowhere else. */
.yop-poll-scale__point:has( .yop-poll-tap-input:focus-visible ),
.yop-poll-block:has( .yop-poll-tap-input:focus-visible ),
.yop-poll-versus__side:has( .yop-poll-tap-input:focus-visible ),
.yop-poll-image-answer:has( .yop-poll-tap-input:focus-visible ),
.yop-poll-media-answer:has( .yop-poll-tap-input:focus-visible ),
.yop-poll-media-answer--audio:has( .yop-poll-tap-input:focus-visible ),
.yop-poll-answer-card:has( input:focus-visible ) {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@supports not selector( :has( * ) ) {
	.yop-poll-scale__point:focus-within,
	.yop-poll-block:focus-within,
	.yop-poll-versus__side:focus-within,
	.yop-poll-image-answer:focus-within,
	.yop-poll-media-answer:focus-within,
	.yop-poll-media-answer--audio:focus-within,
	.yop-poll-answer-card:focus-within {
		outline: 2px solid currentColor;
		outline-offset: 2px;
	}
}

/* The card is the one row above whose control is visible -- that is the type,
   and it is why its ring is keyed on `input` rather than on
   `.yop-poll-tap-input`, which the card deliberately does not carry. It is
   also why it needs the rule below and the others do not: every other row
   hides its input, so the browser draws no ring of its own there and there is
   nothing to take away. Here it does, and two indicators on one answer is one
   too many.

   The browser's is the one to drop. It rings the 13px control rather than the
   52px box a visitor actually pressed, and it is square -- an outline follows
   the input's border box, and the round mark is painted inside that box by the
   UA, so the ring has no radius to follow. On a picked card that drew a black
   square around a white circle.

   `:focus`, not `:focus-visible`, and the difference is the whole rule. A ring
   this is meant to take away has to be gone wherever the browser would draw
   it, and which of the two the browser keys its own ring on is the browser's
   business, not ours -- Chrome was seen painting it on a pointer click that
   did not match `:focus-visible`. `:focus` is the superset, so it holds
   whichever the answer turns out to be; `:focus-visible` would leave the
   square behind in exactly the case that first showed it.

   The replacement is the rule above, and it is deliberately narrower: the ring
   moves to the card on `:focus-visible`, with `:focus-within` where `:has()`
   is missing. So a pointer may end up with no ring at all, which is what every
   other row above already does and is what `:focus-visible` is for -- the card
   paints itself in the button's colour, so a click already has its answer. A
   keyboard always gets one, and it is the better one: white on a picked card
   is 5.17:1 against the UA ring's 4.06:1, and it rings the 52px box rather
   than the 13px control.

   The withdrawn social card met the same black box and answered it the other
   way, by keeping the ring on the input. Both work; this one goes to the row
   because this row is one of the tap stylings, and every other tap styling
   above already rings the row. */
.yop-poll-answer-card input:focus {
	outline: none;
}

/* A picked answer has to look picked without any script running. Plan 2a
   made every tap target a <label> wrapping a real input, so the browser
   already knows what is checked, and `:has()` can reach up from that input
   to the label around it.

   For blocks, versus and both scale families, every declaration
   below matches this file's own `--checked` rules (compare the
   `.yop-poll-block--checked` and `.yop-poll-versus__side--checked` rules
   above, and the 0-10 scale's own rule further down). The image and media rules below are not copied from
   anywhere in this file -- there is no `--selected` indicator rule in
   assets/style.css to copy. The real ones live per template, scoped to
   `[data-template]`, in templates/material/style.css and
   templates/bootstrap/style.css, and they differ from what follows here in
   both size and colour (material's dot is 10px and #f44336; bootstrap fills
   the indicator rather than dotting it; the rules below draw a generic 8px
   dot in #0073aa). They are new, generic rules that keep the no-JS ballot
   showing *some* selected state everywhere, not a reproduction of either
   template's indicator styling -- reconciling the two is out of scope here
   and is tracked as a cutover-checklist item.

   Unlike the focus ring above, this gets no `:has()` fallback, and none
   should be added. `:focus-within` stands in for `:has(:focus-visible)`
   because it matches an ancestor whose descendant has focus -- exactly what
   the `:has()` version also matches, just less precisely. There is no
   `:checked-within`: an ancestor is never itself :checked, because the
   checked input is the descendant, not the label that needs the styling. So
   on Safari below 15.4, Chrome below 105 and Firefox below 121, a picked
   answer will not show as picked until a later plan's behaviour layer swaps
   a class onto the label directly -- Plan 2b-ii's job, not this file's. Do
   not reach for a JavaScript fallback here either: doing this in CSS, so it
   survives with scripting off, is the entire reason this is not a
   behaviour. */
.yop-poll-scale__point:has( .yop-poll-tap-input:checked ) {
	filter: none;
	opacity: 1;
}

/* No styling carries an inset ring any more, and one should not be added back
   without the problem that earned it. It existed for One-tap pills, which
   repainted the picked row in the poll's Vote-button palette -- so an author
   whose vote button was white on a white poll got a white fill on white, and
   tapping an answer looked like nothing had happened. The ring was the rescue,
   drawn in `currentColor` because that has to contrast with the picked
   background whatever the author chose.

   This or that and Big buttons never needed it: each says "picked" with its
   own border and its own tint rather than by repainting the row, so neither
   can come out matching the poll behind it. A ring on top of those would be a
   third thing saying what two already say. */

/* The 0-10 score's own --checked rule adds bold on top of the generic one
   above; picked reuses both. */
.yop-poll-scale--nps .yop-poll-scale__point:has( .yop-poll-tap-input:checked ) {
	opacity: 1;
	font-weight: 700;
}

.yop-poll-image-answer:has( .yop-poll-tap-input:checked ) .yop-poll-image-indicator {
	border-color: var(--yop-radio-color, #0073aa);
}

.yop-poll-image-answer:has( .yop-poll-tap-input:checked ) .yop-poll-image-indicator::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--yop-radio-color, #0073aa);
}

.yop-poll-media-answer:has( .yop-poll-tap-input:checked ) .yop-poll-media-indicator,
.yop-poll-media-answer--audio:has( .yop-poll-tap-input:checked ) .yop-poll-media-indicator {
	border-color: var(--yop-radio-color, #0073aa);
}

.yop-poll-media-answer:has( .yop-poll-tap-input:checked ) .yop-poll-media-indicator::after,
.yop-poll-media-answer--audio:has( .yop-poll-tap-input:checked ) .yop-poll-media-indicator::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--yop-radio-color, #0073aa);
}

.yop-poll-media-answer:has( .yop-poll-tap-input:checked ) .yop-poll-media-indicator--checkbox::after,
.yop-poll-media-answer--audio:has( .yop-poll-tap-input:checked ) .yop-poll-media-indicator--checkbox::after {
	width: 4px;
	height: 7px;
	background: transparent;
	border-radius: 0;
	border: solid var(--yop-radio-color, #0073aa);
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -70%) rotate(45deg);
}

/* The 0-10 score has no glyph, so its points are numbers in boxes, and the
   numeral has to sit in the middle of its box in both directions.
 *
 * Neither happens on its own. The box is held at 2em because that is wider
 * than a single digit draws, so without centring the numeral sits against the
 * left edge and only "10" looks right; and the Size choice below sets a
 * `min-height` the numeral does not fill, so without centring it sits against
 * the top edge with the whole difference below it -- 15px of line in a 38px
 * box at the medium size.
 *
 * A flex box does both, and it is safe here because a point has exactly one
 * thing in flow: the real radio beside it is positioned absolutely. The other
 * three scales centre already, each having reached the same arrangement for
 * its own reason -- faces and thumbs stack a mark over a word in a column, and
 * a star's box is drawn to the glyph rather than to a `min-height`. This is
 * the only one that needed saying out loud.
 *
 * `text-align` stays. It is what centres the numeral if the flex box is ever
 * lost, and it costs a line. */
.yop-poll-scale--nps .yop-poll-scale__point {
	align-items: center;
	border-color: currentColor;
	display: flex;
	filter: none;
	font-size: 1em;
	justify-content: center;
	min-width: 2em;
	opacity: 0.7;
	text-align: center;
}

/* The chosen box is filled, not merely un-dimmed.
 *
 * Opacity and weight alone say "picked" only while an unpicked box is beside
 * it to compare against, and on a row of eleven numerals that is a weak signal
 * -- the design fills it. The fill is the author's, so the numeral on it can
 * be light or dark text depending on what they chose, and CSS cannot ask how
 * dark a custom property is: `Element_Scale::readable_on()` decides and writes
 * the answer as the second property.
 *
 * `:has()` and the `--on` class are both listed, and the class comes second on
 * purpose. The two tie nowhere -- `:has( … :checked )` counts its argument and
 * is a class more specific -- so the pane's class would lose to the base rule
 * above if it were written before it. That is the bug the hover preview
 * shipped with; see `StylesheetIntegrityTest`. */
.yop-poll-scale--nps .yop-poll-scale__point:has( .yop-poll-tap-input:checked ),
.yop-poll-scale--nps .yop-poll-scale__point--on {
	background: var(--yop-mark-on, #2271b1);
	border-color: var(--yop-mark-on, #2271b1);
	color: var(--yop-mark-on-text, #fff);
	opacity: 1;
	font-weight: 700;
}

/* Box height, the same three words the rating uses.
 *
 * Height rather than font size: the numerals should not change size between a
 * small row and a large one -- eleven of them have to stay legible either way
 * -- so what grows is the box around them. `min-height`, never `height`:
 * a fixed one clips at 200% zoom and fails 1.4.4. */
.yop-poll-scale--nps.yop-poll-scale--size-small .yop-poll-scale__point {
	min-height: 30px;
}

.yop-poll-scale--nps.yop-poll-scale--size-medium .yop-poll-scale__point {
	min-height: 38px;
}

.yop-poll-scale--nps.yop-poll-scale--size-large .yop-poll-scale__point {
	min-height: 48px;
}

/* Eleven boxes across a phone.
 *
 * At 320px with a 16px gutter each side and 5px between boxes, one row of
 * eleven gives 25px each -- under the 24x24 that 2.5.8 asks of a target, and
 * well under what anyone hits without also hitting the neighbour. Six per row
 * gives 44px, which is comfortable.
 *
 * A media query rather than always: a 0-10 row reads best unbroken, and it
 * fits perfectly well on anything wider. The author can turn the wrap off, and
 * the panel tells them in px what that costs before they do. */
@media ( max-width: 600px ) {

	.yop-poll-scale--nps-wrap .yop-poll-scale__point {
		flex: 1 1 calc( ( 100% - 25px ) / 6 );
	}
}

/* The centre anchor, when the author has written one.
 *
 * `space-between` already puts two labels at the two ends. A third needs
 * nothing more -- it lands in the middle by the same rule -- so this exists
 * only to centre its own text, which would otherwise sit left-aligned in a
 * box the width of the longest word. */
.yop-poll-scale__ends--three .yop-poll-scale__end:nth-child( 2 ) {
	text-align: center;
}

/* The three end labels share the row's width equally rather than sizing to
   their words, or a long left anchor pushes the centre one off centre -- and
   "off centre" is the one thing a centre label cannot be. */
.yop-poll-scale__ends--three .yop-poll-scale__end {
	flex: 1 1 0;
}

.yop-poll-scale__ends--three .yop-poll-scale__end:last-child {
	text-align: right;
}

/* With the words hidden the points are numerals: they take their natural
   width and the row closes up around them. */
.yop-poll-scale--labels-none .yop-poll-scale__point,
.yop-poll-scale--labels-ends .yop-poll-scale__point {
	flex: 0 0 auto;
}

/* The two ends, on their own line beneath the numbers.

   `space-between` rather than a grid: with one word at each end that is the
   whole layout, and it degrades correctly when only one has been written —
   the remaining label stays at its own end instead of sliding to the middle,
   because the empty span still holds its place.

   The poles are a description, not points: they sit outside the group so
   nothing arrows onto them, and `aria-describedby` on the group is what reads
   them out. */

.yop-poll-scale-summary {
	font-size: 1.1em;
	font-weight: 700;
	margin-bottom: 0.5em;
}

/* The mark a tap styling carries. Hidden rather than absent: a styling drawn
   only from buttons submits an empty vote, because the answer reader collects
   checked inputs and nothing else. */
/* A linked media answer: its link sits at the tile's corner, outside the
   label, so pressing the answer picks it (QA M20). A one-cell grid keeps the
   tile filling its place in the list. Core styles the link itself
   (`.yop-poll-answer-link`). */
.yop-poll .yop-poll-media-linked {
	position: relative;
	display: grid;
}

.yop-poll .yop-poll-media-linked > label {
	grid-area: 1 / 1;
}

.yop-poll .yop-poll-media-linked__link {
	position: absolute;
	inset-block-start: 6px;
	inset-inline-end: 6px;
	z-index: 1;
	background: var(--yop-poll-bg, #fff);
	border-radius: 50%;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* Scoped, and the box stated: a single class lost to a theme's own
   `input[type=radio]` (Twenty Twenty-One sizes every one to 25px and makes
   it `position: relative`), which put the hidden input back in the flow —
   space above the emoji faces, the 0–10 numbers pushed right (QA M26). */
.yop-poll-tap-input,
.yop-poll .yop-poll-tap-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 1px;
	height: 1px;
	margin: 0;
}

/* A large answer card shows the browser's own marker, and only that: the
   theme's restyled radio — 25px with a dot of its own — is reverted to it. */
.yop-poll .yop-poll-answer-card > input[type="radio"],
.yop-poll .yop-poll-answer-card > input[type="checkbox"] {
	all: revert;
	flex-shrink: 0;
}

/* Builder chrome for the premium element panels. These buttons deliberately
   carry no `button` class: wp-admin's own selector is `.wp-core-ui .button`,
   which outranks a single class, so under the Modern colour scheme an
   icon-only button came out as a wide box with a blue border round the glyph.
   Styling them from scratch makes the icon the whole control, and matches the
   borderless icon buttons Core already uses on its answer cards. */
.yop-poll-pro-btn--icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	border-radius: 4px;
	background: transparent;
	color: #8c8f94;
	cursor: pointer;
}

.yop-poll-pro-btn--icon:hover {
	background: #f0f0f0;
	color: #1e1e1e;
}

/* Borderless buttons have no resting outline to thicken, so focus has to draw
   its own ring or keyboard users lose the control entirely. */
.yop-poll-pro-btn--icon:focus-visible {
	outline: 2px solid #3858e9;
	outline-offset: 1px;
}

.yop-poll-pro-btn--danger:hover {
	background: #fcf0f1;
	color: #b32d2e;
}

/* The question's own title field sits directly above this header with no
   margin of its own, so "Answers" ran straight into it. 16px matches the gap
   `.yop-poll-properties__field` already leaves below itself. The class is
   Pro's own: Core's text and dropdown editors reuse the header markup and do
   not want the extra space. */
.yop-poll-pro-answers-header {
	margin-top: 16px;
}

/* Core styles the expand panel under an image, video or audio answer as a
   plain block, so "Set As Default" sat flush against the caption field above
   it. A flex column gives every control in the panel the same breathing room,
   the way Core's own `.yop-poll-answer-expand` does. */
.yop-poll-properties__images-answer-expand,
.yop-poll-properties__videos-answer-expand,
.yop-poll-properties__audios-answer-expand {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Those same panels put their own margins on the link field, which would stack
   on top of the gap above. */
.yop-poll-properties__images-answer-expand .yop-poll-answer-expand__text-input,
.yop-poll-properties__videos-answer-expand .yop-poll-answer-expand__text-input,
.yop-poll-properties__audios-answer-expand .yop-poll-answer-expand__text-input {
	margin-top: 0;
	margin-bottom: 0;
}

/* The builder preview drops the author's embed straight into the page, and an
   <iframe> whose width and height attributes have been stripped falls back to
   the CSS default 300x150 — wider than the 300px preview card's content box,
   so the video hung over both edges and overlapped the elements above and
   below it. The frontend templates already size embeds exactly this way
   (`.yop-poll-media-answer iframe`); the preview had never been given the
   same rule. The wrap is a shrink-to-fit flex column, so it has to be told to
   fill the row before a percentage width inside it means anything. */
.yop-poll-poll-preview__answer--video .yop-poll-poll-preview__video-wrap {
	width: 100%;
}

.yop-poll-poll-preview__video {
	width: 100%;
}

/* The ratio goes on the iframe, not on the box around it: that box is a flex
   item, so its `min-height: auto` is its content's height, and a 16/9 box with
   a 150px-tall iframe inside it just stays 150px tall. */
.yop-poll-poll-preview__video iframe {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	border: 0;
}

/* The empty-state box next to it has the same problem from the other end:
   Core gives it `width: 100%` but leaves it content-box, so its 20px of side
   padding pushed it 40px past the card edge. Its image and video counterparts
   are shrink-to-fit and are not affected. */
.yop-poll-poll-preview__audio-placeholder {
	box-sizing: border-box;
}

/* An audio answer needs a width of its own once the answers lie in a row.
 *
 * `<audio>` has no intrinsic width, so as a flex item with nothing to size it
 * the whole answer shrank to the width of its radio -- 16px, two of them side
 * by side, the player gone. The ballot has said this since the type existed
 * (`.yop-poll .yop-poll-media-answer--audio`); the pane, which draws its own
 * markup and cannot borrow that rule, had never been told.
 *
 * `min()` rather than a flat width so the vertical layout is unchanged: there
 * the answer already has the row to itself.
 */
.yop-poll-poll-preview__answer--audio {
	width: min(320px, 100%);
}

.yop-poll-poll-preview__answer--audio .yop-poll-poll-preview__audio {
	width: 100%;
}

/* And in a row they share it, rather than each taking their full 320.
 *
 * Two answers at 320px is 640, which no preview pane is, so `flex-wrap` put
 * them back on separate lines -- Arrangement set to Horizontal and nothing
 * apparently happening, which is how this was reported. The ballot has the
 * same rule for the same reason (`.yop-poll-answers--horizontal
 * .yop-poll-media-answer`); the width above is the floor for the vertical
 * case, not a size to insist on here.
 */
.yop-poll-answers--horizontal .yop-poll-poll-preview__answer--audio {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
}

/* The dropdown preview's width, from the Size row in Options and the same
   three widths the front end uses. `classic-elements.css` states them for the
   real `<select>`; the preview draws a div rather than hosting a control, so
   the rule has to name that too — without it the Size row moved the poll and
   left the preview where it was, which is a control that appears to do
   nothing. The class only exists in the preview, so no further scoping. */
.yop-poll-answers--size-small .yop-poll-poll-preview__dropdown {
	width: 50%;
}

.yop-poll-answers--size-medium .yop-poll-poll-preview__dropdown {
	width: 75%;
}

.yop-poll-answers--size-large .yop-poll-poll-preview__dropdown {
	width: 100%;
}

/* The box itself, from the field tokens — the same move the real `<select>`
   got in `classic-elements.css`, for the same reason: the write-in box sits
   directly beneath it and the preview has to show the author what the poll
   draws. Core's own rule here is `10px 14px` with a 1px #1e1e1e edge and a 4px
   corner, which is 8px shorter than the box below it, a darker line and a
   sharper corner. */
.yop-poll-poll-preview__dropdown {
	padding: var(--yop-fld-pt, 13px) var(--yop-fld-pr, 12px) var(--yop-fld-pb, 13px) var(--yop-fld-pl, 12px);
	border-width: var(--yop-fld-bw, 1px);
	border-color: var(--yop-fld-bc, #8a96a4);
	border-radius: var(--yop-fld-br, 8px);
	background: var(--yop-fld-bg, #fff);
	line-height: 1.35;

	/* The write-in box's own height, written out, so the two are level
	   whatever the field settings say. `min-height`, never `height`. */
	min-height: calc(
		var(--yop-fld-ts, 15px) * 1.35 + var(--yop-fld-pt, 13px) +
			var(--yop-fld-pb, 13px) + 2 * var(--yop-fld-bw, 1px)
	);
}

/* The Mobile stage, by the device and not by a container query — Core's own
   reason, over the same rule for the write-in box: the preview column is
   already under 400px on a normal admin window, so a query on the box would
   draw this with "Desktop" selected. */
.yop-v2-preview__stage--mobile .yop-poll-answers--size-small .yop-poll-poll-preview__dropdown,
.yop-v2-preview__stage--mobile .yop-poll-answers--size-medium .yop-poll-poll-preview__dropdown {
	width: 100%;
}

/* The dropdown preview's write-in boxes. `Element_Dropdown` renders them in
   `.yop-poll-other-wrap`, and the preview draws the same container so the two
   keep one spelling — but the template stylesheet scopes its own rules for it
   under `.yop-poll`, which the builder preview sits outside of (the boxes
   themselves wear Core's `yop-v2-ballot__other-input` for exactly that reason).
   So the container's stacking is stated here, and only inside the preview. */
.yop-v2-ballot__addon .yop-poll-other-wrap {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 8px;
}

/* `currentColor` is what makes the glyph follow the button through hover,
   focus and the disabled state without a rule for each. */
.yop-poll-pro-icon {
	fill: currentColor;
	flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Radio and checkbox shapes.

   These drew the Material and Bootstrap templates' own marks instead of the
   browser's, and lived in those templates' stylesheets. They are here because
   the shape is now the author's per-question choice, answered by
   `Mark_Style_Service` through Core's `yop_poll_question_mark_style`: a
   Material mark on a classic poll needs a stylesheet the classic poll loads,
   and this one loads for every poll while the addon is active. The rules were
   already unscoped by template, so the move changes nothing for a poll that
   uses the template they came from.

   Deactivating the addon takes the marks with it, which is the point — Core
   only ever emits the indicator spans when something answers that filter.
   --------------------------------------------------------------------------- */

/* Custom checkbox - MUI style */
.yop-poll-checkbox-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	outline: none;
}

.yop-poll-checkbox-outer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border: 2px solid #757575;
	border-radius: 2px;
	flex-shrink: 0;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.yop-poll-checkbox-check {
	width: 10px;
	height: 10px;
	opacity: 0;
	transition: opacity 0.15s ease;
}

.yop-poll-checkbox-input:checked + .yop-poll-checkbox-outer,
.yop-poll-answer:has(.yop-poll-checkbox-input:checked) .yop-poll-checkbox-outer {
	background: var(--yop-radio-color, #f44336);
	border-color: var(--yop-radio-color, #f44336);
}

.yop-poll-checkbox-input:checked + .yop-poll-checkbox-outer .yop-poll-checkbox-check,
.yop-poll-answer:has(.yop-poll-checkbox-input:checked) .yop-poll-checkbox-check {
	opacity: 1;
}

/* Custom radio button - MUI style */
.yop-poll-radio-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	outline: none;
}

.yop-poll-radio-outer {
	width: 20px;
	height: 20px;
	border: 2px solid #757575;
	border-radius: 50%;
	flex-shrink: 0;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.yop-poll-radio-inner {
	display: none;
}

.yop-poll-radio-input:checked + .yop-poll-radio-outer,
.yop-poll-answer:has(.yop-poll-radio-input:checked) .yop-poll-radio-outer {
	border-color: var(--yop-radio-color, #f44336);
}

.yop-poll-radio-input:checked + .yop-poll-radio-outer::after,
.yop-poll-answer:has(.yop-poll-radio-input:checked) .yop-poll-radio-outer::after {
	content: '';
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--yop-radio-color, #f44336);
	transform: scale(0.625);
}

/* Hidden native input */
.yop-poll-bootstrap-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	outline: none;
}

/* Circular indicator */
.yop-poll-bootstrap-outer {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border: 2px solid #dee2e6;
	border-radius: 50%;
	flex-shrink: 0;
	transition: border-color 0.15s ease, background 0.15s ease;
	box-sizing: border-box;
}

/* SVG checkmark */
.yop-poll-bootstrap-check {
	width: 12px;
	height: 12px;
	opacity: 0;
	transition: opacity 0.15s ease;
}

/* Hover: accent ring */
.yop-poll-answer:hover .yop-poll-bootstrap-outer {
	border-color: var(--yop-radio-color, #f44336);
}

/* Selected: filled circle with checkmark */
.yop-poll-bootstrap-input:checked + .yop-poll-bootstrap-outer,
.yop-poll-answer:has(.yop-poll-bootstrap-input:checked) .yop-poll-bootstrap-outer {
	background: var(--yop-radio-color, #f44336);
	border-color: var(--yop-radio-color, #f44336);
}

.yop-poll-bootstrap-input:checked + .yop-poll-bootstrap-outer .yop-poll-bootstrap-check,
.yop-poll-answer:has(.yop-poll-bootstrap-input:checked) .yop-poll-bootstrap-check {
	opacity: 1;
}

/* The Other row draws the same indicator as the answers above it, so it takes
   the same nudge against `align-items: flex-start`. Unscoped for the same
   reason as everything above: the row is not the template's any more. */
.yop-poll-other-answer > .yop-poll-radio-outer,
.yop-poll-other-answer > .yop-poll-checkbox-outer,
.yop-poll-other-answer > .yop-poll-bootstrap-outer {
	margin-top: 1px;
}

/* Per-element margins. The element's own box carries them, not the
   `display: contents` wrapper the custom properties ride on -- that wrapper
   has no box by design, so a margin on it would do nothing. No template sets
   a margin on `.yop-poll-element`, so the 0 fallback overrides nothing. */
.yop-poll-element {
	margin-top: var(--yop-el-mt, 0);
	margin-bottom: var(--yop-el-mb, 0);
}

/* ── A page break in the builder's preview ────────────────────────────────
   The seam between two pages, drawn as one. It used to be two buttons; those
   belong to the pages either side of it -- Next closes the page above, and the
   page below opens with Previous -- and the pane draws them there now.

   Core's admin stylesheet carries an older `display: flex` rule for this class
   from when it was a button row. This sheet is registered after it, so these
   restate what they need rather than relying on what is left.

   The label is text, not only a dashed rule: a boundary said in a line alone
   is said in shape alone, and the page number is the useful half anyway. */
.yop-poll-poll-preview__page-break {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 4px 0;
	padding: 14px 12px;
	background: #f2f7fc;
	border-radius: 6px;
}

.yop-poll-poll-preview__page-break-rule {
	flex: 1 1 auto;
	min-width: 12px;
	border-top: 1px dashed #b9cde2;
}

/* The pill. `flex: none` so a long label shortens the rules either side of it
   rather than wrapping onto a second line inside a band that is one line
   tall. */
.yop-poll-poll-preview__page-break-label {
	flex: none;
	padding: 4px 12px;
	background: #fff;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: #50575e;
	white-space: nowrap;
}

/* Conditional logic, in the builder's question panel.
 *
 * Sets are boxes and conditions are rows inside them, because the shape is the
 * meaning: everything in one box has to hold, and the boxes are alternatives.
 * An author reading "and" down a box and "or" between boxes has the rule
 * without being told it.
 *
 * Admin-only rules in the frontend stylesheet, as the other builder chrome in
 * this file already is: one sheet is registered for both contexts. */
.yop-logic {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 4px;
}

.yop-logic__set {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 12px;
	background: #fbfbfc;
	border: 1px solid #dcdcde;
	border-radius: 5px;
}

.yop-logic__set-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.yop-logic__set-name,
.yop-logic__and,
.yop-logic__or {
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #646970;
}

.yop-logic__or {
	align-self: flex-start;
	padding: 4px 7px;
	color: #8a6d1f;
	background: #fcf9e8;
	border: 1px solid #f0e2a1;
	border-radius: 2px;
}

.yop-logic__condition {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 11px 12px;
	background: #fff;
	border: 1px solid #e1e4e8;
	border-radius: 4px;
}

.yop-logic__fields {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 8px;
}

.yop-logic__field {
	display: flex;
	flex-direction: column;
	flex: 1 1 180px;
	gap: 4px;
	min-width: 0;
}

.yop-logic__field--number {
	flex: 0 1 120px;
}

.yop-logic__field-name {
	font-size: 11px;
	font-weight: 500;
	color: #646970;
}

.yop-logic__field select,
.yop-logic__field input {
	width: 100%;
	box-sizing: border-box;
}

.yop-logic__answers,
.yop-logic__numbers {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.yop-logic__numbers {
	flex-direction: row;
	gap: 8px;
}

.yop-logic__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

/* A target, so 24x24 (2.5.8) whatever the answer is called. `min-height`
   rather than a height, so a long answer wraps instead of clipping. */
.yop-logic__chip {
	min-height: 24px;
	padding: 6px 11px;
	font-size: 12px;
	color: #3c434a;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 14px;
	cursor: pointer;
}

.yop-logic__chip.is-on {
	font-weight: 600;
	color: #0a4b78;
	background: #eef6fd;
	border-color: #2271b1;
}

/* Never colour alone: a chosen chip is also bolder and says `aria-pressed`,
   because a border and a tint are the two things a colour-blind reader is
   least likely to tell apart. */
.yop-logic__chip:focus-visible,
.yop-logic__drop:focus-visible,
.yop-logic__add:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

.yop-logic__drop {
	flex: none;
	width: 32px;
	min-height: 24px;
	height: 34px;
	color: #646970;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	cursor: pointer;
}

.yop-logic__drop[disabled] {
	color: #c3c4c7;
	cursor: default;
}

.yop-logic__add {
	align-self: flex-start;
	min-height: 24px;
	padding: 8px 11px;
	font-size: 12px;
	color: #2271b1;
	background: #fff;
	border: 1px dashed #2271b1;
	border-radius: 3px;
	cursor: pointer;
}

.yop-logic__add--set {
	color: #8a6d1f;
	background: #fdfcf3;
	border-color: #dba617;
}

.yop-logic__add[disabled] {
	color: #a7aaad;
	background: #f6f7f7;
	border-color: #c3c4c7;
	cursor: default;
}

/* The one part that says what the rule means rather than what it is made of.
   An author checks this, not the selects. */
.yop-logic__sentence {
	margin: 0;
	padding: 11px 12px;
	font-size: 13px;
	line-height: 1.5;
	color: #1d2327;
	background: #f6fafd;
	border: 1px solid #c5d9ea;
	border-radius: 4px;
}

.yop-logic__sentence-label {
	display: block;
	margin-bottom: 4px;
	font-size: 10px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #646970;
}

.yop-logic__hidden-note {
	font-size: 12px;
	line-height: 1.5;
	color: #3c434a;
}

.yop-logic__hidden-note ul {
	margin: 0 0 6px;
	padding-left: 18px;
}

/* Text, not a red border: an error a visitor can only see is not an error
   they can read (1.4.1). */
.yop-logic__issue {
	margin: 0;
	padding: 8px 10px;
	font-size: 12px;
	line-height: 1.45;
	color: #8a6d1f;
	background: #fcf9e8;
	border: 1px solid #f0e2a1;
	border-radius: 3px;
}

/* The rule, tried against answers an author types.
 *
 * Creator-only and saved nowhere: these answers are a question being asked of
 * the rule, not a setting. */
.yop-logic__test {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 11px 12px;
	background: #fbfbfc;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.yop-logic__test .yop-v2-qopt__help {
	margin: 0;
}

/* `flex: 1 1 180px` is right for a condition's row, where the fields sit side
   by side and should share the width. Here they are stacked, and growing means
   each one claims a share of the column's height -- which drew a select with
   an inch of nothing under it. */
.yop-logic__test .yop-logic__field,
.yop-logic__test .yop-logic__answers {
	flex: none;
}

.yop-logic__test .yop-logic__field select,
.yop-logic__test .yop-logic__field input {
	max-width: 340px;
}

/* The verdict says which it is in words as well as in colour, because a
   green box and a yellow one are the two a colour-blind reader is least
   likely to tell apart (1.4.1). */
.yop-logic__verdict {
	margin: 0;
	padding: 9px 11px;
	font-size: 13px;
	line-height: 1.45;
	border-radius: 3px;
}

.yop-logic__verdict.is-shown {
	color: #00450c;
	background: #edf7ee;
	border: 1px solid #b8e0bd;
}

.yop-logic__verdict.is-hidden {
	color: #5c4a0f;
	background: #fcf9e8;
	border: 1px solid #f0e2a1;
}

/* Long feedback's box, drawn as the ballot draws it.
 *
 * Core styles its own preview fields from the same custom properties the
 * template uses, so a text input in the pane is the box a visitor will see. The
 * textarea here is this addon's own preview and matched nothing: `readonly`
 * makes wp-admin draw a grey box with a hairline border and a 4px radius,
 * which is what an author was comparing against the white, 8px field above it.
 *
 * The same declarations rather than a copy of the colours, because the
 * properties are how a poll's own field styling reaches both. Hardcoding #fff
 * would look right on the default palette and wrong on every other.
 *
 * The `[readonly]` is load-bearing, not decoration. wp-admin's `forms.css`
 * carries `input[readonly], textarea[readonly] { background-color: #f0f0f0 }`,
 * which is worth a class and an element -- so a single class sets the border
 * and the radius and loses the background, which is exactly what happened
 * first. Core's own preview field wins by being two classes deep inside
 * `.yop-v2-ballot`; this has no such wrapper to lean on, so it names the
 * attribute the rule it is beating names. */
.yop-poll-poll-preview__multi-line-textarea[readonly],
.yop-poll-poll-preview__email-input[readonly],
.yop-poll-poll-preview__multi-line-textarea,
.yop-poll-poll-preview__email-input {
	box-sizing: border-box;
	appearance: none;
	font-family: inherit;
	min-height: 0;
	margin: 0;
	padding: var(--yop-fld-pt, 13px) var(--yop-fld-pr, 12px)
		var(--yop-fld-pb, 13px) var(--yop-fld-pl, 12px);
	border-width: var(--yop-fld-bw, 1px);
	border-style: solid;
	border-color: var(--yop-fld-bc, #8a96a4);
	border-radius: var(--yop-fld-br, 8px);
	background: var(--yop-fld-bg, #fff);
	box-shadow: none;
	color: var(--yop-fld-tc, #1d2327);
	font-size: var(--yop-fld-ts, 15px);
	font-weight: var(--yop-fld-tw, normal);
	line-height: 1.35;
}

/* Width and alignment, in the builder's preview.
 *
 * The preview has always emitted `--small`, `--medium`, `--large` and an
 * alignment on both fields, and nothing styled them: Core's template sheet
 * carries the rules for the real ballot, scoped under `.yop-poll`, and the
 * preview sits outside that. So Width and Alignment worked on the site and did
 * nothing an author could see while they were setting them.
 *
 * Fixed for the long-answer field first and not for the email one, which
 * emits the same two modifiers from the same function -- so the setting went
 * on doing nothing there.
 *
 * Plain shares rather than the template's `min(100%, max(50%, 22ch))`, and
 * this is where the preview departs from the ballot on purpose. `ch` is
 * measured in the control's own font, so an input and a textarea resolve one
 * `22ch` to two widths -- and the preview column is under 400px on a normal
 * admin window, which is inside the band where that floor always binds. Two
 * fields an author set to the same Small would come out two widths, every
 * time. These are the numbers a real poll resolves to at the widths being
 * shown, and they are the same for both controls. Core's own preview field
 * made this choice first; `FIELD_WIDTHS` in `PreviewPane.jsx` is the same
 * three numbers, and the two have to agree or one pane draws two Smalls. */
.yop-poll-poll-preview__multi-line-textarea--small,
.yop-poll-poll-preview__email-input--small {
	width: 50%;
}

.yop-poll-poll-preview__multi-line-textarea--medium,
.yop-poll-poll-preview__email-input--medium {
	width: 75%;
}

.yop-poll-poll-preview__multi-line-textarea--large,
.yop-poll-poll-preview__email-input--large {
	width: 100%;
}

/* Below 400px of poll the template collapses both to full width, and the pane
 * says which width it is drawing. After the three above, so it wins between
 * equal specificities without reaching for `!important`. */
.yop-poll-poll-preview__field--fluid {
	width: 100%;
}

/* Alignment has no rule here, and must not get one.
 *
 * The preview wraps the field in a `text-align` box and the field is
 * inline-block, so the box already moves it -- and that half has worked all
 * along. The `--left`/`--center`/`--right` classes it also emits were styled
 * with `display: block` and auto margins, which is how the real ballot does
 * it, and neither half of that rule ever took: the base block above names
 * `[readonly]` to beat Core's field styling, so its `margin: 0` outranks a
 * plain class. Dead, and harmlessly so.
 *
 * Giving them the specificity to win is the trap. `display: block` takes the
 * field out of the `text-align` box's reach, so the working mechanism stops
 * and the auto margins have to replace it exactly -- which is a swap with
 * nothing to gain. Tried, measured, reverted: it centred nothing and left
 * every alignment flush left. */

/*
 * The progress indicator's style cards.
 *
 * Four shapes chosen by picture rather than by name: Bar, Steps and Segments
 * are shapes, and the quickest way to say which is which is to show one. The
 * card is a real button carrying `role="radio"`, so the group answers to a
 * screen reader as the exclusive choice it is; everything here is what it
 * looks like and nothing is what it means.
 */
.yop-v2-progress__styles {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 150px, 1fr ) );
	gap: 8px;
	width: 100%;
}

.yop-v2-progress__style {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 7px;
	/* Comfortably past the 24px minimum for a pointer target. */
	padding: 11px;
	text-align: left;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	cursor: pointer;
}

.yop-v2-progress__style.is-on {
	background: #f6fafd;
	border-color: #2271b1;
	/* An inset ring rather than a second border, so choosing a card does not
	   move the three beside it by a pixel. */
	box-shadow: inset 0 0 0 1px #2271b1;
}

.yop-v2-progress__style:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 2px;
}

.yop-v2-progress__mini {
	display: flex;
	align-items: center;
	gap: 3px;
	width: 100%;
	height: 14px;
}

.yop-v2-progress__style-name {
	font-weight: 600;
	font-size: 12px;
	line-height: 1.2;
	color: #1d2327;
}

.yop-v2-progress__style-note {
	font-size: 11px;
	line-height: 1.35;
	color: #646970;
}

/*
 * The tags a confirmation email may carry, listed under the box that takes
 * them. Not a control -- an author types them into the message themselves --
 * so a row of names rather than buttons that would promise to insert one.
 */
.yop-v2-qopt__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 2px;
}

.yop-v2-qopt__tag {
	padding: 3px 6px;
	font-family: ui-monospace, sfmono-regular, menlo, monospace;
	font-size: 11px;
	line-height: 1.4;
	color: #3c434a;
	cursor: help;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 3px;
}

/*
 * A message is several lines, and the row's control column is one field
 * wide.
 */
.yop-v2-qopt__control .components-textarea-control__input {
	width: 100%;
	min-height: 150px;
	font-family: inherit;
	line-height: 1.55;
	resize: vertical;
}

/*
 * The three places an address can go, as cards.
 *
 * Each choice carries a second line -- whether this site can reach the service
 * -- which a segmented control has nowhere to put. Still one-of-several, so
 * still a radiogroup; only the shape differs.
 */
.yop-pro-provider__set {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.yop-pro-provider {
	display: flex;
	flex-direction: column;
	gap: 5px;
	align-items: flex-start;
	min-width: 150px;
	padding: 10px 12px;
	text-align: left;
	cursor: pointer;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.yop-pro-provider.is-on {
	background: #f6fafd;
	border-color: #2271b1;

	/* The design's second ring, which is what makes the chosen card read as
	   pressed rather than merely tinted. */
	box-shadow: inset 0 0 0 1px #2271b1;
}

.yop-pro-provider__name {
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
}

.yop-pro-provider__state {
	font-size: 11px;
	line-height: 1.3;
	color: #646970;
}

/* Connected is the one state worth colouring, and it carries its own word. */
.yop-pro-provider__state.is-ready {
	color: #00450c;
}

/*
 * A service this site has no key for.
 *
 * The same card, in the same row -- it simply is not a choice, and carries
 * the one thing that would make it one. It keeps the others' width and
 * padding on purpose: a blocked card that grew a badge and an explanation
 * became a full-width banner and broke the row of three the design is.
 *
 * Deliberately not dimmed. The text is what explains why the card is there,
 * so it has to stay readable at 4.5:1, and a greyed card that still holds a
 * working button reads as a control that does nothing.
 */
.yop-pro-provider.is-blocked {
	cursor: default;
	background: #f6f7f7;
	border-style: dashed;
}

/*
 * 24x24 is the floor (2.5.8), and the padding is what reaches it -- the word
 * alone is about 11px tall.
 */
.yop-pro-provider__add {
	min-height: 24px;
	padding: 3px 10px;
	margin-top: 2px;
	font-size: 12px;
	color: #1d2327;
	cursor: pointer;
	background: #fff;
	border: 1px solid #2271b1;
	border-radius: 3px;
}

.yop-pro-provider__add:hover {
	background: #f0f6fc;
}

.yop-pro-provider__add:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: 1px;
}

/* ---- the key dialog ---- */

/*
 * Pro's own, not Core's `.yop-v2-keys`.
 *
 * The two dialogs look alike because they do the same job, and borrowing the
 * class names would have been forty lines cheaper -- but Core's builder CSS is
 * not contract, and a rename there would leave this dialog unstyled on top of
 * a page with no way to tell. `.claude/rules/addon-contract.md` is about
 * declared seams; an undeclared one is worse, not better.
 *
 * Above the admin bar's own layer, which is 99999.
 */
.yop-pro-keys {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 80px 20px;
	background: rgba(20, 25, 30, 0.45);
}

.yop-pro-keys__dialog {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 460px;
	max-width: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid #a9aeb5;
	border-radius: 5px;
	box-shadow: 0 24px 60px -20px rgba(20, 25, 30, 0.5);
}

.yop-pro-keys__head {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 15px 17px;
	background: #f6f7f7;
	border-bottom: 1px solid #dcdcde;
}

.yop-pro-keys__titles {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.yop-pro-keys__title {
	font-size: 15px;
	font-weight: 600;
	line-height: 1.3;
	color: #1d2327;
}

.yop-pro-keys__blurb {
	font-size: 12px;
	line-height: 1.45;
	color: #646970;
}

/* 24x24 is the floor for a pointer target (2.5.8). */
.yop-pro-keys__close {
	flex: none;
	min-width: 24px;
	min-height: 24px;
	font-size: 14px;
	line-height: 1;
	color: #646970;
	cursor: pointer;
	background: none;
	border: 0;
}

.yop-pro-keys__close:focus-visible {
	outline: none;
	box-shadow: 0 0 0 2px #a7c8e8;
}

.yop-pro-keys__body {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 16px 17px;
}

.yop-pro-keys__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.yop-pro-keys__label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	color: #1d2327;
}

.yop-pro-keys .yop-pro-keys__input {
	box-sizing: border-box;
	width: 100%;
	padding: 9px 11px;
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: 13px;
	line-height: 1.4;
	color: #1d2327;
	background: #fff;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	box-shadow: none;
}

.yop-pro-keys__help,
.yop-pro-keys__note {
	font-size: 11px;
	line-height: 1.45;
	color: #646970;
}

.yop-pro-keys__where {
	padding: 9px 11px;
	font-size: 11px;
	line-height: 1.5;
	color: #646970;
	background: #f6f7f7;
	border: 1px solid #e1e4e8;
	border-radius: 3px;
}

/* Text, not a red edge: an error carried by colour alone is 1.4.1. */
.yop-pro-keys__error {
	padding: 8px 10px;
	font-size: 11px;
	line-height: 1.5;
	color: #8a6d1f;
	background: #fcf9e8;
	border: 1px solid #f0e2a1;
	border-radius: 3px;
}

.yop-pro-keys__foot {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 13px 17px;
	background: #f6f7f7;
	border-top: 1px solid #dcdcde;
}

.yop-pro-keys__note {
	flex: 1;
	min-width: 0;
}
