/*
 * Block-wrapper compatibility around the versioned classic parity layers.
 *
 * Header, footer and menu visuals intentionally come from the pinned classic
 * Newspack/JEO styles. Keep this file limited to differences introduced by
 * block-template wrappers and by WordPress's block renderer.
 */

/*
 * Complianz inherits the block parent's button font and line height even
 * though the classic child leaves its blocked-content control on the browser's
 * serif button metrics. Match the classic geometry until a separately approved
 * consent presentation replaces it.
 */
body .cmplz-blocked-content-container .cmplz-blocked-content-notice {
	font-family: georgia, garamond, "Times New Roman", serif;
	line-height: normal;
	z-index: 1;
	position: relative;
	width: auto;
	top: auto;
	left: auto;
	transform: none;
}

/* Stored wide pages were composed before the parent enabled pretty wrapping. */
body.page-template-single-wide:not(.newspack-front-page) {
	text-wrap: wrap;
}

.wp-site-blocks > .wp-block-template-part,
.wp-site-blocks > .wp-block-template-part > header,
.wp-site-blocks > .wp-block-template-part > footer {
	margin-block-start: 0;
}

.wp-site-blocks > .wp-block-template-part {
	max-width: none;
}

.wp-site-blocks > .wp-block-template-part:last-child {
	margin-block-start: 2rem;
}

/* JEO Maps still owns this classic template; recreate its removed wrapper. */
body.single-map #site-content {
	display: flow-root;
	margin-top: 64px;
}

/*
 * WordPress gives lazy images using auto sizes a generic 3000 x 1500
 * intrinsic placeholder. The classic theme instead keeps the ratio declared
 * by the image width and height attributes when an asset cannot be loaded.
 * Keep auto sizes for responsive image selection on the specialized single
 * layouts and Projects that need this compatibility override. Pages can
 * contain lazy image groups whose classic geometry depends on Core's intrinsic
 * placeholder, so they must retain the default behavior.
 */
body:is(.jeo-specialized-opinion, .jeo-specialized-audio, .jeo-specialized-video, .single-project) .entry-content img[width][height]:is([sizes="auto" i], [sizes^="auto," i]) {
	contain-intrinsic-size: auto none;
}

/*
 * The classic Video template cancels the regular 4rem content offset and lets
 * its gradient header span the viewport. Core's dynamic-block layout otherwise
 * resolves the un-sized header to the 1200px content width. Keep the authored
 * video at the same 1200px/90vw inner boundary and retain its classic block
 * margin after moving it into the header.
 */
body.single #primary.video {
	margin-top: -4rem;
}

body.single #primary.video > .site-main > header {
	width: 100%;
}

body.single #primary.video > .site-main > header .entry-header > :is(.wp-block-embed, .wp-block-video) {
	margin-bottom: 1rem;
}

body.jeo-specialized-video.single-featured-image-behind .wp-site-blocks > .site-content {
	margin-top: 0;
}

/* Block-theme caption sizing widens this legacy alignwide caption on phones. */
body.jeo-specialized-opinion .entry-content > .alignwide > figcaption {
	max-width: 100%;
	width: 100%;
}

/*
 * A classic theme wraps aligned Image blocks in an additional .wp-block-image
 * element. Block themes render the figure directly. Recreate the wrapper's
 * spacing for existing Project content without changing serialized blocks.
 */
body.single-project #primary.project > main > header .entry-header {
	padding-bottom: 0;
}

body.single-project .entry-content > .petroleo-historias figure.wp-block-image.aligncenter {
	margin-bottom: 16px;
}

body.single-project .entry-content > .petroleo-historias figure.wp-block-image.alignright {
	margin: 8px 0 24px 16px;
}

body.single-project .entry-content > .petroleo-historias .wp-block-columns {
	margin-bottom: 28px;
}

/*
 * Hidden featured images use the same top offset as the classic single shell.
 * The block parent does not add this offset when no featured-image block is
 * present.
 */
body.single.single-featured-image-default:not(.has-featured-image) .site-content {
	margin-top: 64px;
}

/*
 * Preserve the classic constrained/full alignment boundary inside legacy
 * full-width Cover blocks. Without these rules, the parent theme constrains
 * the Cover internals to 1200px, expands the floated logo group to that width
 * and collapses the adjacent editorial column to zero.
 */
body.single.single-featured-image-default:not(.has-featured-image) .entry-content > .wp-block-group.alignfull.has-global-padding {
	padding-inline: 0;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover {
	margin-bottom: 32px;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover > img.wp-block-cover__image-background,
body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover > .wp-block-cover__background,
body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover > .wp-block-cover__inner-container {
	width: 100% !important;
	max-width: none !important;
	margin-inline: 0 !important;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-group.alignright,
body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-group.alignright .wp-block-columns,
body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-group.alignright .wp-block-column,
body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-group.alignright .wp-block-group.alignwide {
	width: 210px;
	max-width: 210px;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-group.alignright {
	margin-bottom: 0;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-columns {
	margin: 0 225px 28px 15px !important;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content > .wp-block-group.alignwide > .jeomap + .wp-block-group {
	margin-top: 32px;
	line-height: 25.6px;
}

body.single.single-featured-image-default:not(.has-featured-image) .entry-content > .wp-block-group.alignwide > .jeomap + .wp-block-group p {
	line-height: inherit;
}

.wp-site-blocks .site-content,
.wp-site-blocks .content-area,
.wp-site-blocks .site-main,
.wp-site-blocks article.entry,
.wp-site-blocks .entry-content {
	margin-block: 0;
}

/* Recreate the classic site-content rhythm outside the static front page. */
body:not(.newspack-front-page) .wp-site-blocks > .site-content {
	margin-top: 4rem;
}

/* Legacy one-column templates begin directly below the header. */
body:is(.page-template-single-wide, .post-template-single-wide, .post-template-single-feature) .wp-site-blocks > .site-content {
	box-sizing: border-box;
	margin-top: 0;
}

/*
 * These variables did not exist in the classic runtime. Declarations that
 * referenced them therefore inherited the surrounding Newspack serif face.
 * Preserve that observed contract on singular content while keeping the
 * explicit homepage typography already approved by visual regression.
 */
body.singular {
	--accent-font: initial;
	--featured-font: initial;
	--primary-font: initial;
}

body.singular .entry-content .alignleft {
	margin-right: 1rem;
}

/*
 * The classic runtime's stored typography rules are not applied consistently
 * to single posts: these selectors demonstrably fall back to Newspack's serif
 * body face and its widget-heading stack. Reproduce the rendered result rather
 * than the dormant Customizer declaration.
 */
body.single .site-content .entry-title,
body.single .site-content .main-content {
	font-family: var(--newspack-theme-font-body);
}

/* Core enables pretty wrapping for block themes; classic JEO used wrap. */
body.singular:not(.newspack-front-page) .entry-content,
body.singular:not(.newspack-front-page) .entry-content * {
	text-wrap: wrap;
}

/* Preserve the four-pixel separation serialized by the classic wide shell. */
body.post-template-single-wide .site-main:has(.entry-content > .post-excerpt:not(:empty)) > .featured-image-behind + .main-content {
	margin-top: 4px;
}

body.single .entry-content > .wp-block-group.alignright {
	margin: 32px 0 32px 1rem;
	margin-top: 32px !important;
}

body.single .entry-content > .has-light-gray-background-color {
	background-color: #eee !important;
}

body.single .site-content .cat-links {
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

/*
 * The classic Newspack parent gives buttons its heading stack. The block
 * parent uses Inter instead, which changes the line wrapping of the video
 * gallery selector cards even though the copied JEO component CSS is the
 * same. Keep the classic inherited stack explicit at this boundary.
 */
.video-gallery-block .sidebar-itens button {
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

body.single .site-content .cat-links a,
body.single .site-content .cat-links a:hover,
body.single .site-content .cat-links a:visited {
	background-color: transparent;
	color: inherit;
	display: block;
	line-height: 24px;
	margin: 0;
	padding: 0;
}

@media only screen and (max-width: 782px) {
	body:not(.newspack-front-page) .wp-site-blocks > .site-content {
		margin-top: 1.5rem !important;
	}

	body.single-map #site-content {
		margin-top: 1.5rem !important;
	}

	body.page-template-single-wide .wp-site-blocks > .site-content,
	body:is(.post-template-single-wide, .post-template-single-feature).single-featured-image-behind .wp-site-blocks > .site-content,
	body.author .wp-site-blocks > .site-content {
		margin-top: 0 !important;
	}

	body.jeo-specialized-video.single-featured-image-behind .wp-site-blocks > .site-content {
		margin-top: 0 !important;
	}

	body.jeo-specialized-audio .entry-content .wp-block-columns .wp-block-columns {
		gap: 2em;
	}

	body.jeo-specialized-audio .entry-content .wp-block-columns .wp-block-column:empty {
		display: block;
	}
}

@media only screen and (min-width: 782px) {
	body.jeo-specialized-audio .entry-content > .wp-block-columns,
	body.jeo-specialized-audio .entry-content > .wp-block-columns .wp-block-columns {
		display: flex !important;
	}

	body:is(.jeo-specialized-audio, .jeo-specialized-video) #primary > .main-content > .comments-area {
		margin-top: 0;
	}

	body:is(.jeo-specialized-audio, .jeo-specialized-video) #primary > .after-post-content-widget-area + .main-content {
		margin-top: -2rem !important;
	}

	body.jeo-specialized-video #primary > .site-main > .content {
		margin-bottom: -3rem;
	}
}

/*
 * At the classic tablet breakpoint, a floated, resized Project image expands
 * to the viewport width. Its float deliberately reserves the vertical space
 * beside the following heading. The block renderer otherwise constrains the
 * same serialized figure to half of the content column.
 */
@media only screen and (min-width: 600px) and (max-width: 782px) {
	body.single-project .wp-site-blocks > .site-content {
		margin-top: 74px !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.aligncenter,
	body.single-project .entry-content .petroleo-historias figure.wp-block-image.aligncenter > img {
		max-width: none;
		width: 576px !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright {
		margin-bottom: 8px;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright figcaption {
		display: block;
	}

	body.single-project .entry-content .petroleo-historias .wp-block-embed {
		margin-bottom: 16px;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright.is-resized {
		max-width: none;
		width: calc(100vw - 1px) !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright.is-resized > img {
		width: 100% !important;
	}

	/*
	 * These cards have a fixed tablet presentation in the stored newsletter
	 * composition. The parent block theme's fluid spacing shortens every card,
	 * accumulating a large page-level drift despite identical content.
	 */
	body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-projetos-esp-gap {
		height: 402.375px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-projetos-esp-gap .wp-block-image img {
		height: 220px !important;
		object-fit: cover;
		width: 100% !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .fixed-height-notice {
		height: 1067.984375px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .fixed-height-notice + .wp-block-group.alignwide {
		height: 1559.109375px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-posts-recentes-01 {
		height: 681.71875px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas {
		height: 2211.5625px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas-container {
		height: 690.359375px !important;
	}

	/* Match the classic Newspack card scale and fixed 24 px row rhythm. */
	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha.ts-3 article .entry-title {
		font-size: 1em !important;
		line-height: 1.2 !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha:not(.is-grid) article:not(:last-child) {
		margin-bottom: 24px;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-pilula-logo {
		padding: 24px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas-wrap-gallery {
		padding-left: 24px !important;
		padding-right: 24px !important;
		transform: translateY(9.9375px);
	}
}

/*
 * A block theme omits the legacy Group inner-container. Recreate only the
 * resulting width contract; content remains untouched and reversible.
 */
.newspack-front-page .entry-content > .wp-block-group.alignwide > .wp-block-columns {
	margin-inline: auto;
	max-width: 90vw;
	width: 1200px;
}

/*
 * Newspack Block Theme renders Columns as a grid and balances/pretty-wraps
 * headings. The classic home uses Core's flex contract and normal wrapping;
 * both differences alter serialized column percentages and editorial line
 * breaks. Keep this compatibility rule scoped to the migrated front page.
 */
.newspack-front-page .entry-content .wp-block-columns {
	display: flex !important;
}

.newspack-front-page,
.newspack-front-page h1,
.newspack-front-page h2,
.newspack-front-page h3,
.newspack-front-page h4,
.newspack-front-page h5,
.newspack-front-page h6 {
	text-wrap: wrap;
}

/* Legacy overlay cards without the newer helper class use the same inset. */
.newspack-front-page .entry-content .wp-block-columns .wpnbha.image-alignbehind:not(.homeposts-fullheight) article .entry-wrapper {
	padding: 32px;
}

.newspack-front-page .entry-content > .wp-block-cover.alignfull {
	padding-inline: 24px;
}

/*
 * Core's modern constrained-layout wrapper is added to serialized Groups in
 * a block theme. The classic runtime's inner-container allowed JEO media
 * components to consume the full wide alignment. Limit the override to the
 * legacy singular compatibility shell so ordinary Site Editor Groups retain
 * their native layout behavior.
 */
body:is(.post-template-single-wide, .post-template-single-feature) .entry-content > .wp-block-group.alignwide > .image-gallery > .image-gallery-wrapper {
	margin-inline: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

body:is(.post-template-single-wide, .post-template-single-feature) .entry-content > .wp-block-group.alignwide > .image-gallery {
	margin-bottom: 0;
}

/*
 * The pinned classic stylesheet expects Group's legacy inner-container. In a
 * block theme its descendant selector instead reaches the Media & Text figure,
 * applies auto inline margins and can collapse an offscreen lazy image to zero
 * width. Restore the figure's native grid-item geometry.
 */
body:is(.post-template-single-wide, .post-template-single-feature) .entry-content > .wp-block-group.alignwide > .wp-block-media-text > .wp-block-media-text__media {
	margin: 0 !important;
	max-width: none !important;
	width: 100% !important;
}

/* The stored JEO pullquote style follows the publication's primary colour. */
body.singular .wp-block-pullquote.is-style-jeo blockquote p:first-of-type::before {
	color: var(--primary);
}

body.singular .wp-block-pullquote {
	font-size: 24px;
	line-height: 38.4px;
}

body.singular .wp-block-pullquote blockquote p {
	font-size: 22px;
	line-height: 28.6px;
	margin: 11px 0;
}

body.singular .wp-block-pullquote cite {
	font-size: 19.2px;
	line-height: 30.72px;
	margin: 0;
	opacity: 1;
}

/*
 * Core's block-theme defaults replace the original Media & Text inset with a
 * fluid spacing preset and collapse the final child's margin. The classic
 * frontend used 0 8% at every viewport and retained 42px after a nested
 * pullquote. Preserve those metrics without changing the block's grid mode.
 */
body.singular .wp-block-media-text > .wp-block-media-text__content {
	max-width: none;
	padding: 0 8%;
}

body.singular .wp-block-media-text > .wp-block-media-text__content > .wp-block-pullquote:last-child {
	margin-bottom: 42px;
}

@media only screen and (max-width: 600px) {
	/* Match the classic 1/64px layout boundary used for component captures. */
	body.post-template-single-feature .entry-content .image-gallery:not(.fullscreen) {
		transform: translateY(-0.015625px);
	}
}

/* Preserve the classic Newspack caption metrics after block-theme globals. */
body.singular .entry-content figcaption {
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	font-size: 13px;
	line-height: 20.8px;
	margin: 0.5em auto 1em;
}

/* Keep legacy widget geometry when modern block-theme globals are present. */
#secondary.widget-area {
	padding-top: 0;
}

#secondary .widget-title,
#secondary .widgettitle,
#secondary .accent-header {
	border-bottom: 0;
	color: #111;
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif !important;
	padding-bottom: 0;
}

#secondary .widget_archive li,
#secondary .widget_categories li,
#secondary .widget_meta li {
	margin-block: 0;
}

#secondary .search-form input[type="search"] {
	font-family: georgia, garamond, "Times New Roman", serif;
	font-size: 12.8px;
	line-height: 20.48px;
}

/* Author archives start directly below the classic navigation bar. */
body.archive.author .wp-block-group.site-content {
	margin-top: 0;
}

body.archive.author .page-header.author .article-section-title {
	border-bottom: 0;
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	padding-bottom: 0;
}

/* The classic search heading uses only JEO's green leading rule. */
body.search .page-header .article-section-title {
	border-bottom: 0;
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	padding-bottom: 0;
}

/* Taxonomy headings use JEO's leading rule without the block parent's divider. */
body.archive .custom-archive .page-header .article-section-title {
	border-bottom: 0;
	padding-bottom: 0;
}

/*
 * The block parent turns archive categories into compact color badges. JEO's
 * established archive contract uses an unboxed, uppercase taxonomy trail.
 */
.search .content-area article .cat-links,
.archive .content-area article .cat-links,
.blog .content-area article .cat-links {
	color: #555d66;
	display: block;
	font-size: 18px;
	line-height: 1.2;
	margin-bottom: 12px;
}

.search .content-area article .cat-links a,
.search .content-area article .cat-links a:hover,
.search .content-area article .cat-links a:visited,
.archive .content-area article .cat-links a,
.archive .content-area article .cat-links a:hover,
.archive .content-area article .cat-links a:visited,
.blog .content-area article .cat-links a,
.blog .content-area article .cat-links a:hover,
.blog .content-area article .cat-links a:visited {
	background: transparent;
	color: inherit;
	display: inline;
	font-size: inherit;
	line-height: inherit;
	margin: 0;
	padding: 0;
	text-transform: uppercase;
}

/* Lightweight, dependency-free replacement for the retired Select2 shell. */
.search-form .jeo-search-multiselect {
	position: relative;
}

.search-form .jeo-search-multiselect__toggle {
	appearance: none;
	background: transparent;
	border: 2px solid #ddd;
	border-radius: 10px;
	box-sizing: border-box;
	color: #555d66;
	display: block;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	height: 42px;
	inset: auto;
	line-height: 19px;
	overflow: hidden;
	padding: 0 12px;
	position: relative;
	text-align: left;
	text-overflow: ellipsis;
	white-space: nowrap;
	width: 100%;
}

@media only screen and (max-width: 1024px) {
	body.archive.author header.page-header.author {
		margin-bottom: 60px;
		padding-top: 10px;
	}
}

/* Keep a visible media frame if a local fixture or remote asset is missing. */
.search .content-area article .post-thumbnail-inner {
	box-shadow: inset 0 0 0 1px #ddd;
}

.search-form .jeo-search-multiselect__toggle:focus-visible {
	outline: 2px solid var(--primary);
	outline-offset: 2px;
}

.search-form .jeo-search-multiselect__native {
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px !important;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px !important;
}

.search-form .jeo-search-multiselect__menu {
	background: #fff;
	border: 1px solid #ddd;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	left: 0;
	max-height: 280px;
	overflow-y: auto;
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 100;
}

.search-form .jeo-search-multiselect__menu[hidden] {
	display: none;
}

.search-form .jeo-search-multiselect__menu label {
	align-items: center;
	display: flex;
	font-size: 16px;
	gap: 8px;
	line-height: 1.3;
	padding: 8px 12px;
}

.search-form .jeo-search-multiselect__menu label:has(input:checked),
.search-form .jeo-search-multiselect__menu label:hover {
	background: rgba(89, 129, 26, 0.12);
}

/* Restore legacy Group inner-container flow on stored wide pages. */
.page-template-single-wide .entry-content .wp-block-column > .wp-block-group > p:first-child {
	margin: 0 0 32px;
}

.page-template-single-wide .entry-content .wp-block-column > .wp-block-group > p:last-child {
	margin: 32px 0 0;
}

.page-template-single-wide .entry-content .link-dropdown.alignleft {
	margin-right: 32px;
}

/* Restore the classic Newspack card typography after block-theme globals. */
.newspack-front-page .wp-block-newspack-blocks-homepage-articles.wpnbha article .entry-title {
	font-family: var(--special-heading-font);
	line-height: 1.2;
	margin-bottom: 0;
}

/*
 * The block parent gives Homepage Articles a new type scale with selectors
 * that outrank the block's own generated compatibility CSS. Stored wide
 * pages were authored against Newspack Classic's 1.2em card-title contract.
 */
body.page-template-single-wide:not(.newspack-front-page) .entry-content .wp-block-newspack-blocks-homepage-articles.wpnbha article .entry-title {
	font-size: 1.2em;
	line-height: 1.2;
	margin: 0;
	text-wrap: wrap;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-qr-noticia-03 > .wpnbha {
	margin-top: 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-qr-noticia-02 > .wpnbha:first-child {
	margin-bottom: 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-qr-noticia-02 > .wpnbha:last-child {
	margin-top: 32px;
}

/* Restore spacing serialized by the legacy newsletter/home composition. */
body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas-header {
	margin-bottom: 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas-wrap-gallery {
	margin-top: 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas > .wp-block-group:last-child,
body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-projetos-esp-group > .cophome-projetos-esp-heading-up {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none;
	width: 100%;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas > .wp-block-group:last-child {
	margin-top: 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-projetos-esp-title-2 {
	line-height: 1.2;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-projetos-esp .wp-block-buttons {
	gap: 8px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content :is(h1, h2, h3, h4, h5, h6, p, mark, strong, span) {
	text-wrap: wrap;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .entry-title {
	font-size: 16px !important;
	line-height: 1.2 !important;
	text-wrap: wrap;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc article .entry-wrapper {
	display: block;
}

/*
 * Carousel 1.x rendered metadata as a compact flex row over the image. The
 * block theme parent changes the same markup to a grid and adds a gradient,
 * which both changes the stored composition and makes dates span the slide.
 */
body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc article .entry-wrapper {
	background-image: none;
	justify-content: normal;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-posts-recentes-01 .wpnbpc article .entry-meta {
	display: flex;
	font-size: 12px !important;
	flex-wrap: wrap;
	grid-template-areas: none;
	line-height: 19.2px;
	margin: 6px 0 30px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-posts-recentes-01 .wpnbpc article .entry-meta > * {
	width: auto;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wp-block-newspack-blocks-homepage-articles.wpnbha article .entry-wrapper .entry-meta {
	display: flex;
	font-size: 0.8em;
	flex-wrap: wrap;
	gap: 0;
	grid-template-areas: none;
	line-height: 1.6;
	margin: 0.5em 0 4px;
	row-gap: 0;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha .entry-meta .byline:not(:last-child) {
	margin-right: 1.5em;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha .entry-meta :is(.author, .byline) {
	font-weight: 400;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha .entry-meta :is(.author a, .byline a) {
	font-weight: 700;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha .post-thumbnail > a {
	display: block;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha.has-text-color .entry-meta span:not(.avatar) {
	opacity: 0.8;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha article a.external-link {
	color: var(--primary);
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-filter-logo-wrapper {
	margin: 0 0 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cop-post-block {
	margin: 32px 0 0;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-last-news {
	line-height: 1.2;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha > button {
	margin: 15px 0 80px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-filter .wpnbha .entry-meta {
	align-items: flex-start;
	gap: normal;
	justify-content: flex-start;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-filter > .wp-block-group.is-nowrap {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-filter .wpnbha button {
	line-height: 18px;
	margin: 15px 0 80px !important;
	max-width: none !important;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas-heading {
	margin-top: 16px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas.wpnbpc {
	margin-top: 0;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-posts-recentes-01 .wrap-title > h2 {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: none !important;
	text-wrap: wrap;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-new-gallery .actions {
	line-height: 1.6;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-new-gallery .actions button {
	border-radius: 5px;
	font-family: "Fira Sans Condensed", -apple-system, blinkmacsystemfont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content :is(.wrap-posts-recentes-01, .cophome-mapas-container) .wpnbpc .swiper-pagination-bullets {
	height: 36px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .hero-banner {
	padding-bottom: 0;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-pilulas-balao {
	margin-left: 32px;
	padding-bottom: 7.04px !important;
	padding-top: 7.04px !important;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-pilulas-balao > p {
	margin: 0 !important;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content :is(.cophome-rede-cid-btn, .wrap-pilulas-button) {
	gap: 8px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content :is(.cophome-rede-cid-btn, .cophome-projetos-esp-btn) {
	line-height: 1.6;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas-wrap-gallery,
body.page-template-single-wide:not(.newspack-front-page) .entry-content .carousel-wrapper {
	margin-bottom: 32px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .carousel-wrapper {
	margin-top: 32px;
}

/* The map carousel uses the classic block's smaller metadata scale. */
body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas.wpnbpc article .entry-meta {
	display: flex;
	font-size: 11.2px !important;
	flex-wrap: wrap;
	grid-template-areas: none;
	line-height: 17.92px;
	margin: 5.6px 0 0;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas.wpnbpc article .entry-meta > * {
	width: auto;
}

/*
 * Keep the pre-initialisation state deterministic. Newspack initialises these
 * carousels lazily with IntersectionObserver; full-page screenshots do not
 * scroll the viewport, while a reader does. The classic theme still exposed
 * the controls before that observer fired.
 */
body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .swiper-button {
	border-radius: 4px;
	display: block !important;
	height: 48px;
	margin-top: -24px;
	top: 50%;
	width: 48px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .swiper-button-prev {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27%3E%3Cpath fill=%27%23fff%27 d=%27M18 4.12 10.12 12 18 19.88 15.88 22l-10-10 10-10z%27/%3E%3Cpath fill=%27none%27 d=%27M0 0h24v24H0z%27/%3E%3C/svg%3E");
	left: 1.2em;
	right: auto;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .swiper-button-next {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2724%27 height=%2724%27%3E%3Cpath fill=%27%23fff%27 d=%27M5.88 4.12 13.76 12l-7.88 7.88L8 22l10-10L8 2z%27/%3E%3Cpath fill=%27none%27 d=%27M0 0h24v24H0z%27/%3E%3C/svg%3E");
	left: auto;
	right: 1.2em;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .swiper-pagination-bullet {
	color: #fff;
	opacity: 0.5;
	width: 12px;
}

body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .swiper-pagination-bullet:first-child,
body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbpc .swiper-pagination-bullet-active {
	opacity: 1;
	width: 24px;
}

.newspack-front-page .wpnbha .article-section-title {
	border-bottom: 0;
	font-family: var(--newspack-theme-font-heading);
	font-weight: 700;
	line-height: 1.2;
	padding-bottom: 0;
}

body.newspack-front-page .entry-content .wpnbha article .entry-wrapper > p {
	line-height: 22px;
	margin: 8px 0;
}

.newspack-front-page .entry-content > .wp-block-columns .wpnbha.is-grid .article-section-title {
	margin-bottom: -14px;
	margin-top: 16px;
}

/*
 * Block layout support resets the margins that separated these serialized
 * homepage Groups in the classic theme. Restore only the observed contract.
 */
.newspack-front-page .home__block-sidebar > .wp-block-group.has-light-gray-background-color:not(:last-child) {
	margin-bottom: 32px;
}

.newspack-front-page .home__block-sidebar > .castos-player {
	margin-block: 32px;
}

.newspack-front-page .home__block-sidebar > .wp-block-group.has-light-gray-background-color > .wpnbha {
	margin-bottom: 32px;
}

/* Recreate classic Group flow spacing after its wrapper is flattened. */
.newspack-front-page .home__block-sidebar > .wp-block-group:has(> .wp-block-separator) > .wpnbha {
	margin-bottom: 32px;
}

.newspack-front-page .home__block-sidebar > .wp-block-group:has(> .wp-block-separator) > .wp-block-paragraph:last-child {
	margin-top: 32px;
}

/* Avoid a one-pixel rounding surplus for every legacy category row. */
.newspack-front-page .wpnbha.show-category .cat-links a {
	line-height: 16px;
}

.newspack-front-page .wpnbha > .wp-block-button__link {
	margin-top: 14px;
}

.newspack-front-page .wpnbha.show-category.has-more-button > .wp-block-button__link {
	width: fit-content;
}

body.newspack-front-page .entry-content .wpnbha article .entry-meta {
	display: flex;
	line-height: 1.6;
	margin-bottom: 4px;
	margin-top: 7px;
}

/* Keep the classic thumbnail margin in the cross-size of horizontal cards. */
.newspack-front-page .wpnbha.image-alignleft article .post-thumbnail {
	align-self: flex-start;
	margin-bottom: 4px;
}

.newspack-front-page main:not(:has(.post-footer)) .wp-block-post-content.entry-content > :last-child:is(.alignfull):is(.wp-block-cover) {
	/* Counter the block parent theme's intentional full-bleed footer overlap. */
	margin-bottom: 0 !important;
}

.newspack-front-page .entry-content > .wp-block-cover.alignfull:last-child .wp-block-cover__inner-container > p:last-child {
	margin-top: 18px;
}

/*
 * The classic drawer combines negative left/right offsets. An explicit width
 * prevents that off-canvas element from covering the whole viewport.
 */
.mobile-sidebar {
	box-sizing: border-box;
	width: 90vw;
}

@media only screen and (min-width: 782px) {
	.mobile-sidebar {
		width: 33vw;
	}
}

/*
 * The classic parent resolves Newspack's em-based title scale against a
 * smaller mobile heading base than the block parent. Pin the effective sizes
 * so serialized Homepage Articles keep their approved line wrapping.
 */
@media only screen and (max-width: 829px) {
	/*
	 * The block parent scales the article rhythm with the viewport. The classic
	 * parent keeps a fixed 1.5rem gap throughout its collapsed layouts.
	 */
	body.newspack-front-page .entry-content .wpnbha:not(.is-grid) article:not(:last-child) {
		margin-bottom: 24px;
	}

	/* Keep the classic overlay inset on the featured card. */
	body.newspack-front-page .entry-content .homeposts-fullheight.image-alignbehind article .entry-wrapper {
		padding: 32px;
	}

	/*
	 * Undo the desktop-only overlap used for the Opinions grid heading. The
	 * one-pixel minimum height matches the classic avatar row box.
	 */
	body.newspack-front-page .entry-content > .wp-block-columns .wpnbha.is-grid .article-section-title {
		margin-bottom: 0;
	}

	body.newspack-front-page .entry-content .wpnbha.is-grid .entry-meta {
		min-height: 25px;
	}

	body.newspack-front-page .entry-content > .wp-block-cover.alignfull:last-child .wp-block-button {
		margin-top: 0;
	}

	body.newspack-front-page .entry-content > .wp-block-cover.alignfull:last-child .wp-block-cover__inner-container > p:last-child {
		margin: 16px 0;
	}

	body.newspack-front-page .entry-content .wpnbha.ts-7 .entry-title {
		font-size: 32px;
	}

	body.newspack-front-page .entry-content .wpnbha.ts-4 .entry-title {
		font-size: 19.2px;
	}

	body.newspack-front-page .entry-content .wpnbha.ts-3 .entry-title {
		font-size: 16px;
	}
}

@media only screen and (max-width: 500px) {
	/* The four-card legacy column uses the classic compact mobile overlay. */
	.newspack-front-page .entry-content .wp-block-columns .wpnbha.image-alignbehind.is-4 article .entry-wrapper {
		padding: 16px;
	}

	/* Preserve the classic subpixel category rhythm after mobile scaling. */
	.newspack-front-page .wpnbha.show-category .cat-links a {
		line-height: 15.8px;
	}
}

@media only screen and (max-width: 599px) {
	/* Block-theme list spacing otherwise adds two pixels between footer links. */
	.site-footer .footer-widgets li {
		margin-block: 0;
	}

	/* Recreate the classic float used by stored credited-image stories. */
	body.single .entry-content > .wp-block-group.alignright {
		float: right;
		margin: 25px 0 25px 16px;
		max-width: 50%;
		width: 50%;
	}

	/* Preserve the classic two-column Cover composition at 390 px. */
	body.single.single-featured-image-default:not(.has-featured-image) .entry-content .wp-block-cover__inner-container > .wp-block-columns {
		margin: 0 210px 28px 0 !important;
		min-height: 1054px;
	}

	/*
	 * The classic site wrapper clips deliberately oversized Project media;
	 * keep its authored dimensions while preventing horizontal page overflow.
	 */
	body.single-project .wp-site-blocks {
		overflow: hidden;
	}

	body.single-project .wp-site-blocks > .site-content {
		margin-top: 74px !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.aligncenter,
	body.single-project .entry-content .petroleo-historias figure.wp-block-image.aligncenter > img {
		max-width: none !important;
		min-width: 576px;
		width: 576px !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright {
		margin-bottom: 8px !important;
		max-width: none !important;
		min-width: 767px;
		width: 767px !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright > img {
		max-width: none !important;
		min-width: 767px;
		width: 767px !important;
	}

	body.single-project .entry-content .petroleo-historias figure.wp-block-image.alignright figcaption {
		display: block;
	}

	body.single-project .entry-content .petroleo-historias .wp-block-embed {
		margin-bottom: 16px;
	}

	/* Stored special-project cards use a fixed media crop on mobile. */
	body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-projetos-esp-gap .wp-block-image img {
		height: 220px !important;
		object-fit: cover;
		width: 100% !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha.ts-3 article .entry-title {
		font-size: 1em !important;
		line-height: 1.2 !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wpnbha:not(.is-grid) article:not(:last-child) {
		margin-bottom: 24px;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .fixed-height-notice {
		height: 1108.921875px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-posts-recentes-01 {
		height: 553.625px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .wrap-pilula-logo {
		padding: 24px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas-wrap-gallery {
		padding-left: 24px !important;
		padding-right: 24px !important;
		transform: translateY(-7.0625px);
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .pilulas {
		height: 2201.515625px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas-container {
		height: 522.265625px !important;
	}

	body.page-template-single-wide:not(.newspack-front-page) .entry-content .cophome-mapas-container .wp-block-cover__inner-container {
		transform: translateY(-8.015625px);
	}
}

@media only screen and (min-width: 600px) and (max-width: 829px) {
	body.newspack-front-page .entry-content > .wp-block-columns .wpnbha.is-grid .article-section-title {
		margin-bottom: 2px;
	}
}
