/*
 * formularfeld - ALL form fields of the shop as ONE component, defined here once (rules and tokens), in one family:
 *   text fields (input, textarea), select (native select + open list: fieldset.select_ul, .basket_menge), checkbox and radio (.liste_checkbox)
 *   and the radio dot (input.radio2). All kinds share ONE box, ONE set of states and ONE set of state tokens:
 *     - box: white, very light 1 px frame, no corners; hover = frame 220, ground 250 and a faint inner glow; open/focus = frame 210;
 *     - bottom line (2 px, grows from the middle): pale green = valid, pink = error, red = active, green on top when valid and active;
 *     - label: grey, inside the field; small, bold and on top once the field is focused, filled or open; red when active, green when valid,
 *       red on error; the checkbox frame, its pointer and the focus ring use the same error / focus tokens;
 *     - disabled: half transparent, for fields and for checkboxes alike (--field-opacity-off).
 * The look is the look the shop has today, value for value: every state of every kind renders pixel for pixel like the legacy rules, also with
 * those rules removed (see the verification notes of the order). The geometry is the geometry of the shop as well (control padding
 * 1.5 em .5 em .5 em, label 1.25 em / 1 em, em units), so nothing moves.
 *
 * Rewrite of existing rules: same selectors and classes, loaded later (preview stylesheet); :where() adds no specificity, so every rule ranks like the
 * plain selector of the shop and every more specific rule (checkout, article page, footer newsletter, overlay) still wins exactly as before. The
 * variant card of the article page (.hat_karte) and the dark filter panel (.content_usicht_filter) keep their own rules. Markup and the classes bound
 * by JavaScript stay unchanged (fieldset, highlight, label, check, error, selected, static, top, fix, .info, label em, .select_ul, ul li, .optgroup,
 * .basket_menge, .liste_checkbox, .checkbox, .radio2).
 *
 * What is new and invisible: tokens instead of literals; states as variables (one mechanism per part); :focus-within does what the script class
 * .highlight does; the same hover for every field kind; motion only on colour, opacity and width and none under prefers-reduced-motion;
 * forced-colors handling; a keyboard-reachable checkbox input and a 44 px touch target for checkbox and radio. All sizes and colours are
 * --field-* tokens in the ONE :root below (the neutral greys of the shop's look are literal token values, the rest derives from --color-* roles);
 * the tick, the list arrows and the radio dot are glyphs of the shop's icon font (--field-icon-font); the select chevron is the shop's arrow.svg,
 * inlined as a data URL (no request, nothing external in a draft package).
 */

:root {
	/* Geometry (em like the shop: it follows the font size of the page) */
	--field-border-width: 1px;
	--field-pad: 1.5em .5em .5em;
	--field-pad-qty: 1em;
	--field-textarea-size: 1em;
	--field-label-gap: .5em;
	--field-label-size: 1.25em;
	--field-label-size-small: 1em;
	--field-label-size-list: 1.1em;
	--field-label-top: .8em;
	--field-label-top-small: .3em;
	--field-label-top-mid: 50%;
	--field-label-lh: 1em;
	--field-label-mid: translate3d(0, -50%, 0);
	--field-label-top-shift: translate3d(0, 0, 0);
	--field-label-weight: normal;
	--field-label-weight-strong: bold;
	--field-line-h: 2px;
	--field-info-pad: .5em;
	--field-chevron-size: 1em;
	--field-chevron-inset: 1em;
	--field-ring-width: 2px;
	--field-ring-gap: 2px;
	--field-ring-pull: 8px;
	--field-hidden-size: 1px;
	--field-hit-side: max(.8125rem, 13px);
	--field-hit-top: max(1rem, 16px);
	--field-size-touch: 16px;
	--field-min-touch: 44px;
	--field-control-min-touch: 3.125em;
	--field-pad-qty-touch: 1em .4em;
	--field-chevron-qty-touch: .55em;
	--field-chevron-qty-inset-touch: .2em;

	/* Motion */
	--field-motion: .1s ease;
	--field-line-motion: .3s;
	--field-label-motion: .05s ease-out;

	/* Colours: the box */
	--field-bg: var(--color-surface);
	--field-bg-hover: rgb(250, 250, 250);
	--field-border: rgb(230, 230, 230);
	--field-border-hover: rgb(220, 220, 220);
	--field-border-open: rgb(210, 210, 210);
	--field-glow: inset 0 0 2px var(--field-border);
	--field-lift-off: .5em .5em 0 transparent;
	--field-lift-on: .5em .5em 0 rgba(220, 220, 220, .2);

	/* Colours: the shared states (field, checkbox, radio) */
	--field-error: var(--color-brand);
	--field-error-soft: rgb(252, 176, 198);
	--field-focus: var(--color-brand);
	--field-valid: rgb(4, 173, 0);
	--field-valid-soft: rgb(194, 255, 193);
	--field-valid-text: rgb(3, 120, 0);
	--field-opacity-off: .5;
	--field-label-color: rgb(150, 150, 150);
	--field-info-bg: var(--color-brand);
	--field-info-text: rgb(255, 255, 255);
	--field-chevron: url("data:image/svg+xml,%3Csvg data-name='Ebene 1' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 12.8'%3E%3Cpath d='M9.44 12.57a.8.8 0 0 0 1.12 0l9.2-9.17a.76.76 0 0 0 .24-.56.74.74 0 0 0-.24-.55L17.7.23a.76.76 0 0 0-.55-.23.79.79 0 0 0-.56.23L10 6.8 3.41.23A.79.79 0 0 0 2.85 0a.8.8 0 0 0-.56.23l-2 2.06a.74.74 0 0 0-.29.55.76.76 0 0 0 .24.56z' fill='%231d1d1b'/%3E%3C/svg%3E");
	--field-list-border: rgb(205, 205, 205);
	--field-list-bg: rgb(252, 252, 252);
	--field-list-text: rgb(100, 100, 100);
	--field-list-max: 21.5em;
	--field-list-lift-up: 0 -.3em .1em .3em rgba(0, 0, 0, .05);
	--field-list-lift-up-gap: 2.4em;
	--field-row-pad: .6em .6em .6em 1em;
	--field-row-line: rgba(80, 80, 80, .2);
	--field-row-bg: rgb(252, 252, 252);
	--field-row-bg-chosen: rgb(235, 235, 235);
	--field-row-bg-hover: rgb(225, 225, 225);
	--field-row-text-hover: rgb(50, 50, 50);
	--field-row-line-hover: rgba(50, 50, 50, .2);
	--field-row-bg-aim: rgb(245, 245, 245);
	--field-row-line-aim: rgba(70, 70, 70, .2);
	--field-row-white: rgb(255, 255, 255);
	--field-row-white-hover: rgb(245, 245, 245);
	--field-row-arrow: rgb(0, 0, 0);
	--field-row-arrow-hover: rgb(120, 120, 120);
	--field-row-arrow-gap: .5em;
	--field-row-motion: .3s;
	--field-row-sale: rgb(200, 0, 60);
	--field-row-stock: rgb(0, 200, 0);
	--field-row-tag-gap: 1em;
	--field-group-bg: rgb(220, 220, 220);
	--field-group-line: rgb(210, 210, 210);
	--field-group-pad: .6em .5em;

	/* Icon font of the shop (glyphs of the list arrows, tick and radio dot) */
	--field-icon-font: slewoFontIco;
	--field-glyph-next: "\25BA";
	--field-glyph-down: "\25BC";
	--field-glyph-up: "\25B2";
	--field-glyph-man: "\2642";
	--field-glyph-woman: "\2640";
	--field-glyph-tick: "\f037";

	/* Checkbox and radio (.liste_checkbox) and radio dot (.radio2) */
	--field-box-size: 1.5em;
	--field-box-w: 1px;
	--field-box-w-on: 2px;
	--field-box-frame: rgb(200, 200, 200);
	--field-box-frame-on: rgb(0, 0, 0);
	--field-box-radius: .3em;
	--field-box-gap: .5em;
	--field-box-row-gap: .5em;
	--field-box-motion: .1s ease;
	--field-tick-size: 1.8em;
	--field-tick-halo-size: 2em;
	--field-tick-halo: rgb(255, 255, 255);
	--field-tick-motion: .2s;
	--field-box-error-pointer: 10px;
	--field-box-error-shift: -1em;
	--field-note-gap: .5em;
	--field-note-bar: 5px;
	--field-note-bar-color: rgb(215, 215, 215);
	--field-radio-frame: rgb(220, 220, 220);
	--field-radio-dot: rgb(0, 0, 0);
	--field-radio-dot-size: 1.6em;
	--field-radio-dot-x: 60%;
	--field-radio-motion: .3s;
}

/* ------------------------------------------------------------------ Box (every field kind) */

/* Selector conventions: `fieldset:where(:not(.hat_karte))` is every fieldset except the variant card of the article page; :where() adds no
   specificity, so these rules rank like the plain `fieldset` of the shop. `FIELD` below stands for
   `:has(> :is(select, input:not([type=hidden],[type=checkbox],[type=radio],[type=button],[type=submit],[type=image],[type=file]), textarea))`
   (a fieldset that holds a text field, a textarea or a select). States are variables on the fieldset, ONE rule per part paints them. */
fieldset:where(:not(.hat_karte)) {
	position: relative;
	border: var(--field-border-width) solid var(--field-frame-now, var(--field-border));
	background-color: var(--field-bg-now, var(--field-bg));
	box-shadow: var(--field-shadow-now, none);
	transition: border-color var(--field-motion), background-color var(--field-motion);
}

/* open or active: frame one step darker (JavaScript sets .highlight / .selected, :focus-within does the same without it) */
fieldset:is(.highlight, .selected, :focus-within):where(:not(.hat_karte)) {
	--field-frame-now: var(--field-border-open);
}

fieldset.select_ul:where(:not(.hat_karte)) {
	overflow: visible;
	--field-shadow-now: var(--field-lift-off);
}

/* hover only with a real pointer: frame, ground and a faint inner glow, the same for every field kind (not on disabled fields) */
@media (hover: hover) and (pointer: fine) {
	fieldset:where(:has(> :is(select, input:not([type=hidden],[type=checkbox],[type=radio],[type=button],[type=submit],[type=image],[type=file]), textarea)):not(:has(> :disabled), .hat_karte)):hover {
		--field-frame-now: var(--field-border-hover);
		--field-bg-now: var(--field-bg-hover);
		--field-shadow-now: var(--field-glow);
	}
}

fieldset.select_ul.selected:where(:not(.hat_karte)) {
	--field-shadow-now: var(--field-lift-on);
}

/* disabled: half transparent like a disabled checkbox, no pointer */
fieldset:where(:has(> :is(input, select, textarea):disabled):not(.hat_karte)) {
	opacity: var(--field-opacity-off);
	cursor: not-allowed;
}

/* ------------------------------------------------------------------ Bottom line (every field kind) */

/* Two layers growing from the middle, 2 px, covering the frame and the last pixel inside; they are full width all the time and grow by scaleX
   (transform only, no layout animation). Soft (::before, no motion): pale green when valid, pink on error. Strong (::after, .3 s): red while the
   field is active, green when valid. */
fieldset:where(:not(.hat_karte, .password_strength))::before,
fieldset:where(:not(.hat_karte, .password_strength))::after {
	content: "";
	position: absolute;
	inset-block-end: calc(-1 * var(--field-border-width));
	inset-inline: 0;
	inline-size: auto;
	border-block-end: var(--field-line-h) solid;
}

fieldset:where(:not(.hat_karte, .password_strength))::before {
	transform: scaleX(var(--field-soft-scale, 0));
	border-block-end-color: var(--field-soft-color, var(--field-valid-soft));
	transition: none;
}

fieldset:where(:not(.hat_karte, .password_strength))::after {
	transform: scaleX(var(--field-line-scale, 0));
	border-block-end-color: var(--field-line-color, var(--field-focus));
	transition: transform var(--field-line-motion), border-color var(--field-line-motion);
}

fieldset.check:where(:not(.hat_karte)) {
	--field-line-color: var(--field-valid);
}

fieldset:is(.check, .error):where(:not(.hat_karte)) {
	--field-soft-scale: 1;
}

fieldset.error:where(:not(.hat_karte)) {
	--field-soft-color: var(--field-error-soft);
}

fieldset:is(.highlight, :focus-within):where(:not(.hat_karte)) {
	--field-line-scale: 1;
}

/* ------------------------------------------------------------------ Label (every field kind) */

/* At rest inside the field, grey; small, bold and on top once the field is focused, filled (not placeholder-shown), or fixed by the script
   (.fix / .label). The list variant (.select_ul) is bold and centred at rest. Only the colour is animated. */
fieldset:where(:not(.hat_karte)) label {
	position: absolute;
	inset-block-start: var(--field-label-top-now, var(--field-label-top));
	inset-inline-start: var(--field-label-gap);
	z-index: 1;
	inline-size: calc(100% - 2 * var(--field-label-gap));
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: var(--field-label-lh);
	pointer-events: none;
	cursor: var(--field-label-cursor-now, text);
	font-size: var(--field-label-size-now, var(--field-label-size));
	font-weight: var(--field-label-weight-now, var(--field-label-weight));
	color: var(--field-label-color-now, var(--field-label-color));
	transform: var(--field-label-shift-now, none);
	transition: color var(--field-label-motion);
}

fieldset:where(:not(.hat_karte)) select + label {
	--field-label-cursor-now: default;
}

fieldset:where(:not(.hat_karte)) input:focus + label,
input:not(:placeholder-shown) + label,
fieldset:is(.fix, .label):where(:not(.hat_karte)) label {
	--field-label-size-now: var(--field-label-size-small);
	--field-label-top-now: var(--field-label-top-small);
	--field-label-weight-now: var(--field-label-weight-strong);
}

fieldset.select_ul:where(:not(.hat_karte)) label {
	--field-label-size-now: var(--field-label-size-list);
	--field-label-top-now: var(--field-label-top-mid);
	--field-label-shift-now: var(--field-label-mid);
	--field-label-cursor-now: pointer;
}

fieldset.select_ul:is(.static, .check, .selected):where(:not(.hat_karte)) label {
	--field-label-size-now: var(--field-label-size-small);
	--field-label-top-now: var(--field-label-top-small);
	--field-label-shift-now: var(--field-label-top-shift);
}

fieldset:is(.highlight, :focus-within):where(:not(.hat_karte)) label {
	--field-label-color-now: var(--field-focus);
}

fieldset.check:is(.highlight, :focus-within):not(.error):where(:not(.hat_karte)) label {
	--field-label-color-now: var(--field-valid-text);
}

fieldset.error:where(:not(.hat_karte)) label {
	--field-label-color-now: var(--field-error);
}

/* ------------------------------------------------------------------ Control (input, textarea, select) */

fieldset:where(:not(.hat_karte)) :is(input, select, textarea) {
	inline-size: 100%;
	padding: var(--field-pad);
}

fieldset:where(:not(.hat_karte)) input {
	appearance: textfield;
}

fieldset:where(:not(.hat_karte)) input:disabled {
	pointer-events: none;
}

fieldset:where(:not(.hat_karte)) textarea {
	resize: vertical;
	font-size: var(--field-textarea-size);
}

.table_formular fieldset:where(:not(.hat_karte)) textarea {
	border: 0 none;
}

/* the browser focus ring is not drawn on the field (the box shows the state); a transparent outline turns into a system colour in forced-colors mode */
fieldset:where(:not(.hat_karte)) :is(input, textarea):focus {
	outline: var(--field-ring-width) solid transparent;
	outline-offset: calc(-1 * var(--field-ring-width));
}

/* Select: no browser look, the chevron is a background image, the value text sits under the label */
fieldset:where(:not(.hat_karte)) > select {
	position: relative;
	z-index: 2;
	block-size: auto;
	border: 0 none;
	border-radius: 0;
	appearance: none;
	background-image: var(--field-chevron);
	background-repeat: no-repeat;
	background-position: calc(100% - var(--field-chevron-inset)) 50%;
	background-size: var(--field-chevron-size) var(--field-chevron-size);
	cursor: pointer;
}

fieldset.select_ul.basket_menge:where(:not(.hat_karte)) > select {
	padding: var(--field-pad-qty);
	font-weight: bold;
}

.select_ul option {
	opacity: 0;
}

/* ------------------------------------------------------------------ Message of a field (checkout) */

.table_formular .info {
	padding: var(--field-info-pad);
	background: var(--field-info-bg);
	color: var(--field-info-text);
}

.table_formular .info::before {
	content: "Fehler: ";
	font-weight: bold;
}

/* ------------------------------------------------------------------ Select: open list, rows, groups */

/* Open list: appears below the field while the fieldset is .selected */
fieldset.select_ul:where(:not(.hat_karte)) > ul {
	position: absolute;
	inset-inline-start: calc(-1 * var(--field-border-width));
	inset-block-start: calc(100% + var(--field-border-width));
	z-index: 951;
	display: none;
	box-sizing: content-box;
	inline-size: 100%;
	max-block-size: var(--field-list-max);
	overflow: hidden scroll;
	border: var(--field-border-width) solid var(--field-list-border);
	border-block-start: 0;
	background: var(--field-list-bg);
	color: var(--field-list-text);
	box-shadow: var(--field-lift-on);
	cursor: pointer;
}

fieldset.select_ul.top:where(:not(.hat_karte)) > ul {
	inset-block-start: auto;
	inset-block-end: var(--field-list-lift-up-gap);
	box-shadow: var(--field-list-lift-up);
}

fieldset.select_ul.selected:where(:not(.hat_karte)) ul {
	display: block;
}

/* Row */
fieldset.select_ul:where(:not(.hat_karte)) ul li {
	margin: 0;
	padding: var(--field-row-pad);
	border-block-start: 1px solid var(--field-row-line);
	background: var(--field-row-bg);
	font-weight: bold;
	text-align: start;
	transition: background-color var(--field-row-motion), color var(--field-row-motion), border-color var(--field-row-motion);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li::before {
	content: var(--field-glyph-next);
	position: relative;
	inset-inline-start: 0;
	margin: 0;
	margin-inline-end: var(--field-row-arrow-gap);
	font-family: var(--field-icon-font);
	color: var(--field-row-arrow);
	transition: color var(--field-row-motion);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li:is(.in_stock, .in_sale) {
	display: flex;
}

fieldset.select_ul:where(:not(.hat_karte)) ul li:is(.in_stock, .in_sale)::after {
	flex: 1;
	margin-inline-start: var(--field-row-tag-gap);
	font-weight: bold;
	text-align: end;
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.in_sale::after {
	content: "SALE";
	color: var(--field-row-sale);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.in_stock::after {
	content: "LAGERND";
	color: var(--field-row-stock);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.select {
	background: var(--field-row-bg-chosen);
}

@media (hover: hover) and (pointer: fine) {
	fieldset.select_ul:where(:not(.hat_karte)) ul li:hover {
		border-block-start: 1px solid var(--field-row-line-hover);
		background: var(--field-row-bg-hover);
		color: var(--field-row-text-hover);
	}
}

@media (hover: hover) and (pointer: fine) {
	fieldset.select_ul:where(:not(.hat_karte)) ul li:hover::before {
		margin: 0 var(--field-row-arrow-gap);
		color: var(--field-row-arrow-hover);
	}
}

@media (hover: hover) and (pointer: fine) {
	fieldset.select_ul:where(:not(.hat_karte)) ul li:hover + li {
		border-block-start: 1px solid var(--field-row-line-hover);
	}
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.mouseover {
	border-block-start: 1px solid var(--field-row-line-aim);
	background: var(--field-row-bg-aim);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.mouseover + li {
	border-block-start: 1px solid var(--field-row-line-aim);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.white,
fieldset.select_ul:where(:not(.hat_karte)) ul li.white::before {
	color: var(--field-row-white);
}

@media (hover: hover) and (pointer: fine) {
	fieldset.select_ul:where(:not(.hat_karte)) ul li.white:hover {
		color: var(--field-row-white-hover);
	}
}

fieldset.select_ul:where(:not(.hat_karte)) ul li:first-child {
	border-block-start-width: 0;
}

/* Quantity in the cart: the rows read "1 x", the first one "0 x (delete)" */
fieldset.select_ul.basket_menge:where(:not(.hat_karte)) ul li::before {
	content: "";
}

fieldset.select_ul.basket_menge:where(:not(.hat_karte)) ul li::after {
	content: " x";
}

fieldset.select_ul.basket_menge:where(:not(.hat_karte)) ul li {
	white-space: nowrap;
}

fieldset.select_ul.basket_menge:where(:not(.hat_karte)) ul li[data-index="0"]::after {
	content: " x (l\00f6schen)";
}

/* Gender symbols in front of a row (after the quantity rows on purpose: same specificity, the later rule wins as in the shop) */
fieldset.select_ul:where(:not(.hat_karte)) ul li.symbol_mann::before {
	content: var(--field-glyph-man);
}

fieldset.select_ul:where(:not(.hat_karte)) ul li.symbol_frau::before {
	content: var(--field-glyph-woman);
}

/* Groups inside the list (optgroup): a grey bar that opens its own rows */
fieldset.select_ul:where(:not(.hat_karte)) .optgroup {
	padding: 0;
	border-block-start: 1px solid var(--field-group-line);
	background: var(--field-group-bg);
	text-align: center;
}

fieldset.select_ul:where(:not(.hat_karte)) .optgroup::before {
	display: none;
}

fieldset.select_ul:where(:not(.hat_karte)) .optgroup > span {
	display: block;
	padding: var(--field-group-pad);
}

fieldset.select_ul:where(:not(.hat_karte)) .optgroup > span::before,
fieldset.select_ul:where(:not(.hat_karte)) .optgroup > span::after {
	content: var(--field-glyph-down);
	margin: 0 var(--field-row-arrow-gap);
	font-family: var(--field-icon-font);
}

fieldset.select_ul:where(:not(.hat_karte)) .optgroup.select > span::before,
fieldset.select_ul:where(:not(.hat_karte)) .optgroup.select > span::after {
	content: var(--field-glyph-up);
}

fieldset.select_ul:where(:not(.hat_karte)) .optgroup > ul {
	display: none;
	margin: 0;
	border-block-start: 1px solid var(--field-group-line);
	text-align: start;
}

fieldset.select_ul:where(:not(.hat_karte)) .optgroup.select > ul {
	display: block;
}


/* ------------------------------------------------------------------ Checkbox, radio and radio dot */

/* The look of the shop, defined here once: 1.5 em box with a very light 1 px frame and soft corners; chosen or hovered the frame turns 2 px black
   and a thick black tick appears (drawn by the icon font of the shop twice: black glyph over a larger white one, the tick wipes in from the left);
   error = red 2 px frame and a red pointer in front of the row; disabled = half transparent. Values: --field-box-* / --field-tick-* tokens.
   Scope: nothing of it applies inside the category filter panel (.content_usicht_filter), a dark panel with its own rules. :where() keeps the
   specificity of the plain .liste_checkbox selector; a browser without complex :not() (before Chrome 88, Safari 14, Firefox 84) drops such a
   rule, then the rules of the shop stay as they are.
   Added by this component: the input stays reachable by keyboard (focus ring), the touch target grows to 44 px without moving anything,
   motion stops under prefers-reduced-motion. */

.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) li {
	position: relative;
	margin: 0;
	margin-block-end: var(--field-box-row-gap);
	white-space: nowrap;
	cursor: pointer;
}

.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) :disabled + label {
	opacity: var(--field-opacity-off);
}

/* The input stays keyboard operable (the rules of the shop hide it with display:none): only invisible, focus ring on the box */
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input[type="checkbox"],
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input[type="radio"] {
	display: block;
	position: absolute;
	inline-size: var(--field-hidden-size);
	block-size: var(--field-hidden-size);
	margin: calc(-1 * var(--field-hidden-size));
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0 none;
}

/* Box */
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	inline-size: var(--field-box-size);
	block-size: var(--field-box-size);
	margin-inline-end: var(--field-box-gap);
	border: var(--field-box-w) solid var(--field-box-frame);
	border-radius: var(--field-box-radius);
	cursor: pointer;
	transition: border-color var(--field-box-motion);
}

/* Chosen, or the row/list is hovered (only with a real pointer): 2 px black frame */
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) > input:is([type="checkbox"], [type="radio"]):checked + label > span,
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) li input:is([type="checkbox"], [type="radio"]):checked + label > span {
	border: var(--field-box-w-on) solid var(--field-box-frame-on);
}

@media (hover: hover) and (pointer: fine) {
	.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)):hover > input:is([type="checkbox"], [type="radio"]) + label > span,
	.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) li:hover input:is([type="checkbox"], [type="radio"]) + label > span {
		border: var(--field-box-w-on) solid var(--field-box-frame-on);
	}
}

/* Tick: ::before = black glyph on top, ::after = larger white one behind (thickens the stroke); the clip opens from the left and wipes it in */
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span::before,
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span::after {
	content: var(--field-glyph-tick);
	position: absolute;
	inset-inline-start: 0;
	inset-block-start: 50%;
	inline-size: 1em;
	overflow: hidden;
	clip-path: inset(0 100% 0 0);
	font-family: var(--field-icon-font);
	font-size: var(--field-tick-size);
	z-index: 1;
	transform: translate3d(0, -50%, 0);
	transition: clip-path var(--field-tick-motion);
}

.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span::after {
	z-index: 0;
	font-size: var(--field-tick-halo-size);
	font-weight: bolder;
	color: var(--field-tick-halo);
}

.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) > input:is([type="checkbox"], [type="radio"]):checked + label > span::before,
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) > input:is([type="checkbox"], [type="radio"]):checked + label > span::after,
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) li input:is([type="checkbox"], [type="radio"]):checked + label > span::before,
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) li input:is([type="checkbox"], [type="radio"]):checked + label > span::after {
	clip-path: inset(0);
}

/* Error: red 2 px frame on every box in the label and a red pointer in front of the row */
.liste_checkbox.error:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label span {
	border: var(--field-box-w-on) solid var(--field-error);
}

.liste_checkbox.error:where(:not(.content_usicht_filter .liste_checkbox)) {
	position: relative;
}

.liste_checkbox.error:where(:not(.content_usicht_filter .liste_checkbox))::before {
	content: " ";
	position: absolute;
	inset-inline-start: var(--field-box-error-shift);
	inset-block-start: 50%;
	border: var(--field-box-error-pointer) solid;
	border-color: transparent;
	border-inline-start-color: var(--field-error);
	transform: translate3d(0, -50%, 0);
}

span.liste_checkbox {
	font-weight: bold;
	text-align: start;
}

/* Note under a checkbox (checkout): grey bar, opens when the box is checked */
.table_formular input[type="checkbox"] ~ div {
	display: none;
	inline-size: 100%;
	margin: var(--field-note-gap);
	padding: 0 var(--field-note-gap);
	border-inline-start: var(--field-note-bar) solid var(--field-note-bar-color);
}

.table_formular input[type="checkbox"]:checked:not(:disabled) ~ div {
	display: block;
}

/* Radio dot (input.radio2 + label): round, light frame; chosen = black frame and a black dot with a white halo */
input.radio2[type="radio"] + label {
	position: relative;
	display: block;
	inline-size: var(--field-box-size);
	block-size: var(--field-box-size);
	border: var(--field-box-w) solid var(--field-radio-frame);
	border-radius: 100%;
	transition: border-color var(--field-radio-motion);
}

input.radio2[type="radio"]:checked + label {
	border-color: var(--field-radio-dot);
}

input.radio2[type="radio"] + label::before,
input.radio2[type="radio"] + label::after {
	content: var(--field-glyph-tick);
	position: absolute;
	inset-inline-start: var(--field-radio-dot-x);
	inset-block-start: 50%;
	font-family: var(--field-icon-font);
	font-size: var(--field-radio-dot-size);
	color: var(--field-radio-dot);
	opacity: 0;
	transform: translate3d(-50%, -50%, 0);
	transition: opacity var(--field-radio-motion);
}

input.radio2[type="radio"] + label::before {
	inset-inline-start: calc(var(--field-radio-dot-x) + 1px);
	inset-block-start: calc(50% + 1px);
	color: var(--field-tick-halo);
}

input.radio2[type="radio"]:checked + label::before,
input.radio2[type="radio"]:checked + label::after {
	opacity: 1;
}

/* Touch target: the label (inline) grows by 16 px above and below and 13 px at the sides and takes the sides back with a negative margin, so
   the box (the first thing in the label) is reachable on at least 44 x 44 px while nothing in the flow, no pixel and no link of the text moves
   (vertical padding of an inline box does not enter the line height). */
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input[type="checkbox"]:not(:disabled) + label,
.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input[type="radio"]:not(:disabled) + label {
	padding-block: var(--field-hit-top);
	padding-inline: var(--field-hit-side);
	margin-inline: calc(-1 * var(--field-hit-side));
}

/* Keyboard focus: ring on the label around the whole row (box and text); the input itself is invisible. The ring sits inside the touch padding,
   so it hugs the row and does not reach into the neighbour rows. */
:is(.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) > input, .liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) li input):is([type="checkbox"], [type="radio"]):focus-visible + label {
	outline: var(--field-ring-width) solid var(--field-focus);
	outline-offset: calc(-1 * var(--field-ring-pull));
}

/* Radio dot: the ring on the label (the input is not visible) */
input.radio2[type="radio"]:focus-visible + label {
	outline: var(--field-ring-width) solid var(--field-focus);
	outline-offset: var(--field-ring-gap);
}

/* ------------------------------------------------------------------ Small screens: touch size */

/* Phones: the shop scales the page down at this width (style_responsive.css: html at .9em, body .875em), which leaves the fields at 12.6 px text and
   a 41 px frame: iOS Safari zooms into a text field below 16 px, and a target below 44 px is hard to hit. From here on the field text is 16 px and the
   frame is at least 44 px. The geometry of the field is in em of the fieldset (padding, label, line, chevron, quantity field, message), so one font size
   on the fieldset moves everything together and nothing overlaps. Not for the variant card, the header search, the search overlay, the card payment
   window (.zahlung_overlay, own approved design and size) and the filter panel. */
@media only screen and (max-width: 25em) {
	fieldset:where(:not(.hat_karte, header fieldset, .livesearch fieldset, .zahlung_overlay fieldset, .content_usicht_filter fieldset)) {
		font-size: var(--field-size-touch);
	}

	fieldset:where(:has(> :is(select, input:not([type=hidden],[type=checkbox],[type=radio],[type=button],[type=submit],[type=image],[type=file]), textarea)):not(.hat_karte, header fieldset, .livesearch fieldset, .zahlung_overlay fieldset, .content_usicht_filter fieldset)) {
		min-block-size: var(--field-min-touch);
	}

	/* the native select and the text field differ by one pixel in their line box at this size: one common minimum keeps the family at one height */
	fieldset:where(:not(.hat_karte, header fieldset, .livesearch fieldset, .zahlung_overlay fieldset, .content_usicht_filter fieldset)) > :is(select, input:not([type=hidden],[type=checkbox],[type=radio],[type=button],[type=submit],[type=image],[type=file])) {
		min-block-size: var(--field-control-min-touch);
	}

	/* the quantity field of the basket is a narrow box (about 50 px): at 16 px a two- or three-digit value would run into the chevron, so its side
	   padding is smaller and the chevron is smaller and sits closer to the edge */
	fieldset.select_ul.basket_menge:where(:not(.hat_karte, header fieldset, .livesearch fieldset, .zahlung_overlay fieldset, .content_usicht_filter fieldset)) {
		--field-pad-qty: var(--field-pad-qty-touch);
		--field-chevron-size: var(--field-chevron-qty-touch);
		--field-chevron-inset: var(--field-chevron-qty-inset-touch);
	}
}

/* ------------------------------------------------------------------ Reduced motion: no movement, colour stays */

@media (prefers-reduced-motion: reduce) {
	fieldset:where(:not(.hat_karte)),
	fieldset:where(:not(.hat_karte, .password_strength))::after,
	fieldset:where(:not(.hat_karte)) label,
	fieldset.select_ul:where(:not(.hat_karte)) ul li,
	fieldset.select_ul:where(:not(.hat_karte)) ul li::before {
		transition: none;
	}

	.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span,
	.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span::before,
	.liste_checkbox:where(:not(.content_usicht_filter .liste_checkbox)) input:is([type="checkbox"], [type="radio"]) + label > span::after,
	input.radio2[type="radio"] + label,
	input.radio2[type="radio"] + label::before,
	input.radio2[type="radio"] + label::after {
		transition: none;
	}
}

/* ------------------------------------------------------------------ Forced-colors mode (Windows high contrast): shadows and colours are
   dropped, so every state needs a second signal that does not rely on colour: outline for the active and the erroneous field, wider frame
   for a chosen box or dot, the glyph itself */

@media (forced-colors: active) {
	fieldset:is(.highlight, .selected, :focus-within):where(:not(.hat_karte)) {
		outline: var(--field-ring-width) solid Highlight;
		outline-offset: calc(-1 * var(--field-ring-width));
	}

	fieldset.error:not(.highlight, .selected, :focus-within):where(:not(.hat_karte)) {
		outline: var(--field-ring-width) solid CanvasText;
		outline-offset: calc(-1 * var(--field-ring-width));
	}

	input.radio2[type="radio"]:checked + label {
		border-width: var(--field-box-w-on);
	}
}
