/* Finanças · Kit C · Crescimento · base: botões, sobretítulo, ícones, cartões, trilha, texto do post e anúncio.
   As cores, fontes e cantos vêm das variáveis de cada kit (assets/css/style.css do kit). */

/* Título traduzido com palavra longa (ex.: alemão) quebra dentro da própria caixa em vez de vazar; com hífen nos idiomas de palavras compostas. */
h1, h2, h3, h4, h5, h6,
[class*="__title"] {
	overflow-wrap: anywhere;
}

:is(:lang(de), :lang(nl), :lang(sv), :lang(da), :lang(nb), :lang(no), :lang(fi), :lang(hu)) :is(h1, h2, h3, h4, h5, h6, [class*="__title"]) {
	hyphens: auto;
}

/* Base ------------------------------------------------------------------ */
.nx *,
.nx *::before,
.nx *::after {
	box-sizing: border-box;
}

body.nx {
	margin: 0;
	background: var(--nx-bg);
	color: var(--nx-ink);
	font-family: var(--nx-font);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* :where() = prioridade mínima: estilos do próprio conteúdo (blocos, HTML) vencem */
:where(.nx) a {
	color: var(--nx-ink);
}

:where(.nx) a:hover {
	color: var(--fx-ink);
}

:where(.nx) img {
	max-width: 100%;
	height: auto;
}

:where(.nx) h1,
:where(.nx) h2,
:where(.nx) h3,
:where(.nx) p {
	margin: 0;
}

.nx :focus-visible {
	outline: 2px solid var(--fx-ink);
	outline-offset: 2px;
}

.nx-wrap {
	width: 100%;
	max-width: calc(1216px + var(--nx-gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--nx-gutter);
}

.nx-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.nx-skip {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 100;
	padding: 10px 16px;
	border-radius: var(--fx-pill, 999px);
	background: var(--nx-ink);
	color: #fff !important;
	font-weight: 700;
	text-decoration: none;
}

.nx-skip:focus {
	top: 12px;
}

/* Botões, links e campos ------------------------------------------------ */
.nx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: 48px;
	padding: 0 22px;
	border: 0;
	border-radius: 10px;
	background: var(--nx-accent);
	color: var(--nx-on-accent) !important;
	font: 700 15px/1 var(--nx-font);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.nx-btn:hover {
	background: var(--nx-accent-hover);
	color: var(--nx-on-accent-hover) !important;
}

.nx-btn--lg {
	height: 56px;
	padding: 0 28px;
	font-size: 16px;
}

.nx-btn--ghost {
	border: 1.5px solid var(--nx-line);
	background: var(--nx-white);
	color: var(--nx-ink) !important;
}

.nx-btn--ghost:hover {
	background: var(--fx-tint-10);
	color: var(--nx-ink) !important;
}

.nx-link {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--fx-ink) !important;
	font-size: 15px;
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

.nx-link:hover {
	text-decoration-color: var(--nx-accent);
}

.nx-input {
	width: 100%;
	min-width: 0;
	height: 48px;
	padding: 0 18px;
	border: 1px solid var(--nx-line);
	border-radius: var(--fx-pill, 999px);
	background: var(--nx-white);
	color: var(--nx-ink);
	font: 500 15px var(--nx-font);
}

.nx-input:focus {
	border-color: var(--nx-accent);
	outline: none;
	box-shadow: 0 0 0 3px var(--fx-tint-16);
}

/* Sobretítulo e etiqueta da categoria: retângulo verde-claro, sem maiúsculas. */
.nx-eyebrow,
.nx-card__cat {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 10px;
	border-radius: 6px;
	background: color-mix(in oklab, var(--nx-accent) 12%, #fff);
	color: var(--fx-ink);
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0;
	text-transform: none;
}

.nx-eyebrow i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--nx-accent);
	display: none;
}

.nx-ico {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: var(--fx-radius, 14px);
	background: var(--fx-tint-11);
	color: var(--fx-ink);
}

.nx-h2 {
	font-size: 40px;
	font-family: var(--fx-display, inherit);
	font-weight: var(--fx-display-weight, 800);
	line-height: 1.12;
	letter-spacing: var(--fx-display-tracking, -.025em);
	text-wrap: balance;
	color: var(--nx-ink);
}

.nx-lead {
	font-size: 18px;
	line-height: 1.65;
	color: var(--nx-muted);
}

/* Cartões de artigo (home, 404 e listagens) ----------------------- */
/* Mídia: imagem do post ou ilustração na cor do site. */
.nx-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nx-illus {
	background: linear-gradient(140deg, var(--fx-tint-8) 0%, color-mix(in oklab, var(--nx-accent) 18%, #fff) 100%);
}

.nx-illus svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* Cores das ilustrações (shared/illustrations.php): o número é quanto da Cor destaque entra no tom. */
.nx-il-26 { fill: color-mix(in oklab, var(--nx-accent) 26%, #fff); }
.nx-il-30 { fill: color-mix(in oklab, var(--nx-accent) 30%, #fff); }
.nx-il-40 { fill: color-mix(in oklab, var(--nx-accent) 40%, #fff); }
.nx-il-41 { fill: color-mix(in oklab, var(--nx-accent) 41%, #fff); }
.nx-il-52 { fill: color-mix(in oklab, var(--nx-accent) 52%, #fff); }
.nx-il-63 { fill: color-mix(in oklab, var(--nx-accent) 63%, #fff); }
.nx-il-74 { fill: color-mix(in oklab, var(--nx-accent) 74%, #fff); }
.nx-il-80 { fill: color-mix(in oklab, var(--nx-accent) 80%, #fff); }
.nx-il-92 { fill: color-mix(in oklab, var(--nx-accent) 92%, #fff); }
.nx-il-96 { fill: color-mix(in oklab, var(--nx-accent) 96%, #fff); }
.nx-il-branco { fill: #fff; }
.nx-il-linha { fill: none; stroke: color-mix(in oklab, var(--nx-accent) 92%, #fff); stroke-width: 5; }
.nx-il-moeda { fill: var(--fx-gold, #F2B33D); }
.nx-il-moeda-topo { fill: color-mix(in oklab, var(--fx-gold, #F2B33D) 78%, #fff); }

.nx-cards {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.nx-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 14px 14px 20px;
	border: 1px solid var(--nx-line);
	border-radius: 14px;
	background: var(--nx-white);
}

.nx-card__media {
	position: relative;
	height: 180px;
	overflow: hidden;
	border-radius: 10px;
}

.nx-card__body {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	gap: 10px;
	padding: 0 6px;
}

.nx-card__title {
	font-size: 20px;
	font-family: var(--fx-display, inherit);
	font-weight: var(--fx-display-weight, 800);
	line-height: 1.25;
	letter-spacing: var(--fx-display-tracking, -.025em);
	text-wrap: balance;
}

.nx-card__title a {
	text-decoration: none;
}

.nx-card__meta {
	font-size: 13px;
	line-height: 1.5;
	color: var(--nx-muted);
}

.nx-card__meta strong {
	color: var(--nx-ink);
}

.nx-card__text {
	font-size: 15px;
	line-height: 1.65;
	color: var(--nx-muted);
	display: none;
}

.nx-card .nx-link {
	margin-top: auto;
}

/* Trilha (breadcrumb) ---------------------------------------------- */
.nx-crumbs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--nx-muted);
}

.nx-crumbs a {
	color: var(--nx-muted);
}

.nx-crumbs [aria-current] {
	color: var(--nx-ink);
}

/* Texto do post e das páginas legais (.nx-content) ----------------- */
.nx-content {
	font-size: 18px;
	line-height: 1.75;
	color: var(--nx-ink);
	overflow-wrap: break-word;
}

.nx-content > * + * {
	margin-top: 20px;
}

.nx-content > :first-child {
	margin-top: 0;
}

.nx-content h2 {
	margin-top: 44px;
	font-size: 30px;
	font-family: var(--fx-display, inherit);
	font-weight: var(--fx-display-weight, 800);
	line-height: 1.12;
	letter-spacing: var(--fx-display-tracking, -.025em);
	text-wrap: balance;
	scroll-margin-top: 24px;
}

.nx-content h3 {
	scroll-margin-top: 24px;
	margin-top: 32px;
	font-size: 22px;
	font-family: var(--fx-display, inherit);
	font-weight: var(--fx-display-weight, 800);
	line-height: 1.25;
	letter-spacing: -.02em;
}

.nx-content h4 {
	scroll-margin-top: 24px;
	margin-top: 24px;
	font-size: 18px;
	font-weight: 800;
}

.nx-content h2 + *,
.nx-content h3 + *,
.nx-content h4 + * {
	margin-top: 14px;
}

.nx-content a {
	color: var(--fx-ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

.nx-content ul,
.nx-content ol {
	padding-left: 1.3em;
}

.nx-content li + li {
	margin-top: 8px;
}

.nx-content li::marker {
	color: var(--fx-ink);
	font-weight: 700;
}

.nx-content img {
	border-radius: var(--fx-radius, 14px);
}

.nx-content figure {
	margin-left: 0;
	margin-right: 0;
}

.nx-content figcaption {
	margin-top: 8px;
	font-size: 14px;
	color: var(--nx-muted);
}

.nx-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: 20px 24px;
	border-left: 4px solid var(--nx-accent);
	border-radius: 0 14px 14px 0;
	background: var(--nx-soft);
}

.nx-content blockquote p {
	margin: 0;
}

/* Tabelas: borda arredondada e rolagem para o lado no celular. */
.nx-content .wp-block-table,
.nx-content > table {
	display: block;
	overflow-x: auto;
	border: 1px solid var(--nx-line);
	border-radius: var(--fx-radius, 14px);
	background: var(--nx-white);
}

.nx-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.5;
}

.nx-content th,
.nx-content td {
	padding: 13px 14px;
	border: 0;
	border-top: 1px solid var(--nx-line);
	text-align: left;
	vertical-align: top;
}

.nx-content td {
	color: var(--nx-muted);
	font-variant-numeric: tabular-nums;
}

.nx-content thead th {
	border-top: 0;
	background: var(--fx-mint);
	font-weight: 700;
}

.nx-content tbody th {
	font-weight: 700;
}

.nx-content .wp-block-table table {
	border: 0;
}

.nx-content .wp-block-table figcaption {
	padding: 0 14px 12px;
}

/* Perguntas frequentes (bloco Detalhes). */
.nx-content details {
	padding: 18px 0;
	border-bottom: 1px solid var(--nx-line);
}

.nx-content details + details {
	margin-top: 0;
}

.nx-content summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
}

.nx-content summary::-webkit-details-marker {
	display: none;
}

.nx-content summary::after {
	content: "+";
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: color-mix(in oklab, var(--nx-accent) 12%, #fff);
	color: var(--fx-ink);
	font-size: 18px;
	font-weight: 700;
}

.nx-content details[open] summary::after {
	content: "−";
}

.nx-content details > :not(summary) {
	margin-top: 10px;
	font-size: 16px;
	line-height: 1.65;
	color: var(--nx-muted);
}

/* Botões do editor na Cor destaque. */
.nx-content .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 28px;
	border-radius: var(--fx-pill, 999px);
	background: var(--nx-accent);
	color: var(--nx-on-accent);
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
}

/* Sumário no celular (a lateral some). */
.nx-toc-inline {
	display: none;
	padding: 16px 18px;
	border: 1px solid var(--nx-line);
	border-radius: var(--fx-radius, 14px);
	background: var(--nx-white);
}

.nx-toc-inline summary {
	font-size: 15px;
	font-family: var(--fx-display, inherit);
	font-weight: var(--fx-display-weight, 800);
	cursor: pointer;
}

.nx-toc-inline nav {
	display: flex;
	flex-direction: column;
	margin-top: 8px;
}

.nx-toc-inline a {
	padding: 8px 0;
	border-top: 1px solid var(--nx-line);
	font-size: 15px;
	text-decoration: none;
}

/* Anúncio --------------------------------------------------------------- */
.nx-ad {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	margin: 48px auto 8px;
	padding: 0 20px;
}

.nx-ad__label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #444;
}

/* Busca: sugestões de artigos enquanto digita (shared/assets/js/comum.js) ---- */
.nx-suggest-host {
	position: relative;
}

.nx-suggest {
	position: absolute;
	z-index: 60;
	display: flex;
	flex-direction: column;
	max-height: min(420px, 70vh);
	overflow-y: auto;
	padding: 6px;
	border: 1px solid var(--nx-line);
	border-radius: var(--fx-radius, 16px);
	background: var(--nx-white);
	box-shadow: 0 16px 40px rgba(8, 24, 48, .12);
	text-align: left;
}

.nx-suggest[hidden] {
	display: none;
}

.nx-suggest__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: var(--fx-radius, 12px);
	color: var(--nx-ink);
	text-decoration: none;
}

.nx-suggest__item:hover,
.nx-suggest__item.is-active,
.nx-suggest__all:hover,
.nx-suggest__all.is-active {
	background: var(--fx-tint-10);
}

.nx-suggest__img {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border-radius: var(--fx-radius, 10px);
	object-fit: cover;
	background: var(--nx-line);
}

.nx-suggest__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.nx-suggest__title {
	display: -webkit-box;
	overflow: hidden;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.nx-suggest__title mark {
	padding: 0 1px;
	border-radius: 3px;
	background: var(--fx-tint-16);
	color: var(--fx-ink);
	font-weight: 800;
}

.nx-suggest__cat {
	font-size: 12px;
	font-weight: 600;
	color: var(--nx-muted);
}

.nx-suggest__empty {
	padding: 12px;
	font-size: 14px;
	color: var(--nx-muted);
}

.nx-suggest__all {
	margin-top: 4px;
	padding: 12px;
	border-top: 1px solid var(--nx-line);
	font-size: 14px;
	font-weight: 700;
	color: var(--fx-ink);
	text-decoration: none;
}

/* Responsivo ------------------------------------------------------------ */
@media (max-width: 1024px) {
	.nx-cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.nx-h2 {
		font-size: 34px;
	}
}

@media (max-width: 640px) {
	.nx-cards {
		grid-template-columns: 1fr;
	}

	.nx-h2 {
		font-size: 28px;
	}

	.nx-lead {
		font-size: 16px;
	}
}

/* Cartão estilo "guia" (kit C): linha de baixo com tempo de leitura e "Read guide". */
.nx-card__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: auto;
	padding-top: 8px;
	border-top: 1px solid var(--nx-line);
}

.nx-card__foot .nx-link {
	margin-top: 0;
}
