/*
 * Cookielier frontend stylesheet: the dialog and the re-open button. Loaded on every page, so it stays
 * small. The defaults of the custom properties are the defaults of the Design tab; the page overrides
 * them with one style block in the head. The defaults and the position of the re-open button carry zero
 * specificity (:where), so a theme or another plugin can override a custom property or a property
 * without a selector fight. Rules of the dialog use two classes, which beats the usual element rules
 * of a theme; everything the dialog needs is set here, nothing is inherited by accident.
 */
:where(:root) {
	--ckl-bg: #ffffff;
	--ckl-text: #1f2937;
	--ckl-accent: #1d4ed8;
	--ckl-accent-text: #ffffff;
	--ckl-radius: 8px;
	--ckl-font-size: 16px;
	--ckl-motion: 180ms;
	--ckl-backdrop: rgb(0 0 0 / 0.5);
	--ckl-reopen-left: 16px;
	--ckl-reopen-right: auto;
	--ckl-reopen-bottom: 16px;
	--ckl-reopen-z: 9998;
	--ckl-status-left: 16px;
	--ckl-status-right: auto;
	--ckl-status-bottom: 16px;
}

/* Re-open button. Only the position has zero specificity (so another plugin can move it); the look is set with one class,
   which beats the rules a theme puts on every button (colour, capital letters, letter spacing, shadows). */
:where(.ckl-reopen) {
	position: fixed;
	bottom: var(--ckl-reopen-bottom);
	left: var(--ckl-reopen-left);
	right: var(--ckl-reopen-right);
	z-index: var(--ckl-reopen-z);
}

.ckl-reopen {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	box-sizing: border-box;
	min-block-size: var(--ckl-reopen-min, 44px);
	min-inline-size: var(--ckl-reopen-min, 44px);
	max-inline-size: calc(100vw - var(--ckl-reopen-x, 1rem) - 1rem);
	margin: 0;
	padding: 0.5em 1em;
	border: 2px solid var(--ckl-reopen-bg, var(--ckl-accent));
	border-radius: var(--ckl-reopen-radius, var(--ckl-button-radius, var(--ckl-radius)));
	background: var(--ckl-reopen-bg, var(--ckl-accent));
	box-shadow: var(--ckl-reopen-ring, none);
	color: var(--ckl-reopen-fg, var(--ckl-accent-text));
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: calc(var(--ckl-font-size) * var(--ckl-reopen-scale, 1));
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	cursor: pointer;
}

.ckl-reopen[hidden] {
	display: none;
}

/* Own colours, size and ring of the cookie button (OD-55): the custom properties exist only when the Design tab sets them, so without them
   every value here is the one of the dialog buttons. The text colour of the hover follows the own text colour. */
.ckl-reopen:hover {
	border-color: var(--ckl-reopen-hover, var(--ckl-reopen-bg, var(--ckl-accent)));
	background: var(--ckl-reopen-hover, var(--ckl-reopen-bg, var(--ckl-accent)));
	color: var(--ckl-reopen-hover-fg, var(--ckl-reopen-fg, var(--ckl-accent-text)));
}

/* The icon is limited by the box here, whatever size the file has. A size in pixels from the Design tab (OD-70) replaces 1.25 times the text; the box stays at least 44 px times the size step. */
.ckl-reopen .ckl-reopen-icon {
	flex: none;
	width: var(--ckl-reopen-icon-size, 1.25em);
	height: var(--ckl-reopen-icon-size, 1.25em);
	object-fit: contain;
}

.ckl-reopen[data-ckl-display="icon"] {
	padding: 0.5em;
}

.ckl-reopen--slot {
	position: static;
	/* In a slot the button is not positioned, so the distance from the side must not limit its width either (OD-70). */
	--ckl-reopen-x: 1rem;
}

/* A ring in two colours, so the focus stays visible on any page background. */
/* With the element in the selector (0,2,1): a theme rule such as :is(button, a, .button):focus has 0,2,0, comes later and would take the ring away. */
button.ckl-reopen:focus-visible,
a.ckl-open--button:focus-visible {
	outline: 2px solid var(--ckl-text);
	outline-offset: 2px;
	box-shadow: 0 0 0 2px var(--ckl-bg);
}

.ckl-open--button {
	display: inline-block;
	box-sizing: border-box;
	min-block-size: 44px;
	padding: 0.65em 1em;
	border: 2px solid var(--ckl-accent);
	border-radius: var(--ckl-button-radius, var(--ckl-radius));
	background: var(--ckl-accent);
	color: var(--ckl-accent-text);
	font-weight: 600;
	letter-spacing: normal;
	line-height: 1.3;
	text-decoration: none;
	text-transform: none;
}

/* Dialog */
html.ckl-scroll-lock {
	overflow: hidden;
}

.ckl-dialog,
.ckl-dialog * {
	box-sizing: border-box;
}

.ckl-dialog {
	position: fixed;
	inset: 0;
	display: none;
	width: min(44rem, calc(100% - 1rem));
	max-height: calc(100% - 1rem);
	margin: auto;
	padding: 1.5rem;
	overflow: auto;
	border: 2px solid var(--ckl-accent);
	border-radius: var(--ckl-radius);
	background: var(--ckl-bg);
	color: var(--ckl-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: var(--ckl-font-size);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-align: start;
	text-transform: none;
	overflow-wrap: anywhere;
	/* The closed state, and the transition in both directions (OD-122, item 3): only opacity and transform move, nothing reflows. The second
	   declaration adds the discrete properties that keep the box visible until the end of the closing transition; a browser that does not know
	   them drops that line and keeps the first, so the open fade still works there. */
	opacity: 0;
	transform: translateY(0.5rem);
	transition: opacity var(--ckl-motion) ease, transform var(--ckl-motion) ease;
	transition: opacity var(--ckl-motion) ease, transform var(--ckl-motion) ease, display var(--ckl-motion) allow-discrete, overlay var(--ckl-motion) allow-discrete;
}

.ckl-dialog[open] {
	display: flex;
	flex-direction: column;
	opacity: 1;
	transform: none;
}

/* The start of the opening transition: the box is display: none before, so it has no style of its own to transition from. */
@starting-style {
	.ckl-dialog[open] {
		opacity: 0;
		transform: translateY(0.5rem);
	}
}

/* The scroll region stays inside the content area (OD-122, item 1): the headline and the row of buttons keep their place,
   only the stage content between them scrolls. The dialog keeps overflow: auto as the fallback of a very small window with
   very large text, where the fixed parts alone are taller than the box. */
.ckl-dialog .ckl-stage {
	display: flex;
	flex-direction: column;
	min-block-size: 0;
}

.ckl-dialog .ckl-body {
	flex: 1 1 auto;
	min-block-size: 0;
	overflow: auto;
}

.ckl-dialog::backdrop {
	background: var(--ckl-backdrop, rgb(0 0 0 / 0.5));
}

/* The compact post-consent box (OD-122, item 4): a second native dialog at the corner of the re-open button, so it keeps the
   modal semantics, the focus trap and the focus return of the settings. Only the position has zero specificity, like the button. */
:where(.ckl-status-box) {
	position: fixed;
	inset: auto;
	bottom: var(--ckl-status-bottom);
	left: var(--ckl-status-left);
	right: var(--ckl-status-right);
	z-index: var(--ckl-reopen-z);
}

.ckl-status-box,
.ckl-status-box * {
	box-sizing: border-box;
}

.ckl-status-box {
	width: min(24rem, calc(100vw - 1rem));
	max-height: calc(100vh - 1rem);
	margin: 0;
	padding: 1rem;
	overflow: auto;
	border: 2px solid var(--ckl-accent);
	border-radius: var(--ckl-radius);
	background: var(--ckl-bg);
	color: var(--ckl-text);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: var(--ckl-font-size);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-align: start;
	text-transform: none;
	overflow-wrap: anywhere;
	/* Only the middle position needs it: half the own width back to the left, so the box is centred on the window. */
	translate: var(--ckl-status-shift, 0);
}

.ckl-status-box::backdrop {
	background: var(--ckl-backdrop, rgb(0 0 0 / 0.5));
}

/* The one head of all four cards (OD-127, OD-136): a decorative mark before the headline, 32 px with fixed width and height, so
   nothing moves when the image loads; the text fallback is the site title and is not a fixed square. The settings layer adds its
   close control as the last item. One rule set for the compact box and the dialog; the headline is 1.5rem everywhere. */
.ckl-dialog .ckl-status-head,
.ckl-status-box .ckl-status-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.75rem;
}

.ckl-dialog .ckl-status-title,
.ckl-status-box .ckl-status-title {
	margin: 0;
	padding: 0;
	border: 0;
	color: inherit;
	font-family: inherit;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
}

.ckl-dialog .ckl-status-mark,
.ckl-status-box .ckl-status-mark {
	flex: none;
	width: 2rem;
	height: 2rem;
	object-fit: contain;
}

.ckl-dialog .ckl-status-mark--text,
.ckl-status-box .ckl-status-mark--text {
	width: auto;
	height: auto;
	max-width: 10rem;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: anywhere;
}

.ckl-dialog .ckl-status-title:focus,
.ckl-status-box .ckl-status-title:focus {
	outline: none;
}

.ckl-status-box .ckl-status-summary {
	margin: 0 0 1rem;
	padding: 0;
}

/* One read-only line per category (OD-123): icon and text; the words carry the state, the icon does not. */
.ckl-status-box .ckl-status-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ckl-status-box .ckl-status-list li {
	display: flex;
	gap: 0.4em;
	margin: 0 0 0.25rem;
}

/* The date of the decision (OD-123), hidden for a version 1 token that carries none. */
.ckl-status-box .ckl-status-date {
	margin: 0.5rem 0 0;
	font-size: 0.875em;
}

.ckl-status-box .ckl-status-icon {
	flex: none;
	inline-size: 1em;
	text-align: center;
}

.ckl-status-box .ckl-status-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
}

/* The small first-visit card of Compact mode (OD-125, OD-130): the look and the corner of the box, but no dimming, so the page behind stays visible; it is
   still modal, so the page is inert until the visitor decides. Its texts and links carry the type of the dialog, because those rules are scoped to it. */
.ckl-first-box::backdrop {
	background: transparent;
}

.ckl-first-box .ckl-status-actions {
	flex-direction: column;
}

.ckl-first-box .ckl-text {
	margin: 0 0 0.75rem;
	padding: 0;
	font-size: 1em;
	line-height: 1.5;
}

.ckl-first-box .ckl-link {
	display: inline-block;
	min-block-size: 24px;
	color: var(--ckl-text);
	text-decoration: underline;
}

.ckl-first-box .ckl-first-list {
	margin: 0 0 0.75rem;
	padding: 0;
	list-style: none;
}

.ckl-first-box .ckl-first-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em;
	margin: 0 0 0.25rem;
}

.ckl-first-box .ckl-check {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 0.75rem;
	min-block-size: 44px;
	margin: 0;
	font-weight: 600;
	cursor: pointer;
}

/* The shared rule below sets flex: 1 1 9rem, which becomes the height in the column of the card. Two classes plus the card
   class win over that rule without !important: the button takes its content height and the full width, with the padding,
   the radius, the font and the 44 px minimum of the shared rule unchanged, so it looks like a details button. */
.ckl-status-box.ckl-first-box .ckl-btn {
	flex: none;
	inline-size: 100%;
}

.ckl-dialog .ckl-stage[hidden],
.ckl-dialog .ckl-btn[hidden] {
	display: none;
}

/* The close control in the head of the settings layer (OD-123): an icon button with a 44 pixel target, pushed to the right edge. */
.ckl-dialog .ckl-close {
	min-inline-size: 44px;
	min-block-size: 44px;
	margin: 0;
	margin-inline-start: auto;
	padding: 0;
	border: 0;
	border-radius: var(--ckl-button-radius, var(--ckl-radius));
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 1.35em;
	line-height: 1;
	cursor: pointer;
	appearance: none;
}

.ckl-dialog .ckl-close:hover {
	background: rgb(128 128 128 / 0.15);
}

.ckl-dialog .ckl-text,
.ckl-dialog .ckl-cat-desc,
.ckl-dialog .ckl-service-desc,
.ckl-dialog .ckl-status,
.ckl-dialog .ckl-links {
	margin: 0 0 1rem;
	padding: 0;
	color: inherit;
	font-size: 1em;
	line-height: 1.5;
}

.ckl-dialog .ckl-cat-desc,
.ckl-dialog .ckl-service-desc {
	margin: 0 0 0.5rem;
	font-size: 0.9em;
}

.ckl-dialog .ckl-status {
	margin: 0.75rem 0 0;
	font-size: 0.9em;
	font-weight: 600;
}

.ckl-dialog .ckl-status:empty {
	display: none;
}

.ckl-dialog .ckl-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.25rem;
}

.ckl-dialog .ckl-link {
	display: inline-block;
	min-block-size: 24px;
	color: var(--ckl-text);
	text-decoration: underline;
}

.ckl-dialog .ckl-link:hover {
	text-decoration-thickness: 2px;
}

.ckl-dialog .ckl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.25rem 0 0;
	padding: 0;
}

.ckl-dialog .ckl-btn,
.ckl-status-box .ckl-btn {
	flex: 1 1 9rem;
	min-block-size: 44px;
	margin: 0;
	padding: 0.5em 1em;
	border: 2px solid var(--ckl-accent);
	border-radius: var(--ckl-button-radius, var(--ckl-radius));
	box-shadow: none;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	appearance: none;
}

.ckl-dialog .ckl-btn--solid,
.ckl-status-box .ckl-btn--solid {
	background: var(--ckl-accent);
	color: var(--ckl-accent-text);
}

.ckl-dialog .ckl-btn--outline,
.ckl-status-box .ckl-btn--outline {
	background: var(--ckl-bg);
	color: var(--ckl-text);
}

.ckl-dialog .ckl-btn:focus-visible,
.ckl-status-box .ckl-btn:focus-visible,
.ckl-dialog .ckl-close:focus-visible,
.ckl-dialog .ckl-link:focus-visible,
.ckl-dialog .ckl-powered-link:focus-visible,
.ckl-status-box .ckl-powered-link:focus-visible,
.ckl-dialog .ckl-check input:focus-visible {
	outline: 2px solid var(--ckl-accent);
	outline-offset: 2px;
}

/* The credit line of the first layer: a link in the text colour, smaller and lighter than the buttons, with a target of at least 24 px. */
.ckl-dialog .ckl-powered,
.ckl-status-box .ckl-powered {
	margin: 0.75rem 0 0;
	padding: 0;
	text-align: center;
}

.ckl-dialog .ckl-powered-link,
.ckl-status-box .ckl-powered-link {
	display: inline-block;
	padding: 0 0.25em;
	color: var(--ckl-text);
	font-size: 0.8125em;
	font-weight: 400;
	line-height: 24px;
	text-decoration: none;
}

/* The logo before the wordmark in the Powered by line (OD-109, OD-110): decorative, fixed colour in the markup. THE SIZE IS THE ONE VALUE --ckl-powered-logo-size below (1em of the font
   size of the line; the drawn cookie fills 5/6 of its box). The box has a hard cap: width, height, min and max all take that value, so nothing that a theme says about svg or img
   (width: 100%, height: auto, max-width) can make it larger. Three classes in the selector (specificity 0,3,0) beat the usual theme rules for svg, img and .entry-content svg without
   !important; a theme rule with !important on every svg would still win (known limit). The same 1em stands in the width and height attributes of the svg as a fallback. */
.ckl-dialog .ckl-powered-link .ckl-powered-logo,
.ckl-status-box .ckl-powered-link .ckl-powered-logo {
	--ckl-powered-logo-size: 1em;
	display: inline-block;
	flex: none;
	box-sizing: border-box;
	inline-size: var(--ckl-powered-logo-size);
	block-size: var(--ckl-powered-logo-size);
	min-inline-size: var(--ckl-powered-logo-size);
	min-block-size: var(--ckl-powered-logo-size);
	max-inline-size: var(--ckl-powered-logo-size);
	max-block-size: var(--ckl-powered-logo-size);
	margin: 0 0.35em 0 0;
	padding: 0;
	border: 0;
	vertical-align: -0.15em;
}

.ckl-dialog .ckl-sr,
.ckl-status-box .ckl-sr {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* The tabs of the settings layer (OD-122, item 6): text buttons in one row, the selected one marked by a line, not by colour alone
   (aria-selected is in the markup); 44 px high and with a focus ring of their own. */
.ckl-dialog .ckl-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0 0 0.75rem;
	border-bottom: 1px solid rgb(127 127 127 / 0.4);
}

.ckl-dialog .ckl-tab {
	min-block-size: 44px;
	margin: 0 0 -1px;
	padding: 0.5rem 0.75rem;
	border: 0 solid transparent;
	border-bottom-width: 3px;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.ckl-dialog .ckl-tab[aria-selected="true"] {
	border-bottom-color: var(--ckl-accent);
}

.ckl-dialog .ckl-tab:focus-visible {
	outline: 2px solid var(--ckl-text);
	outline-offset: 2px;
}

.ckl-dialog .ckl-categories {
	margin: 1rem 0 0;
	padding: 0;
}

.ckl-dialog .ckl-cat {
	margin: 0;
	padding: 0.75rem 0;
	border-top: 1px solid rgb(127 127 127 / 0.4);
}

.ckl-dialog .ckl-cat-head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.25rem 0.75rem;
}

/* A category is collapsed by default (OD-122, item 6): the count of its services is the label of the native disclosure row below
   the name. The row and its focus ring are set here; the marker and the toggling stay with the browser. */
.ckl-dialog .ckl-cat-more {
	margin: 0.25rem 0 0;
}

.ckl-dialog .ckl-cat-count {
	min-block-size: 44px;
	padding: 0.5rem 0;
	font-size: 0.9em;
	font-weight: 600;
	cursor: pointer;
}

.ckl-dialog .ckl-cat-count:focus-visible {
	outline: 2px solid var(--ckl-text);
	outline-offset: 2px;
}

.ckl-dialog .ckl-services {
	margin: 0.25rem 0 0;
	padding: 0 0 0 1.75rem;
	list-style: none;
}

.ckl-dialog .ckl-service {
	margin: 0;
	padding: 0.25rem 0;
}

.ckl-dialog .ckl-vendor {
	display: block;
	margin: 0 0 0.25rem 2.25rem;
	font-size: 0.85em;
}

.ckl-dialog .ckl-check {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	align-items: center;
	gap: 0.75rem;
	min-block-size: 44px;
	margin: 0;
	padding: 0;
	font-weight: 600;
	cursor: pointer;
}

/* A reported indent of about 2rem on the category names has no rule of its own here; the reset is a precaution, so a theme rule
   on labels, list items or headings cannot shift the name inside its row. No !important: two classes beat a theme rule without an id. */
.ckl-dialog .ckl-check-label,
.ckl-first-box .ckl-check-label {
	margin: 0;
	padding: 0;
	text-indent: 0;
}

/* The switch (OD-22, OD-126): the native checkbox stays the state carrier but is visually hidden and stays focusable; the track and
   the knob are decoration beside it. The reported left offset of about 2rem on the row names came from the input in the flex line:
   a theme rule on input[type=checkbox] (reported: Themify) can put it back into the flow and the gap before it shifts the name.
   The input therefore sits in its own wrapper that is absolutely positioned with no size: whatever a theme does to the input stays
   inside and clipped, and the input is no flex item, so the name starts at the left edge of the row. The input stays focusable and
   in the accessibility tree (no display: none, no visibility: hidden, no aria-hidden); the label wraps it, so a click on the row
   toggles it. The state reaches the switch through the row with :has(), because the input is no sibling of the switch any more. */
.ckl-dialog .ckl-input,
.ckl-first-box .ckl-input {
	position: absolute;
	inline-size: 0;
	block-size: 0;
	overflow: hidden;
}

.ckl-dialog .ckl-check input,
.ckl-first-box .ckl-check input {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	overflow: hidden;
	clip-path: inset(50%);
	opacity: 0;
}

.ckl-check input:disabled {
	cursor: default;
}

/* The geometry follows the admin toggle (OD-133, plan 0.5.7 item 2): 44 x 24 track, 18 px knob, 3 px inset, 5 x 9 px
   check mark. Both scopes are border-box, so the 2 px track border sits inside the 44 x 24 box; the knob insets are
   1 px inside the border, which is 3 px from the outer edge and keeps the 18 px knob inside the 20 px inner height. */
.ckl-switch {
	position: relative;
	flex: none;
	width: 2.75rem;
	height: 1.5rem;
	margin-inline-start: auto;
	border: 2px solid var(--ckl-accent);
	border-radius: 999px;
	background: var(--ckl-bg);
	transition: background-color var(--ckl-motion) ease;
}

.ckl-switch-knob {
	position: absolute;
	inset-block-start: 0.0625rem;
	inset-inline-start: 0.0625rem;
	width: 1.125rem;
	height: 1.125rem;
	border-radius: 50%;
	background: var(--ckl-accent);
	transition: inset-inline-start var(--ckl-motion) ease;
}

/* The state of the row reads from the label with :has() (Baseline 2023: Chrome and Edge 105, Safari 15.4, Firefox 121; sources
   MDN and caniuse, version numbers [UNVERIFIED], not re-fetched). No fallback is possible without :has(), because the input is
   inside the wrapper and no sibling combinator reaches it; browsers older than that show the track and the knob in the off look. */
.ckl-check:has(input:checked) .ckl-switch {
	background: var(--ckl-accent);
}

/* The checked knob is white-like (the background colour) on the accent track, and the check mark is drawn in the text colour:
   background against accent is the pair the colour guard enforces at 3:1, text against background the one at 4.5:1, in the
   light and the dark palette (settings.php:776, 807; contrast.php:96-121). The off knob, also under an indeterminate input,
   is drawn in the accent colour on the background track, the same 3:1 pair, and the accent border marks the track edge. */
.ckl-check:has(input:checked) .ckl-switch .ckl-switch-knob {
	inset-inline-start: calc(100% - 1.1875rem);
	background: var(--ckl-bg);
}

.ckl-check:has(input:checked) .ckl-switch .ckl-switch-knob::before {
	content: "";
	position: absolute;
	inset-block-start: 0.1875rem;
	inset-inline-start: 0.375rem;
	width: 0.3125rem;
	height: 0.5625rem;
	border: solid var(--ckl-text);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ckl-check:has(input:indeterminate) .ckl-switch .ckl-switch-knob::before {
	content: "";
	position: absolute;
	inset-block-start: 0.5rem;
	inset-inline-start: 0.25rem;
	width: 0.625rem;
	height: 0;
	border-block-start: 2px solid var(--ckl-bg);
}

.ckl-check:has(input:focus-visible) .ckl-switch {
	outline: 2px solid var(--ckl-text);
	outline-offset: 2px;
}

/* The mandatory switch (follow-up 0.5.7) is checked and cannot be changed, so it must not wear the brand colour: only track and
   border become a neutral grey mixed from the text colour. The knob keeps the white-like background colour and its check mark the
   text colour, as in every checked state: the mark on the knob is the text-on-background pair the guard enforces at 4.5:1 in every
   palette, and the knob against the grey track is the pair of a disabled control, which is exempt from the minimums and is not
   guarded; knob position and the check mark still carry the state, so it is not carried by colour alone. The row shows the
   not-allowed cursor. The plain declarations before the color-mix() lines are the fallback where color-mix() is not supported: the
   off look, still with the knob on the right. No hover or focus effect applies: the rows have no hover rule, and a disabled input
   cannot take focus. */
.ckl-check:has(input:disabled) .ckl-switch {
	border-color: var(--ckl-text);
	background: var(--ckl-bg);
	border-color: color-mix(in srgb, var(--ckl-text) 25%, var(--ckl-bg));
	background: color-mix(in srgb, var(--ckl-text) 25%, var(--ckl-bg));
	transition: none;
}

.ckl-dialog .ckl-check.ckl-mandatory,
.ckl-first-box .ckl-check.ckl-mandatory {
	cursor: not-allowed;
}

/* After the rules above, so the equal-specificity later rule does not win: the dialog and the switch stand still when the
   visitor asked for reduced motion. */
@media (prefers-reduced-motion: reduce) {
	.ckl-dialog,
	.ckl-switch,
	.ckl-switch-knob {
		transition: none;
	}
}

/* A theme (reported: Themify) draws its own :checked:before mark on checkboxes; inside our dialog the native box already has one.
   The selector is more specific than the usual theme rule and touches nothing outside our surfaces. The reset must cover the first
   card as well: its mandatory row carries a checked, disabled input, and until now only the dialog was covered, so a theme mark
   could paint a third item on that row. Whether that mark is the reported item is [UNVERIFIED] without computed styles on the
   theme; the staging case reads them. The native mark and the mixed state stay. */
.ckl-dialog .ckl-check input:checked::before,
.ckl-dialog .ckl-check input:checked::after,
.ckl-first-box .ckl-check input:checked::before,
.ckl-first-box .ckl-check input:checked::after {
	content: none;
}

@media (max-width: 30em) {
	.ckl-dialog {
		padding: 1rem;
	}

	.ckl-dialog .ckl-btn {
		flex-basis: 100%;
	}
}

/* The notice on a form whose service is held back (OD-65). It sits inside the form, on the colours of the dialog, and uses two classes
   like the dialog, so a theme rule on every paragraph or every button does not reach it. */
.ckl-form-notice {
	box-sizing: border-box;
	margin: 1rem 0;
	padding: 1rem;
	border: 2px solid var(--ckl-text);
	border-radius: var(--ckl-radius);
	background: var(--ckl-bg);
	color: var(--ckl-text);
	font-size: var(--ckl-font-size);
	line-height: 1.5;
	text-align: start;
}

.ckl-form-notice .ckl-form-notice-text {
	margin: 0 0 0.75rem;
	padding: 0;
	color: inherit;
	font-size: 1em;
	line-height: inherit;
}

.ckl-form-notice,
.ckl-form-notice .ckl-form-notice-text,
.ckl-form-notice .ckl-form-notice-service,
.ckl-form-notice .ckl-form-notice-btn {
	transition: none;
	animation: none;
}

.ckl-form-notice .ckl-form-notice-service {
	color: inherit;
	font-weight: 700;
}

.ckl-form-notice .ckl-form-notice-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
}

.ckl-form-notice .ckl-form-notice-btn {
	flex: 1 1 9rem;
	min-block-size: 44px;
	margin: 0;
	padding: 0.5em 1em;
	border: 2px solid var(--ckl-accent);
	border-radius: var(--ckl-button-radius, var(--ckl-radius));
	box-shadow: none;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	appearance: none;
}

.ckl-form-notice .ckl-form-notice-btn--solid {
	background: var(--ckl-accent);
	color: var(--ckl-accent-text);
}

.ckl-form-notice .ckl-form-notice-btn--outline {
	background: var(--ckl-bg);
	color: var(--ckl-text);
}

.ckl-form-notice .ckl-form-notice-btn:disabled {
	cursor: default;
	opacity: 0.6;
}

.ckl-form-notice .ckl-form-notice-btn:focus-visible {
	outline: 2px solid var(--ckl-accent);
	outline-offset: 2px;
}

/* The placeholder of a held-back frame (plan 0.5). It takes the place of the iframe: at most the width of its container (OD-88), a common ratio from its class (16:9 without
   one) that the content may enlarge, the colours of the dialog, two classes per rule so a theme rule on every paragraph or button does not reach it. A preview image
   (class ckl-embed-preview, an img directly inside, optional) lies behind the panel; the panel carries its own background, so the text keeps its contrast with any image
   and without one. The height is capped at 16rem (--ckl-embed-max-height, OD-114); the content's automatic minimum size wins over the cap, so the text and the two buttons
   grow the box only when they need it. No transition, no animation. */
.ckl-embed {
	--ckl-embed-max-height: 16rem;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	inline-size: 100%;
	max-inline-size: 100%;
	max-block-size: var(--ckl-embed-max-height);
	aspect-ratio: 16 / 9;
	margin: 1rem 0;
	padding: 1rem;
	overflow: hidden;
	isolation: isolate;
	border: 2px solid var(--ckl-text);
	border-radius: var(--ckl-radius);
	background: var(--ckl-bg);
	color: var(--ckl-text);
	font-size: var(--ckl-font-size);
	line-height: 1.5;
	text-align: center;
	transition: none;
	animation: none;
}

.ckl-embed.ckl-embed--r-4-3 {
	aspect-ratio: 4 / 3;
}

.ckl-embed.ckl-embed--r-3-2 {
	aspect-ratio: 3 / 2;
}

.ckl-embed.ckl-embed--r-1-1 {
	aspect-ratio: 1 / 1;
}

.ckl-embed.ckl-embed--r-21-9 {
	aspect-ratio: 21 / 9;
}

.ckl-embed.ckl-embed--r-9-16 {
	aspect-ratio: 9 / 16;
}

.ckl-embed.ckl-embed--r-3-4 {
	aspect-ratio: 3 / 4;
}

.ckl-embed.ckl-embed--r-2-3 {
	aspect-ratio: 2 / 3;
}

.ckl-embed > .ckl-embed-preview {
	position: absolute;
	inset: 0;
	z-index: -1;
	inline-size: 100%;
	block-size: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	object-fit: cover;
}

.ckl-embed .ckl-embed-panel {
	box-sizing: border-box;
	max-inline-size: 100%;
	padding: 1rem;
	border-radius: var(--ckl-radius);
	background: var(--ckl-bg);
	color: var(--ckl-text);
}

.ckl-embed .ckl-embed-text {
	margin: 0 0 0.75rem;
	padding: 0;
	color: inherit;
	font-size: 1em;
	line-height: inherit;
	overflow-wrap: anywhere;
}

.ckl-embed .ckl-embed-service {
	color: inherit;
	font-weight: 700;
}

.ckl-embed .ckl-embed-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
}

.ckl-embed .ckl-embed-btn {
	flex: 1 1 9rem;
	min-block-size: 44px;
	margin: 0;
	padding: 0.5em 1em;
	border: 2px solid var(--ckl-accent);
	border-radius: var(--ckl-button-radius, var(--ckl-radius));
	box-shadow: none;
	font-family: inherit;
	font-size: 1em;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	appearance: none;
	transition: none;
	animation: none;
}

.ckl-embed .ckl-embed-btn--solid {
	background: var(--ckl-accent);
	color: var(--ckl-accent-text);
}

.ckl-embed .ckl-embed-btn--outline {
	background: var(--ckl-bg);
	color: var(--ckl-text);
}

.ckl-embed .ckl-embed-btn:disabled {
	cursor: default;
	opacity: 0.6;
}

.ckl-embed .ckl-embed-btn:focus-visible {
	outline: 2px solid var(--ckl-accent);
	outline-offset: 2px;
}
