/**
 * Block erl/marketing-order — Werbematerial bestellen (docs/erl-marketing/PLAN.md §5.3).
 *
 * The signature is the cart slip: a white slip on a #F5F5F7 surface, a red 5px line on top (same
 * weight as the nav indicator and the mail line), the positions as rows, a perforation with two
 * notches, and below it the pickup details. Only theme tokens (--erl-*); buttons, the tab bar, the
 * close button and ALL form fields come from the theme's global CSS (buttons.css, inputs.css) —
 * there is deliberately no field styling in this file (CI.md → Formularfelder).
 *
 * Icons are files (assets/icons/*.svg) painted through a mask, so they follow `currentColor`.
 */

.erl-mkt {
	/*
	 * Blue-grey „Leihgabe" pair (CI: blue-grey/200 + /600). The theme has no token for it yet, so it
	 * is named once here instead of repeating the hex values. Deliberately not red: red means
	 * „act", blue-grey means „is lent, comes back".
	 */
	--erl-mkt-loan-bg: #dce4ea;
	--erl-mkt-loan-ink: #394c5d;
	--erl-mkt-sticky-top: 112px;
	--erl-mkt-motion: 150ms ease-out;

	position: relative;
}

.erl-mkt__head {
	margin-block-end: var(--erl-spacing-lg);
}

.erl-mkt__heading {
	margin: 0;
}

.erl-mkt__intro {
	max-inline-size: var(--erl-measure-text);
	margin-block: var(--erl-spacing-sm) 0;
	color: var(--erl-color-text-muted);
}

.erl-mkt__config {
	display: none;
}

.erl-mkt__notice-text {
	margin: 0;
	padding: 16px;
	border-radius: var(--erl-border-radius-md);
	background: var(--erl-color-warning-lightest);
	color: var(--erl-color-warning-dark);
}

.erl-mkt__preview-note {
	margin-block: 0 12px;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-text-muted);
}

/* --------------------------------------------------------------------- icons */
.erl-mkt__icon {
	display: inline-block;
	flex: 0 0 auto;
	inline-size: 20px;
	block-size: 20px;
	background-color: currentcolor;
	-webkit-mask: var(--erl-mkt-icon) center / contain no-repeat;
	mask: var(--erl-mkt-icon) center / contain no-repeat;
}

.erl-mkt__icon--bag {
	--erl-mkt-icon: url("../../icons/bag.svg");
}

.erl-mkt__icon--calendar {
	--erl-mkt-icon: url("../../icons/calendar.svg");
}

.erl-mkt__icon--minus {
	--erl-mkt-icon: url("../../icons/minus.svg");
}

.erl-mkt__icon--plus {
	--erl-mkt-icon: url("../../icons/plus.svg");
}

.erl-mkt__icon--x {
	--erl-mkt-icon: url("../../icons/x.svg");
	inline-size: 24px;
	block-size: 24px;
}

.erl-mkt__icon--zoom {
	--erl-mkt-icon: url("../../icons/zoom.svg");
}

.erl-mkt__icon--chevron-left {
	--erl-mkt-icon: url("../../icons/chevron-left.svg");
	inline-size: 24px;
	block-size: 24px;
}

.erl-mkt__icon--chevron-right {
	--erl-mkt-icon: url("../../icons/chevron-right.svg");
	inline-size: 24px;
	block-size: 24px;
}

.erl-mkt__icon--check {
	--erl-mkt-icon: url("../../icons/check.svg");
	inline-size: 28px;
	block-size: 28px;
}

/* -------------------------------------------------------------------- layout */
.erl-mkt__layout {
	display: grid;
	grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
	gap: var(--erl-spacing-lg);
	align-items: start;
	padding: var(--erl-spacing-lg);
	border-radius: var(--erl-border-radius-lg);
	background: var(--erl-color-bg-subtle);
}

.erl-mkt__main {
	min-inline-size: 0;
}

.erl-mkt__aside {
	position: sticky;
	inset-block-start: var(--erl-mkt-sticky-top);
	max-block-size: calc(100vh - var(--erl-mkt-sticky-top) - 24px);
	/* x hidden: the perforation's negative margins would otherwise add a horizontal scrollbar. */
	overflow: hidden auto;
}

/* ---------------------------------------------------------------------- tabs */
.erl-mkt__tabs {
	margin-block-end: 24px;
	padding-block: 4px;
	overflow-x: auto;
}

.erl-mkt__tabs .erl-tabbar__tab {
	white-space: nowrap;
}

/* ---------------------------------------------------------------------- grid */
.erl-mkt__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
}

/* At most two cards per row. From 601px two fit (≥ 256px each, also beside the slip at 992px+). */
@media (min-width: 601px) {
	.erl-mkt__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.erl-mkt__card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid transparent;
	border-radius: var(--erl-border-radius-lg);
	background: var(--erl-color-bg);
	box-shadow: var(--erl-shadow-sm);
}

.erl-mkt__card.is-in-cart {
	border-color: var(--erl-color-primary);
}

.erl-mkt__media {
	position: relative;
	aspect-ratio: 4 / 3;
	/* min-block-size 0: otherwise a portrait image stretches the box beyond its ratio. */
	min-block-size: 0;
	max-block-size: 250px;
	background: var(--erl-color-bg-subtle);
}

.erl-mkt__media img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
}

.erl-mkt__media-empty {
	position: absolute;
	inset: 0;
	margin: auto;
	inline-size: 48px;
	block-size: 48px;
	color: var(--erl-color-text-muted);
}

.erl-mkt__in-cart {
	position: absolute;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	display: grid;
	place-items: center;
	min-inline-size: 28px;
	block-size: 28px;
	padding-inline: 8px;
	border-radius: 100px;
	background: var(--erl-color-primary);
	color: #fff;
	font-size: var(--erl-fs-body-sm);
	font-weight: var(--erl-fw-bold);
	font-variant-numeric: tabular-nums;
}

.erl-mkt__card-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 12px;
	padding: 20px;
}

.erl-mkt__name {
	margin: 0;
	font-size: var(--erl-fs-h5);
	line-height: var(--erl-lh-h5);
	font-weight: var(--erl-fw-bold);
	color: var(--erl-color-heading);
}

.erl-mkt__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.erl-mkt__badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 100px;
	background: var(--erl-color-bg-subtle);
	color: var(--erl-color-text-muted);
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	font-weight: var(--erl-fw-medium);
}

.erl-mkt__badge--loan {
	background: var(--erl-mkt-loan-bg);
	color: var(--erl-mkt-loan-ink);
}

.erl-mkt__desc {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-text-muted);
}

.erl-mkt__desc.is-open {
	display: block;
}

.erl-mkt__desc > :first-child {
	margin-block-start: 0;
}

.erl-mkt__desc > :last-child {
	margin-block-end: 0;
}

.erl-mkt__more {
	align-self: flex-start;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--erl-color-primary);
	font-family: inherit;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	font-weight: var(--erl-fw-medium);
	cursor: pointer;
}

.erl-mkt__more:hover {
	color: var(--erl-color-primary-hover);
	text-decoration: underline;
}

.erl-mkt__more:focus-visible,
.erl-mkt__thumb:focus-visible,
.erl-mkt__step:focus-visible {
	outline: var(--erl-focus-ring);
	outline-offset: var(--erl-focus-ring-offset);
}

/* Thumbnail strip right under the picture: one line, scrolls sideways without moving the page. */
.erl-mkt__thumbs {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0;
	padding: 8px 10px 0;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	list-style: none;
}

.erl-mkt__thumbs > li {
	flex: 0 0 auto;
}

.erl-mkt__thumb {
	display: block;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 2px solid transparent;
	border-radius: var(--erl-border-radius-sm);
	background: none;
	cursor: pointer;
}

/* Whole picture is the „enlarge" button; the lens icon in the corner only says so. */
.erl-mkt__zoom {
	position: absolute;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.erl-mkt__zoom:focus-visible {
	outline: var(--erl-focus-ring);
	outline-offset: -4px;
}

.erl-mkt__zoom-icon {
	position: absolute;
	inset-block-end: 10px;
	inset-inline-end: 10px;
	display: grid;
	place-items: center;
	inline-size: 32px;
	block-size: 32px;
	border-radius: 50%;
	background: var(--erl-color-bg);
	color: var(--erl-color-text);
	box-shadow: var(--erl-shadow-sm);
}

.erl-mkt__thumb.is-active {
	border-color: var(--erl-color-primary);
}

.erl-mkt__thumb img {
	display: block;
	inline-size: 60px;
	block-size: 45px;
	object-fit: cover;
}

.erl-mkt__card-action {
	margin-block-start: auto;
	padding-block-start: 4px;
}

/* On a 230px card the hint wraps to two lines — the slot reserves both, so the buttons stay put. */
.erl-mkt__card-action .erl-mkt__limit {
	min-block-size: 2lh;
}

.erl-mkt__card-action .btn {
	inline-size: 100%;
	justify-content: center;
}

.erl-mkt__card-action .erl-mkt__stepper {
	inline-size: 100%;
	justify-content: space-between;
	/* Same height as the „In den Warenkorb" button it replaces (.btn renders 46px). */
	min-block-size: 46px;
	box-sizing: border-box;
}

/* ------------------------------------------------------------------- stepper */
.erl-mkt__stepper-wrap {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.erl-mkt__stepper {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	padding: 2px;
	border: 1px solid var(--erl-color-border);
	border-radius: 100px;
}

.erl-mkt__step {
	display: grid;
	place-items: center;
	inline-size: 36px;
	block-size: 36px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--erl-color-text);
	cursor: pointer;
}

.erl-mkt__step:hover {
	background: var(--erl-color-border-subtle);
}

.erl-mkt__step[aria-disabled="true"] {
	color: var(--erl-color-text-muted);
	opacity: 0.45;
	cursor: not-allowed;
}

.erl-mkt__step[aria-disabled="true"]:hover {
	background: none;
}

/*
 * The number is a field, but it is part of the stepper: the frame is the stepper's, so here only
 * type, width and alignment are set — no second field look. (Documented exception to „no field CSS
 * in blocks", CI.md → Formularfelder.) The selector is (0,3,1) to beat the global
 * input[type="text"] and its :hover/:focus-visible states without !important.
 */
.erl-mkt .erl-mkt__stepper input.erl-mkt__qty {
	flex: 0 1 auto;
	inline-size: 4.5ch;
	min-inline-size: 0;
	min-block-size: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	text-align: center;
	font-size: inherit;
	font-weight: var(--erl-fw-bold);
	font-variant-numeric: tabular-nums;
}

.erl-mkt__card-action .erl-mkt__stepper input.erl-mkt__qty {
	flex: 1 1 auto;
}

/* The focus ring belongs to the whole stepper, since the field itself has no frame. */
.erl-mkt__stepper:has(input.erl-mkt__qty:focus-visible) {
	outline: var(--erl-focus-ring);
	outline-offset: var(--erl-focus-ring-offset);
}

/* Fixed slot: one line of the hint's font, occupied whether or not there is text. */
.erl-mkt__limit {
	display: block;
	min-block-size: 1lh;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-text-muted);
}

/* ---------------------------------------------------------------------- slip */
.erl-mkt__slip {
	position: relative;
	padding: 29px 24px 24px;
	border-radius: var(--erl-border-radius-md);
	background: var(--erl-color-bg);
	box-shadow: var(--erl-shadow-sm);
}

/* The red line: 5px, like the nav indicator. */
.erl-mkt__slip::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	block-size: 5px;
	border-radius: var(--erl-border-radius-md) var(--erl-border-radius-md) 0 0;
	background: var(--erl-color-primary);
}

.erl-mkt__slip-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-block-end: 16px;
}

.erl-mkt__slip-title {
	margin: 0;
	font-size: var(--erl-fs-h6);
	line-height: var(--erl-lh-h6);
	font-weight: var(--erl-fw-medium);
	letter-spacing: var(--erl-ls-h6);
	text-transform: uppercase;
	color: var(--erl-color-heading);
}

.erl-mkt__slip-count {
	margin-inline-start: auto;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-text-muted);
	font-variant-numeric: tabular-nums;
}

.erl-mkt__items {
	outline: 0;
}

.erl-mkt__empty {
	margin: 0;
	padding-block: 8px 16px;
	color: var(--erl-color-text-muted);
}

.erl-mkt__lines {
	margin: 0;
	padding: 0;
	list-style: none;
}

.erl-mkt__line {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px;
	align-items: center;
	position: relative;
	/* Bottom padding also holds the stepper's hint slot (see .erl-mkt__limit below). */
	padding-block: 12px 26px;
	border-block-end: 1px solid var(--erl-color-border-subtle);
}

.erl-mkt__line-name {
	font-weight: var(--erl-fw-medium);
	overflow-wrap: anywhere;
}

.erl-mkt__line-name .erl-mkt__badge {
	margin-inline-start: 8px;
	padding-block: 0;
	vertical-align: middle;
}

.erl-mkt__line .erl-mkt__stepper-wrap {
	align-items: flex-end;
}

/* In the slip the slot sits in the row's bottom padding instead of adding a line to every row. */
.erl-mkt__line .erl-mkt__limit {
	position: absolute;
	inset-inline-end: 0;
	inset-block-end: 4px;
	min-block-size: 0;
	text-align: end;
}

/* Ausleihe: grows above the perforation only while a loan article is on the slip. */
.erl-mkt__loan {
	margin-block-start: 16px;
	padding: 16px;
	border-radius: var(--erl-border-radius-md);
	background: var(--erl-mkt-loan-bg);
	color: var(--erl-mkt-loan-ink);
}

.erl-mkt__section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	font-weight: var(--erl-fw-bold);
	text-transform: uppercase;
	letter-spacing: var(--erl-ls-h6);
}

.erl-mkt__loan-text {
	margin-block: 8px 16px;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
}

/* One column: a date field at the global 18px size does not fit twice into the 292px slip. */
.erl-mkt__dates {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--erl-field-gap, 24px);
}

/* Perforation: dashed line, two half-circle notches at the slip's edges. It separates WHAT from WHEN/WHERE. */
.erl-mkt__perf {
	position: relative;
	block-size: 2px;
	margin-block: 28px;
	margin-inline: -24px;
	background-image: repeating-linear-gradient(90deg, var(--erl-color-border) 0 8px, transparent 8px 16px);
}

.erl-mkt__perf::before,
.erl-mkt__perf::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inline-size: 20px;
	block-size: 20px;
	margin-block-start: -10px;
	border-radius: 50%;
	background: var(--erl-color-bg-subtle);
}

.erl-mkt__perf::before {
	inset-inline-start: -10px;
}

.erl-mkt__perf::after {
	inset-inline-end: -10px;
}

.erl-mkt__pickup {
	display: flex;
	flex-direction: column;
	gap: var(--erl-field-gap, 24px);
}

/* Honeypot: off-screen, not display:none (some bots skip those). */
.erl-mkt__hp {
	position: absolute;
	inset-inline-start: -9999px;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
}

.erl-mkt__error {
	margin-block: 16px 0;
	padding: 12px 16px;
	border-radius: var(--erl-border-radius-md);
	background: var(--erl-color-error-lightest);
	color: var(--erl-color-error-dark);
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
}

/* The note right above the send button: body/sm, muted, no box, no icon. */
.erl-mkt__legal {
	margin: 24px 0 0;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-text-muted);
}

.erl-mkt__submit {
	inline-size: 100%;
	margin-block-start: 12px;
	justify-content: center;
}

.erl-mkt__done {
	padding: 24px;
	border-radius: var(--erl-border-radius-md);
	background: var(--erl-color-success-lightest);
	color: var(--erl-color-success-dark);
	text-align: center;
}

.erl-mkt__done-icon {
	display: inline-grid;
	place-items: center;
	inline-size: 56px;
	block-size: 56px;
	border-radius: 50%;
	background: var(--erl-color-success-mid);
}

.erl-mkt__done-text {
	margin-block: 16px;
	font-weight: var(--erl-fw-medium);
}

.erl-mkt__line-error {
	grid-column: 1 / -1;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-error);
}

/* One rule for everything in the block that can be `hidden` (guide §2: author `display` beats the UA rule). */
.erl-mkt[hidden],
.erl-mkt [hidden] {
	display: none;
}

/* ------------------------------------------------- step 2: signed-in line, sign-in card */
.erl-mkt__auth {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 4px 12px;
	margin: -4px 0 16px;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	color: var(--erl-color-text-muted);
}

.erl-mkt__auth b {
	color: var(--erl-color-text);
	font-weight: var(--erl-fw-medium);
}

.erl-mkt__link {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--erl-color-primary);
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	font-weight: var(--erl-fw-medium);
	cursor: pointer;
}

.erl-mkt__link:hover {
	color: var(--erl-color-primary-hover);
	text-decoration: underline;
}

.erl-mkt__link:focus-visible {
	outline: var(--erl-focus-ring);
	outline-offset: var(--erl-focus-ring-offset);
}

/* The card is all the page shows without a session: the same grey surface, one white card. */
.erl-mkt__layout--login {
	grid-template-columns: minmax(0, 560px);
}

.erl-mkt__login-card {
	display: grid;
	gap: 16px;
	align-content: start;
	padding: 32px;
	border-radius: var(--erl-border-radius-lg);
	background: var(--erl-color-bg);
	box-shadow: var(--erl-shadow-sm);
}

.erl-mkt__login-card > * {
	margin: 0;
}

.erl-mkt__eyebrow {
	font-size: var(--erl-fs-h6);
	line-height: var(--erl-lh-h6);
	font-weight: var(--erl-fw-medium);
	letter-spacing: var(--erl-ls-h6);
	text-transform: uppercase;
	color: var(--erl-color-primary);
}

.erl-mkt__login-title {
	margin: 0;
	font-size: var(--erl-fs-h3);
	line-height: var(--erl-lh-h3);
	font-weight: var(--erl-fw-regular);
	color: var(--erl-color-heading);
}

.erl-mkt__login-button {
	justify-self: start;
}

/* Two buttons of the same height; they wrap under each other on a narrow card. */
.erl-mkt__login-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
}

/* Narrow card: every button of the sign-in card spans the full width and keeps its text on one line. */
@media (max-width: 480px) {
	.erl-mkt__login-card {
		padding: 24px;
	}

	.erl-mkt__login-card .btn {
		flex: 1 1 100%;
		justify-content: center;
		padding-inline: 16px;
		white-space: nowrap;
	}

	.erl-mkt__login-button {
		justify-self: stretch;
	}
}

.erl-mkt__tag {
	justify-self: start;
	padding: 2px 10px;
	border-radius: 100px;
	font-size: var(--erl-fs-body-sm);
	line-height: var(--erl-lh-body-sm);
	font-weight: var(--erl-fw-medium);
}

.erl-mkt__tag--error {
	background: var(--erl-color-error-lightest);
	color: var(--erl-color-error-dark);
}

/* ------------------------------------------------------------------ lightbox */
.erl-mkt__lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: grid;
	place-items: center;
	background: color-mix(in srgb, var(--erl-color-heading) 88%, transparent);
	outline: 0;
}

.erl-mkt__lightbox-image {
	display: block;
	max-inline-size: 90vw;
	max-block-size: 85vh;
	inline-size: auto;
	block-size: auto;
	object-fit: contain;
}

.erl-mkt__lightbox .erl-mkt__lightbox-close {
	position: absolute;
	inset-block-start: 16px;
	inset-inline-end: 16px;
	background: var(--erl-color-bg);
	color: var(--erl-color-text);
}

.erl-mkt__lightbox-nav {
	position: absolute;
	inset-block-start: 50%;
	display: grid;
	place-items: center;
	inline-size: 48px;
	block-size: 48px;
	margin: -24px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--erl-color-bg);
	color: var(--erl-color-text);
	cursor: pointer;
}

.erl-mkt__lightbox-nav:hover {
	background: var(--erl-color-border-subtle);
}

.erl-mkt__lightbox-nav:focus-visible {
	outline: var(--erl-focus-ring);
	outline-offset: var(--erl-focus-ring-offset);
}

.erl-mkt__lightbox-nav--prev {
	inset-inline-start: 16px;
}

.erl-mkt__lightbox-nav--next {
	inset-inline-end: 16px;
}

.erl-mkt__lightbox-count {
	position: absolute;
	inset-block-end: 16px;
	inset-inline: 0;
	margin: 0;
	text-align: center;
	color: var(--erl-color-bg);
	font-size: var(--erl-fs-body-sm);
	font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------ mobile bar/sheet */
.erl-mkt__bar {
	position: fixed;
	inset-inline: 0;
	inset-block-end: 0;
	z-index: 900;
	/* 88px on the right keeps the theme's floating ERL-Assistent button off the label. */
	padding: 12px 88px calc(12px + env(safe-area-inset-bottom)) 16px;
	border-block-start: 1px solid var(--erl-color-border-subtle);
	background: var(--erl-color-bg);
}

.erl-mkt__bar .btn {
	inline-size: 100%;
	justify-content: center;
}

@media (max-width: 991px) {
	.erl-mkt:has(.erl-mkt__bar) {
		padding-block-end: 72px;
	}

	.erl-mkt__layout {
		grid-template-columns: minmax(0, 1fr);
		padding: 16px;
	}

	.erl-mkt__aside {
		display: none;
		position: static;
		max-block-size: none;
	}

	.erl-mkt__aside.is-open {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 9999;
		padding: 16px;
		overflow-y: auto;
		background: var(--erl-color-bg-subtle);
		outline: 0;
	}

	.erl-mkt__aside.is-open .erl-mkt__slip {
		max-inline-size: 560px;
		margin-inline: auto;
	}

}

/* ------------------------------------------------------------------ motion */
/* The one movement: a new line slides in and its quantity ticks (plan §5.3). Off for reduced motion. */
@keyframes erl-mkt-slide-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.is-animated .erl-mkt__line.is-new {
	animation: erl-mkt-slide-in var(--erl-mkt-motion);
}

/* ---------------------------------------------------------------- skeleton */
@keyframes erl-mkt-pulse {
	50% {
		opacity: 0.55;
	}
}

.erl-mkt__sk,
.erl-mkt__sk-tabs {
	background: var(--erl-color-border-subtle);
	animation: erl-mkt-pulse 1.4s ease-in-out infinite;
}

.erl-mkt__sk-tabs {
	inline-size: min(340px, 100%);
	block-size: 48px;
	margin-block-end: 24px;
	border-radius: 200px;
}

.erl-mkt__sk-image {
	inline-size: 100%;
	aspect-ratio: 4 / 3;
	max-block-size: 250px;
}

.erl-mkt__sk-line {
	block-size: 16px;
	border-radius: var(--erl-border-radius-sm);
}

.erl-mkt__sk-line--title {
	inline-size: 60%;
	block-size: 24px;
}

.erl-mkt__sk-line--short {
	inline-size: 55%;
}

.erl-mkt__sk-button {
	block-size: 44px;
	margin-block-start: auto;
	border-radius: 100px;
}

.erl-mkt__sk-field {
	block-size: 40px;
	border-radius: var(--erl-border-radius-sm);
}

.erl-mkt__sk-slip {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-block-size: 360px;
}

.erl-mkt__sk-card {
	min-block-size: 360px;
}

.is-preview .erl-mkt__sk,
.is-preview .erl-mkt__sk-tabs {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.erl-mkt__sk,
	.erl-mkt__sk-tabs,
	.is-animated .erl-mkt__line.is-new {
		animation: none;
	}
}
