/**
 * Carreira+ Blog — folha de estilo principal.
 *
 * Paleta e tipografia espelham o app (src/index.css + tailwind.config.ts):
 * verde-floresta #14231C (brand.primary), dourado #B6801F (brand.accent),
 * fundo creme #FBFAF7. Tipografia Archivo (corpo/headings); Space Grotesk
 * so no wordmark "Carreira+" (.site-logo__text) — mesma regra do app.
 *
 * Sumário:
 *   1. Tokens
 *   2. Reset e base
 *   3. Utilitários (container, botões, pills)
 *   4. Cabeçalho e navegação
 *   5. Home e listagens
 *   6. Cards
 *   7. Artigo (single)
 *   8. Índice lateral (TOC)
 *   9. CTA e newsletter
 *  10. Navegação entre artigos, relacionados, comentários
 *  11. Rodapé
 *  12. Estados vazios, paginação, widgets
 *  13. Acessibilidade e movimento
 */

/* ---------------------------------------------------------------- 1. Tokens */

:root {
	--fp-bg: #fbfaf7;
	--fp-bg-alt: #f2e9d6;
	--fp-card: #ffffff;
	--fp-border: #e8ece3;
	--fp-border-strong: #dbe3d5;
	--fp-text: #14231c;
	--fp-text-soft: #33513a;
	--fp-muted: #746d62;
	--fp-primary: #14231c;
	--fp-primary-dark: #1f332a;
	--fp-primary-soft: #e8ece3;
	--fp-teal: #b6801f;
	--fp-teal-soft: #f2e9d6;
	--fp-shadow-sm: 0 1px 2px rgba(20, 35, 28, 0.04), 0 1px 3px rgba(20, 35, 28, 0.06);
	--fp-shadow-md: 0 4px 12px rgba(20, 35, 28, 0.06), 0 2px 4px rgba(20, 35, 28, 0.04);
	--fp-shadow-lg: 0 12px 32px rgba(20, 35, 28, 0.1), 0 4px 8px rgba(20, 35, 28, 0.04);

	--fp-radius: 0.75rem;
	--fp-radius-lg: 1.25rem;
	--fp-radius-full: 999px;

	--fp-font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
	--fp-font-logo: "Space Grotesk", var(--fp-font);

	--fp-container: 1180px;
	--fp-measure: 720px;

	--fp-step: 0.25rem;
	--fp-header-h: 64px;

	--fp-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
	--fp-bg: #0b140f;
	--fp-bg-alt: #14231c;
	--fp-card: #14231c;
	--fp-border: #1f332a;
	--fp-border-strong: #33513a;
	--fp-text: #fbfaf7;
	--fp-text-soft: #e8ece3;
	--fp-muted: #a8b0a9;
	--fp-primary: #d9a552;
	--fp-primary-dark: #b6801f;
	--fp-primary-soft: #2a2013;
	--fp-teal: #33513a;
	--fp-teal-soft: #1f332a;
	--fp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
	--fp-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
	--fp-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.site-logo__text {
	font-family: var(--fp-font-logo);
	font-weight: 700;
}

/* ------------------------------------------------------- 2. Reset e base */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Âncoras do índice não ficam escondidas sob o cabeçalho fixo. */
	scroll-padding-top: calc(var(--fp-header-h) + 16px);
}

body {
	margin: 0;
	background: var(--fp-bg);
	color: var(--fp-text);
	font-family: var(--fp-font);
	font-size: 1rem;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
}

img {
	display: block;
}

a {
	color: var(--fp-primary);
	text-decoration: none;
}

a:hover {
	color: var(--fp-primary-dark);
}

h1,
h2,
h3,
h4 {
	margin: 0;
	line-height: 1.2;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--fp-text);
}

p {
	margin: 0 0 1em;
}

ul,
ol {
	margin: 0;
	padding: 0;
}

button {
	font: inherit;
	color: inherit;
	cursor: pointer;
}

figure {
	margin: 0;
}

::selection {
	background: var(--fp-primary-soft);
	color: var(--fp-primary-dark);
}

/* ------------------------------------------------- 3. Utilitários */

.container {
	width: 100%;
	max-width: var(--fp-container);
	margin-inline: auto;
	padding-inline: 20px;
}

@media (min-width: 768px) {
	.container {
		padding-inline: 32px;
	}
}

.site-main {
	min-height: 60vh;
	padding-bottom: 24px;
}

.section-title {
	font-size: 1.5rem;
	margin: 48px 0 20px;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 22px;
	border: 1px solid transparent;
	border-radius: var(--fp-radius);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1;
	text-align: center;
	transition: background-color 0.18s var(--fp-ease), transform 0.18s var(--fp-ease), box-shadow 0.18s var(--fp-ease);
}

.btn--primary {
	background: var(--fp-primary);
	color: #fff;
	box-shadow: var(--fp-shadow-sm);
}

.btn--primary:hover {
	background: var(--fp-primary-dark);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: var(--fp-shadow-md);
}

.btn--ghost {
	background: transparent;
	border-color: var(--fp-border-strong);
	color: var(--fp-text);
}

.btn--ghost:hover {
	background: var(--fp-bg-alt);
	color: var(--fp-text);
}

.btn--sm {
	padding: 9px 16px;
	font-size: 0.875rem;
}

.pill {
	display: inline-flex;
	align-items: center;
	padding: 5px 12px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-full);
	background: var(--fp-card);
	color: var(--fp-text-soft);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.4;
	transition: border-color 0.18s var(--fp-ease), color 0.18s var(--fp-ease), background-color 0.18s var(--fp-ease);
}

.pill:hover {
	border-color: var(--fp-primary);
	color: var(--fp-primary);
}

.pill--accent {
	background: var(--fp-primary-soft);
	border-color: transparent;
	color: var(--fp-primary-dark);
}

.pill--accent:hover {
	background: var(--fp-primary);
	color: #fff;
}

/* --------------------------------------- 4. Cabeçalho e navegação */

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	padding: 12px 20px;
	background: var(--fp-primary);
	color: #fff;
	border-radius: 0 0 var(--fp-radius) 0;
}

.skip-link:focus {
	left: 0;
	color: #fff;
}

.reading-bar {
	position: fixed;
	inset: 0 0 auto 0;
	height: 3px;
	z-index: 60;
	background: transparent;
	pointer-events: none;
}

.reading-bar__fill {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--fp-primary), var(--fp-teal));
	transition: width 0.1s linear;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	/* Fundo solido primeiro: navegador sem color-mix ignora a linha seguinte
	   e fica com o cabeçalho opaco em vez de transparente. */
	background: var(--fp-bg);
	background: color-mix(in srgb, var(--fp-bg) 85%, transparent);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s var(--fp-ease), box-shadow 0.2s var(--fp-ease);
}

/* Classe aplicada por theme.js após rolar — separa o cabeçalho do conteúdo. */
.site-header.is-stuck {
	border-bottom-color: var(--fp-border);
	box-shadow: var(--fp-shadow-sm);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: var(--fp-header-h);
}

.site-branding {
	flex-shrink: 0;
}

.site-logo,
.custom-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--fp-text);
	font-weight: 600;
	letter-spacing: -0.02em;
}

.site-logo:hover {
	color: var(--fp-text);
}

.site-logo img,
.custom-logo {
	width: 34px;
	height: 34px;
	object-fit: contain;
}

.site-logo__text {
	font-size: 1.0625rem;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 28px;
	flex: 1;
	justify-content: flex-end;
}

.site-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
}

.site-nav__list li {
	position: relative;
}

.site-nav__list a {
	display: block;
	padding: 8px 12px;
	border-radius: var(--fp-radius);
	color: var(--fp-text-soft);
	font-size: 0.9375rem;
	font-weight: 500;
	transition: color 0.18s var(--fp-ease), background-color 0.18s var(--fp-ease);
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current-cat > a {
	color: var(--fp-primary);
	background: var(--fp-primary-soft);
}

/* Submenu */
.site-nav__list .sub-menu {
	list-style: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 200px;
	padding: 6px;
	background: var(--fp-card);
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	box-shadow: var(--fp-shadow-lg);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.18s var(--fp-ease), transform 0.18s var(--fp-ease), visibility 0.18s;
}

.site-nav__list li:hover > .sub-menu,
.site-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.site-nav__actions {
	display: flex;
	align-items: center;
	gap: 10px;
}

.search-form {
	position: relative;
	display: flex;
	align-items: center;
}

.search-form__icon {
	position: absolute;
	left: 12px;
	color: var(--fp-muted);
	pointer-events: none;
}

.search-form__input {
	width: 190px;
	padding: 8px 14px 8px 36px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-full);
	background: var(--fp-card);
	color: var(--fp-text);
	font: inherit;
	font-size: 0.875rem;
	transition: border-color 0.18s var(--fp-ease), box-shadow 0.18s var(--fp-ease), width 0.2s var(--fp-ease);
}

.search-form__input::placeholder {
	color: var(--fp-muted);
}

.search-form__input:focus {
	outline: none;
	border-color: var(--fp-primary);
	box-shadow: 0 0 0 3px var(--fp-primary-soft);
}

.theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-full);
	background: var(--fp-card);
	color: var(--fp-text-soft);
	transition: color 0.18s var(--fp-ease), border-color 0.18s var(--fp-ease);
}

.theme-toggle:hover {
	color: var(--fp-primary);
	border-color: var(--fp-primary);
}

.theme-toggle__moon {
	display: none;
}

[data-theme="dark"] .theme-toggle__sun {
	display: none;
}

[data-theme="dark"] .theme-toggle__moon {
	display: block;
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
}

.nav-toggle__bar {
	display: block;
	width: 18px;
	height: 2px;
	margin-inline: auto;
	border-radius: 2px;
	background: var(--fp-text);
	transition: transform 0.2s var(--fp-ease), opacity 0.2s var(--fp-ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
	opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
	.nav-toggle {
		display: flex;
	}

	.site-nav {
		position: fixed;
		inset: var(--fp-header-h) 0 auto 0;
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
		padding: 20px;
		background: var(--fp-bg);
		border-bottom: 1px solid var(--fp-border);
		box-shadow: var(--fp-shadow-lg);
		transform: translateY(-8px);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s var(--fp-ease), transform 0.2s var(--fp-ease), visibility 0.2s;
		max-height: calc(100vh - var(--fp-header-h));
		overflow-y: auto;
	}

	.site-nav.is-open {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.site-nav__list {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.site-nav__list a {
		padding: 12px;
		font-size: 1rem;
	}

	.site-nav__list .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: 0;
		padding-left: 12px;
	}

	.site-nav__actions {
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		padding-top: 12px;
		border-top: 1px solid var(--fp-border);
	}

	.search-form__input {
		width: 100%;
	}

	.site-nav__actions .btn {
		width: 100%;
	}

	.theme-toggle {
		align-self: flex-start;
	}
}

/* --------------------------------------------- 5. Home e listagens */

.home-hero {
	padding: 56px 0 40px;
	text-align: center;
}

.home-hero__eyebrow {
	margin: 0 0 12px;
	color: var(--fp-primary);
	font-size: 0.8125rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.home-hero__title {
	max-width: 800px;
	margin: 0 auto 16px;
	font-size: clamp(2rem, 5vw, 3rem);
	letter-spacing: -0.03em;
}

.home-hero__text {
	max-width: 620px;
	margin: 0 auto 28px;
	color: var(--fp-muted);
	font-size: 1.125rem;
}

.home-hero__cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.featured-wrap {
	margin-bottom: 8px;
}

.grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}

.archive__header {
	padding: 40px 0 24px;
	max-width: var(--fp-measure);
}

.archive__title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	margin-bottom: 12px;
}

.archive__desc {
	color: var(--fp-muted);
	font-size: 1.0625rem;
}

.archive__count {
	margin: 8px 0 0;
	color: var(--fp-muted);
	font-size: 0.875rem;
}

.archive__search {
	margin-top: 20px;
	max-width: 380px;
}

.archive__search .search-form__input {
	width: 100%;
}

.archive__siblings {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 32px;
}

/* --------------------------------------------------- 6. Cards */

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--fp-card);
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-lg);
	overflow: hidden;
	transition: transform 0.22s var(--fp-ease), box-shadow 0.22s var(--fp-ease), border-color 0.22s var(--fp-ease);
}

.card:hover {
	transform: translateY(-3px);
	border-color: var(--fp-border-strong);
	box-shadow: var(--fp-shadow-lg);
}

/* Link cobre o card inteiro: área de clique generosa sem aninhar <a> dentro de <a>. */
.card__link {
	position: absolute;
	inset: 0;
	z-index: 2;
}

.card__media {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: var(--fp-bg-alt);
}

.card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s var(--fp-ease);
}

.card:hover .card__img {
	transform: scale(1.03);
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 22px;
	flex: 1;
}

.card__cat {
	align-self: flex-start;
	position: relative;
	z-index: 3;
}

.card__title {
	font-size: 1.1875rem;
	line-height: 1.3;
}

.card:hover .card__title {
	color: var(--fp-primary-dark);
}

.card__excerpt {
	margin: 0;
	color: var(--fp-muted);
	font-size: 0.9375rem;
	line-height: 1.6;
}

.card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 6px;
	color: var(--fp-muted);
	font-size: 0.8125rem;
}

/* Destaque da home */
.card--featured {
	margin-top: 8px;
}

@media (min-width: 900px) {
	.card--featured {
		display: grid;
		grid-template-columns: 1.15fr 1fr;
		align-items: stretch;
	}

	.card--featured .card__media {
		aspect-ratio: auto;
		height: 100%;
		min-height: 320px;
	}

	.card--featured .card__body {
		padding: 40px;
		justify-content: center;
		gap: 14px;
	}

	.card--featured .card__title {
		font-size: 1.875rem;
	}

	.card--featured .card__excerpt {
		font-size: 1.0625rem;
	}
}

/* ------------------------------------------------- 7. Artigo (single) */

.breadcrumbs {
	padding: 20px 0 0;
	font-size: 0.8125rem;
	color: var(--fp-muted);
}

.breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	list-style: none;
}

.breadcrumbs li:not(:last-child)::after {
	content: "/";
	margin-left: 8px;
	color: var(--fp-border-strong);
}

.breadcrumbs a {
	color: var(--fp-muted);
}

.breadcrumbs a:hover {
	color: var(--fp-primary);
}

.breadcrumbs li[aria-current="page"] {
	color: var(--fp-text-soft);
}

.single__header {
	max-width: var(--fp-measure);
	margin-inline: auto;
	padding: 32px 0 28px;
	text-align: center;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-bottom: 20px;
	color: var(--fp-muted);
	font-size: 0.875rem;
}

.entry-meta__sep {
	color: var(--fp-border-strong);
}

.single__title {
	font-size: clamp(2rem, 5vw, 2.875rem);
	line-height: 1.15;
	letter-spacing: -0.03em;
	margin-bottom: 20px;
}

.single__lead {
	color: var(--fp-muted);
	font-size: 1.1875rem;
	line-height: 1.6;
	margin-bottom: 28px;
}

.single__byline {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	padding-top: 24px;
	border-top: 1px solid var(--fp-border);
}

.single__byline .avatar,
.avatar--round {
	border-radius: var(--fp-radius-full);
}

.single__byline-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.35;
	margin-right: auto;
}

.single__author {
	font-size: 0.9375rem;
	font-weight: 500;
}

.single__updated {
	color: var(--fp-muted);
	font-size: 0.8125rem;
}

.single__hero {
	max-width: 960px;
	margin: 8px auto 0;
	border-radius: var(--fp-radius-lg);
	overflow: hidden;
	background: var(--fp-bg-alt);
}

.single__hero-img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.single__hero figcaption {
	padding: 10px 4px;
	color: var(--fp-muted);
	font-size: 0.8125rem;
	text-align: center;
}

.single__layout {
	display: grid;
	gap: 48px;
	padding: 40px 0 8px;
	justify-content: center;
}

@media (min-width: 1060px) {
	.single__layout {
		grid-template-columns: 260px minmax(0, var(--fp-measure));
		gap: 56px;
	}
}

.single__main {
	min-width: 0;
	max-width: var(--fp-measure);
	margin-inline: auto;
	width: 100%;
}

.single__aside {
	min-width: 0;
}

.single__aside-inner {
	position: sticky;
	top: calc(var(--fp-header-h) + 24px);
	display: flex;
	flex-direction: column;
	gap: 24px;
}

@media (max-width: 1059px) {
	.single__aside {
		order: -1;
	}

	.single__aside-inner {
		position: static;
	}

	/* Fora do desktop o CTA lateral seria redundante com o do meio do texto. */
	.cta--sidebar {
		display: none;
	}
}

/* Conteúdo do artigo — o ritmo tipográfico e o coração do blog. */
.entry-content {
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--fp-text-soft);
}

.entry-content > * + * {
	margin-top: 1.4em;
}

.entry-content p {
	margin: 0;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
	color: var(--fp-text);
	scroll-margin-top: calc(var(--fp-header-h) + 20px);
}

.entry-content h2 {
	margin-top: 2.2em;
	font-size: 1.625rem;
	letter-spacing: -0.025em;
}

.entry-content h3 {
	margin-top: 1.8em;
	font-size: 1.25rem;
}

.entry-content h4 {
	margin-top: 1.6em;
	font-size: 1.0625rem;
}

.entry-content a {
	color: var(--fp-primary-dark);
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, var(--fp-primary) 35%, transparent);
	text-underline-offset: 3px;
	transition: text-decoration-color 0.18s var(--fp-ease);
}

.entry-content a:hover {
	text-decoration-color: var(--fp-primary);
}

.entry-content strong {
	color: var(--fp-text);
	font-weight: 600;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content li + li {
	margin-top: 0.5em;
}

.entry-content li::marker {
	color: var(--fp-primary);
}

.entry-content img,
.entry-content figure img {
	border-radius: var(--fp-radius);
}

.entry-content figure {
	margin-block: 2em;
}

.entry-content figcaption {
	margin-top: 10px;
	color: var(--fp-muted);
	font-size: 0.8125rem;
	text-align: center;
}

.entry-content blockquote {
	margin: 2em 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--fp-primary);
	color: var(--fp-text);
	font-size: 1.125rem;
	font-style: italic;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content code {
	padding: 2px 6px;
	border-radius: 5px;
	background: var(--fp-bg-alt);
	font-size: 0.875em;
}

.entry-content pre {
	padding: 18px;
	border-radius: var(--fp-radius);
	background: var(--fp-bg-alt);
	overflow-x: auto;
}

.entry-content pre code {
	padding: 0;
	background: none;
}

.entry-content hr {
	margin: 2.5em 0;
	border: 0;
	border-top: 1px solid var(--fp-border);
}

.entry-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
	padding: 12px;
	border: 1px solid var(--fp-border);
	text-align: left;
}

.entry-content th {
	background: var(--fp-bg-alt);
	color: var(--fp-text);
	font-weight: 600;
}

/* Tabelas largas rolam sozinhas em vez de estourar a página no celular. */
.entry-content .wp-block-table {
	overflow-x: auto;
}

.entry-content .alignwide {
	width: min(960px, 100vw - 40px);
	margin-inline: calc(50% - min(480px, 50vw - 20px));
}

.entry-content .alignfull {
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
}

.entry-content--page {
	max-width: var(--fp-measure);
	margin-inline: auto;
	padding-block: 24px 40px;
}

.single__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 40px;
}

.single__footer {
	display: flex;
	justify-content: center;
	padding: 28px 0;
	margin-top: 8px;
	border-top: 1px solid var(--fp-border);
}

.page-single__header {
	max-width: var(--fp-measure);
	margin-inline: auto;
	padding: 40px 0 8px;
}

.page-single__title {
	font-size: clamp(1.875rem, 4vw, 2.5rem);
}

/* Compartilhar */
.share {
	display: flex;
	align-items: center;
	gap: 8px;
}

.share__label {
	color: var(--fp-muted);
	font-size: 0.8125rem;
	margin-right: 2px;
}

.share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-full);
	background: var(--fp-card);
	color: var(--fp-muted);
	transition: color 0.18s var(--fp-ease), border-color 0.18s var(--fp-ease), transform 0.18s var(--fp-ease);
}

.share__btn:hover {
	color: var(--fp-primary);
	border-color: var(--fp-primary);
	transform: translateY(-2px);
}

.share__btn.is-copied {
	color: var(--fp-primary);
	border-color: var(--fp-primary);
	background: var(--fp-primary-soft);
}

/* ------------------------------------------- 8. Índice lateral (TOC) */

.toc {
	padding: 20px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
}

.toc__title {
	margin-bottom: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fp-muted);
}

.toc__list {
	list-style: none;
	counter-reset: toc;
	display: flex;
	flex-direction: column;
	gap: 2px;
	max-height: 60vh;
	overflow-y: auto;
}

.toc__item a {
	display: block;
	padding: 7px 10px;
	border-radius: 6px;
	border-left: 2px solid transparent;
	color: var(--fp-muted);
	font-size: 0.875rem;
	line-height: 1.4;
	transition: color 0.18s var(--fp-ease), border-color 0.18s var(--fp-ease), background-color 0.18s var(--fp-ease);
}

.toc__item a:hover {
	color: var(--fp-text);
	background: var(--fp-bg-alt);
}

/* Secao em leitura, marcada pelo IntersectionObserver do theme.js. */
.toc__item.is-active a {
	color: var(--fp-primary);
	border-left-color: var(--fp-primary);
	background: var(--fp-primary-soft);
	font-weight: 500;
}

@media (max-width: 1059px) {
	.toc__list {
		max-height: none;
	}
}

/* ------------------------------------------ 9. CTA e newsletter */

.cta {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-lg);
	background: linear-gradient(180deg, var(--fp-primary-soft), var(--fp-card) 70%);
	box-shadow: var(--fp-shadow-sm);
}

.cta__mark img {
	width: 36px;
	height: 36px;
}

.cta__title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.01em;
	color: var(--fp-text);
}

.cta__text {
	margin: 0;
	color: var(--fp-text-soft);
	font-size: 0.9375rem;
	line-height: 1.55;
}

.cta__btn {
	align-self: flex-start;
	margin-top: 4px;
}

.cta__note {
	margin: 0;
	color: var(--fp-muted);
	font-size: 0.75rem;
}

/* No meio do artigo o CTA precisa parecer um respiro, não um banner. */
.cta--inline {
	margin-block: 2.6em;
}

.cta--end {
	margin-top: 8px;
}

@media (min-width: 640px) {
	.cta--inline,
	.cta--end {
		flex-direction: row;
		align-items: center;
		flex-wrap: wrap;
		padding: 28px;
		gap: 8px 20px;
	}

	.cta--inline .cta__mark,
	.cta--end .cta__mark {
		flex-shrink: 0;
	}

	.cta--inline .cta__body,
	.cta--end .cta__body {
		flex: 1;
		min-width: 240px;
	}

	.cta--inline .cta__btn,
	.cta--end .cta__btn {
		align-self: center;
		margin-top: 0;
	}

	.cta--inline .cta__note,
	.cta--end .cta__note {
		width: 100%;
		text-align: right;
	}
}

.newsletter {
	margin: 64px 0 0;
	padding: 56px 20px;
	background: var(--fp-bg-alt);
	border-top: 1px solid var(--fp-border);
	border-bottom: 1px solid var(--fp-border);
	text-align: center;
}

.newsletter__inner {
	max-width: 560px;
	margin-inline: auto;
}

.newsletter__title {
	font-size: clamp(1.375rem, 3vw, 1.75rem);
	margin-bottom: 12px;
}

.newsletter__text {
	color: var(--fp-muted);
	margin-bottom: 24px;
}

.newsletter__note {
	margin: 14px 0 0;
	color: var(--fp-muted);
	font-size: 0.75rem;
}

/* O formulário vem do plugin de newsletter (Hostinger Reach) ou de um shortcode: o tema
   não controla essa marcação, então os seletores abaixo miram elementos genéricos
   (input/button dentro do bloco) para vestir qualquer um dos dois sem depender de
   classes específicas de plugin — que mudam de versão para versão. */
.newsletter__form {
	display: flex;
	justify-content: center;
}

.newsletter__form form {
	width: 100%;
	max-width: 480px;
}

.newsletter__form input[type="email"],
.newsletter__form input[type="text"] {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
	color: var(--fp-text);
	font: inherit;
	font-size: 0.9375rem;
	transition: border-color 0.18s var(--fp-ease), box-shadow 0.18s var(--fp-ease);
}

.newsletter__form input[type="email"]::placeholder,
.newsletter__form input[type="text"]::placeholder {
	color: var(--fp-muted);
}

.newsletter__form input[type="email"]:focus,
.newsletter__form input[type="text"]:focus {
	outline: none;
	border-color: var(--fp-primary);
	box-shadow: 0 0 0 3px var(--fp-primary-soft);
}

.newsletter__form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 13px 24px;
	border: 1px solid transparent;
	border-radius: var(--fp-radius);
	background: var(--fp-primary);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: var(--fp-shadow-sm);
	transition: background-color 0.18s var(--fp-ease), transform 0.18s var(--fp-ease);
}

.newsletter__form button[type="submit"]:hover:not(:disabled) {
	background: var(--fp-primary-dark);
	transform: translateY(-1px);
}

.newsletter__form button[type="submit"]:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Campo + botão lado a lado a partir do tablet; empilhados no celular. */
.newsletter__form .hostinger-reach-block-form-fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-align: left;
}

@media (min-width: 560px) {
	.newsletter__form .hostinger-reach-block-form-fields {
		flex-direction: row;
		align-items: flex-start;
	}

	.newsletter__form .hostinger-reach-block-form-fields > * {
		flex: 1;
		margin: 0;
	}

	.newsletter__form .hostinger-reach-block-form-fields > *:last-child {
		flex: 0 0 auto;
	}
}

.newsletter__form label {
	display: block;
	margin-bottom: 6px;
	color: var(--fp-text-soft);
	font-size: 0.8125rem;
	font-weight: 500;
	text-align: left;
}

/* Mensagem de sucesso/erro do plugin — o JS dele controla a visibilidade. */
.newsletter__form .reach-subscription-message {
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	padding: 12px 16px;
	border-radius: var(--fp-radius);
	font-size: 0.9375rem;
}

.newsletter__form .reach-subscription-message.is-success {
	background: var(--fp-primary-soft);
	color: var(--fp-primary-dark);
}

.newsletter__form .reach-subscription-message.is-error {
	background: #fdecec;
	color: #b42318;
}

[data-theme="dark"] .newsletter__form .reach-subscription-message.is-error {
	background: #2d1416;
	color: #f5a3a3;
}

/* ------------------- 10. Navegação entre artigos, relacionados, comentários */

.post-nav {
	display: grid;
	gap: 16px;
	margin: 56px 0 0;
	padding-top: 40px;
	border-top: 1px solid var(--fp-border);
}

@media (min-width: 768px) {
	.post-nav {
		grid-template-columns: 1fr 1fr;
	}
}

.post-nav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 20px 22px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius-lg);
	background: var(--fp-card);
	transition: border-color 0.2s var(--fp-ease), transform 0.2s var(--fp-ease), box-shadow 0.2s var(--fp-ease);
}

.post-nav__item:hover {
	border-color: var(--fp-primary);
	transform: translateY(-2px);
	box-shadow: var(--fp-shadow-md);
}

.post-nav__item--next {
	text-align: right;
	grid-column: -2;
}

.post-nav__label {
	color: var(--fp-muted);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.post-nav__title {
	color: var(--fp-text);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.4;
}

.related {
	padding-bottom: 8px;
}

.comments {
	max-width: var(--fp-measure);
	margin: 64px auto 0;
	padding-top: 40px;
	border-top: 1px solid var(--fp-border);
}

.comments__title {
	font-size: 1.375rem;
	margin-bottom: 24px;
}

.comments__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 32px;
}

.comments__list .children {
	list-style: none;
	padding-left: 24px;
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	border-left: 2px solid var(--fp-border);
}

.comments__list .comment-body {
	padding: 20px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
	font-size: 0.9375rem;
}

.comments__list .comment-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
	font-size: 0.8125rem;
	color: var(--fp-muted);
}

.comments__list .comment-author img {
	border-radius: var(--fp-radius-full);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
	color: var(--fp-text);
	font: inherit;
	font-size: 0.9375rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: none;
	border-color: var(--fp-primary);
	box-shadow: 0 0 0 3px var(--fp-primary-soft);
}

.comment-form label {
	display: block;
	margin-bottom: 6px;
	font-size: 0.875rem;
	font-weight: 500;
}

.comment-form p {
	margin-bottom: 16px;
}

.comments__closed {
	color: var(--fp-muted);
	font-size: 0.9375rem;
}

/* ------------------------------------------------------ 11. Rodapé */

.site-footer {
	margin-top: 72px;
	padding: 56px 0 28px;
	background: var(--fp-card);
	border-top: 1px solid var(--fp-border);
}

.newsletter + .site-footer {
	margin-top: 0;
	border-top: 0;
}

.site-footer__grid {
	display: grid;
	gap: 40px;
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.site-footer__grid {
		grid-template-columns: 1.5fr 1fr 1fr;
	}
}

.site-footer__desc {
	color: var(--fp-muted);
	font-size: 0.9375rem;
	max-width: 34ch;
	margin: 14px 0 16px;
}

.site-footer__social {
	display: inline-flex;
	color: var(--fp-muted);
	transition: color 0.18s var(--fp-ease);
}

.site-footer__social:hover {
	color: var(--fp-primary);
}

.site-footer__title {
	margin-bottom: 14px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fp-muted);
}

.site-footer__list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.site-footer__list a {
	color: var(--fp-text-soft);
	font-size: 0.9375rem;
}

.site-footer__list a:hover {
	color: var(--fp-primary);
}

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--fp-border);
	color: var(--fp-muted);
	font-size: 0.8125rem;
}

.site-footer__bottom p {
	margin: 0;
}

/* ------------------------- 12. Estados vazios, paginação, widgets */

.empty {
	max-width: 560px;
	margin: 64px auto;
	text-align: center;
}

.empty h1,
.empty h2 {
	font-size: 1.5rem;
	margin-bottom: 12px;
}

.empty p {
	color: var(--fp-muted);
}

.empty .search-form {
	justify-content: center;
	margin-top: 24px;
}

.empty .search-form__input {
	width: 100%;
	max-width: 360px;
}

.empty__code {
	font-size: 4rem;
	font-weight: 600;
	color: var(--fp-primary);
	letter-spacing: -0.04em;
	margin: 0 0 8px;
}

.empty__cats {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin-top: 24px;
}

.pagination {
	margin: 56px 0 24px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: 12px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
	color: var(--fp-text-soft);
	font-size: 0.9375rem;
	transition: border-color 0.18s var(--fp-ease), color 0.18s var(--fp-ease);
}

.pagination .page-numbers:hover {
	border-color: var(--fp-primary);
	color: var(--fp-primary);
}

.pagination .page-numbers.current {
	background: var(--fp-primary);
	border-color: var(--fp-primary);
	color: #fff;
}

.pagination .dots {
	border-color: transparent;
	background: none;
}

.page-links {
	display: flex;
	gap: 8px;
	margin-top: 32px;
	font-size: 0.9375rem;
}

.sidebar-widgets {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.widget {
	padding: 20px;
	border: 1px solid var(--fp-border);
	border-radius: var(--fp-radius);
	background: var(--fp-card);
	font-size: 0.9375rem;
}

.widget-title {
	margin-bottom: 12px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fp-muted);
}

.widget ul {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.widget a {
	color: var(--fp-text-soft);
}

.widget a:hover {
	color: var(--fp-primary);
}

.site-footer .widget {
	padding: 0;
	border: 0;
	background: none;
}

/* ---------------------------------- 13. Acessibilidade e movimento */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	z-index: 100;
	display: block;
	padding: 12px 20px;
	background: var(--fp-primary);
	color: #fff;
	border-radius: var(--fp-radius);
}

:focus-visible {
	outline: 2px solid var(--fp-primary);
	outline-offset: 2px;
	border-radius: 4px;
}

.aligncenter {
	margin-inline: auto;
}

.alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}

.alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}

.wp-caption-text {
	color: var(--fp-muted);
	font-size: 0.8125rem;
}

.sticky .card {
	border-color: var(--fp-primary);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.card:hover,
	.post-nav__item:hover,
	.btn--primary:hover,
	.share__btn:hover {
		transform: none;
	}
}

/* Impressao: so o texto importa. */
@media print {
	.site-header,
	.site-footer,
	.cta,
	.newsletter,
	.share,
	.toc,
	.post-nav,
	.related,
	.comments,
	.reading-bar {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
	}

	.single__layout {
		display: block;
	}
}
