/* TechDescomplicado — design system (paleta Tech Blue, tema claro/escuro, efeitos leves) */

:root {
	--td-brand: #2563eb;
	--td-brand-2: #0ea5e9;
	--td-accent: #06b6d4;
	--td-radius: 14px;
	--td-radius-sm: 10px;
	--td-shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 8px 24px -12px rgb(15 23 42 / 18%);
	--td-shadow-hover: 0 2px 4px rgb(15 23 42 / 8%), 0 18px 40px -16px rgb(37 99 235 / 35%);
	--td-header-bg: rgb(255 255 255 / 82%);
	--td-surface: #ffffff;
	--td-muted: #475569;
	--td-gradient: linear-gradient(120deg, #2563eb 0%, #0ea5e9 55%, #06b6d4 100%);
	color-scheme: light;
}

html[data-theme="dark"] {
	--ast-global-color-0: #3b82f6;
	--ast-global-color-1: #38bdf8;
	--ast-global-color-2: #f1f5f9;
	--ast-global-color-3: #cbd5e1;
	--ast-global-color-4: #0b1120;
	--ast-global-color-5: #0f172a;
	--ast-global-color-6: #334155;
	--ast-global-color-7: #111a2e;
	--ast-global-color-8: #0f172a;
	--td-header-bg: rgb(11 17 32 / 78%);
	--td-surface: #111a2e;
	--td-muted: #94a3b8;
	--td-shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px -12px rgb(0 0 0 / 60%);
	--td-shadow-hover: 0 2px 4px rgb(0 0 0 / 35%), 0 18px 40px -16px rgb(56 189 248 / 30%);
	color-scheme: dark;
}

html[data-theme="dark"] body,
html[data-theme="dark"] .site,
html[data-theme="dark"] .site-content,
html[data-theme="dark"] .ast-plain-container,
html[data-theme="dark"] .ast-separate-container,
html[data-theme="dark"] .site-footer,
html[data-theme="dark"] .site-below-footer-wrap,
html[data-theme="dark"] .site-primary-footer-wrap {
	background-color: var(--ast-global-color-4);
	color: var(--ast-global-color-3);
}

html[data-theme="dark"] :is(h1, h2, h3, h4, h5, h6, .entry-title, .entry-title a, .wp-block-post-title a, .site-title a, .ast-archive-title),
html[data-theme="dark"] .entry-content :is(h1, h2, h3, h4, h5, h6) {
	color: var(--ast-global-color-2);
}

html[data-theme="dark"] .ast-archive-description .ast-archive-title {
	color: #60a5fa;
}

html[data-theme="dark"] a {
	color: var(--ast-global-color-1);
}

html[data-theme="dark"] .main-header-menu .menu-link,
html[data-theme="dark"] .ast-builder-menu-mobile .menu-link,
html[data-theme="dark"] .ast-header-search .astra-search-icon,
html[data-theme="dark"] .ast-footer-copyright,
html[data-theme="dark"] .site-footer a {
	color: var(--ast-global-color-3);
}

html[data-theme="dark"] .main-header-menu .current-menu-item > .menu-link,
html[data-theme="dark"] .main-header-menu .menu-link:hover {
	color: #f8fafc;
}

html[data-theme="dark"] .wp-block-button__link:not(.is-style-outline .wp-block-button__link),
html[data-theme="dark"] .ast-custom-button {
	color: #fff;
}

html[data-theme="dark"] .ast-mobile-popup-drawer .ast-mobile-popup-inner,
html[data-theme="dark"] .main-header-menu .sub-menu {
	background-color: var(--ast-global-color-5);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
	background-color: var(--ast-global-color-7);
	color: var(--ast-global-color-2);
	border-color: var(--ast-global-color-6);
}

/* Campos de formulário: o Astra usa borda #ddd de 0,8 px (1,36:1, campo "invisível"). WCAG 1.4.11 pede 3:1 */
:is(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], textarea, select) {
	border: 1px solid #8391a7 !important; /* 3,19:1 sobre branco */
	border-radius: var(--td-radius-sm);
}

html[data-theme="dark"] :is(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], textarea, select) {
	border-color: #64748b !important; /* 3,64:1 sobre #111a2e */
}

:is(input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="url"], input[type="number"], textarea, select):focus-visible {
	outline: 2px solid var(--td-brand);
	outline-offset: 1px;
	border-color: var(--td-brand) !important;
}

/* Contraste AA (auditoria 25/09). Botão sólido: o Astra pinta o texto com a cor dos títulos (azul-marinho sobre
   azul, 3,45:1 no claro) e no escuro usava fundo #3b82f6 (3,68:1). Texto branco sobre #2563eb dá 5,17:1. */
.wp-block-button__link:not(.is-style-outline .wp-block-button__link),
.ast-custom-button,
.woocommerce :is(a.button, button.button, input.button),
.woocommerce-page :is(a.button, button.button, input.button) {
	background-color: var(--td-brand);
	color: #fff;
}

.wp-block-button__link:not(.is-style-outline .wp-block-button__link):hover,
.ast-custom-button:hover,
.woocommerce :is(a.button, button.button, input.button):hover,
.woocommerce-page :is(a.button, button.button, input.button):hover {
	background-color: #1d4ed8;
	color: #fff;
}

/* Classe repetida: ganha do ".woocommerce-js .woocommerce-breadcrumb" (#777) do Astra */
body .woocommerce-breadcrumb.woocommerce-breadcrumb,
body .woocommerce-breadcrumb.woocommerce-breadcrumb a {
	color: var(--td-muted);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	color: #1d4ed8;
}

html[data-theme="dark"] .td-eyebrow {
	color: #60a5fa;
}

html[data-theme="dark"] :is(.entry-meta, .entry-meta a, .posted-on a, .published) {
	color: var(--td-muted);
}

/* Minha conta (WooCommerce): o item ativo vinha com fundo quase branco */
html[data-theme="dark"] .woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	background-color: transparent;
	color: var(--ast-global-color-3);
}

html[data-theme="dark"] .woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
html[data-theme="dark"] .woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
	background-color: var(--td-surface);
	color: #f8fafc;
}

/* Complianz (Política de Cookies): caixas das categorias */
html[data-theme="dark"] .cmplz-category {
	background-color: var(--td-surface) !important;
}

html[data-theme="dark"] .cmplz-category :is(.cmplz-category-title, .cmplz-description, .cmplz-category-header) {
	color: var(--ast-global-color-2) !important;
}

html[data-theme="dark"] .cmplz-always-active {
	color: #4ade80 !important;
}

/* wpDiscuz: textos cinza-escuro pensados para fundo branco */
html[data-theme="dark"] #wpdcom :is(.wpd-login, .wpd-sbs-title, .wpd-thread-info, .wpdtc, .wpd-thread-filter) {
	color: var(--ast-global-color-3);
}

html[data-theme="dark"] #wpdcom .wpd-login a {
	color: #60a5fa;
}

/* Tipografia */
body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

.entry-content p,
.entry-content li {
	line-height: 1.75;
}

h1, h2, h3, .entry-title {
	letter-spacing: -0.02em;
	text-wrap: balance;
}

::selection {
	background: rgb(37 99 235 / 22%);
}

/* Header: vidro fosco fixo no topo */
#masthead {
	position: sticky;
	top: 0;
	z-index: 999;
}

.admin-bar #masthead {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar #masthead {
		top: 0;
	}
}

#masthead .main-header-bar,
#masthead .ast-primary-header-bar,
#masthead .ast-mobile-header-wrap .ast-primary-header-bar {
	background: var(--td-header-bg);
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom: 1px solid rgb(148 163 184 / 18%);
	transition: box-shadow 0.25s ease;
}

/* Sombra do header aparece conforme a página rola, sem JavaScript */
@supports (animation-timeline: scroll()) {
	#masthead .ast-primary-header-bar {
		animation: td-header-shadow linear both;
		animation-timeline: scroll(root);
		animation-range: 0 120px;
	}
	@keyframes td-header-shadow {
		to { box-shadow: 0 10px 30px -18px rgb(15 23 42 / 45%); }
	}
}

.main-header-menu > .menu-item > .menu-link {
	font-weight: 500;
	position: relative;
}

@media (min-width: 922px) {
	.main-header-menu > .menu-item > .menu-link {
		padding-left: 0.8em;
		padding-right: 0.8em;
	}
	.ast-primary-header-bar .site-header-primary-section-left {
		flex-wrap: nowrap;
	}
	.main-header-menu {
		flex-wrap: nowrap;
	}
	.main-header-menu > .menu-item > .menu-link {
		white-space: nowrap;
	}
}

@media (min-width: 922px) and (max-width: 1199px) {
	.td-logo { width: 185px; }
	.main-header-menu > .menu-item > .menu-link {
		padding-left: 0.5em;
		padding-right: 0.5em;
		font-size: 0.92rem;
	}
	#masthead .ast-header-button-1 { display: none; }
}

.main-header-menu > .menu-item > .menu-link::after {
	content: "";
	position: absolute;
	left: 1em;
	right: 1em;
	bottom: 0.55em;
	height: 2px;
	border-radius: 2px;
	background: var(--td-gradient);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.main-header-menu > .menu-item:hover > .menu-link::after,
.main-header-menu > .current-menu-item > .menu-link::after,
.main-header-menu > .current-menu-ancestor > .menu-link::after {
	transform: scaleX(1);
}

.main-header-menu .sub-menu {
	border-radius: var(--td-radius-sm);
	box-shadow: var(--td-shadow);
	border: 1px solid rgb(148 163 184 / 20%);
	overflow: hidden;
}

/* Logo inline */
.td-logo-link {
	display: inline-flex;
	align-items: center;
	line-height: 0;
}

.td-logo {
	display: block;
	width: 230px;
	height: auto;
	overflow: visible;
}

.td-logo text {
	font-family: "Space Grotesk", "Inter", Arial, sans-serif;
	font-size: 92px;
	letter-spacing: -1px;
}

.td-logo-tech {
	font-weight: 700;
	fill: #0f172a;
}

.td-logo-desc {
	font-weight: 500;
	fill: #0ea5e9;
}

html[data-theme="dark"] .td-logo-tech {
	fill: #f8fafc;
}

@media (max-width: 921px) {
	.td-logo { width: 200px; }
}

@media (max-width: 544px) {
	.td-logo { width: 168px; }
}

/* Botão claro/escuro */
.td-theme-toggle {
	display: inline-grid;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border-radius: 999px;
	border: 1px solid rgb(148 163 184 / 35%);
	background: transparent;
	color: var(--ast-global-color-2);
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.td-theme-toggle:hover {
	background: rgb(148 163 184 / 14%);
	color: var(--ast-global-color-2);
}

.td-theme-toggle:active {
	transform: scale(0.94);
}

.td-theme-toggle:focus-visible {
	outline: 2px solid var(--td-brand);
	outline-offset: 2px;
}

.td-theme-toggle .td-icon-sun { display: none; }
html[data-theme="dark"] .td-theme-toggle .td-icon-sun { display: block; }
html[data-theme="dark"] .td-theme-toggle .td-icon-moon { display: none; }

/* Botões */
.ast-button,
.wp-block-button__link,
.ast-custom-button,
button.ff-btn-submit,
.ff-btn-submit {
	border-radius: 999px !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ast-button:hover,
.wp-block-button__link:hover,
.ast-custom-button:hover,
.ff-btn-submit:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 24px -12px rgb(37 99 235 / 60%);
}

/* Cards de post nas listagens */
.ast-archive-post .ast-article-inner,
.ast-article-post .ast-article-inner,
.td-card {
	background: var(--td-surface);
	border: 1px solid rgb(148 163 184 / 22%);
	border-radius: var(--td-radius);
	box-shadow: var(--td-shadow);
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ast-archive-post .ast-article-inner:hover,
.ast-article-post .ast-article-inner:hover,
.td-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--td-shadow-hover);
	border-color: rgb(37 99 235 / 35%);
}

.ast-archive-post .post-thumb-img-content img,
.ast-article-post .post-thumb-img-content img {
	transition: transform 0.5s ease;
}

.blog .ast-article-post .post-thumb-img-content img,
.archive .ast-article-post .post-thumb-img-content img,
.search .ast-article-post .post-thumb-img-content img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.ast-article-post .ast-article-inner:hover .post-thumb-img-content img {
	transform: scale(1.04);
}

/* Estado vazio de categoria (ainda sem artigos) */
.no-results.not-found {
	max-width: 640px;
	margin: 2rem auto;
	padding: 2.5rem 2rem;
	text-align: center;
	border: 1px dashed rgb(148 163 184 / 45%);
	border-radius: var(--td-radius);
	background: var(--td-surface);
}

/* Links no conteúdo */
.entry-content a:not(.wp-block-button__link):not(.ast-button) {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Revelação suave ao rolar — só onde o navegador suporta, e só em elementos marcados */
@supports (animation-timeline: view()) {
	.td-reveal {
		animation: td-reveal linear both;
		animation-timeline: view();
		animation-range: entry 0% entry 35%;
	}
	@keyframes td-reveal {
		from { opacity: 0; transform: translateY(24px); }
		to { opacity: 1; transform: none; }
	}
}

/* Transição suave entre páginas (navegadores com suporte) */
@view-transition {
	navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
	animation-duration: 0.25s;
}

/* Rodapé */
.site-footer {
	background: #0b1120 !important;
	color: #94a3b8;
}

.site-footer .site-primary-footer-wrap,
.site-footer .site-below-footer-wrap,
.site-footer .site-above-footer-wrap {
	background: transparent !important;
	border-color: rgb(148 163 184 / 12%) !important;
}

.site-footer .site-primary-footer-wrap {
	padding: clamp(2.5rem, 6vw, 4rem) 0 2rem !important;
}

.td-footer {
	display: grid;
	grid-template-columns: 1.4fr repeat(3, 1fr);
	gap: 2rem;
	text-align: left;
}

.td-footer-brand .td-footer-tagline {
	margin: 0 0 1rem;
	max-width: 32ch;
	color: #cbd5e1;
	line-height: 1.6;
}

.td-footer-name {
	margin: 0 0 0.75rem !important;
	font-family: "Space Grotesk", sans-serif;
	font-size: 1.35rem;
	line-height: 1.2;
}

.td-footer-name span:first-child {
	font-weight: 700;
	color: #f8fafc;
}

.td-footer-name span:last-child {
	font-weight: 500;
	color: #38bdf8;
}

.td-footer-cta {
	display: inline-block;
	font-weight: 600;
	color: #38bdf8 !important;
	text-decoration: none;
}

.td-footer-title {
	margin: 0 0 0.9rem !important;
	font-size: 0.8rem !important;
	font-weight: 600 !important;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #f1f5f9 !important;
}

.td-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.td-footer-links a {
	color: #94a3b8 !important;
	text-decoration: none;
	font-size: 0.95rem;
	transition: color 0.2s ease;
}

.td-footer-links a:hover {
	color: #f8fafc !important;
}

.site-footer .ast-footer-copyright,
.site-footer .ast-footer-copyright p {
	color: #94a3b8 !important; /* 7,4:1 sobre #0b1120 (o #64748b dava 3,9:1) */
	font-size: 0.85rem;
}

@media (max-width: 921px) {
	.td-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.td-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 544px) {
	.td-footer { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* Padrões: review, afiliado, patrocinado */
.td-review-box {
	margin: 2rem 0;
	padding: 1.5rem;
	border-radius: var(--td-radius);
	border: 1px solid rgb(37 99 235 / 25%);
	background: var(--td-surface);
	box-shadow: var(--td-shadow);
}

.td-review-head {
	align-items: center;
	margin-bottom: 0.5rem;
}

.td-review-head h3 {
	margin: 0 !important;
}

.td-review-score {
	margin: 0 !important;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	background: var(--td-gradient);
	color: #fff;
	font-family: "Space Grotesk", sans-serif;
	white-space: nowrap;
}

.td-review-score strong {
	font-size: 1.4rem;
}

.td-pros h4 { color: #047857; }
.td-cons h4 { color: #dc2626; }
.td-pros h4, .td-cons h4 { font-size: 1rem !important; margin-bottom: 0.4rem !important; }

.td-verdict {
	margin: 1rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid rgb(148 163 184 / 25%);
}

.td-affiliate {
	gap: 0.75rem 1.5rem;
	margin: 2rem 0;
	padding: 1.1rem 1.4rem;
	border-radius: var(--td-radius);
	border: 1px dashed rgb(37 99 235 / 45%);
	background: rgb(37 99 235 / 5%);
}

.td-affiliate p {
	margin: 0;
}

.td-affiliate-note {
	flex-basis: 100%;
	font-size: 0.8rem;
	color: var(--td-muted);
}

.td-sponsored {
	padding: 0.75rem 1rem;
	border-left: 4px solid #f59e0b;
	border-radius: 0 var(--td-radius-sm) var(--td-radius-sm) 0;
	background: rgb(245 158 11 / 10%);
	font-size: 0.92rem;
}

/* Artigo */
.single-post .entry-header .entry-title {
	font-size: clamp(1.9rem, 4.2vw, 2.8rem) !important;
	line-height: 1.15;
	margin-bottom: 0.6rem;
}

.single-post .entry-meta {
	color: var(--td-muted);
	font-size: 0.92rem;
}

.single-post .post-thumb-img-content img,
.single-post .ast-single-post-featured-section img {
	border-radius: var(--td-radius);
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.single-post .entry-content > * {
	margin-bottom: 1.4rem;
}

.single-post .entry-content h2 {
	margin-top: 2.4rem;
}

.single-post .entry-content blockquote {
	border-left: 4px solid var(--td-brand);
	background: rgb(37 99 235 / 5%);
	padding: 1rem 1.25rem;
	border-radius: 0 var(--td-radius-sm) var(--td-radius-sm) 0;
	font-style: normal;
}

.single-post .entry-content :not(pre) > code {
	padding: 0.1em 0.4em;
	border-radius: 6px;
	background: rgb(148 163 184 / 18%);
	font-size: 0.9em;
}

.single-post .entry-content pre {
	border-radius: var(--td-radius-sm);
	padding: 1rem 1.25rem;
	background: #0b1120;
	color: #e2e8f0;
	overflow-x: auto;
}

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

.single-post .entry-content th,
.single-post .entry-content td {
	padding: 0.65rem 0.8rem;
	border-bottom: 1px solid rgb(148 163 184 / 25%);
	text-align: left;
}

.single-post .entry-content .wp-block-table,
.single-post .entry-content .tablepress {
	overflow-x: auto;
}

/* Espaços de anúncio: tamanho reservado, nunca sobrepõem o conteúdo, colapsados se vazios */
.td-ad-slot {
	display: block;
	margin: 2rem auto;
	text-align: center;
	contain: layout;
}

.td-ad-slot:empty {
	display: none;
}

.td-ad-slot::before {
	content: "Publicidade";
	display: block;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--td-muted);
	margin-bottom: 6px;
}

.td-ad-slot--in-content { min-height: 280px; }
.td-ad-slot--sidebar { min-height: 600px; position: sticky; top: 96px; }

/* ===== Home e seções ===== */
.td-eyebrow {
	display: block;
	margin-bottom: 0.75rem !important;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--td-brand);
}

.td-grad {
	background: var(--td-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.td-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(4rem, 10vw, 7.5rem) 1.25rem clamp(3.5rem, 8vw, 6rem) !important;
	text-align: center;
}

.td-hero::before {
	content: "";
	position: absolute;
	inset: -30% -10% auto;
	height: 140%;
	z-index: -1;
	background:
		radial-gradient(40% 45% at 20% 30%, rgb(37 99 235 / 18%), transparent 70%),
		radial-gradient(35% 40% at 80% 25%, rgb(14 165 233 / 16%), transparent 70%),
		radial-gradient(30% 35% at 55% 80%, rgb(6 182 212 / 12%), transparent 70%);
	animation: td-drift 18s ease-in-out infinite alternate;
	will-change: transform;
}

.td-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgb(148 163 184 / 22%) 1px, transparent 1px);
	background-size: 22px 22px;
	-webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
	mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
}

@keyframes td-drift {
	from { transform: translate3d(-2%, 0, 0) scale(1); }
	to { transform: translate3d(2%, 3%, 0) scale(1.06); }
}

.td-hero-title {
	font-size: clamp(2.2rem, 5.6vw, 4rem) !important;
	line-height: 1.08 !important;
	margin: 0 auto 1.25rem !important;
	max-width: 16ch;
}

.td-hero-sub {
	font-size: clamp(1.05rem, 2vw, 1.25rem);
	line-height: 1.6;
	color: var(--td-muted);
	max-width: 58ch;
	margin: 0 auto 2rem !important;
}

.td-hero-search {
	max-width: 560px;
	margin: 0 auto 1.5rem !important;
}

.td-hero-search .wp-block-search__inside-wrapper {
	border-radius: 999px !important;
	padding: 6px !important;
	background: var(--td-surface);
	border: 1px solid #8391a7 !important; /* 3,19:1, mesma borda dos campos */
	box-shadow: var(--td-shadow);
}

.td-hero-search .wp-block-search__input {
	border: 0 !important;
	background: transparent !important;
	padding: 0.7rem 1.1rem !important;
	font-size: 1rem;
}

.td-hero-search .wp-block-search__button {
	border-radius: 999px !important;
	padding: 0.7rem 1.4rem !important;
	margin: 0 !important;
	background: var(--td-brand) !important;
	color: #fff !important;
}

.td-hero-ctas {
	justify-content: center;
	gap: 0.75rem;
}

.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent !important;
	border: 1.5px solid var(--td-brand) !important;
	color: var(--td-brand) !important;
}

html[data-theme="dark"] .wp-block-button.is-style-outline > .wp-block-button__link {
	border-color: #60a5fa !important;
	color: #93c5fd !important;
}

.td-section {
	padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem !important;
}

.td-section-title {
	font-size: clamp(1.5rem, 3vw, 2rem) !important;
	margin-bottom: 1.5rem !important;
}

.td-topics {
	gap: 1.25rem !important;
	grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.td-topics:has(> :nth-child(4):last-child) {
	grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 921px) {
	.td-topics,
	.td-topics:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* Texto corrido (Sobre, políticas) */
.td-prose h2 {
	font-size: clamp(1.35rem, 2.6vw, 1.7rem) !important;
	margin-top: 2.2rem !important;
	margin-bottom: 0.8rem !important;
}

.td-prose p,
.td-prose li {
	font-size: 1.05rem;
	line-height: 1.75;
}

.td-checklist {
	list-style: none;
	padding-left: 0 !important;
	display: grid;
	gap: 0.85rem;
	margin-top: 1.25rem !important;
	margin-bottom: 2rem !important;
}

.td-checklist li {
	position: relative;
	padding: 0.9rem 1rem 0.9rem 3rem;
	border-radius: var(--td-radius-sm);
	background: var(--td-surface);
	border: 1px solid rgb(148 163 184 / 22%);
}

.td-checklist li::before {
	content: "";
	position: absolute;
	left: 1rem;
	top: 1.05rem;
	width: 1.2rem;
	height: 1.2rem;
	border-radius: 999px;
	background: var(--td-gradient);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 100% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 100% no-repeat;
}

.td-b2b-cta {
	font-size: 1.1rem;
	font-weight: 600;
}

@media (max-width: 544px) {
	.td-topics { grid-template-columns: 1fr !important; }
}

.td-lab-band,
.td-newsletter {
	max-width: 1200px;
	margin-left: auto !important;
	margin-right: auto !important;
}

@media (max-width: 1240px) {
	.td-lab-band,
	.td-newsletter {
		margin-left: 1.25rem !important;
		margin-right: 1.25rem !important;
	}
}

.td-topic {
	position: relative;
	padding: 1.5rem 1.5rem 1.25rem;
}

.td-topic h3 {
	font-size: 1.25rem !important;
	margin: 0.25rem 0 0.5rem !important;
}

.td-topic h3 a {
	color: var(--ast-global-color-2);
	text-decoration: none;
}

.td-topic h3 a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
}

.td-topic p:last-child {
	margin: 0;
	color: var(--td-muted);
	font-size: 0.95rem;
	line-height: 1.55;
}

.td-topic-tag {
	margin: 0 !important;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #0369a1;
}

html[data-theme="dark"] .td-topic-tag {
	color: #38bdf8;
}

/* Páginas internas */
.td-page-hero {
	padding: clamp(3rem, 7vw, 5rem) 1.25rem clamp(1.5rem, 4vw, 2.5rem) !important;
}

.td-page-hero h1 {
	font-size: clamp(2rem, 4.5vw, 3rem) !important;
	margin-top: 0 !important;
	margin-bottom: 0.75rem !important;
}

.td-lead {
	font-size: clamp(1.05rem, 1.8vw, 1.2rem);
	line-height: 1.65;
	color: var(--td-muted);
	max-width: 62ch;
}

.td-contact-cols {
	gap: 1.5rem !important;
}

.td-contact-aside {
	display: grid;
	gap: 1rem;
	align-content: start;
}

@media (max-width: 781px) {
	.td-contact-cols > .wp-block-column:last-child { order: -1; }
}

.td-contact-card {
	padding: 1.25rem 1.4rem;
}

.td-contact-card h3 {
	font-size: 1.05rem !important;
	margin: 0 0 0.4rem !important;
}

.td-contact-card p {
	margin: 0 0 0.4rem;
	color: var(--td-muted);
	font-size: 0.95rem;
}

.td-form-card {
	padding: clamp(1.25rem, 3vw, 2rem);
}

.td-form-card h2 {
	font-size: 1.4rem !important;
	margin: 0 0 1.25rem !important;
}

/* Formulários (Fluent Forms) no padrão do site */
.fluentform .ff-el-form-control {
	border-radius: var(--td-radius-sm) !important;
	border: 1px solid rgb(148 163 184 / 45%) !important;
	padding: 0.7rem 0.9rem !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fluentform .ff-el-form-control:focus {
	border-color: var(--td-brand) !important;
	box-shadow: 0 0 0 3px rgb(37 99 235 / 18%) !important;
	outline: none;
}

.fluentform .ff-el-input--label label {
	font-weight: 600;
	font-size: 0.9rem;
}

.fluentform .ff-btn-submit {
	background: var(--td-brand) !important;
	color: #fff !important;
	border: 0 !important;
	padding: 0.75rem 1.6rem !important;
	font-weight: 600;
}

.fluentform .td-form-note p,
.fluentform .td-form-note {
	margin: 0.25rem 0 0 !important;
	font-size: 0.8rem !important;
	line-height: 1.5;
	color: var(--td-muted) !important;
	text-align: left;
}

.fluentform .ff-message-success {
	border-radius: var(--td-radius-sm);
	border: 1px solid rgb(5 150 105 / 35%);
	background: rgb(5 150 105 / 8%);
	color: inherit;
	padding: 1rem 1.25rem;
}

html[data-theme="dark"] .fluentform .ff-el-input--label label,
html[data-theme="dark"] .fluentform .ff-el-form-check-label {
	color: var(--ast-global-color-3);
}

.td-topic::before {
	content: "";
	position: absolute;
	left: 1.5rem;
	top: 0;
	width: 42px;
	height: 3px;
	border-radius: 0 0 3px 3px;
	background: var(--td-gradient);
}

.td-latest .wp-block-post-template {
	gap: 1.25rem !important;
}

.td-post-card {
	height: 100%;
	display: flex;
	flex-direction: column;
}

.td-post-card .wp-block-post-featured-image {
	margin: 0 !important;
}

.td-post-card-body {
	padding: 1.1rem 1.25rem 1.25rem;
}

.td-post-card .wp-block-post-title {
	font-size: 1.15rem !important;
	margin: 0.35rem 0 0.5rem !important;
}

.td-post-card .wp-block-post-title a {
	color: var(--ast-global-color-2);
	text-decoration: none;
}

.td-post-cat a {
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-decoration: none;
}

.td-post-date {
	font-size: 0.85rem;
	color: var(--td-muted);
}

.td-empty {
	padding: 2rem;
	text-align: center;
	border: 1px dashed rgb(148 163 184 / 45%);
	border-radius: var(--td-radius);
}

.td-empty p {
	margin: 0;
}

.td-lab-band {
	margin: clamp(1.5rem, 4vw, 3rem) 1.25rem !important;
	padding: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 4vw, 3rem) !important;
	border-radius: 24px;
	color: #cbd5e1;
	background:
		radial-gradient(60% 80% at 100% 0%, rgb(14 165 233 / 25%), transparent 60%),
		radial-gradient(50% 70% at 0% 100%, rgb(37 99 235 / 30%), transparent 60%),
		#0b1120;
	border: 1px solid rgb(56 189 248 / 20%);
}

.td-lab-band h2 {
	color: #f8fafc !important;
	font-size: clamp(1.6rem, 3.5vw, 2.4rem) !important;
}

.td-lab-band .td-eyebrow {
	color: #38bdf8;
}

.td-stats {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	gap: 0.75rem;
}

.td-stats li {
	display: flex;
	align-items: baseline;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	border-radius: var(--td-radius-sm);
	background: rgb(255 255 255 / 5%);
	border: 1px solid rgb(148 163 184 / 18%);
	color: #cbd5e1;
}

.td-stats strong {
	font-family: "Space Grotesk", sans-serif;
	font-size: 2rem;
	line-height: 1;
	background: var(--td-gradient);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	min-width: 2.2ch;
}

.td-newsletter {
	margin: clamp(1.5rem, 4vw, 3rem) 1.25rem !important;
	padding: clamp(2rem, 5vw, 3rem) 1.25rem !important;
	text-align: center;
	border-radius: 24px;
	background: var(--ast-global-color-7, #f1f5f9);
	border: 1px solid rgb(148 163 184 / 22%);
}

.td-newsletter h2 {
	font-size: clamp(1.4rem, 3vw, 2rem) !important;
}

.td-newsletter p {
	color: var(--td-muted);
}

.td-newsletter .fluentform {
	max-width: 560px;
	margin: 1.5rem auto 0;
	text-align: left;
}

/* E-mail e botão na mesma linha, aviso centralizado embaixo; no celular o botão desce e ocupa a largura (08/10). */
.td-newsletter .fluentform fieldset {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.75rem;
	align-items: start;
}

.td-newsletter .fluentform .ff-el-group {
	margin: 0 !important;
}

.td-newsletter .fluentform .ff-el-group:has(input[type="email"]) {
	grid-column: 1;
	grid-row: 1;
}

.td-newsletter .fluentform .ff_submit_btn_wrapper {
	grid-column: 2;
	grid-row: 1;
}

.td-newsletter .fluentform .td-form-note {
	grid-column: 1 / -1;
	grid-row: 2;
}

.td-newsletter .fluentform .td-form-note,
.td-newsletter .fluentform .td-form-note p {
	text-align: center !important;
}

.td-newsletter .fluentform input[type="email"] {
	min-height: 48px;
	border-color: rgb(100 116 139 / 55%) !important;
}

.td-newsletter .fluentform .ff-btn-submit {
	min-height: 48px;
	white-space: nowrap;
}

@media (max-width: 560px) {
	.td-newsletter .fluentform fieldset {
		grid-template-columns: minmax(0, 1fr);
	}

	.td-newsletter .fluentform .ff_submit_btn_wrapper {
		grid-column: 1;
		grid-row: 2;
	}

	.td-newsletter .fluentform .ff-btn-submit {
		width: 100%;
	}

	.td-newsletter .fluentform .td-form-note {
		grid-row: 3;
	}
}

.td-b2b-strip {
	padding: 1.25rem !important;
	margin-bottom: clamp(2rem, 5vw, 3.5rem) !important;
	text-align: center;
}

.td-b2b-strip p {
	margin: 0 auto;
	max-width: 900px;
	padding: 1rem 1.5rem;
	border-radius: 999px;
	border: 1px solid rgb(148 163 184 / 30%);
	font-size: 0.95rem;
	color: var(--td-muted);
}

.td-b2b-strip a {
	font-weight: 600;
	white-space: nowrap;
}

@media (max-width: 781px) {
	.td-b2b-strip p { border-radius: var(--td-radius); }
	.td-hero { text-align: left; }
	.td-hero-title, .td-hero-sub { margin-left: 0 !important; }
	.td-hero-ctas { justify-content: flex-start; }
}

/* Acessibilidade: respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	.td-reveal { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* Conta no cabeçalho: ao lado do botão de tema (mesmo elemento HTML 1 do Astra) */
.ast-header-html .ast-builder-html-element,
.ast-header-html .ast-builder-html-element > p {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
}

.ast-header-html .ast-builder-html-element br { display: none; }

.td-account {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	height: 40px;
	padding: 0 0.85rem 0 0.65rem;
	border-radius: 999px;
	border: 1px solid rgb(148 163 184 / 35%);
	color: var(--ast-global-color-2) !important;
	font-size: 0.9rem;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none !important;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}

.td-account:hover { background: rgb(148 163 184 / 14%); }
.td-account:focus-visible { outline: 2px solid var(--td-brand); outline-offset: 2px; }
.td-account--in { border-color: rgb(37 99 235 / 45%); }
.td-account--in svg { color: var(--td-brand); }
html[data-theme="dark"] .td-account--in svg { color: #60a5fa; }

/* Sem espaço sobrando: só o ícone (o título do link continua dizendo "Minha conta"/"Entrar").
   O nome só cabe a partir de 1500px, quando o botão Newsletter também está visível. */
@media (max-width: 1499px) {
	.td-account { width: 40px; padding: 0; justify-content: center; }
	.td-account-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}
}

/* Aviso depois de cadastrar/entrar */
.td-welcome {
	position: relative;
	z-index: 20;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 0.75rem 3rem 0.75rem 1rem;
	/* Só azuis escuros: o degradê da marca termina em ciano e o texto branco ficava abaixo de 3:1 */
	background: linear-gradient(120deg, #1e40af 0%, #2563eb 100%);
	color: #fff;
	text-align: center;
	animation: td-welcome-in 0.35s ease;
}

.td-welcome p { margin: 0; font-size: 0.95rem; }
.td-welcome button {
	position: absolute;
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	background: none !important;
	border: 0 !important;
	color: #fff !important;
	font-size: 1.5rem !important;
	line-height: 1;
	padding: 0 0.4rem !important;
	cursor: pointer;
	box-shadow: none !important;
}

@keyframes td-welcome-in { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .td-welcome { animation: none; } }

/* Painel da conta: atalhos para o Laboratório */
.td-account-lab {
	margin: 0 0 1.5rem;
	padding: 1.25rem;
	border-radius: var(--td-radius);
	border: 1px solid rgb(37 99 235 / 30%);
	background:
		radial-gradient(60% 90% at 100% 0%, rgb(14 165 233 / 12%), transparent 60%),
		var(--td-surface);
}

.td-account-lab h3 { margin: 0 0 0.9rem !important; font-size: 1.1rem !important; }
.td-account-lab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.75rem; }
.td-account-lab-grid a {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.85rem 1rem;
	border-radius: var(--td-radius-sm);
	border: 1px solid rgb(148 163 184 / 25%);
	background: var(--td-surface);
	text-decoration: none !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.td-account-lab-grid a:hover { transform: translateY(-2px); box-shadow: var(--td-shadow-hover); }
.td-account-lab-grid strong { color: var(--td-brand); }
html[data-theme="dark"] .td-account-lab-grid strong { color: #60a5fa; }
.td-account-lab-grid span { font-size: 0.85rem; color: var(--td-muted); }

/* Navegação entre as áreas do Laboratório */
.td-lab-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	max-width: 1200px;
	margin: 0 auto 1.5rem;
	padding: 0 1.25rem;
}

.td-lab-nav a {
	padding: 0.4rem 0.95rem;
	border-radius: 999px;
	border: 1px solid rgb(148 163 184 / 35%);
	font-size: 0.88rem;
	font-weight: 600;
	color: var(--td-muted) !important;
	text-decoration: none !important;
}

.td-lab-nav a:hover { border-color: var(--td-brand); color: var(--td-brand) !important; }
.td-lab-nav a[aria-current="page"] { background: var(--td-brand); border-color: var(--td-brand); color: #fff !important; }

/* Conteúdo só para visitante / só para quem está logado (a classe logged-in vem do WordPress no <body>) */
body.logged-in .td-only-guest { display: none !important; }
body:not(.logged-in) .td-only-member { display: none !important; }

/* Faixa 922–1199 px: precisa vir DEPOIS da regra base do .td-logo (230px), senão ela vence a cascata. */
@media (min-width: 922px) and (max-width: 1199px) {
	.td-logo { width: 165px; }
	#masthead .main-header-menu > .menu-item > .menu-link {
		padding-left: 0.45em;
		padding-right: 0.45em;
	}
	.td-theme-toggle,
	.td-account { width: 36px; height: 36px; }
}

@media (min-width: 922px) and (max-width: 1080px) {
	.td-logo { width: 150px; }
	#masthead .main-header-menu > .menu-item > .menu-link { font-size: 0.86rem; padding-left: 0.4em; padding-right: 0.4em; }
	#masthead .main-header-menu .ast-header-navigation-arrow,
	#masthead .main-header-menu .dropdown-menu-toggle { display: none; }
}

/* O layout "constrained" do conteúdo aplica margin auto nos filhos; aqui os links ficam lado a lado. */
.td-lab-nav a { margin: 0 !important; }

/* As páginas do Laboratório usam o layout "largura total" do Astra, que zera o max-width de todo filho direto do
   conteúdo (.ast-page-builder-template .entry-content[data-ast-blocks-layout] > *, especificidade 0,3,0) e jogava a
   barra de abas para a borda esquerda. Aqui ela volta a ter a largura das seções (1100 px) e fica alinhada aos títulos. */
body .entry-content[data-ast-blocks-layout] > .td-lab-nav {
	max-width: calc(1100px + 2.5rem);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

/* No AiTester v2 os cartões ficam num bloco de 1240 px: a barra acompanha esse bloco. */
body .entry-content[data-ast-blocks-layout] > .td-lab-nav:has(+ .td-lab-app[data-view="aitester-v2"]) {
	max-width: calc(1240px + 2.5rem);
}

/* Celular: logo + tema + conta + busca + menu precisam caber em 360–375px */
@media (max-width: 544px) {
	.td-logo { width: 138px; }
	.ast-header-html .ast-builder-html-element,
	.ast-header-html .ast-builder-html-element > p { gap: 0.3rem; }
	.td-theme-toggle,
	.td-account { width: 34px; height: 34px; }
}

@media (max-width: 380px) {
	.td-logo { width: 124px; }
}

/* 1200–1399 px: entra o botão Newsletter; logo e menu cedem espaço para ele não quebrar em linhas */
#masthead .ast-header-button-1 .ast-custom-button { white-space: nowrap; }
/* Botão Newsletter: no escuro o Astra usa #3b82f6 (3,68:1 com branco); fundo da marca dá 5,17:1 */
html[data-theme="dark"] #masthead .ast-header-button-1 .ast-custom-button { background-color: var(--td-brand); border-color: var(--td-brand); color: #fff; }
html[data-theme="dark"] #masthead .ast-header-button-1 .ast-custom-button:hover { background-color: #1d4ed8; border-color: #1d4ed8; }

@media (min-width: 1200px) and (max-width: 1399px) {
	.td-logo { width: 195px; }
	#masthead .main-header-menu > .menu-item > .menu-link { padding-left: 0.65em; padding-right: 0.65em; }
}

@media (min-width: 1200px) and (max-width: 1299px) {
	.td-logo { width: 172px; }
	#masthead .main-header-menu > .menu-item > .menu-link { padding-left: 0.5em; padding-right: 0.5em; }
}

/* Página de posts (/blog/): cabeçalho e estado vazio — td-lab/includes/blog.php */
.td-blog-hero {
	max-width: 1200px;
	margin: 0 auto;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

.td-empty--listagem {
	max-width: 720px;
	margin: 0 auto clamp(2rem, 5vw, 3.5rem);
}

.td-empty--listagem p + p {
	margin-top: 0.5rem;
}

/* Caixa "Sobre o autor" no fim dos artigos — td-lab/includes/autor.php */
.td-author-box {
	display: flex;
	gap: 1.25rem;
	align-items: flex-start;
	margin: 3rem 0 1rem;
	padding: 1.5rem;
	background: var(--td-surface);
	border: 1px solid rgb(148 163 184 / 22%);
	border-radius: var(--td-radius);
	box-shadow: var(--td-shadow);
}

.td-author-avatar {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--td-gradient);
	color: #fff;
	font-family: "Space Grotesk", sans-serif;
	font-weight: 700;
	font-size: 1.35rem;
}

.td-author-box p {
	margin: 0 0 0.4rem;
}

.td-author-label {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--td-brand);
}

html[data-theme="dark"] .td-author-label {
	color: #60a5fa;
}

.td-author-name {
	font-family: "Space Grotesk", sans-serif;
	font-size: 1.25rem;
	font-weight: 700;
}

.td-author-name a {
	color: inherit;
	text-decoration: none;
}

.td-author-role {
	font-size: 0.9rem;
	font-weight: 600;
}

.td-author-bio {
	color: var(--td-muted);
	line-height: 1.6;
}

.td-author-more {
	font-weight: 600;
}

@media (max-width: 544px) {
	.td-author-box { flex-direction: column; }
}
