.eds-materials-page {
	--eds-page-width: min(1180px, calc(100% - 48px));
	background: var(--eds-surface);
	color: var(--eds-text);
}

.eds-materials-container {
	width: var(--eds-page-width);
	margin: 0 auto;
	padding: 24px 0 72px;
}

.eds-materials-heading {
	display: grid;
	gap: 14px;
	max-width: 900px;
	margin: 0 0 36px;
}

.eds-materials-heading h1,
.eds-materials-heading p,
.eds-material-direction-heading h2,
.eds-material-direction-heading p,
.eds-material-card h3,
.eds-material-card p,
.eds-material-article-heading h1,
.eds-material-article-heading p,
.eds-material-block h2,
.eds-material-block h3,
.eds-material-block p,
.eds-material-related h2 {
	margin: 0;
}

.eds-materials-heading > p,
.eds-material-direction-heading p,
.eds-material-card-content > p,
.eds-material-article-lead,
.eds-material-block--text p,
.eds-material-block--callout p,
.eds-material-block--cta p,
.eds-material-list-intro {
	color: var(--eds-text-muted);
}

.eds-materials-eyebrow,
.eds-material-article-direction,
.eds-materials-empty > .eds-type-ui {
	color: var(--eds-orange-dark) !important;
	text-decoration: none !important;
}

.eds-material-directions {
	display: grid;
	gap: 52px;
}

.eds-material-direction {
	display: grid;
}

.eds-material-direction-heading {
	display: flex;
	align-items: end;
}

.eds-material-direction-heading > div {
	display: grid;
	gap: 8px;
	max-width: 760px;
}

.eds-material-quick-links {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: -4px 0 36px;
	padding: 0;
	background: transparent;
	border: 0;
}

.eds-material-quick-links-title {
	flex: 0 0 260px;
	color: var(--eds-text-muted);
}

.eds-material-quick-links-list {
	display: flex;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: 8px;
}

.eds-material-quick-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 40px;
	padding: 0 14px 0 16px;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-ui);
	background: var(--eds-surface);
	color: var(--eds-text);
	text-decoration: none;
	transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.eds-material-quick-links a:hover {
	border-color: var(--eds-orange);
	background: var(--eds-orange-soft);
	color: var(--eds-black);
	text-decoration: none;
	transform: scale(1.03);
}

.eds-material-quick-link-arrow,
.eds-material-card-button > span {
	display: block;
	width: 18px;
	height: 18px;
	background: var(--eds-orange-dark);
	mask: url("images/chevron-right.svg") center / contain no-repeat;
	-webkit-mask: url("images/chevron-right.svg") center / contain no-repeat;
	transition: background-color 160ms ease, transform 160ms ease;
}

.eds-material-quick-links a:hover .eds-material-quick-link-arrow {
	background: var(--eds-orange);
	transform: translateX(2px);
}

.eds-material-card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 22px;
}

.eds-material-card {
	position: relative;
	min-width: 0;
	min-height: 100%;
	overflow: hidden;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-card);
	background: var(--eds-surface);
	box-shadow: 0 12px 30px color-mix(in srgb, var(--eds-graphite) 7%, transparent);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.eds-material-card:hover {
	z-index: 1;
	border-color: var(--eds-orange);
	box-shadow: 0 18px 36px color-mix(in srgb, var(--eds-graphite) 13%, transparent);
	transform: scale(1.015);
}

.eds-material-card-main-link {
	display: flex;
	min-height: 100%;
	flex-direction: column;
	color: var(--eds-text);
	text-decoration: none;
}

.eds-material-card-main-link:hover {
	color: var(--eds-text);
	text-decoration: none;
}

.eds-material-card-image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--eds-surface-warm);
}

.eds-material-card-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.eds-material-card-content {
	position: relative;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 10px;
	padding: 20px 64px 20px 20px;
}

.eds-material-card-date,
.eds-material-article-date {
	color: var(--eds-text-muted);
}

.eds-material-card-button {
	position: absolute;
	top: 50%;
	right: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border: 0;
	background: transparent;
	transform: translateY(-50%);
}

.eds-material-card-button > span {
	width: 24px;
	height: 24px;
	background: var(--eds-orange-dark);
}

.eds-material-card:hover .eds-material-card-button > span {
	background: var(--eds-orange);
	transform: translateX(3px);
}

.eds-materials-empty {
	max-width: 820px;
	padding: 30px;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-card);
	background: var(--eds-surface-warm);
}

.eds-materials-empty > * + * {
	margin-top: 10px;
}

.eds-material-article {
	--eds-material-visual-width: min(960px, calc(100vw - 48px));
	max-width: 960px;
}

.eds-material-article-heading {
	display: grid;
	gap: 14px;
	max-width: 900px;
	margin-bottom: 30px;
}

.eds-material-article-direction {
	width: fit-content;
}

.eds-material-hero {
	display: flex;
	justify-content: center;
	margin: 0 0 40px;
	padding-block: 32px;
	overflow: hidden;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-card);
	background: var(--eds-surface-warm);
}

.eds-material-hero-frame {
	width: min(100%, calc(var(--eds-material-hero-frame-width) * 1px));
	aspect-ratio: var(--eds-material-hero-frame-width) / var(--eds-material-hero-frame-height);
}

.eds-material-hero-image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: var(--eds-radius-card);
}

.eds-material-hero-image--contain {
	object-fit: contain;
	object-position: center;
}

.eds-material-hero-image--cover {
	object-fit: cover;
	object-position: center;
}

.eds-material-article-body {
	max-width: 820px;
}

.eds-material-block {
	margin: 0 0 34px;
}

.eds-material-block > h2,
.eds-material-block > h3 {
	margin-bottom: 14px;
}

.eds-material-block--text p + p {
	margin-top: 14px;
}

.eds-material-figure {
	margin-right: 0;
	margin-left: 0;
}

.eds-material-figure,
.eds-material-block--table,
.eds-material-block--callout,
.eds-material-block--steps,
.eds-material-block--cta,
.eds-material-block--product-cards {
	width: var(--eds-material-visual-width);
}

.eds-material-image-stage {
	position: relative;
	display: flex;
	justify-content: center;
	padding-block: 32px;
	overflow: visible;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-card);
	background: var(--eds-surface-warm);
}

.eds-material-image-frame {
	position: relative;
	width: min(100%, calc(var(--eds-material-image-frame-width) * 1px));
	aspect-ratio: var(--eds-material-image-frame-width) / var(--eds-material-image-frame-height);
}

.eds-material-image {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: var(--eds-radius-card);
}

.eds-material-image--contain {
	object-fit: contain;
	object-position: center;
}

.eds-material-image--cover {
	object-fit: cover;
	object-position: center;
}

.eds-material-image-marker {
	position: absolute;
	z-index: 1;
	left: var(--eds-marker-x);
	top: var(--eds-marker-y);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border: 2px solid var(--eds-surface);
	border-radius: 50%;
	background: var(--eds-orange);
	box-shadow: 0 4px 12px color-mix(in srgb, var(--eds-black) 28%, transparent);
	color: var(--eds-black);
	cursor: help;
	transform: translate(-50%, -50%);
}

.eds-material-image-marker-tooltip {
	position: absolute;
	left: 50%;
	bottom: calc(100% + 10px);
	width: max-content;
	max-width: 240px;
	padding: 7px 10px;
	border-radius: var(--eds-radius-ui);
	background: var(--eds-text);
	box-shadow: 0 8px 20px color-mix(in srgb, var(--eds-black) 20%, transparent);
	color: var(--eds-surface);
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 4px);
	transition: opacity 140ms ease, transform 140ms ease;
}

.eds-material-image-marker:hover .eds-material-image-marker-tooltip,
.eds-material-image-marker:focus .eds-material-image-marker-tooltip {
	opacity: 1;
	transform: translate(-50%, 0);
}

.eds-material-image-marker:focus-visible {
	outline: 2px solid var(--eds-text);
	outline-offset: 3px;
}

.eds-material-figure figcaption {
	margin-top: 8px;
	color: var(--eds-text-muted);
}

.eds-material-image-links {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-top: 12px;
}

.eds-material-image-link {
	display: inline-flex;
	gap: 8px;
	align-items: center;
	color: var(--eds-text);
	text-decoration: none;
}

.eds-material-image-link:hover {
	color: var(--eds-orange-dark);
	text-decoration: none;
}

.eds-material-table-scroll {
	overflow-x: auto;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-card);
}

.eds-material-table {
	width: 100%;
	border-collapse: collapse;
	background: var(--eds-surface);
}

.eds-material-table caption {
	padding: 12px 16px;
	color: var(--eds-text-muted);
	text-align: left;
}

.eds-material-table th,
.eds-material-table td {
	min-width: 150px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--eds-border);
	text-align: left;
	vertical-align: top;
}

.eds-material-table th {
	background: var(--eds-surface-warm);
	color: var(--eds-text-secondary);
	font-weight: 600;
}

.eds-material-table tbody tr:last-child td {
	border-bottom: 0;
}

.eds-material-block--callout,
.eds-material-block--cta {
	padding: 22px 24px;
	border: 1px solid var(--eds-border);
	border-left: 4px solid var(--eds-orange);
	border-radius: var(--eds-radius-card);
	background: var(--eds-surface-warm);
}

.eds-material-callout--warning {
	border-left-color: var(--eds-orange-dark);
}

.eds-material-list {
	display: grid;
	gap: 10px;
	margin: 0;
	padding-left: 24px;
}

.eds-material-list-intro {
	margin: 0 0 14px;
}

.eds-material-list li::marker {
	color: var(--eds-orange-dark);
	font-weight: 700;
}

.eds-material-steps {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.eds-material-steps li {
	display: grid;
	grid-template-columns: 42px minmax(0, 1fr);
	gap: 14px;
	align-items: start;
}

.eds-material-step-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--eds-orange);
	border-radius: 50%;
	color: var(--eds-orange-dark);
}

.eds-material-block--cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.eds-material-block--cta > div:first-child {
	display: grid;
	gap: 8px;
}

.eds-material-cta-actions {
	display: flex;
	flex: 0 0 auto;
	gap: 10px;
}

.eds-material-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 18px;
	border: 1px solid var(--eds-text);
	border-radius: var(--eds-radius-ui);
	color: var(--eds-text) !important;
	text-decoration: none !important;
}

.eds-material-button--primary {
	border-color: var(--eds-orange);
	background: var(--eds-orange);
}

.eds-material-button:hover {
	border-color: var(--eds-orange-dark);
	background: var(--eds-orange-dark);
}

.eds-material-product-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 18px;
}

.eds-material-product-card {
	display: block;
	overflow: hidden;
	border: 1px solid var(--eds-border);
	border-radius: var(--eds-radius-card);
	background: var(--eds-surface);
	box-shadow: 0 10px 24px color-mix(in srgb, var(--eds-graphite) 6%, transparent);
	color: var(--eds-text);
	text-decoration: none;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.eds-material-product-card:hover {
	position: relative;
	z-index: 1;
	border-color: var(--eds-orange);
	box-shadow: 0 16px 32px color-mix(in srgb, var(--eds-graphite) 12%, transparent);
	color: var(--eds-text);
	text-decoration: none;
	transform: scale(1.015);
}

.eds-material-product-card-media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 16 / 8;
	padding: 12px 38px 12px 12px;
	background: var(--eds-surface-warm);
}

.eds-material-product-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.eds-material-product-card-arrow {
	position: absolute;
	top: 50%;
	right: 14px;
	width: 22px;
	height: 22px;
	background: var(--eds-orange-dark);
	mask: url("images/chevron-right.svg") center / contain no-repeat;
	-webkit-mask: url("images/chevron-right.svg") center / contain no-repeat;
	transform: translateY(-50%);
	transition: background-color 160ms ease, transform 160ms ease;
}

.eds-material-product-card:hover .eds-material-product-card-arrow {
	background: var(--eds-orange);
	transform: translate(3px, -50%);
}

.eds-material-product-card-content {
	display: grid;
	gap: 6px;
	padding: 14px 16px 16px;
}

.eds-material-product-card-content h3,
.eds-material-product-card-label {
	margin: 0;
}

.eds-material-product-card-label {
	color: var(--eds-orange-dark);
}

.eds-material-related {
	display: grid;
	gap: 22px;
	margin-top: 58px;
}

@media (max-width: 991px) {
	.eds-material-card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.eds-materials-page {
		--eds-page-width: min(100% - 28px, 1180px);
	}

	.eds-material-article {
		--eds-material-visual-width: 100%;
	}

	.eds-material-image-stage {
		padding-block: 20px;
	}

	.eds-material-hero {
		padding-block: 20px;
	}

	.eds-materials-container {
		padding: 20px 0 52px;
	}

	.eds-materials-heading {
		margin-bottom: 28px;
	}

	.eds-material-direction-heading,
	.eds-material-block--cta,
	.eds-material-quick-links {
		align-items: stretch;
		flex-direction: column;
	}

	.eds-material-quick-links-title {
		flex-basis: auto;
	}

	.eds-material-card-grid {
		grid-template-columns: 1fr;
	}

	.eds-material-product-cards {
		grid-template-columns: 1fr;
	}

	.eds-material-card-content {
		padding: 20px;
	}

	.eds-material-card-button {
		position: static;
		display: inline-flex;
		gap: 8px;
		width: 100%;
		height: 46px;
		margin-top: 10px;
		border: 1px solid var(--eds-text);
		border-radius: var(--eds-radius-ui);
		background: var(--eds-surface);
		color: var(--eds-text);
		transform: none;
	}

	.eds-material-card-button::before {
		content: 'Открыть материал';
	}

	.eds-material-card-button > span {
		width: 16px;
		height: 16px;
		background: var(--eds-text);
	}

	.eds-material-card:hover .eds-material-card-button > span {
		background: var(--eds-text);
		transform: none;
	}

	.eds-material-cta-actions {
		flex-direction: column;
	}

	.eds-material-button {
		width: 100%;
	}

}

@media (max-width: 420px) {
	.eds-materials-page {
		--eds-page-width: min(100% - 20px, 1180px);
	}
}
