/* ==========================================================================
   MATERIAS DO BLOG (06/10/2026)

   Carrega so em post individual, pelo novamira-sandbox/duplod-materia.php,
   que tambem poe as classes no body:
     .dd-mat         toda materia com a camada ligada
     .dd-mat-prosa   texto corrido (a maioria das 74)
     .dd-mat-cols    montada em colunas do BeTheme ([two_third]: 6981 e
                     7094): a grade dela fica como esta
     .dd-mat-legado  publicada antes de 2024

   O problema que isto resolve, medido em 1440px: paragrafo com 726px, e
   titulo, tabela, caixa, chamada e linha com 1058px, tudo na mesma margem
   esquerda. Tres larguras e um vao de 330px a direita. Aqui vira uma coluna
   so de 720px, centrada, e o cabecalho do artigo entra na mesma coluna.

   Desliga: update_option('dd_materia_layer','0'). Compara: ?dd_materia=0.
   So tokens --dd-* do :root do style.css (esta folha nao conta com a v2).
   ========================================================================== */

.dd-mat {
	--mat-col: 720px;
	--mat-wide: 1058px;
	--mat-gap: clamp(2.5rem, 1.8rem + 2vw, 3.5rem);
}


/* --- 1. Cabecalho do artigo na coluna de leitura -------------------------- */

.dd-mat-prosa .dd-page-hero--post .dd-page-hero-inner {
	max-width: var(--mat-col);
	margin-left: auto;
	margin-right: auto;
}

.dd-mat-prosa .dd-page-hero--post .dd-hero-lead {
	max-width: none;
}

.dd-mat .dd-page-hero--post .dd-hero-title {
	text-wrap: balance;
}

/* Autor, data, atualizacao e tempo de leitura: quebram como blocos, sem o
   ponto separador sobrando no comeco da segunda linha. */
.dd-mat .dd-page-hero--post .dd-hero-facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	column-gap: 0;
	row-gap: .15rem;
}

.dd-mat .dd-page-hero--post .dd-hero-facts .dd-hero-sep {
	margin-left: .75rem;
	margin-right: .75rem;
}

@media (max-width: 767px) {
	.dd-mat .dd-page-hero--post .dd-hero-facts {
		column-gap: 1rem;
	}

	.dd-mat .dd-page-hero--post .dd-hero-facts .dd-hero-sep {
		display: none;
	}
}

/* Migalha numa linha so: com o cabecalho na coluna de 720px, o titulo do
   post quebrava para uma segunda linha com o marcador solto. O item atual
   (que o H1 repete logo abaixo) e quem encolhe, com reticencias. */
.dd-mat .dd-hero-crumbs ol {
	flex-wrap: nowrap;
	min-width: 0;
}

.dd-mat .dd-hero-crumbs li {
	flex: none;
	white-space: nowrap;
}

.dd-mat .dd-hero-crumbs li:last-child {
	flex: 0 1 auto;
	min-width: 0;
}

.dd-mat .dd-hero-crumbs li:last-child > span {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Setas e grade de icone solto entre o cabecalho e a capa: tres alvos sem
   rotulo, que repetem a migalha ("Blog") e as relacionadas do fim. */
.dd-mat .section-post-header .post-nav,
.dd-mat .section-post-header .post-header {
	display: none;
}

.dd-mat .section-post-header {
	padding-top: var(--mat-gap);
}

/* A capa encostava no primeiro paragrafo. */
.dd-mat .section-post-header .single-photo-wrapper {
	margin-bottom: clamp(2rem, 1.4rem + 1.6vw, 3rem);
}

/* Capa: na coluna, com o canto do sistema. O tema pede a imagem com
   sizes="643px"; o PHP troca para a largura real. */
.dd-mat-prosa .section-post-header .single-photo-wrapper .mcb-column-inner {
	max-width: var(--mat-col);
	margin: 0 auto;
}

.dd-mat .section-post-header .single-photo-wrapper .image_frame {
	display: block;
	margin: 0 auto;
	border: 0;
	border-radius: var(--dd-radius-media);
	overflow: hidden;
}

.dd-mat-prosa .section-post-header .single-photo-wrapper .image_frame img {
	width: 100%;
	height: auto;
}

.dd-mat .section-post-header .single-photo-wrapper .image_frame img {
	border-radius: var(--dd-radius-media);
}


/* Materia em colunas: cabecalho e capa na borda da grade (x da coluna de
   2/3), a capa com a largura dessa coluna, sobre o texto. Antes eram tres
   margens: titulo 180, secoes 191, capa de 1056px. */
@media (min-width: 768px) {
	.dd-mat-cols .dd-page-hero--post .dd-page-hero-inner {
		padding-left: 11px;
		box-sizing: border-box;
	}

	.dd-mat-cols .section-post-header .single-photo-wrapper .mcb-column-inner {
		max-width: calc(66.666% - 14px);
		margin-left: 11px;
		margin-right: 0;
	}

	.dd-mat-cols .section-post-header .single-photo-wrapper .image_frame {
		margin: 0;
	}

	.dd-mat-cols .section-post-header .single-photo-wrapper .image_frame img {
		width: 100%;
		height: auto;
	}
}


/* --- 2. A coluna --------------------------------------------------------- */

/* Tudo o que e texto ou caixa de texto entra na coluna. A regra antiga do
   style.css (max-width:68ch so em p/ul/ol) deixava o resto em 1058px. */
html .dd-mat-prosa .the_content_wrapper > * {
	max-width: var(--mat-col);
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}

/* As caixas escritas em HTML nas materias de 2026 trazem margin:28px 0 no
   style="" e caiam para a esquerda da coluna. */
html .dd-mat-prosa .the_content_wrapper > [style*="margin"]:not(.alignleft):not(.alignright) {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* O navegador cria <p></p> ao consertar marcacao antiga (p dentro de p,
   div dentro de p): nao existem no HTML, so no DOM. */
html .dd-mat .the_content_wrapper p:empty {
	display: none;
}

/* Saem da coluna, centrados: grades de colunas. Tabela fica na coluna e
   rola dentro de si quando nao cabe. */
html .dd-mat-prosa .the_content_wrapper > .wp-block-columns,
html .dd-mat-prosa .the_content_wrapper > .wrap,
html .dd-mat-prosa .the_content_wrapper > .column,
html .dd-mat-prosa .the_content_wrapper > figure.wp-block-image.alignwide,
html .dd-mat-prosa .the_content_wrapper > .alignfull {
	max-width: var(--mat-wide);
}

/* Lista conta o recuo dentro da coluna, nao fora dela. */
html .dd-mat-prosa .the_content_wrapper > ul,
html .dd-mat-prosa .the_content_wrapper > ol {
	padding-left: 1.4em;
	box-sizing: border-box;
}


/* --- 3. Tipografia de leitura ------------------------------------------- */

html .dd-mat-prosa .the_content_wrapper {
	font-size: 1.125rem;
	line-height: 1.75;
	color: var(--dd-ink-2);
}

html .dd-mat-prosa .the_content_wrapper p,
html .dd-mat-prosa .the_content_wrapper li {
	font-size: 1.125rem;
	line-height: 1.75;
}

html .dd-mat-prosa .the_content_wrapper > p {
	margin-top: 0;
	margin-bottom: 1.25em;
}

html .dd-mat-prosa .the_content_wrapper li {
	margin-bottom: .45em;
}

html .dd-mat-prosa .the_content_wrapper li::marker {
	color: var(--dd-teal-600);
}

html .dd-mat-prosa .the_content_wrapper strong,
html .dd-mat-prosa .the_content_wrapper b {
	color: var(--dd-ink);
	font-weight: 600;
}

/* Escala: o tema da 38px ao H2 com 15px abaixo e quase nada acima, e o
   titulo encosta no paragrafo anterior. Aqui o espaco vem antes. */
html .dd-mat-prosa .the_content_wrapper h2 {
	font-size: clamp(1.625rem, 1.15rem + 1.3vw, 2rem);
	line-height: 1.2;
	letter-spacing: -.015em;
	font-weight: 600;
	color: var(--dd-ink);
	margin-top: var(--mat-gap);
	margin-bottom: .55em;
	text-wrap: balance;
}

html .dd-mat-prosa .the_content_wrapper h3 {
	font-size: clamp(1.25rem, 1.05rem + .55vw, 1.5rem);
	line-height: 1.3;
	letter-spacing: -.01em;
	font-weight: 600;
	color: var(--dd-ink);
	margin-top: 2.25rem;
	margin-bottom: .5em;
	text-wrap: balance;
}

html .dd-mat-prosa .the_content_wrapper h4,
html .dd-mat-prosa .the_content_wrapper h5,
html .dd-mat-prosa .the_content_wrapper h6 {
	font-size: 1.1875rem;
	line-height: 1.4;
	font-weight: 600;
	color: var(--dd-ink);
	margin-top: 1.75rem;
	margin-bottom: .4em;
}

html .dd-mat-prosa .the_content_wrapper > :first-child {
	margin-top: 0;
}

/* Titulo logo depois de titulo nao precisa do vao inteiro. */
html .dd-mat-prosa .the_content_wrapper :is(h2, h3, h4) + :is(h3, h4, h5) {
	margin-top: .75rem;
}

/* Links no texto: sublinhados, porque cor sozinha nao diz que e link. */
html .dd-mat-prosa .the_content_wrapper :is(p, li, td, blockquote) a:not(.button):not([class*="mfn-"]) {
	color: var(--dd-teal-600);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
	text-decoration-color: rgba(50, 118, 113, .45);
	transition: color .15s ease, text-decoration-color .15s ease;
}

html .dd-mat-prosa .the_content_wrapper :is(p, li, td) {
	overflow-wrap: break-word;
}

html .dd-mat-prosa .the_content_wrapper :is(p, li, td) a {
	overflow-wrap: anywhere;
}

html .dd-mat-prosa .the_content_wrapper :is(p, li, td, blockquote) a:not(.button):not([class*="mfn-"]):hover {
	color: var(--dd-red-700);
	text-decoration-color: currentColor;
}

html .dd-mat .the_content_wrapper a:focus-visible {
	outline: 2px solid var(--dd-teal-600);
	outline-offset: 2px;
	border-radius: 2px;
}


/* --- 4. Elementos dentro do texto --------------------------------------- */

html .dd-mat-prosa .the_content_wrapper blockquote {
	margin-top: 2rem;
	margin-bottom: 2rem;
	padding: .25rem 0 .25rem 1.25rem;
	border: 0;
	border-left: 3px solid var(--dd-teal-600);
	background: none;
	font-style: normal;
}

html .dd-mat-prosa .the_content_wrapper blockquote p {
	font-size: 1.1875rem;
	line-height: 1.6;
	color: var(--dd-ink);
	margin-bottom: .5em;
}

html .dd-mat-prosa .the_content_wrapper blockquote cite {
	display: block;
	font-size: .875rem;
	font-style: normal;
	color: var(--dd-ink-3);
}

/* O blockquote do Betheme desenha aspas grandes num ::before/::after. */
html .dd-mat-prosa .the_content_wrapper blockquote::before,
html .dd-mat-prosa .the_content_wrapper blockquote::after {
	content: none;
	display: none;
}

html .dd-mat-prosa .the_content_wrapper > hr:not(.no_line) {
	border: 0;
	border-top: 1px solid var(--dd-line);
	height: 0;
	margin-top: var(--mat-gap);
	margin-bottom: var(--mat-gap);
	background: none;
}

/* Imagens no texto */
html .dd-mat-prosa .the_content_wrapper img {
	max-width: 100%;
	height: auto;
	border-radius: var(--dd-radius-media);
}

html .dd-mat-prosa .the_content_wrapper figure {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

html .dd-mat-prosa .the_content_wrapper figure img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

html .dd-mat-prosa .the_content_wrapper figcaption,
html .dd-mat-prosa .the_content_wrapper .wp-caption-text {
	margin-top: .6rem;
	font-size: .875rem;
	line-height: 1.5;
	color: var(--dd-ink-3);
	text-align: center;
}

html .dd-mat-prosa .the_content_wrapper .wp-caption {
	max-width: 100%;
	border: 0;
	background: none;
	padding: 0;
}

html .dd-mat-prosa .the_content_wrapper .alignleft {
	float: left;
	max-width: 45%;
	margin: .35rem 1.5rem 1rem 0;
}

html .dd-mat-prosa .the_content_wrapper .alignright {
	float: right;
	max-width: 45%;
	margin: .35rem 0 1rem 1.5rem;
}

html .dd-mat-prosa .the_content_wrapper .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

/* Titulo nunca corre ao lado de imagem flutuante. */
html .dd-mat-prosa .the_content_wrapper :is(h2, h3, hr, .wp-block-table, .dd-mat-table) {
	clear: both;
}

/* Video e mapa: largura da coluna, proporcao fixa. */
html .dd-mat-prosa .the_content_wrapper iframe {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	margin: 2rem auto;
	border: 0;
	border-radius: var(--dd-radius-media);
}

/* Tabelas: rolam dentro de si no celular, nunca cortadas. */
html .dd-mat .the_content_wrapper .wp-block-table,
html .dd-mat .the_content_wrapper .dd-mat-table {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin-top: 2rem;
	margin-bottom: 2rem;
}

html .dd-mat-prosa .the_content_wrapper table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
	line-height: 1.5;
	margin: 0 auto;
}

html .dd-mat-prosa .the_content_wrapper table :is(th, td) {
	padding: .75rem 1rem;
	border: 1px solid var(--dd-line);
	text-align: left;
	vertical-align: top;
}

html .dd-mat-prosa .the_content_wrapper table th,
html .dd-mat-prosa .the_content_wrapper table thead td {
	background: var(--dd-warm);
	color: var(--dd-ink);
	font-weight: 600;
}

html .dd-mat-prosa .the_content_wrapper .wp-block-table figcaption {
	text-align: left;
}

/* Codigo. O bloco do Code Block Pro ja pinta o tema monokai: aqui so
   medida, rolagem e canto. */
html .dd-mat-prosa .the_content_wrapper pre {
	max-width: 100%;
	overflow-x: auto;
	padding: 1.1rem 1.25rem;
	border-radius: var(--dd-radius-media);
	font-size: .875rem;
	line-height: 1.65;
	tab-size: 4;
	white-space: pre;
}

html .dd-mat-prosa .the_content_wrapper .wp-block-kevinbatdorf-code-block-pro {
	margin-top: 1.5rem;
	margin-bottom: 1.75rem;
	border-radius: var(--dd-radius-media);
	overflow: hidden;
}

html .dd-mat-prosa .the_content_wrapper .wp-block-kevinbatdorf-code-block-pro pre {
	margin: 0;
	border-radius: 0;
}

/* O be.css pinta todo pre com listras de caderno (gradiente branco de 42px)
   por cima do fundo escuro do monokai: o texto claro sumia. */
html .dd-mat .the_content_wrapper pre {
	background-image: none;
	border: 0;
}

html .dd-mat .the_content_wrapper .wp-block-kevinbatdorf-code-block-pro pre {
	color: #F8F8F2;
}

html .dd-mat .the_content_wrapper pre:not([style*="background"]) {
	background-color: var(--dd-warm);
	color: var(--dd-ink);
	border: 1px solid var(--dd-line);
}

/* O estilo de `code` do tema (fundo branco, borda, nowrap) vazava para
   dentro do bloco: o codigo inteiro virava uma linha de 3.000px com uma
   caixinha branca. Ja estava assim antes de 06/10/2026. */
html .dd-mat .the_content_wrapper pre code {
	display: block;
	white-space: pre;
	background: none;
	border: 0;
	padding: 0;
	margin: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	border-radius: 0;
}

html .dd-mat .the_content_wrapper pre code .line,
html .dd-mat .the_content_wrapper pre code span {
	white-space: inherit;
}

html .dd-mat-prosa .the_content_wrapper :not(pre) > code {
	padding: .1em .35em;
	border-radius: 4px;
	background: var(--dd-warm);
	color: var(--dd-ink);
	font-size: .9em;
}

/* Caixas do BeTheme na coluna: resumo, ideia, chamada, FAQ. */
html .dd-mat-prosa .the_content_wrapper > :is(.alert, .idea_box, .call_to_action, .accordion, .faq) {
	margin-top: 2rem;
	margin-bottom: 2rem;
}

html .dd-mat-prosa .the_content_wrapper > .call_to_action {
	width: 100%;
	box-sizing: border-box;
}

html .dd-mat-prosa .the_content_wrapper > hr.no_line {
	margin: 0 auto;
}

html .dd-mat .the_content_wrapper .alert {
	border-radius: var(--dd-radius-media);
}


/* Imagem e codigo soltos (fora de p ou figure): as regras de img e pre
   acima dao max-width:100% e venciam a coluna. */
html .dd-mat-prosa .the_content_wrapper > :is(img, pre, iframe, video) {
	display: block;
	max-width: min(100%, var(--mat-col));
}


/* --- 5. Texto legado (antes de 2024) ------------------------------------ */

/* Fonte e cor coladas do Word e do editor antigo: o texto volta ao sistema.
   So em texto corrido; codigo fica como esta. */
html .dd-mat-legado .the_content_wrapper :is(p, li, h2, h3, h4, td) :is(span, font)[style],
html .dd-mat-legado .the_content_wrapper font {
	font-family: inherit !important;
	font-size: inherit !important;
	color: inherit !important;
	background-color: transparent !important;
	line-height: inherit !important;
}

html .dd-mat-legado .the_content_wrapper > p[style] {
	font-size: 1.125rem !important;
	line-height: 1.75 !important;
	text-align: left !important;
}

html .dd-mat-legado .the_content_wrapper u {
	text-decoration: none;
}


/* Titulo que era paragrafo: em materia antiga, frase de 3 a 5 linhas
   marcada como H2/H3. O PHP marca os de mais de 110 caracteres com
   .dd-mat-hlonga; ficam com corpo de abertura, nao de titulo. A tag nao
   muda (isso e decisao editorial, listada para o Daniel). */
html .dd-mat-prosa .the_content_wrapper .dd-mat-hlonga {
	font-size: 1.25rem;
	line-height: 1.55;
	font-weight: 500;
	letter-spacing: 0;
	color: var(--dd-ink);
	margin-top: 1.5rem;
	margin-bottom: 1rem;
	text-wrap: pretty;
}


/* FAQ: a pergunta saia em 13px com 60px de recuo para o "+". */
html .dd-mat .the_content_wrapper .mfn-acc .question > .title {
	font-size: 1rem;
	line-height: 1.45;
	font-weight: 600;
	color: var(--dd-ink);
	padding-left: 52px;
}

html .dd-mat .the_content_wrapper .mfn-acc .question .answer,
html .dd-mat .the_content_wrapper .mfn-acc .question .answer p {
	font-size: 1rem;
	line-height: 1.65;
}

/* Chamada montada sem icone (<i class="">): o tema desenha so o anel. */
html .dd-mat .the_content_wrapper .call_to_action .call_center:has(.icon_wrapper > i[class=""]):not(:has(a)) {
	display: none;
}


/* --- 6. Fim do artigo ---------------------------------------------------- */

.dd-mat-prosa .section-post-about .author-box .mcb-column-inner {
	max-width: var(--mat-col);
	margin-left: auto;
	margin-right: auto;
}


/* --- 7. Celular ---------------------------------------------------------- */

@media (max-width: 767px) {

	/* A migalha quebrava em tres linhas com marcador solto: o item atual
	   repete o H1 logo abaixo. */
	.dd-mat .dd-hero-crumbs li:last-child {
		display: none;
	}

	/* A categoria tambem sai: ela esta no selo logo abaixo do titulo, e era
	   ela que quebrava em segunda linha com marcador solto. */
	.dd-mat .dd-hero-crumbs li:nth-last-child(2) {
		display: none;
	}



	.dd-mat .dd-page-hero--post .dd-hero-title {
		line-height: 1.18;
	}

	.dd-mat .section-post-header {
		padding-top: 2rem;
	}

	html .dd-mat-prosa .the_content_wrapper,
	html .dd-mat-prosa .the_content_wrapper p,
	html .dd-mat-prosa .the_content_wrapper li {
		font-size: 1.0625rem;
		line-height: 1.7;
	}

	html .dd-mat-legado .the_content_wrapper > p[style] {
		font-size: 1.0625rem !important;
		line-height: 1.7 !important;
	}

	html .dd-mat-prosa .the_content_wrapper h2 {
		margin-top: 2.5rem;
	}

	html .dd-mat-prosa .the_content_wrapper :is(.alignleft, .alignright) {
		float: none;
		max-width: 100%;
		margin: 1.5rem auto;
		display: block;
	}

	/* Resumo: o icone ocupava uma coluna de 75px e deixava o texto com 215px. */
	html .dd-mat .the_content_wrapper .alert {
		display: block;
		padding: 1.25rem 1.25rem 1rem;
	}

	html .dd-mat .the_content_wrapper .alert .alert_icon {
		display: none;
	}

	html .dd-mat .the_content_wrapper .alert .alert_wrapper {
		padding: 0;
		margin: 0;
	}

	/* Autor: a foto ao lado espremia o texto em ~140px. */
	.dd-mat .section-post-about .author-box-wrapper {
		display: block;
	}

	.dd-mat .section-post-about .author-box .avatar-wrapper {
		float: none;
		margin: 0 0 .75rem;
	}

	.dd-mat .section-post-about .author-box .desc-wrapper {
		margin-left: 0;
		padding-left: 0;
		width: auto;
	}

	html .dd-mat-prosa .the_content_wrapper table {
		min-width: 520px;
		font-size: .9375rem;
	}

	html .dd-mat-prosa .the_content_wrapper table :is(th, td) {
		padding: .6rem .75rem;
	}
}
