/* Content elements. Scoped to ce-* only, никак не пересекается со старыми таблицами. */

.ce-table-wrap {
	background: #FBF6F1;
	border-radius: 12px;
	overflow: hidden;
}

.ce-table {
	width: 100%;
	border-collapse: collapse;
	background: #FBF6F1; /* fallback inside the editor, where the wrapper does not exist */
	font-size: 16px;
	line-height: 1.6;
	color: #6B6560;
}

.ce-table thead:empty {
	display: none;
}

.ce-table thead tr {
	background: #F5C6BA;
}

.ce-table th {
	padding: 18px 20px;
	text-align: left;
	font-weight: 600;
	font-size: 15px;
	color: #2E2723;
}

.ce-table td {
	padding: 18px 20px;
	vertical-align: top;
	border-bottom: 1px solid #E7DDD5;
}

.ce-table tbody tr:last-child td {
	border-bottom: none;
}

.ce-table th:first-child,
.ce-table td:first-child {
	padding-left: 26px;
}

.ce-table th:last-child,
.ce-table td:last-child {
	padding-right: 26px;
}

/* Emphasis follows bold in the content, not column position. */
.ce-table td strong,
.ce-table td b {
	font-weight: 600;
	color: #2E2723;
}

@media (max-width: 600px) {
	.ce-table-wrap {
		overflow-x: auto;
	}

	.ce-table {
		min-width: 600px;
	}
}

/* ---------- Boxes ---------- */

.ce-box {
	position: relative;
	margin: 28px 0;
	padding: 26px 28px;
	border-radius: 12px;
	background: #FCEDE8;
	color: #2E2723;
}

.ce-box > *:first-child { margin-top: 0; }
.ce-box > *:last-child  { margin-bottom: 0; }

.ce-box__title {
	margin-bottom: 10px;
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #2E2723;
}

.ce-box a {
	color: #C0574A;
	text-decoration: underline;
}

/* Icon is bound to the type and never lives in the content. */
.ce-box--tip {
	padding-right: 76px;
}

.ce-box--tip::before {
	content: "";
	position: absolute;
	top: 24px;
	right: 26px;
	width: 28px;
	height: 28px;
	background-color: #2E2723;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 21.5h4'/%3E%3Cpath d='M12 2.5a6.8 6.8 0 0 0-4 12.3V18h8v-3.2a6.8 6.8 0 0 0-4-12.3z'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 21.5h4'/%3E%3Cpath d='M12 2.5a6.8 6.8 0 0 0-4 12.3V18h8v-3.2a6.8 6.8 0 0 0-4-12.3z'/%3E%3C/svg%3E");
}

/* Recommended reading — banner treatment: gradient, outline, CTA. */
.ce-box--resource {
	padding: 24px 26px 22px;
	border: 1px solid #EFA893;
	background: linear-gradient(120deg, #FBDDD4 0%, #FDF0EB 55%, #FCE9E2 100%);
}

/* Last link in the block is the CTA.
   Selector is deliberately over-specific: theme link rules use !important. */
html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a,
html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a:visited,
html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a:hover,
html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a:focus {
	display: inline-block;
	padding: 11px 22px;
	border: 0 !important;
	border-radius: 999px;
	background-color: #C0574A !important;
	background-image: none !important;
	color: #FFF !important;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.2;
	text-decoration: none !important;
	text-decoration-line: none !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease;
}

html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a::before,
html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a::after {
	display: none !important;
}

html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a:hover,
html body .ce-box--resource.ce-box--resource.ce-box--resource > p:last-child a:focus {
	background-color: #A8483C !important;
}

.ce-box--resource > p:last-child {
	margin-top: 16px;
	margin-bottom: 0;
}

@media (max-width: 600px) {
	.ce-box {
		padding: 22px 20px;
	}

	.ce-box--tip {
		padding-right: 20px;
		padding-top: 60px;
	}

	.ce-box--tip::before {
		top: 20px;
		left: 20px;
		right: auto;
	}
}

/* ---------- Accordion ---------- */

.ce-accordion {
	margin: 28px 0;
}

.ce-accordion__item {
	border-top: 1px solid #E7DDD5;
}

.ce-accordion__item:last-child {
	border-bottom: 1px solid #E7DDD5;
}

.ce-accordion__q {
	position: relative;
	margin: 0;
	padding: 20px 44px 20px 0;
	font-weight: 700;
	font-size: 16px;
	line-height: 1.45;
	color: #2E2723;
	cursor: pointer;
	list-style: none;
}

.ce-accordion__q::-webkit-details-marker {
	display: none;
}

.ce-accordion__q::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 6px;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	background-color: #2E2723;
	transition: transform 0.2s ease;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

.ce-accordion__item[open] .ce-accordion__q::after {
	transform: rotate(180deg);
}

.ce-accordion__a {
	padding: 0 44px 22px 0;
	color: #6B6560;
}

.ce-accordion__a > *:first-child { margin-top: 0; }
.ce-accordion__a > *:last-child  { margin-bottom: 0; }

.ce-accordion__a a {
	color: #C0574A;
	text-decoration: underline;
}

/* Progressive enhancement — ignored by browsers without support. */
@supports (interpolate-size: allow-keywords) {
	.ce-accordion__item {
		interpolate-size: allow-keywords;
	}

	.ce-accordion__item::details-content {
		block-size: 0;
		overflow: hidden;
		transition: block-size 0.25s ease, content-visibility 0.25s allow-discrete;
	}

	.ce-accordion__item[open]::details-content {
		block-size: auto;
	}
}
