/*
 * Blog archive and article. Shared with the modules a guide can reuse.
 * Widths follow the 1440, 430, 390, and 320 frames: 1120 content at 1440,
 * 20px inset from 360px, 16px inset below that.
 */

.polcrm-blog,
.polcrm-blog *,
.polcrm-article,
.polcrm-article *,
.polcrm-related,
.polcrm-related *,
.polcrm-drawer,
.polcrm-drawer * {
	box-sizing: border-box;
}

.polcrm-blog,
.polcrm-article {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--iran-sans);
	text-align: start;
}

main:has(.polcrm-blog),
main:has(.polcrm-article) {
	margin: 0;
}

.polcrm-blog__visually-hidden {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.polcrm-blog {
	padding: 24px 20px 64px;
}

.polcrm-blog__inner,
.polcrm-article__frame {
	inline-size: min(1120px, 100%);
	margin-inline: auto;
}

.polcrm-article__frame {
	inline-size: min(1048px, 100%);
}

.polcrm-blog__intro {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.polcrm-blog__crumbs,
.polcrm-article__lead nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 7px;
	color: var(--wp--preset--color--text-muted);
	font-size: 12px;
	line-height: 22px;
}

.polcrm-article__lead nav {
	font-size: 13px;
	line-height: 23px;
}

.polcrm-blog__crumbs a,
.polcrm-article__lead nav a {
	color: inherit;
	text-decoration: none;
}

.polcrm-blog__title,
.polcrm-article__lead h1 {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 36px;
	font-weight: 700;
	line-height: 1.25;
}

.polcrm-blog__description,
.polcrm-article__intro,
.polcrm-article__byline {
	margin: 7px 0 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 16px;
	font-weight: 400;
	line-height: 29px;
}

.polcrm-article__intro {
	font-size: 17px;
	line-height: 32px;
}

.polcrm-article__byline {
	margin-top: 10px;
	font-size: 13px;
	line-height: 24px;
}

.polcrm-blog__search {
	display: flex;
	gap: 8px;
	align-items: center;
	min-block-size: 60px;
	padding: 7px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 4px 15px rgba(24, 35, 59, 0.05);
}

.polcrm-blog__search-submit,
.polcrm-blog__button,
.polcrm-drawer__action,
.polcrm-blog__search-submit,
.polcrm-blog__button,
.polcrm-drawer__action,
.polcrm-module--assessment > .polcrm-blog__button {
	align-items: center;
	justify-content: center;
	min-block-size: 44px;
	margin: 0;
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 23px;
	text-decoration: none;
	cursor: pointer;
}

.polcrm-blog__search-submit {
	inline-size: 84px;
	flex: none;
}

.polcrm-blog__search-field {
	display: flex;
	flex: 1;
	gap: 8px;
	align-items: center;
	min-inline-size: 0;
}

.polcrm-blog__search-field input {
	inline-size: 100%;
	min-inline-size: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--wp--preset--color--text);
	font-family: inherit;
	font-size: 14px;
	line-height: 24px;
	text-align: start;
}

.polcrm-blog__search-field input:focus {
	outline: none;
}

.polcrm-blog__search-icon {
	flex: none;
	inline-size: 18px;
	block-size: 18px;
}

.polcrm-blog__chips {
	display: flex;
	gap: 8px;
	justify-content: flex-start;
	margin-top: 30px;
	overflow-x: auto;
	scrollbar-width: none;
}

.polcrm-blog__chip {
	display: inline-flex;
	flex: none;
	align-items: center;
	min-block-size: 44px;
	padding: 0 14px;
	border-radius: 10px;
	color: var(--wp--preset--color--text);
	font-size: 14px;
	font-weight: 600;
	line-height: 22px;
	text-decoration: none;
}

.polcrm-blog__chip.is-active {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.polcrm-blog__feature,
.polcrm-blog-card,
.polcrm-blog__empty,
.polcrm-blog__guide,
.polcrm-related__card {
	border: 1px solid var(--wp--preset--color--border);
	background: #fff;
}

.polcrm-blog__feature {
	display: grid;
	gap: 16px;
	margin-top: 30px;
	padding: 17px;
	border-radius: 16px;
	box-shadow: 0 6px 18px rgba(24, 35, 59, 0.06);
}

.polcrm-blog__feature-kicker,
.polcrm-blog-card__category,
.polcrm-blog__guide-kicker,
.polcrm-module__eyebrow,
.polcrm-related__card p {
	margin: 0;
	color: var(--wp--preset--color--primary);
	font-size: 13px;
	font-weight: 600;
	line-height: 23px;
}

.polcrm-blog-card__category {
	font-size: 12px;
	line-height: 20px;
	text-decoration: none;
}

.polcrm-blog__feature-title,
.polcrm-blog-card__title {
	margin: 8px 0 0;
	font-weight: 700;
}

.polcrm-blog__feature-title {
	font-size: 28px;
	line-height: 1.35;
}

.polcrm-blog__feature-title a,
.polcrm-blog-card__title a,
.polcrm-related__card {
	color: var(--wp--preset--color--text);
	text-decoration: none;
}

.polcrm-blog__feature-excerpt,
.polcrm-blog-card__excerpt,
.polcrm-blog__guide p,
.polcrm-blog__empty p {
	margin: 8px 0 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 14px;
	line-height: 24px;
}

.polcrm-blog__feature-meta,
.polcrm-blog-card__foot {
	display: flex;
	gap: 14px;
	align-items: center;
	justify-content: flex-start;
	margin-top: 14px;
}

.polcrm-blog__feature-meta p,
.polcrm-blog-card__foot p {
	margin: 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 12px;
	line-height: 21px;
}

.polcrm-blog__feature-media {
	order: -1;
}

.polcrm-blog__feature-media,
.polcrm-blog-card__media,
.polcrm-blog-card__fallback,
.polcrm-article__cover {
	display: block;
	overflow: hidden;
	border-radius: 9px;
}

.polcrm-blog__feature-media img,
.polcrm-blog-card__media img,
.polcrm-article__cover img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	aspect-ratio: 420 / 236;
}

.polcrm-blog-card__fallback,
.polcrm-article__cover--fallback {
	display: grid;
	place-items: center;
	aspect-ratio: 420 / 236;
	background:
		radial-gradient(circle at 80% 18%, rgba(113, 87, 219, 0.18), transparent 42%),
		linear-gradient(160deg, #eef1fa, #f4f6fc 58%, #e8f4fb);
}

.polcrm-blog-card__fallback img,
.polcrm-article__cover--fallback img {
	inline-size: 29px;
	block-size: 29px;
	aspect-ratio: auto;
}

.polcrm-blog__results {
	margin-top: 30px;
}

.polcrm-blog__results-title,
.polcrm-related h2 {
	margin: 0 0 16px;
	font-size: 25px;
	font-weight: 700;
	line-height: 39px;
}

.polcrm-blog__grid,
.polcrm-related__grid {
	display: grid;
	gap: 16px;
}

.polcrm-blog-card {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-block-size: 100%;
	padding: 18px;
	border-radius: 16px;
	box-shadow: 0 6px 18px rgba(24, 35, 59, 0.06);
}

.polcrm-blog-card__title {
	font-size: 19px;
	line-height: 30px;
}

.polcrm-blog-card__foot {
	justify-content: space-between;
	margin-top: 18px;
}

.polcrm-blog-card__open {
	display: inline-flex;
	line-height: 0;
}

.polcrm-blog__pages {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 16px;
}

.polcrm-blog__page {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: 44px;
	min-block-size: 44px;
	padding: 0 8px;
	border-radius: 10px;
	color: var(--wp--preset--color--text);
	font-size: 14px;
	font-weight: 600;
	line-height: 22px;
	text-decoration: none;
}

.polcrm-blog__page.is-current {
	background: var(--wp--preset--color--primary);
	color: #fff;
}

.polcrm-blog__empty,
.polcrm-blog__guide {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-top: 16px;
	padding: 24px;
	border-radius: 18px;
	box-shadow: 0 5px 22px rgba(24, 35, 59, 0.05);
	text-align: center;
}

.polcrm-blog__guide {
	align-items: flex-start;
	border-radius: 16px;
	background: #fff1eb;
	text-align: start;
}

.polcrm-blog__empty-icon {
	display: grid;
	place-items: center;
	inline-size: 52px;
	block-size: 52px;
	border-radius: 16px;
	background: #f0ecff;
}

.polcrm-blog__empty h3,
.polcrm-blog__guide h3 {
	margin: 12px 0 0;
	font-size: 21px;
	line-height: 32px;
}

.polcrm-blog__guide h3 {
	font-size: 18px;
	line-height: 28px;
}

.polcrm-blog__empty p {
	max-inline-size: 525px;
}

.polcrm-blog__button--quiet {
	background: #fff;
	color: var(--wp--preset--color--text);
	border: 1px solid var(--wp--preset--color--border);
}

.polcrm-article {
	padding: 8px 20px 48px;
}

.polcrm-article__lead {
	inline-size: min(744px, 100%);
	margin-inline-end: auto;
	padding-top: 28px;
}

.polcrm-article__lead h1 {
	font-size: 36px;
	line-height: 1.35;
}

.polcrm-article__lead::after {
	content: "";
	display: block;
	block-size: 1px;
	margin-top: 16px;
	background: var(--wp--preset--color--border);
}

.polcrm-article__cover {
	inline-size: min(744px, 100%);
	margin: 16px 0 0 auto;
	margin-inline-start: 0;
	margin-inline-end: auto;
}

.polcrm-article__layout {
	margin-top: 28px;
}

.polcrm-article__content > * + *,
.polcrm-article__content .wp-block-group > * + * {
	margin-top: 16px;
}

.polcrm-article__content h2 {
	margin: 28px 0 0;
	color: var(--wp--preset--color--text);
	font-size: 27px;
	font-weight: 700;
	line-height: 42px;
}

.polcrm-article__content h3,
.polcrm-article__content p,
.polcrm-article__content li {
	color: var(--wp--preset--color--text-muted);
	font-size: 17px;
	line-height: 32px;
}

.polcrm-article__content h3 {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 22px;
	font-weight: 700;
	line-height: 36px;
}

.polcrm-article__content a {
	color: var(--wp--preset--color--primary);
}

.polcrm-article__glance,
.polcrm-module--assessment {
	padding: 17px 19px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	background: #e8f4fb;
}

.polcrm-article__glance p {
	margin: 0;
}

.polcrm-article__glance strong {
	color: var(--wp--preset--color--text);
	font-size: 18px;
	line-height: 28px;
}

.polcrm-article__content .wp-block-table {
	margin-top: 12px;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
}

.polcrm-article__content table {
	inline-size: 100%;
	border-collapse: collapse;
}

.polcrm-article__content th,
.polcrm-article__content td {
	padding: 10px 13px;
	font-size: 14px;
	line-height: 25px;
	text-align: start;
}

.polcrm-article__content th {
	background: var(--wp--preset--color--surface-raised);
	color: var(--wp--preset--color--text);
	font-weight: 600;
}

.polcrm-article__content td {
	color: var(--wp--preset--color--text-muted);
}

.polcrm-article__product {
	margin-top: 28px;
	padding: 17px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 16px;
	background: #fff;
}

.polcrm-article__product-shot img {
	inline-size: min(320px, 100%);
	block-size: auto;
	border-radius: 12px;
}

.polcrm-article__legend {
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.polcrm-article__legend li {
	display: flex;
	gap: 8px;
	align-items: center;
	margin-top: 6px;
	font-size: 14px;
	line-height: 24px;
}

@counter-style polcrm-fa {
	system: numeric;
	symbols: "۰" "۱" "۲" "۳" "۴" "۵" "۶" "۷" "۸" "۹";
}

.polcrm-article__legend li::before {
	content: counter(polcrm-legend, polcrm-fa);
	counter-increment: polcrm-legend;
	display: inline-grid;
	place-items: center;
	flex: none;
	inline-size: 26px;
	block-size: 26px;
	border-radius: 13px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 18px;
}

.polcrm-article__legend {
	counter-reset: polcrm-legend;
}

.polcrm-article__action {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	padding: 9px 13px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9px;
	background: #e8f4fb;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	text-decoration: none;
}

.polcrm-article__toc {
	margin-top: 20px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 12px;
	background: var(--wp--preset--color--surface);
}

.polcrm-article__toc-toggle,
.polcrm-article__toc-title {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 17px;
	font-weight: 700;
	line-height: 27px;
}

.polcrm-article__toc-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	inline-size: 100%;
	min-block-size: 57px;
	padding: 15px 14px;
	border: 0;
	background: transparent;
	font-family: inherit;
	cursor: pointer;
}

.polcrm-article__toc-mark {
	inline-size: 10px;
	block-size: 10px;
	border-block-start: 2px solid currentColor;
	border-inline-end: 2px solid currentColor;
	transform: rotate(-45deg);
}

.polcrm-article__toc.is-open .polcrm-article__toc-mark {
	transform: rotate(135deg);
}

.polcrm-article__toc-panel {
	display: none;
	padding: 0 16px 16px;
}

.polcrm-article__toc.is-open .polcrm-article__toc-panel {
	display: block;
}

.polcrm-article__toc-title {
	display: none;
}

.polcrm-article__toc ol {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.polcrm-article__toc a {
	display: block;
	padding: 6px 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 14px;
	line-height: 24px;
	text-decoration: none;
}

.polcrm-article__toc a.is-current {
	color: var(--wp--preset--color--text);
	font-weight: 600;
}

.polcrm-module {
	margin-top: 28px;
}

.polcrm-module h2,
.polcrm-module__result-title {
	margin: 0;
	color: var(--wp--preset--color--text);
	font-size: 24px;
	font-weight: 700;
	line-height: 36px;
}

.polcrm-module--download {
	padding: 17px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: #fff1eb;
}

.polcrm-module--download h2 {
	font-size: 18px;
	line-height: 30px;
}

.polcrm-module--download a,
.polcrm-module--form button {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	margin-top: 8px;
	padding: 9px 13px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 9px;
	background: #fff;
	color: var(--wp--preset--color--text);
	font-weight: 600;
	text-decoration: none;
}

.polcrm-module--assessment {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border-radius: 16px;
	box-shadow: 0 7px 11px rgba(24, 35, 59, 0.07);
}

.polcrm-module--assessment > .polcrm-blog__button {
	align-self: flex-start;
}

.polcrm-module__questions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.polcrm-module__question {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
	margin: 0;
	padding: 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: #fff;
}

.polcrm-module__question legend {
	inline-size: 100%;
	padding: 0;
	color: var(--wp--preset--color--text);
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
}

.polcrm-module__choices {
	display: flex;
	gap: 8px;
}

.polcrm-module__choices label {
	display: inline-flex;
}

.polcrm-module__choices input {
	position: absolute;
	opacity: 0;
}

.polcrm-module__choices span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	inline-size: 62px;
	min-block-size: 44px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
	font-weight: 600;
}

.polcrm-module__choices input:checked + span,
.polcrm-module__choices input:focus-visible + span {
	border-color: var(--wp--preset--color--primary);
	box-shadow: inset 0 0 0 1px var(--wp--preset--color--primary);
}

.polcrm-module__result,
.polcrm-module__need {
	margin: 0;
	padding: 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 10px;
	background: #fff;
}

.polcrm-module__result p,
.polcrm-module--form p,
.polcrm-module--download p {
	margin: 4px 0 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 14px;
	line-height: 24px;
}

.polcrm-module--form label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 12px;
	font-size: 14px;
	font-weight: 600;
}

.polcrm-module--form input {
	min-block-size: 44px;
	padding: 8px 12px;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
}

.polcrm-related {
	margin-top: 36px;
	padding: 28px 20px 8px;
}

.polcrm-related__card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 13px 14px;
	border-radius: 12px;
}

.polcrm-related__card p {
	color: var(--wp--preset--color--text-muted);
	font-size: 12px;
	font-weight: 400;
	line-height: 21px;
}

.polcrm-related__card strong {
	font-size: 16px;
	font-weight: 600;
	line-height: 26px;
}

.polcrm-drawer {
	position: fixed;
	z-index: 30;
	inset-inline: 14px;
	inset-block-end: 14px;
}

.polcrm-drawer__card {
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 5px 22px rgba(24, 35, 59, 0.13);
}

.polcrm-drawer__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	inline-size: 100%;
	min-block-size: 52px;
	margin: 0;
	padding: 14px 16px;
	border: 0;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 24px;
	text-align: start;
	cursor: pointer;
}

.polcrm-drawer__chevron--down,
.polcrm-drawer[data-open="true"] .polcrm-drawer__chevron--up {
	display: none;
}

.polcrm-drawer[data-open="true"] .polcrm-drawer__chevron--down {
	display: block;
}

.polcrm-drawer__body {
	display: none;
	padding: 14px;
}

.polcrm-drawer[data-open="true"] .polcrm-drawer__body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
}

.polcrm-drawer__body p {
	margin: 0;
	color: var(--wp--preset--color--text-muted);
	font-size: 13px;
	line-height: 23px;
}

.polcrm-drawer__action {
	display: inline-flex;
	align-items: center;
	min-block-size: 44px;
	padding: 9px 13px;
	border-radius: 9px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	line-height: 24px;
	text-decoration: none;
}

.polcrm-article--has-drawer {
	padding-bottom: 96px;
}

.polcrm-blog a:focus-visible,
.polcrm-blog button:focus-visible,
.polcrm-article a:focus-visible,
.polcrm-article button:focus-visible,
.polcrm-drawer button:focus-visible,
.polcrm-drawer a:focus-visible,
.polcrm-related a:focus-visible {
	outline: 2px solid var(--wp--preset--color--primary);
	outline-offset: 2px;
}

@media (max-width: 359px) {
	.polcrm-blog,
	.polcrm-article,
	.polcrm-related {
		padding-inline: 16px;
	}
}

@media (min-width: 900px) {
	.polcrm-blog {
		padding: 42px 24px 72px;
	}

	.polcrm-blog__intro {
		flex-direction: row;
		gap: 24px;
		align-items: center;
		justify-content: space-between;
	}

	.polcrm-blog__intro-copy {
		inline-size: min(704px, 100%);
	}

	.polcrm-blog__title,
	.polcrm-article__lead h1 {
		font-size: 44px;
		line-height: 62px;
	}

	.polcrm-article__lead h1 {
		line-height: 64px;
	}

	.polcrm-blog__search {
		inline-size: 392px;
		flex: none;
	}

	.polcrm-blog__feature {
		grid-template-columns: minmax(0, 1fr) 420px;
		align-items: center;
		padding: 25px;
	}

	.polcrm-blog__feature-media {
		order: 1;
	}

	.polcrm-blog__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.polcrm-article {
		padding-inline: 24px;
	}

	.polcrm-article__layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 250px;
		column-gap: 54px;
		align-items: start;
	}

	.polcrm-article__toc {
		position: sticky;
		inset-block-start: 24px;
		margin-top: 0;
		padding: 17px 16px;
	}

	.polcrm-article__toc-toggle {
		display: none;
	}

	.polcrm-article__toc-panel,
	.polcrm-article__toc-title {
		display: block;
		padding: 0;
	}

	.polcrm-article__toc-title {
		padding-bottom: 8px;
		border-block-end: 1px solid var(--wp--preset--color--border);
	}

	.polcrm-related__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.polcrm-drawer {
		inset-inline: auto;
		inset-inline-end: max(16px, calc((100% - 1048px) / 2));
		inline-size: 250px;
	}

	.polcrm-module__question {
		flex-direction: row;
		gap: 16px;
		align-items: center;
		justify-content: space-between;
	}

	.polcrm-module__question legend {
		inline-size: auto;
		flex: 1;
	}
}
