/* Isolated Blog + Engineering style system */
body.blog,
body.home.blog,
body.single-post,
body.single-format-standard,
body.archive,
body.post-type-archive-engineering,
body.single-engineering {
	--blog-color-bg: #ffffff;
	--blog-color-fg: #1e1e1e;
	--blog-color-brand: #6a4be5;
	--blog-color-brand-light: #9e7ef8;
	--blog-color-press-shadow: #d5ccfc;
	--blog-color-divider: #000000;
	--blog-color-divider-soft: #cccccc;
	--blog-color-muted-divider: #e8e8e8;
	--blog-color-pagination-hover: #f5f5f5;
	--blog-color-header-cta-shadow: #d5ccfc;
	--blog-font-body: var(--wp--preset--font-family--haskoy-medium), var(--wp--preset--font-family--haskoy), sans-serif;
	--blog-font-heavy: var(--wp--preset--font-family--haskoy-extrabold), var(--wp--preset--font-family--haskoy), sans-serif;
	--blog-font-size-body: 18px;
	--blog-font-size-button: 1.125rem;
	--blog-radius-pill: 99px;
	background: linear-gradient(180deg, rgb(255, 255, 255) 0%, rgba(106, 76, 230, 0.14) 100%) !important;
	background-color: var(--blog-color-bg) !important;
	background-repeat: no-repeat !important;
	min-height: 100vh !important;
}

body.blog,
body.home.blog,
body.single-post,
body.single-format-standard,
body.post-type-archive-engineering,
body.single-engineering {
	font-family: var(--blog-font-body);
}

.blog-theme-scope h1.wp-block-post-title {
	font-size: clamp(1.85rem, 6vw, 2.75rem);
}

.blog-theme-scope h1.blog-title {
	font-size: clamp(54px, 5vw, 90px) !important;
	background-image: linear-gradient(180deg, var(--blog-color-brand-light), var(--blog-color-brand));
	-webkit-text-fill-color: transparent;
	-webkit-background-clip: text;
	background-clip: text;
}

.blog-theme-scope h1 a,
.blog-theme-scope h2 a,
.blog-theme-scope h3 a,
.blog-theme-scope h4 a,
.blog-theme-scope h5 a,
.blog-theme-scope h6 a {
	font-family: inherit !important;
}

/* Shared button behavior for Blog + Engineering pages */
body.blog .blog-theme-scope .wp-block-button .wp-block-button__link,
body.home.blog .blog-theme-scope .wp-block-button .wp-block-button__link,
body.single-post .blog-theme-scope .wp-block-button .wp-block-button__link,
body.single-format-standard .blog-theme-scope .wp-block-button .wp-block-button__link,
body.post-type-archive-engineering .blog-theme-scope .wp-block-button .wp-block-button__link,
body.single-engineering .blog-theme-scope .wp-block-button .wp-block-button__link,
.site-header.blog-header .wp-block-button.blog-download-button .wp-block-button__link {
	background-color: var(--blog-color-bg) !important;
	color: var(--blog-color-fg) !important;
	border: 1px solid var(--blog-color-fg) !important;
	border-radius: var(--blog-radius-pill) !important;
	font-family: var(--blog-font-heavy) !important;
	font-size: var(--blog-font-size-button) !important;
	font-weight: 800 !important;
	letter-spacing: 0 !important;
	line-height: 1 !important;
	text-transform: none !important;
	padding: 0.75rem 1.5rem !important;
	text-decoration: none !important;
	box-shadow: inset 0 -5px 0 0 var(--blog-color-press-shadow) !important;
	transform: none !important;
	margin-bottom: 0 !important;
	transition: 0.15s ease transform, 0.15s ease box-shadow, 0.15s ease padding, 0.15s ease margin !important;
}

body.blog .blog-theme-scope .wp-block-button .wp-block-button__link:hover,
body.home.blog .blog-theme-scope .wp-block-button .wp-block-button__link:hover,
body.single-post .blog-theme-scope .wp-block-button .wp-block-button__link:hover,
body.single-format-standard .blog-theme-scope .wp-block-button .wp-block-button__link:hover,
body.post-type-archive-engineering .blog-theme-scope .wp-block-button .wp-block-button__link:hover,
body.single-engineering .blog-theme-scope .wp-block-button .wp-block-button__link:hover,
.site-header.blog-header .wp-block-button.blog-download-button .wp-block-button__link:hover {
	background-color: var(--blog-color-bg) !important;
	color: var(--blog-color-fg) !important;
	box-shadow: inset 0 0 0 0 var(--blog-color-press-shadow) !important;
	transform: translateY(3px) !important;
	padding-bottom: calc(0.75rem - 3px) !important;
	margin-bottom: 3px !important;
}

.site-header.blog-header .wp-block-button.blog-download-button .wp-block-button__link:visited,
.site-header.blog-header .wp-block-button.blog-download-button .wp-block-button__link:focus {
	color: var(--blog-color-fg) !important;
}

.site-header.blog-header .wp-block-button.blog-download-button .wp-block-button__link:focus {
	outline: none !important;
}

@media (max-width: 377px) {
	.site-header.blog-header .header-row {
		gap: 0.75rem;
	}

	.site-header.blog-header .header-row a.wp-element-button {
		padding-right: 0.75rem !important;
		padding-left: 0.75rem !important;
	}
}

@media (max-width: 341px) {
	.site-header.blog-header .header-row,
	.site-header.blog-header .header-row .is-layout-flex {
		gap: 0.5rem;
	}

	.site-header.blog-header .header-row a.wp-element-button {
		padding: 0.5rem !important;
	}
}

/* Post content typography */
.blog-theme-scope .blog-posts-full-content .blog-post-content-full,
.blog-theme-scope .blog-posts-full-content .blog-post-content-full p,
.blog-theme-scope .wp-block-post-content,
.blog-theme-scope .wp-block-post-content p {
	font-size: var(--blog-font-size-body);
	font-weight: 500;
	line-height: 1.6;
	color: var(--blog-color-fg);
}

.blog-theme-scope .wp-block-post-date.has-small-font-size {
	font-size: var(--blog-font-size-button) !important;
}

.blog-theme-scope .wp-block-post-content a,
.blog-theme-scope .blog-posts-full-content .blog-post-content-full a,
.blog-theme-scope .blog-back-link {
	color: var(--blog-color-brand);
}

.blog-theme-scope .wp-block-post-content a,
.blog-theme-scope .blog-posts-full-content .blog-post-content-full a {
	text-decoration: 1px dotted;
	text-decoration-line: underline;
	text-decoration-style: dotted;
	text-decoration-thickness: 1px;
}

.blog-theme-scope .wp-block-post-content img {
	border: none;
	border-radius: 0;
	max-width: 100%;
	height: auto;
}

/* Featured block (Blog only) */
.blog-theme-scope .featured-container {
	margin: 0 auto;
	max-width: 1200px;
	padding: 20px;
}

.blog-theme-scope .featured-container a {
	cursor: pointer;
	text-decoration: none;
}

@media (max-width: 650px) {
	.blog-theme-scope .featured-container {
		padding: 0;
	}
}

.blog-theme-scope .main-featured {
	align-items: center;
	border-bottom: 1px solid var(--blog-color-divider);
	display: flex;
	margin-bottom: 24px;
	padding-bottom: 24px;
}

@media (max-width: 920px) {
	.blog-theme-scope .main-featured {
		align-items: flex-start;
		flex-direction: column;
	}
}

.blog-theme-scope .main-featured img {
	height: auto;
	max-width: 561px;
}

@media (max-width: 920px) {
	.blog-theme-scope .main-featured img {
		max-width: 100%;
	}
}

.blog-theme-scope .main-featured .main-featured-text {
	margin-left: 20px;
}

@media (max-width: 920px) {
	.blog-theme-scope .main-featured .main-featured-text {
		margin-left: 0;
		margin-top: 20px;
	}
}

.blog-theme-scope .main-featured .main-featured-text h1 {
	color: var(--blog-color-brand);
	font-size: 44px;
	font-style: normal;
	font-weight: 700;
	line-height: 50.6px;
	margin: 0;
}

.blog-theme-scope .main-featured .main-featured-text p {
	color: var(--blog-color-fg);
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: 28.8px;
	margin-bottom: 0;
}

.blog-theme-scope .featured-title {
	color: var(--blog-color-fg);
	font-size: 16px;
	font-style: normal;
	font-weight: 700;
	line-height: 110%;
	margin-bottom: 16px;
}

.blog-theme-scope .featured {
	border-bottom: 1px solid var(--blog-color-divider);
	display: flex;
	justify-content: space-between;
	margin: 24px 0;
	padding-bottom: 20px;
}

@media (max-width: 650px) {
	.blog-theme-scope .featured {
		flex-direction: column;
	}
}

.blog-theme-scope .featured .featured-item {
	align-items: center;
	display: flex;
	margin-right: 20px;
	padding: 0 20px;
	width: 30%;
}

@media (max-width: 920px) {
	.blog-theme-scope .featured .featured-item {
		flex-direction: column;
	}
}

@media (max-width: 650px) {
	.blog-theme-scope .featured .featured-item {
		flex-direction: row;
		margin: 0 0 1rem;
		padding: 0;
		width: 100%;
	}
}

.blog-theme-scope .featured .featured-item img {
	border: 0.5px solid var(--blog-color-divider);
	border-radius: 10px;
	height: 115px;
	margin-right: 20px;
	object-fit: cover;
	width: 115px;
}

.blog-theme-scope .featured .featured-item h3 {
	color: var(--blog-color-brand);
	font-size: 18px;
	font-style: normal;
	font-weight: 700;
	line-height: 110%;
	margin-top: 0;
}

.blog-theme-scope .featured .featured-item p {
	color: var(--blog-color-fg);
	font-size: 16px;
	font-style: normal;
	font-weight: 400;
	line-height: 100%;
	margin: 0;
}

.blog-theme-scope .featured .featured-item:not(:last-child) {
	border-right: 1px solid var(--blog-color-divider-soft);
}

@media (max-width: 650px) {
	.blog-theme-scope .featured .featured-item:not(:last-child) {
		border-bottom: 1px solid var(--blog-color-divider-soft);
		border-right: 0;
	}
}

.blog-theme-scope .featured .featured-item:first-child {
	padding-left: 0;
}

.blog-theme-scope .featured .featured-item:last-child {
	margin-right: 0;
	padding-right: 0;
}

/* Main loop post title/link appearance */
.blog-theme-scope .blog-posts-full-content .wp-block-post-title {
	text-align: left;
	margin-bottom: 8px;
	color: var(--blog-color-fg);
}

.blog-theme-scope .blog-posts-full-content .wp-block-post-title a {
	color: var(--blog-color-brand);
	text-decoration: none;
}

/* Pagination */
.blog-theme-scope .wp-block-query-pagination {
	justify-content: center;
}

.blog-theme-scope .wp-block-query-pagination .page-numbers,
.blog-theme-scope .wp-block-query-pagination-next,
.blog-theme-scope .wp-block-query-pagination-previous {
	font-family: var(--blog-font-body);
	font-size: 1rem;
}

.blog-theme-scope .wp-block-query-pagination-numbers .page-numbers.current {
	background-color: var(--blog-color-brand);
	color: var(--blog-color-bg);
}

.blog-theme-scope .wp-block-query-pagination-numbers .page-numbers:hover:not(.current) {
	background-color: var(--blog-color-pagination-hover);
}

/* Subscribe section divider in post template part */
.blog-theme-scope .wp-block-separator.is-style-wide {
	width: 100%;
	border-bottom-width: 1px;
}

/* Back links on single templates */
.blog-theme-scope .blog-back-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	text-decoration: none;
}

@media screen and (max-width: 767px) {
	.blog-logo-link svg {
		width: 100px;
		height: auto;
	}
}

/* Parity overrides: title weights */
.blog-theme-scope .blog-posts-full-content .wp-block-post-title {
  font-weight: 700 !important;
  letter-spacing: -0.01em;
}

.blog-theme-scope .blog-posts-full-content .wp-block-post-title a {
  font-weight: inherit !important;
}

.blog-theme-scope.blog-single-main h1.wp-block-post-title,
.blog-theme-scope.blog-single-main .wp-block-post-title {
  font-weight: 800 !important;
  letter-spacing: -0.02px !important;
}

/* Single title contrast parity */
.blog-theme-scope.blog-single-main .wp-block-post-title,
.blog-theme-scope.blog-single-main .wp-block-post-title a {
	color: var(--blog-color-fg) !important;
	text-decoration: none !important;
}

.blog-theme-scope.blog-single-main .wp-block-post-date,
.blog-theme-scope.blog-single-main .wp-block-post-author,
.blog-theme-scope.blog-single-main .wp-block-post-terms {
	color: var(--blog-color-fg) !important;
}

/* Article footer: sharing + subscriptions */
.blog-theme-scope .sharedaddy.sd-sharing-enabled {
	margin: 2.5rem 0 0;
}

.blog-theme-scope .sd-sharing {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	padding-top: 1.25rem;
	border-top: 1px solid var(--blog-color-muted-divider);
}

.blog-theme-scope .sd-sharing .sd-title {
	margin: 0;
	font-family: var(--blog-font-body);
	font-size: 0.875rem;
	font-weight: 700;
	line-height: 1;
	color: #6b6b6b;
}

.blog-theme-scope .sd-sharing .sd-content,
.blog-theme-scope .sd-sharing .sd-content ul {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 !important;
	padding: 0 !important;
	list-style: none;
}

.blog-theme-scope .sd-sharing .sd-content li {
	margin: 0 !important;
	padding: 0 !important;
}

.blog-theme-scope .sd-sharing .sd-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 0 0.75rem !important;
	border: 1px solid var(--blog-color-muted-divider) !important;
	border-radius: var(--blog-radius-pill) !important;
	background: #fff !important;
	box-shadow: none !important;
	color: var(--blog-color-fg) !important;
	font-family: var(--blog-font-body) !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	text-decoration: none !important;
}

.blog-theme-scope .sd-sharing .sd-button:hover {
	border-color: var(--blog-color-brand) !important;
	color: var(--blog-color-brand) !important;
}

.blog-theme-scope .blog-discover-heading {
	font-family: var(--blog-font-heavy);
	font-size: clamp(1.25rem, 2.2vw, 1.5rem);
	font-weight: 800 !important;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0 0 0.5rem !important;
}

.blog-theme-scope .blog-discover-copy,
.blog-theme-scope .blog-discover-copy.wp-block-paragraph {
	font-family: var(--blog-font-body);
	font-size: 0.9375rem !important;
	font-weight: 500 !important;
	line-height: 1.5;
	color: var(--blog-color-fg) !important;
	opacity: 0.72;
	margin: 0 0 1.25rem !important;
}

.blog-theme-scope .blog-discover-heading,
.blog-theme-scope .blog-discover-copy {
	text-align: center;
}

.blog-theme-scope .blog-discover-heading:first-child,
.blog-theme-scope .wp-block-separator + .blog-discover-heading {
	margin-top: 0 !important;
}

.blog-theme-scope .wp-block-jetpack-subscriptions,
.blog-theme-scope .blog-subscribe-fallback {
	width: min(100%, 460px);
	margin-inline: auto;
}

.blog-theme-scope .wp-block-jetpack-subscriptions form,
.blog-theme-scope .blog-subscribe-fallback-form {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
}

.blog-theme-scope .wp-block-jetpack-subscriptions input[type="email"],
.blog-theme-scope .blog-subscribe-fallback-form input[type="email"] {
	appearance: none;
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	padding: 0 1rem;
	border: 1px solid var(--blog-color-muted-divider) !important;
	border-radius: var(--blog-radius-pill) !important;
	background: #fff !important;
	color: var(--blog-color-fg) !important;
	font-family: var(--blog-font-body) !important;
	font-size: 0.9375rem !important;
	font-weight: 500;
	line-height: 1 !important;
}

.blog-theme-scope .wp-block-jetpack-subscriptions input[type="email"]::placeholder,
.blog-theme-scope .blog-subscribe-fallback-form input[type="email"]::placeholder {
	color: #9e9e9e;
	opacity: 1;
}

.blog-theme-scope .wp-block-jetpack-subscriptions button,
.blog-theme-scope .wp-block-jetpack-subscriptions input[type="submit"],
.blog-theme-scope .blog-subscribe-fallback-form button {
	flex: 0 0 auto;
	height: 44px;
	padding: 0 1.25rem;
	border: 0;
	border-radius: var(--blog-radius-pill) !important;
	background: var(--blog-color-brand) !important;
	color: #fff !important;
	font-family: var(--blog-font-body) !important;
	font-size: 0.9375rem !important;
	font-weight: 700;
	line-height: 1 !important;
	cursor: pointer;
}

@media (max-width: 767px) {
	.blog-theme-scope .sd-sharing {
		align-items: flex-start;
		flex-direction: column;
	}

	.blog-theme-scope .wp-block-jetpack-subscriptions form,
	.blog-theme-scope .blog-subscribe-fallback-form {
		flex-wrap: wrap;
	}

	.blog-theme-scope .wp-block-jetpack-subscriptions input[type="email"],
	.blog-theme-scope .blog-subscribe-fallback-form input[type="email"] {
		width: 100%;
	}

	.blog-theme-scope .wp-block-jetpack-subscriptions button,
	.blog-theme-scope .wp-block-jetpack-subscriptions input[type="submit"],
	.blog-theme-scope .blog-subscribe-fallback-form button {
		width: 100%;
	}
}

/* VideoPress and video blocks */
.blog-theme-scope .wp-block-videopress-video,
.blog-theme-scope .blog-videopress-fallback,
.blog-theme-scope .wp-block-video {
	margin-top: 1.25rem;
	margin-bottom: 1.25rem;
}

.blog-theme-scope .wp-block-videopress-video iframe,
.blog-theme-scope .wp-block-videopress-video video,
.blog-theme-scope .blog-videopress-fallback video,
.blog-theme-scope .wp-block-video video,
.blog-theme-scope .wp-block-embed.is-type-video iframe,
.blog-theme-scope .wp-block-embed.is-provider-videopress iframe {
	display: block;
	width: 100% !important;
	height: auto;
	aspect-ratio: 4 / 3;
	max-width: 100%;
}
