/* ==========================================================================
   Ninja da Grana — folha de estilo principal
   Sistema de design: tokens, tipografia, componentes, layouts, utilitários.
   Sem dependências externas. Sem fontes remotas. Mobile-first.
   ========================================================================== */

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

:root {
	/* Colors: warm linen grounds, dark ink, rose thread accent, leaf green second */
	--ndg-paper: #fbf8f2;
	--ndg-paper-deep: #f3ede1;
	--ndg-surface: #ffffff;
	--ndg-ink: #2a2622;
	--ndg-ink-soft: #57504a;
	--ndg-ink-muted: #6f6962;
	--ndg-line: #e6ddcf;
	--ndg-line-strong: #d4c8b4;
	--ndg-accent: #a13f59;
	--ndg-accent-hover: #7f2f45;
	--ndg-accent-soft: #f9ecef;
	--ndg-second: #3d5a47;
	--ndg-second-soft: #eaf1eb;
	--ndg-focus: #1b5e9c;

	/* Tipografia — pilhas do sistema, nenhum download */
	--ndg-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--ndg-font-head: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
	--ndg-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

	--ndg-text-xs: 0.78rem;
	--ndg-text-sm: 0.875rem;
	--ndg-text-base: 1rem;
	--ndg-text-md: 1.0625rem;
	--ndg-text-lg: 1.1875rem;
	--ndg-text-xl: 1.375rem;
	--ndg-text-2xl: 1.625rem;
	--ndg-text-3xl: 2rem;
	--ndg-text-4xl: 2.5rem;

	--ndg-leading-tight: 1.2;
	--ndg-leading-snug: 1.35;
	--ndg-leading-normal: 1.65;
	--ndg-leading-relaxed: 1.75;

	/* Espaçamento — escala de 4px */
	--ndg-s1: 0.25rem;
	--ndg-s2: 0.5rem;
	--ndg-s3: 0.75rem;
	--ndg-s4: 1rem;
	--ndg-s5: 1.5rem;
	--ndg-s6: 2rem;
	--ndg-s7: 2.5rem;
	--ndg-s8: 3rem;
	--ndg-s9: 4rem;
	--ndg-s10: 5rem;

	/* Formas e sombras */
	--ndg-radius-sm: 6px;
	--ndg-radius: 10px;
	--ndg-radius-lg: 16px;
	--ndg-shadow-sm: 0 1px 2px rgba(33, 31, 28, 0.06);
	--ndg-shadow: 0 2px 10px rgba(33, 31, 28, 0.07);
	--ndg-shadow-lg: 0 10px 30px rgba(33, 31, 28, 0.1);

	/* Layout */
	--ndg-container: 1180px;
	--ndg-container-narrow: 760px;
	--ndg-measure: 68ch;
	--ndg-gutter: var(--ndg-s4);

	color-scheme: light;
}

@media (min-width: 48em) {
	:root {
		--ndg-gutter: var(--ndg-s6);
	}
}

/* --------------------------------------------------------------------------
   2. Reset moderado
   -------------------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 5.5rem;
}

@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;
	}
}

body {
	margin: 0;
	background-color: var(--ndg-paper);
	color: var(--ndg-ink);
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-md);
	line-height: var(--ndg-leading-normal);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

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

img {
	display: block;
}

figure {
	margin: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--ndg-line);
	margin: var(--ndg-s7) 0;
}

/* --------------------------------------------------------------------------
   3. Tipografia
   -------------------------------------------------------------------------- */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--ndg-font-head);
	color: var(--ndg-ink);
	line-height: var(--ndg-leading-tight);
	margin: 0 0 var(--ndg-s4);
	font-weight: 600;
	letter-spacing: -0.01em;
	overflow-wrap: break-word;
}

h1 {
	font-size: clamp(1.875rem, 1.35rem + 2.2vw, var(--ndg-text-4xl));
}

h2 {
	font-size: clamp(1.5rem, 1.2rem + 1.3vw, var(--ndg-text-3xl));
}

h3 {
	font-size: clamp(1.25rem, 1.1rem + 0.7vw, var(--ndg-text-xl));
}

h4 {
	font-size: var(--ndg-text-lg);
}

h5,
h6 {
	font-size: var(--ndg-text-base);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--ndg-ink-soft);
}

p {
	margin: 0 0 var(--ndg-s4);
}

a {
	color: var(--ndg-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

a:hover,
a:focus {
	color: var(--ndg-accent-hover);
}

strong,
b {
	font-weight: 650;
}

small {
	font-size: var(--ndg-text-sm);
}

code,
kbd,
samp {
	font-family: var(--ndg-font-mono);
	font-size: 0.9em;
	background: var(--ndg-paper-deep);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius-sm);
	padding: 0.1em 0.35em;
}

pre {
	font-family: var(--ndg-font-mono);
	font-size: var(--ndg-text-sm);
	background: var(--ndg-paper-deep);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s4);
	overflow-x: auto;
	line-height: 1.5;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
}

blockquote {
	margin: var(--ndg-s6) 0;
	padding: var(--ndg-s2) 0 var(--ndg-s2) var(--ndg-s5);
	border-left: 3px solid var(--ndg-accent);
	font-family: var(--ndg-font-head);
	font-size: var(--ndg-text-lg);
	color: var(--ndg-ink-soft);
}

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

blockquote cite {
	display: block;
	margin-top: var(--ndg-s2);
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-style: normal;
	color: var(--ndg-ink-muted);
}

/* --------------------------------------------------------------------------
   4. Acessibilidade
   -------------------------------------------------------------------------- */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--ndg-focus);
	outline-offset: 2px;
	border-radius: 2px;
}

.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 {
	background-color: var(--ndg-surface);
	border-radius: var(--ndg-radius-sm);
	box-shadow: var(--ndg-shadow);
	clip-path: none;
	color: var(--ndg-accent);
	display: block;
	font-size: var(--ndg-text-sm);
	font-weight: 600;
	height: auto;
	left: var(--ndg-s4);
	line-height: normal;
	padding: var(--ndg-s3) var(--ndg-s4);
	text-decoration: none;
	top: var(--ndg-s4);
	width: auto;
	z-index: 100000;
}

.ndg-skip-link:focus {
	position: fixed;
}

/* --------------------------------------------------------------------------
   5. Layout
   -------------------------------------------------------------------------- */

.ndg-container {
	width: 100%;
	max-width: var(--ndg-container);
	margin-inline: auto;
	padding-inline: var(--ndg-gutter);
}

.ndg-container--narrow {
	max-width: var(--ndg-container-narrow);
}

.ndg-site-main {
	flex: 1 0 auto;
	padding-block: var(--ndg-s7) var(--ndg-s9);
}

/* Usado na home, onde o herói encosta no cabeçalho. */
.ndg-site-main--flush {
	padding-top: 0;
}

.ndg-layout {
	display: grid;
	gap: var(--ndg-s7);
}

@media (min-width: 62em) {
	.ndg-layout--with-sidebar {
		grid-template-columns: minmax(0, 1fr) 20rem;
		gap: var(--ndg-s8);
		align-items: start;
	}
}

.ndg-stack > * + * {
	margin-top: var(--ndg-s4);
}

.ndg-section {
	margin-block: var(--ndg-s9);
}

.ndg-section:first-child {
	margin-top: 0;
}

.ndg-section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--ndg-s3);
	margin-bottom: var(--ndg-s5);
	padding-bottom: var(--ndg-s3);
	border-bottom: 1px solid var(--ndg-line);
}

.ndg-section__title {
	margin: 0;
	font-size: var(--ndg-text-2xl);
}

.ndg-section__description {
	flex-basis: 100%;
	margin: 0;
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-base);
	max-width: var(--ndg-measure);
}

.ndg-section__link {
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.ndg-section__link:hover {
	text-decoration: underline;
}

.ndg-section__link::after {
	content: " →";
}

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

.ndg-site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--ndg-surface);
	border-bottom: 1px solid var(--ndg-line);
}

.ndg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ndg-s4);
	min-height: 4.25rem;
}

.ndg-branding {
	display: flex;
	align-items: center;
	gap: var(--ndg-s3);
	min-width: 0;
}

.ndg-branding__mark {
	flex: 0 0 auto;
	width: 2.25rem;
	height: 2.25rem;
}

.ndg-branding__text {
	min-width: 0;
}

.ndg-branding__title {
	font-family: var(--ndg-font-head);
	font-size: var(--ndg-text-xl);
	font-weight: 600;
	line-height: 1.1;
	margin: 0;
	letter-spacing: -0.015em;
}

.ndg-branding__title a {
	color: var(--ndg-ink);
	text-decoration: none;
}

.ndg-branding__title a:hover {
	color: var(--ndg-accent);
}

.ndg-branding__tagline {
	margin: 0.15rem 0 0;
	font-size: var(--ndg-text-xs);
	color: var(--ndg-ink-muted);
	line-height: 1.3;
}

.ndg-custom-logo-link img {
	max-height: 3rem;
	width: auto;
}

/* Botão do menu móvel */
.ndg-menu-toggle {
	display: inline-flex;
	align-items: center;
	gap: var(--ndg-s2);
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line-strong);
	border-radius: var(--ndg-radius-sm);
	color: var(--ndg-ink);
	cursor: pointer;
	font: inherit;
	font-size: var(--ndg-text-sm);
	font-weight: 600;
	padding: var(--ndg-s2) var(--ndg-s3);
}

.ndg-menu-toggle:hover {
	border-color: var(--ndg-accent);
	color: var(--ndg-accent);
}

.ndg-menu-toggle__bars {
	display: block;
	position: relative;
	width: 1.125rem;
	height: 2px;
	background: currentColor;
}

.ndg-menu-toggle__bars::before,
.ndg-menu-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
}

.ndg-menu-toggle__bars::before {
	top: -6px;
}

.ndg-menu-toggle__bars::after {
	top: 6px;
}

.ndg-header__panel {
	display: none;
	padding-bottom: var(--ndg-s5);
}

.ndg-header__panel.is-open {
	display: block;
}

.ndg-nav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ndg-nav__list li {
	position: relative;
}

.ndg-nav__list a {
	display: block;
	padding: var(--ndg-s3) 0;
	border-bottom: 1px solid var(--ndg-line);
	color: var(--ndg-ink);
	font-size: var(--ndg-text-base);
	font-weight: 550;
	text-decoration: none;
}

.ndg-nav__list a:hover {
	color: var(--ndg-accent);
}

.ndg-nav .current-menu-item > a,
.ndg-nav .current-menu-ancestor > a,
.ndg-nav .current_page_item > a {
	color: var(--ndg-accent);
}

.ndg-header__search {
	margin-top: var(--ndg-s4);
}

/* Aviso exibido apenas para quem pode editar menus, quando nenhum menu foi
   atribuído à posição principal. O visitante nunca vê este bloco. */
.ndg-nav--empty {
	margin: 0;
	padding: var(--ndg-s3) 0;
	font-size: var(--ndg-text-sm);
}

@media (min-width: 62em) {
	.ndg-menu-toggle {
		display: none;
	}

	/* Cabeçalho em uma única linha: marca à esquerda, navegação e busca à
	   direita. Mantém a barra fixa baixa e previsível durante a leitura.
	   `flex-wrap` é o escape: quando o menu cresce e a linha única deixa de
	   caber, o painel desce para uma segunda linha em vez de estourar a
	   largura da página. */
	.ndg-site-header .ndg-container {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 0 var(--ndg-s6);
	}

	.ndg-header__inner {
		flex: 0 0 auto;
		min-height: 4.5rem;
	}

	.ndg-header__panel {
		display: flex !important;
		flex: 1 1 auto;
		flex-wrap: wrap;
		min-width: 0;
		align-items: center;
		justify-content: flex-end;
		gap: var(--ndg-s3) var(--ndg-s5);
		padding-bottom: var(--ndg-s3);
	}

	.ndg-nav__list {
		flex-wrap: wrap;
	}

	.ndg-nav__list {
		display: flex;
		align-items: center;
		gap: var(--ndg-s1);
	}

	.ndg-nav__list a {
		border-bottom: 0;
		border-radius: var(--ndg-radius-sm);
		padding: var(--ndg-s2) var(--ndg-s3);
		font-size: var(--ndg-text-sm);
		white-space: nowrap;
	}

	.ndg-nav__list a:hover {
		background: var(--ndg-accent-soft);
	}

	.ndg-nav .current-menu-item > a,
	.ndg-nav .current-menu-ancestor > a {
		background: var(--ndg-accent-soft);
	}

	/* Submenus (um nível) */
	.ndg-nav__list .sub-menu {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		min-width: 13rem;
		background: var(--ndg-surface);
		border: 1px solid var(--ndg-line);
		border-radius: var(--ndg-radius);
		box-shadow: var(--ndg-shadow-lg);
		list-style: none;
		margin: 0;
		padding: var(--ndg-s2);
		z-index: 60;
	}

	.ndg-nav__list li:hover > .sub-menu,
	.ndg-nav__list li:focus-within > .sub-menu {
		display: block;
	}

	.ndg-nav__list .sub-menu a {
		white-space: normal;
	}

	.ndg-header__search {
		margin-top: 0;
		flex: 0 1 13.5rem;
		min-width: 9rem;
	}
}

/* --------------------------------------------------------------------------
   7. Formulários
   -------------------------------------------------------------------------- */

label {
	display: block;
	font-size: var(--ndg-text-sm);
	font-weight: 600;
	margin-bottom: var(--ndg-s2);
}

.ndg-field {
	margin-bottom: var(--ndg-s5);
}

.ndg-field__hint {
	display: block;
	margin-top: var(--ndg-s2);
	font-size: var(--ndg-text-xs);
	font-weight: 400;
	color: var(--ndg-ink-muted);
}

.ndg-required {
	color: var(--ndg-accent);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="number"],
input[type="password"],
select,
textarea {
	width: 100%;
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line-strong);
	border-radius: var(--ndg-radius-sm);
	color: var(--ndg-ink);
	font: inherit;
	font-size: var(--ndg-text-base);
	padding: var(--ndg-s3);
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--ndg-focus);
}

textarea {
	min-height: 11rem;
	resize: vertical;
	line-height: var(--ndg-leading-normal);
}

input::placeholder,
textarea::placeholder {
	color: var(--ndg-ink-muted);
	opacity: 1;
}

/* Campo de busca */
.ndg-search-form {
	display: flex;
	gap: var(--ndg-s2);
}

.ndg-search-form__field {
	flex: 1 1 auto;
	min-width: 0;
}

.ndg-search-form input[type="search"] {
	padding-block: var(--ndg-s2);
}

.ndg-search-form__submit {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ndg-paper-deep);
	border: 1px solid var(--ndg-line-strong);
	border-radius: var(--ndg-radius-sm);
	color: var(--ndg-ink);
	cursor: pointer;
	padding-inline: var(--ndg-s3);
}

.ndg-search-form__submit:hover {
	background: var(--ndg-accent-soft);
	border-color: var(--ndg-accent);
	color: var(--ndg-accent);
}

/* --------------------------------------------------------------------------
   8. Botões
   -------------------------------------------------------------------------- */

.ndg-button,
.ndg-button--primary,
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--ndg-s2);
	background: var(--ndg-accent);
	border: 1px solid var(--ndg-accent);
	border-radius: var(--ndg-radius-sm);
	color: #fff;
	cursor: pointer;
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-base);
	font-weight: 600;
	line-height: 1.3;
	padding: var(--ndg-s3) var(--ndg-s5);
	text-align: center;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ndg-button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
	background: var(--ndg-accent-hover);
	border-color: var(--ndg-accent-hover);
	color: #fff;
}

.ndg-button--secondary {
	background: transparent;
	border-color: var(--ndg-line-strong);
	color: var(--ndg-ink);
}

.ndg-button--secondary:hover {
	background: var(--ndg-accent-soft);
	border-color: var(--ndg-accent);
	color: var(--ndg-accent);
}

.ndg-button--small {
	font-size: var(--ndg-text-sm);
	padding: var(--ndg-s2) var(--ndg-s4);
}

.ndg-button[disabled],
button[disabled] {
	cursor: not-allowed;
	opacity: 0.55;
}

/* --------------------------------------------------------------------------
   9. Rótulos, categorias, metadados
   -------------------------------------------------------------------------- */

.ndg-eyebrow {
	display: inline-block;
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-xs);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ndg-accent);
	text-decoration: none;
	margin-bottom: var(--ndg-s2);
}

a.ndg-eyebrow:hover {
	text-decoration: underline;
}

.ndg-chip {
	display: inline-flex;
	align-items: center;
	gap: var(--ndg-s1);
	background: var(--ndg-second-soft);
	border-radius: 999px;
	color: var(--ndg-second);
	font-size: var(--ndg-text-xs);
	font-weight: 600;
	padding: 0.2rem 0.65rem;
	text-decoration: none;
}

a.ndg-chip:hover {
	background: var(--ndg-accent-soft);
	color: var(--ndg-accent);
}

.ndg-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ndg-s2) var(--ndg-s4);
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-sm);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ndg-meta__item {
	display: inline-flex;
	align-items: center;
	gap: var(--ndg-s2);
}

.ndg-meta a {
	color: inherit;
}

.ndg-meta svg {
	flex: 0 0 auto;
	color: var(--ndg-ink-muted);
}

.ndg-icon {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
	vertical-align: -0.125em;
}

/* --------------------------------------------------------------------------
   10. Cards e grades
   -------------------------------------------------------------------------- */

.ndg-grid {
	display: grid;
	gap: var(--ndg-s5);
	grid-template-columns: 1fr;
}

@media (min-width: 36em) {
	.ndg-grid--2,
	.ndg-grid--3,
	.ndg-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 62em) {
	.ndg-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ndg-grid--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.ndg-card {
	display: flex;
	flex-direction: column;
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	box-shadow: var(--ndg-shadow-sm);
	overflow: hidden;
	height: 100%;
	transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.ndg-card:hover {
	box-shadow: var(--ndg-shadow);
	transform: translateY(-2px);
}

.ndg-card__media {
	display: block;
	background: var(--ndg-paper-deep);
	aspect-ratio: 16 / 9;
	overflow: hidden;
}

.ndg-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ndg-card__media--placeholder {
	background:
		repeating-linear-gradient(135deg, var(--ndg-paper-deep) 0 14px, #efe7d8 14px 28px);
}

.ndg-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: var(--ndg-s2);
	padding: var(--ndg-s4) var(--ndg-s4) var(--ndg-s5);
}

.ndg-card__title {
	font-size: var(--ndg-text-lg);
	line-height: var(--ndg-leading-snug);
	margin: 0;
}

.ndg-card__title a {
	color: var(--ndg-ink);
	text-decoration: none;
}

.ndg-card__title a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-card__excerpt {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-sm);
	line-height: var(--ndg-leading-normal);
	margin: 0;
}

.ndg-card__footer {
	margin-top: auto;
	padding-top: var(--ndg-s3);
}

/* Card horizontal (listas e resultados de busca) */
.ndg-card-row {
	display: grid;
	gap: var(--ndg-s4);
	padding-bottom: var(--ndg-s5);
	border-bottom: 1px solid var(--ndg-line);
}

.ndg-card-row:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

@media (min-width: 36em) {
	.ndg-card-row {
		grid-template-columns: 13rem minmax(0, 1fr);
		align-items: start;
	}
}

.ndg-card-row__media {
	display: block;
	background: var(--ndg-paper-deep);
	border-radius: var(--ndg-radius);
	aspect-ratio: 4 / 3;
	overflow: hidden;
}

.ndg-card-row__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* min-width: 0 impede que títulos longos estourem a coluna da grade. */
.ndg-card-row__body {
	min-width: 0;
}

.ndg-card-row__title {
	font-size: var(--ndg-text-xl);
	margin: var(--ndg-s1) 0 var(--ndg-s2);
	overflow-wrap: break-word;
}

.ndg-card-row__title a {
	color: var(--ndg-ink);
	text-decoration: none;
}

.ndg-card-row__title a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-card-row__excerpt {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-base);
	margin: 0 0 var(--ndg-s3);
}

.ndg-card-list {
	display: grid;
	gap: var(--ndg-s5);
}

/* Lista compacta numerada (Comece por aqui / Guias populares) */
.ndg-steps {
	list-style: none;
	counter-reset: ndg-step;
	display: grid;
	gap: var(--ndg-s4);
	margin: 0;
	padding: 0;
}

.ndg-steps > li {
	counter-increment: ndg-step;
	display: grid;
	grid-template-columns: 2.25rem minmax(0, 1fr);
	gap: var(--ndg-s4);
	align-items: start;
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s4);
}

.ndg-steps > li::before {
	content: counter(ndg-step);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	background: var(--ndg-accent-soft);
	border-radius: 50%;
	color: var(--ndg-accent);
	font-family: var(--ndg-font-head);
	font-size: var(--ndg-text-base);
	font-weight: 700;
}

.ndg-steps__title {
	font-size: var(--ndg-text-base);
	margin: 0 0 var(--ndg-s1);
}

.ndg-steps__title a {
	color: var(--ndg-ink);
	text-decoration: none;
}

.ndg-steps__title a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-steps p {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-sm);
	margin: 0;
}

/* --------------------------------------------------------------------------
   11. Home — herói e seções
   -------------------------------------------------------------------------- */

.ndg-hero {
	background: linear-gradient(180deg, var(--ndg-paper-deep), var(--ndg-paper));
	border-bottom: 1px solid var(--ndg-line);
	padding-block: var(--ndg-s8);
}

.ndg-hero__inner {
	display: grid;
	gap: var(--ndg-s6);
	align-items: center;
}

@media (min-width: 62em) {
	.ndg-hero {
		padding-block: var(--ndg-s10);
	}

	.ndg-hero__inner {
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
		gap: var(--ndg-s9);
	}
}

.ndg-hero__title {
	font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
	margin-bottom: var(--ndg-s4);
}

.ndg-hero__text {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-lg);
	line-height: var(--ndg-leading-relaxed);
	max-width: 46ch;
	margin-bottom: var(--ndg-s5);
}

.ndg-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ndg-s3);
}

/* Decorative hoop illustration: inline SVG, shown on wide screens only */
.ndg-hero__figure {
	display: none;
	max-width: 23rem;
	margin-inline: auto;
	width: 100%;
}

@media (min-width: 62em) {
	.ndg-hero__figure {
		display: block;
	}
}

.ndg-hero__figure svg {
	display: block;
	width: 100%;
	height: auto;
	filter: drop-shadow(0 10px 22px rgba(42, 38, 34, 0.14));
}

/* Faixa de categorias */
.ndg-topics {
	display: grid;
	gap: var(--ndg-s4);
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	list-style: none;
	margin: 0;
	padding: 0;
}

.ndg-topic {
	display: flex;
	flex-direction: column;
	gap: var(--ndg-s2);
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5) var(--ndg-s4);
	text-decoration: none;
	height: 100%;
}

.ndg-topic:hover {
	border-color: var(--ndg-accent);
	box-shadow: var(--ndg-shadow);
}

.ndg-topic__name {
	font-family: var(--ndg-font-head);
	font-size: var(--ndg-text-lg);
	font-weight: 600;
	color: var(--ndg-ink);
}

.ndg-topic:hover .ndg-topic__name {
	color: var(--ndg-accent);
}

.ndg-topic__desc {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-sm);
	line-height: var(--ndg-leading-normal);
}

.ndg-topic__count {
	margin-top: auto;
	padding-top: var(--ndg-s2);
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-xs);
}

/* Bloco de chamada (CTA) */
.ndg-cta {
	display: grid;
	gap: var(--ndg-s5);
	align-items: center;
	background: var(--ndg-second);
	border-radius: var(--ndg-radius-lg);
	color: #f4f7f9;
	padding: var(--ndg-s7) var(--ndg-s6);
}

@media (min-width: 48em) {
	.ndg-cta {
		grid-template-columns: minmax(0, 1fr) auto;
		padding: var(--ndg-s8);
	}
}

.ndg-cta__title {
	color: #fff;
	margin-bottom: var(--ndg-s3);
}

.ndg-cta__text {
	color: #dce5ea;
	margin: 0;
	max-width: 52ch;
}

.ndg-cta .ndg-button {
	background: var(--ndg-surface);
	border-color: var(--ndg-surface);
	color: var(--ndg-second);
	white-space: nowrap;
}

.ndg-cta .ndg-button:hover {
	background: var(--ndg-accent-soft);
	border-color: var(--ndg-accent-soft);
	color: var(--ndg-accent-hover);
}

/* --------------------------------------------------------------------------
   12. Artigo
   -------------------------------------------------------------------------- */

.ndg-breadcrumbs {
	margin-bottom: var(--ndg-s5);
	font-size: var(--ndg-text-sm);
	color: var(--ndg-ink-muted);
}

.ndg-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ndg-s2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ndg-breadcrumbs li {
	display: inline-flex;
	align-items: center;
	gap: var(--ndg-s2);
}

.ndg-breadcrumbs li + li::before {
	content: "/";
	color: var(--ndg-line-strong);
}

.ndg-breadcrumbs a {
	color: var(--ndg-ink-soft);
	text-decoration: none;
}

.ndg-breadcrumbs a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-breadcrumbs [aria-current="page"] {
	color: var(--ndg-ink-muted);
}

.ndg-article__header {
	margin-bottom: var(--ndg-s6);
}

.ndg-article__title {
	margin-bottom: var(--ndg-s4);
}

.ndg-article__summary {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-lg);
	line-height: var(--ndg-leading-relaxed);
	max-width: var(--ndg-measure);
	margin-bottom: var(--ndg-s4);
}

.ndg-article__meta {
	padding-top: var(--ndg-s4);
	border-top: 1px solid var(--ndg-line);
}

.ndg-article__figure {
	margin-bottom: var(--ndg-s6);
}

.ndg-article__figure img {
	border-radius: var(--ndg-radius);
	width: 100%;
}

.ndg-article__figure figcaption,
.wp-block-image figcaption,
.wp-caption-text {
	margin-top: var(--ndg-s2);
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-sm);
	line-height: var(--ndg-leading-snug);
	text-align: left;
}

/* Corpo do texto */
.ndg-content {
	font-size: var(--ndg-text-md);
	line-height: var(--ndg-leading-relaxed);
}

.ndg-content > * {
	max-width: var(--ndg-measure);
}

.ndg-content > .alignwide,
.ndg-content > .alignfull,
.ndg-content > .ndg-tutorial-facts,
.ndg-content > .ndg-toc,
.ndg-content > figure,
.ndg-content > .wp-block-image,
.ndg-content > .wp-block-gallery,
.ndg-content > .wp-block-table,
.ndg-content > .ndg-ad-slot {
	max-width: none;
}

.ndg-content h2 {
	margin-top: var(--ndg-s8);
	padding-bottom: var(--ndg-s2);
	border-bottom: 1px solid var(--ndg-line);
}

.ndg-content h3 {
	margin-top: var(--ndg-s6);
}

.ndg-content h4 {
	margin-top: var(--ndg-s5);
}

.ndg-content > h2:first-child,
.ndg-content > h3:first-child {
	margin-top: 0;
}

.ndg-content ul,
.ndg-content ol {
	margin: 0 0 var(--ndg-s4);
	padding-left: 1.4em;
}

.ndg-content li + li {
	margin-top: var(--ndg-s2);
}

.ndg-content li > ul,
.ndg-content li > ol {
	margin-top: var(--ndg-s2);
	margin-bottom: 0;
}

.ndg-content ol {
	padding-left: 1.3em;
}

.ndg-content ol li::marker {
	color: var(--ndg-accent);
	font-weight: 700;
}

.ndg-content figure,
.ndg-content .wp-block-image {
	margin-block: var(--ndg-s6);
}

.ndg-content img {
	border-radius: var(--ndg-radius);
}

.ndg-content a {
	text-decoration: underline;
}

/* Tabelas */
.ndg-content table,
.wp-block-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--ndg-text-sm);
	margin-block: var(--ndg-s6);
}

.ndg-content th,
.ndg-content td,
.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--ndg-line);
	padding: var(--ndg-s3);
	text-align: left;
	vertical-align: top;
}

.ndg-content thead th,
.wp-block-table thead th {
	background: var(--ndg-paper-deep);
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-xs);
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.wp-block-table {
	overflow-x: auto;
}

/* Caixas de destaque — classes utilizáveis no editor de blocos */
.ndg-callout {
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-left: 4px solid var(--ndg-second);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5);
	margin-block: var(--ndg-s6);
}

.ndg-callout > :last-child {
	margin-bottom: 0;
}

.ndg-callout__title {
	display: flex;
	align-items: center;
	gap: var(--ndg-s2);
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ndg-second);
	margin-bottom: var(--ndg-s3);
}

.ndg-callout--tip {
	background: var(--ndg-accent-soft);
	border-color: #efd3da;
	border-left-color: var(--ndg-accent);
}

.ndg-callout--tip .ndg-callout__title {
	color: var(--ndg-accent);
}

.ndg-callout--warning {
	background: #fdf6e3;
	border-color: #f0e3bf;
	border-left-color: #a9801f;
}

.ndg-callout--warning .ndg-callout__title {
	color: #8a6715;
}

/* Fatos do tutorial (dificuldade, tempo, papel, materiais) */
.ndg-tutorial-facts {
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5);
	margin-bottom: var(--ndg-s6);
}

.ndg-tutorial-facts__title {
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ndg-ink-soft);
	margin: 0 0 var(--ndg-s4);
}

.ndg-facts {
	display: grid;
	gap: var(--ndg-s4);
	grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
	margin: 0;
}

.ndg-facts__item {
	display: flex;
	align-items: flex-start;
	gap: var(--ndg-s3);
}

.ndg-facts__icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	background: var(--ndg-accent-soft);
	border-radius: var(--ndg-radius-sm);
	color: var(--ndg-accent);
}

.ndg-facts__icon .ndg-icon {
	width: 1.125rem;
	height: 1.125rem;
}

.ndg-facts__label {
	display: block;
	font-size: var(--ndg-text-xs);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ndg-ink-muted);
}

.ndg-facts__value {
	display: block;
	font-size: var(--ndg-text-base);
	font-weight: 600;
	line-height: var(--ndg-leading-snug);
	margin-top: 0.1rem;
}

.ndg-materials {
	margin-top: var(--ndg-s5);
	padding-top: var(--ndg-s4);
	border-top: 1px solid var(--ndg-line);
}

.ndg-materials__list {
	list-style: none;
	display: grid;
	gap: var(--ndg-s2);
	grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	margin: 0;
	padding: 0;
	font-size: var(--ndg-text-base);
}

.ndg-materials__list li {
	display: flex;
	align-items: flex-start;
	gap: var(--ndg-s2);
	margin: 0;
}

.ndg-materials__list li::before {
	content: "";
	flex: 0 0 auto;
	width: 0.5rem;
	height: 0.5rem;
	margin-top: 0.55em;
	background: var(--ndg-accent);
	transform: rotate(45deg);
}

/* Sumário */
.ndg-toc {
	background: var(--ndg-paper-deep);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5);
	margin-bottom: var(--ndg-s6);
}

.ndg-toc__title {
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ndg-ink-soft);
	margin: 0 0 var(--ndg-s3);
}

.ndg-toc ol {
	counter-reset: ndg-toc;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--ndg-text-base);
}

.ndg-toc > ol > li {
	counter-increment: ndg-toc;
	margin: 0;
}

.ndg-toc > ol > li + li {
	margin-top: var(--ndg-s2);
}

.ndg-toc > ol > li > a::before {
	content: counter(ndg-toc) ". ";
	color: var(--ndg-ink-muted);
}

.ndg-toc a {
	color: var(--ndg-ink);
	text-decoration: none;
}

.ndg-toc a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-toc ol ol {
	margin: var(--ndg-s2) 0 0 var(--ndg-s4);
	font-size: var(--ndg-text-sm);
}

.ndg-toc ol ol li + li {
	margin-top: var(--ndg-s1);
}

.ndg-toc ol ol a {
	color: var(--ndg-ink-soft);
}

/* FAQ */
.ndg-faq {
	margin-top: var(--ndg-s8);
}

.ndg-faq__item {
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	margin-bottom: var(--ndg-s3);
	padding: var(--ndg-s4) var(--ndg-s5);
}

.ndg-faq__question {
	font-family: var(--ndg-font-head);
	font-size: var(--ndg-text-lg);
	font-weight: 600;
	margin: 0 0 var(--ndg-s2);
}

.ndg-faq__answer > :last-child {
	margin-bottom: 0;
}

/* Rodapé do artigo */
.ndg-article__footer {
	margin-top: var(--ndg-s8);
	padding-top: var(--ndg-s5);
	border-top: 1px solid var(--ndg-line);
}

.ndg-tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ndg-s2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.ndg-tags__label {
	font-size: var(--ndg-text-sm);
	font-weight: 600;
	color: var(--ndg-ink-soft);
}

.ndg-author-box {
	display: grid;
	gap: var(--ndg-s4);
	align-items: start;
	background: var(--ndg-paper-deep);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5);
	margin-top: var(--ndg-s6);
}

@media (min-width: 36em) {
	.ndg-author-box {
		grid-template-columns: auto minmax(0, 1fr);
	}
}

.ndg-author-box img {
	border-radius: 50%;
}

.ndg-author-box__name {
	font-size: var(--ndg-text-lg);
	margin: 0 0 var(--ndg-s2);
}

.ndg-author-box__bio {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-sm);
	margin: 0;
}

/* Navegação anterior/próximo */
.ndg-post-nav {
	margin-top: var(--ndg-s7);
}

.ndg-post-nav__links {
	display: grid;
	gap: var(--ndg-s4);
}

@media (min-width: 48em) {
	.ndg-post-nav__links {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Existindo só o "próximo", ele vai para a coluna da direita — é lá que
	   o alinhamento do texto e a seta mental do leitor esperam encontrá-lo. */
	.ndg-post-nav__link--next:only-child {
		grid-column: 2;
	}
}

.ndg-post-nav__link {
	display: block;
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s4);
	text-decoration: none;
	height: 100%;
}

.ndg-post-nav__link:hover {
	border-color: var(--ndg-accent);
}

.ndg-post-nav__direction {
	display: block;
	font-size: var(--ndg-text-xs);
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--ndg-ink-muted);
	margin-bottom: var(--ndg-s2);
}

.ndg-post-nav__title {
	display: block;
	font-family: var(--ndg-font-head);
	font-size: var(--ndg-text-base);
	font-weight: 600;
	color: var(--ndg-ink);
	line-height: var(--ndg-leading-snug);
}

.ndg-post-nav__link:hover .ndg-post-nav__title {
	color: var(--ndg-accent);
}

.ndg-post-nav__link--prev {
	text-align: left;
}

.ndg-post-nav__link--next {
	text-align: right;
}

/* --------------------------------------------------------------------------
   13. Barra lateral e widgets
   -------------------------------------------------------------------------- */

.ndg-sidebar {
	display: grid;
	gap: var(--ndg-s5);
}

@media (min-width: 62em) {
	.ndg-sidebar--sticky {
		position: sticky;
		top: 6rem;
	}
}

.ndg-widget {
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5);
	font-size: var(--ndg-text-base);
}

.ndg-widget__title,
.ndg-widget .widget-title {
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ndg-ink-soft);
	margin: 0 0 var(--ndg-s4);
}

.ndg-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.ndg-widget li + li {
	margin-top: var(--ndg-s3);
	padding-top: var(--ndg-s3);
	border-top: 1px solid var(--ndg-line);
}

.ndg-widget a {
	color: var(--ndg-ink);
	text-decoration: none;
}

.ndg-widget a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-widget .children,
.ndg-widget .sub-menu {
	margin-top: var(--ndg-s3);
	padding-left: var(--ndg-s4);
}

/* --------------------------------------------------------------------------
   14. Arquivos, paginação, busca, 404
   -------------------------------------------------------------------------- */

.ndg-archive-header {
	margin-bottom: var(--ndg-s7);
	padding-bottom: var(--ndg-s5);
	border-bottom: 1px solid var(--ndg-line);
}

.ndg-archive-header__title {
	margin-bottom: var(--ndg-s3);
}

.ndg-archive-header__description {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-lg);
	line-height: var(--ndg-leading-relaxed);
	max-width: var(--ndg-measure);
}

.ndg-archive-header__description > :last-child {
	margin-bottom: 0;
}

.ndg-archive-header__count {
	margin: var(--ndg-s3) 0 0;
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-sm);
}

.ndg-subcategories {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ndg-s2);
	list-style: none;
	margin: var(--ndg-s4) 0 0;
	padding: 0;
}

.ndg-pagination {
	margin-top: var(--ndg-s8);
	padding-top: var(--ndg-s5);
	border-top: 1px solid var(--ndg-line);
}

.ndg-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ndg-s2);
}

.ndg-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: var(--ndg-s3);
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line-strong);
	border-radius: var(--ndg-radius-sm);
	color: var(--ndg-ink);
	font-size: var(--ndg-text-sm);
	font-weight: 600;
	text-decoration: none;
}

.ndg-pagination a.page-numbers:hover {
	border-color: var(--ndg-accent);
	color: var(--ndg-accent);
}

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

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

/* Busca */
.ndg-search-intro {
	margin-bottom: var(--ndg-s6);
}

.ndg-search-intro .ndg-search-form {
	max-width: 32rem;
	margin-top: var(--ndg-s4);
}

.ndg-no-results {
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s6);
}

.ndg-no-results__suggestions {
	display: grid;
	gap: var(--ndg-s2);
	list-style: none;
	margin: var(--ndg-s4) 0 0;
	padding: 0;
}

.ndg-no-results__suggestions li {
	padding-left: 1.2em;
	position: relative;
}

.ndg-no-results__suggestions li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.6em;
	width: 0.45rem;
	height: 0.45rem;
	background: var(--ndg-accent);
	transform: rotate(45deg);
}

/* 404 */
.ndg-error-404 {
	text-align: center;
	max-width: 42rem;
	margin-inline: auto;
}

.ndg-error-404__code {
	font-family: var(--ndg-font-head);
	font-size: clamp(3.5rem, 2rem + 8vw, 6rem);
	line-height: 1;
	color: var(--ndg-line-strong);
	margin: 0 0 var(--ndg-s4);
}

.ndg-error-404 .ndg-search-form {
	max-width: 26rem;
	margin: var(--ndg-s5) auto 0;
	text-align: left;
}

.ndg-error-404 .ndg-subcategories {
	justify-content: center;
	margin-top: var(--ndg-s4);
}

.ndg-error-404 .ndg-section__head {
	justify-content: center;
}

.ndg-error-404 .ndg-grid {
	text-align: left;
}

.ndg-error-404__headline {
	margin-top: var(--ndg-s7);
	font-size: var(--ndg-text-xl);
}

/* --------------------------------------------------------------------------
   15. Páginas e formulário de contato
   -------------------------------------------------------------------------- */

.ndg-page__header {
	margin-bottom: var(--ndg-s6);
	padding-bottom: var(--ndg-s5);
	border-bottom: 1px solid var(--ndg-line);
}

.ndg-page__header .ndg-page__title {
	margin-bottom: 0;
}

.ndg-page__updated {
	margin: var(--ndg-s3) 0 0;
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-sm);
}

.ndg-form-notice {
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s4) var(--ndg-s5);
	margin-bottom: var(--ndg-s5);
	border: 1px solid;
}

.ndg-form-notice > :last-child {
	margin-bottom: 0;
}

.ndg-form-notice--success {
	background: #eef7ef;
	border-color: #c6e2c9;
	color: #1f5128;
}

.ndg-form-notice--error {
	background: #fdeeec;
	border-color: #f2c9c3;
	color: #7d2418;
}

.ndg-form-notice__list {
	margin: var(--ndg-s2) 0 0;
	padding-left: 1.2em;
}

.ndg-form {
	max-width: 36rem;
}

.ndg-form input[aria-invalid="true"],
.ndg-form textarea[aria-invalid="true"] {
	border-color: #b3372a;
}

.ndg-field__error {
	display: block;
	margin-top: var(--ndg-s2);
	color: #8c2b20;
	font-size: var(--ndg-text-sm);
	font-weight: 600;
}

.ndg-form__honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   16. Comentários
   -------------------------------------------------------------------------- */

.ndg-comments {
	margin-top: var(--ndg-s9);
	padding-top: var(--ndg-s6);
	border-top: 1px solid var(--ndg-line);
}

.ndg-comments__title {
	font-size: var(--ndg-text-2xl);
}

.ndg-comments .comment-list {
	list-style: none;
	margin: 0 0 var(--ndg-s7);
	padding: 0;
}

.ndg-comments .comment-list ol.children {
	list-style: none;
	margin: var(--ndg-s4) 0 0 var(--ndg-s5);
	padding: 0;
}

.ndg-comments .comment-body {
	background: var(--ndg-surface);
	border: 1px solid var(--ndg-line);
	border-radius: var(--ndg-radius);
	padding: var(--ndg-s5);
	margin-bottom: var(--ndg-s4);
}

.ndg-comments .comment-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--ndg-s2) var(--ndg-s3);
	font-size: var(--ndg-text-sm);
	color: var(--ndg-ink-muted);
	margin-bottom: var(--ndg-s3);
}

.ndg-comments .comment-author img {
	border-radius: 50%;
	margin-right: var(--ndg-s2);
	vertical-align: middle;
}

.ndg-comments .reply {
	font-size: var(--ndg-text-sm);
	font-weight: 600;
}

.comment-respond .comment-form-cookies-consent label,
.comment-respond .comment-notes {
	font-weight: 400;
	font-size: var(--ndg-text-sm);
	color: var(--ndg-ink-soft);
	display: inline;
}

.comment-form p {
	margin-bottom: var(--ndg-s4);
}

/* --------------------------------------------------------------------------
   17. Espaços de anúncio (vazios e desativados por padrão)
   -------------------------------------------------------------------------- */

.ndg-ad-slot {
	margin-block: var(--ndg-s6);
	text-align: center;
}

.ndg-ad-slot__label {
	display: block;
	margin-bottom: var(--ndg-s2);
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-xs);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ndg-ad-slot--sidebar {
	margin-block: 0;
}

/* --------------------------------------------------------------------------
   18. Rodapé
   -------------------------------------------------------------------------- */

.ndg-site-footer {
	background: var(--ndg-surface);
	border-top: 1px solid var(--ndg-line);
	margin-top: auto;
	padding-block: var(--ndg-s8) var(--ndg-s6);
}

.ndg-footer__grid {
	display: grid;
	gap: var(--ndg-s6);
	margin-bottom: var(--ndg-s6);
}

@media (min-width: 48em) {
	.ndg-footer__grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
		gap: var(--ndg-s8);
	}
}

.ndg-footer__about p {
	color: var(--ndg-ink-soft);
	font-size: var(--ndg-text-sm);
	max-width: 42ch;
	margin-bottom: 0;
}

.ndg-footer__nav {
	min-width: 0;
}

.ndg-footer__heading {
	font-family: var(--ndg-font-body);
	font-size: var(--ndg-text-sm);
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--ndg-ink-soft);
	margin: 0 0 var(--ndg-s3);
}

.ndg-footer__menu {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: var(--ndg-text-sm);
}

.ndg-footer__menu li + li {
	margin-top: var(--ndg-s2);
}

.ndg-footer__menu a {
	color: var(--ndg-ink-soft);
	text-decoration: none;
}

.ndg-footer__menu a:hover {
	color: var(--ndg-accent);
	text-decoration: underline;
}

.ndg-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ndg-s3);
	padding-top: var(--ndg-s5);
	border-top: 1px solid var(--ndg-line);
	color: var(--ndg-ink-muted);
	font-size: var(--ndg-text-sm);
}

.ndg-footer__bottom p {
	margin: 0;
}

/* --------------------------------------------------------------------------
   19. Utilitários e alinhamentos do editor
   -------------------------------------------------------------------------- */

.ndg-visually-balanced {
	max-width: var(--ndg-measure);
}

.ndg-text-center {
	text-align: center;
}

.ndg-mt-0 {
	margin-top: 0;
}

.ndg-mb-0 {
	margin-bottom: 0;
}

.alignleft {
	float: left;
	margin: 0 var(--ndg-s5) var(--ndg-s4) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--ndg-s4) var(--ndg-s5);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	margin-inline: auto;
}

.ndg-content > .alignfull {
	margin-inline: calc(-1 * var(--ndg-gutter));
	width: calc(100% + (2 * var(--ndg-gutter)));
	max-width: none;
}

.wp-block-embed__wrapper {
	position: relative;
}

.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper {
	aspect-ratio: 16 / 9;
}

.wp-block-embed.wp-embed-aspect-16-9 iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	border-radius: var(--ndg-radius);
}

.sticky .ndg-card__title::after {
	content: " ★";
	color: var(--ndg-accent);
}

/* --------------------------------------------------------------------------
   20. Impressão — artigos legíveis no papel
   -------------------------------------------------------------------------- */

@media print {
	.ndg-site-header,
	.ndg-site-footer,
	.ndg-ad-slot,
	.ndg-post-nav,
	.ndg-comments,
	.ndg-sidebar,
	.ndg-related,
	.ndg-skip-link,
	.ndg-breadcrumbs {
		display: none !important;
	}

	body {
		background: #fff;
		font-size: 11pt;
	}

	.ndg-content > * {
		max-width: none;
	}

	a {
		color: inherit;
		text-decoration: underline;
	}

	.ndg-content h2,
	.ndg-content h3 {
		break-after: avoid;
	}

	figure,
	.ndg-tutorial-facts,
	.ndg-facts__item {
		break-inside: avoid;
	}
}

/* --------------------------------------------------------------------------
   21. Needlework accents: running-stitch rules under titles and around panels
   -------------------------------------------------------------------------- */

.ndg-section__title::after {
	content: "";
	display: block;
	width: 3.5rem;
	margin-top: var(--ndg-s2);
	border-bottom: 2px dashed var(--ndg-accent);
}

.ndg-hero {
	background:
		radial-gradient(circle at 88% 12%, var(--ndg-accent-soft) 0, transparent 38%),
		radial-gradient(circle at 6% 92%, var(--ndg-second-soft) 0, transparent 34%),
		linear-gradient(180deg, var(--ndg-paper-deep), var(--ndg-paper));
}

.ndg-tutorial-facts,
.ndg-cta {
	outline: 1px dashed var(--ndg-line-strong);
	outline-offset: -7px;
}

.ndg-cta {
	outline-color: rgba(255, 255, 255, 0.35);
}

.ndg-site-footer {
	border-top: 2px dashed var(--ndg-line-strong);
}
