/* =========================================================
   TagInd — Instrumentação & Manutenção
   Paleta: petróleo, grafite, aço, sinal e laranja de segurança.
   Tipografia: Barlow Condensed (títulos) + Barlow (texto).
   ========================================================= */

:root {
	--petrol: #0e3b43;
	--petrol-2: #15505a;
	--ink: #1d2629;
	--muted: #55636a;
	--steel: #e7eced;
	--steel-2: #d5dde0;
	--line: #c9d3d6;
	--surface: #ffffff;
	--signal: #2f7fa8;
	--safety: #f26b1d;
	--safety-ink: #a8430a;
	--font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
	--font-text: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--wrap: 1200px;
	--text: 70ch;
	--gutter: clamp(16px, 4vw, 32px);
	--radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
	margin: 0;
	font-family: var(--font-text);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--ink);
	background: var(--steel);
	text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--signal); text-underline-offset: .18em; }
a:hover { color: var(--petrol); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.08; color: var(--petrol); margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.35rem); }
h3 { font-size: 1.4rem; font-weight: 600; }
p { margin: 0 0 1em; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--petrol); color: #fff; padding: .75rem 1rem; }
.skip-link:focus { left: 1rem; top: 1rem; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--text { max-width: calc(var(--text) + 2 * var(--gutter)); }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-tight { padding-block: clamp(1.5rem, 4vw, 2.5rem); }

/* ---------- Botões ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	font-family: var(--font-text); font-weight: 600; font-size: 1rem; line-height: 1.2;
	padding: .8rem 1.25rem; border-radius: 4px; border: 2px solid transparent;
	text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn--primary { background: var(--safety); color: #1b0d03; border-color: var(--safety); }
.btn--primary:hover { background: #d95a10; border-color: #d95a10; color: #fff; }
.btn--ghost { border-color: currentColor; color: var(--petrol); background: transparent; }
.btn--ghost:hover { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.btn--block { width: 100%; margin-top: .6rem; }
.link-more { font-weight: 600; text-decoration: none; border-bottom: 2px solid currentColor; padding-bottom: 1px; }

.badge { display: inline-block; font-size: .8rem; font-weight: 600; padding: .2rem .55rem; border-radius: 3px; background: var(--steel-2); color: var(--petrol); margin-bottom: .5rem; }
.badge--open { background: var(--safety); color: #1b0d03; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--petrol); }
.logo__mark { width: 46px; height: 46px; flex: none; }
.logo__text { display: flex; flex-direction: column; line-height: 1; }
.logo__name { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; letter-spacing: .01em; }
.logo__tagline { white-space: nowrap; font-size: .78rem; color: var(--muted); margin-top: .2rem; }
.logo--light { color: #fff; }
.logo--light .logo__tagline { color: #a9c4c9; }

/* ---------- Cabeçalho ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; position: relative; } }
.site-header__bar { display: flex; align-items: center; gap: 1.5rem; min-height: 72px; }
.site-nav { display: flex; align-items: center; gap: 1.25rem; margin-left: auto; }
.site-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.site-nav .menu a { display: block; white-space: nowrap; padding: .55rem .7rem; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 4px; }
.site-nav .menu a:hover { background: var(--steel); color: var(--petrol); }
.site-nav .current-menu-item > a, .site-nav .current-menu-ancestor > a, .site-nav .current_page_item > a { color: var(--petrol); box-shadow: inset 0 -3px 0 var(--safety); border-radius: 0; }
.site-nav .sub-menu { display: none; }
.header-search { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--steel); }
.header-search input { border: 0; background: transparent; padding: .5rem .7rem; font: inherit; font-size: .95rem; width: 15rem; color: var(--ink); }
.header-search input:focus { outline: none; }
.header-search:focus-within { outline: 3px solid var(--signal); outline-offset: 1px; }
.header-search button { border: 0; background: var(--petrol); color: #fff; font: inherit; font-weight: 600; font-size: .9rem; padding: 0 .9rem; cursor: pointer; }
.nav-toggle { display: none; margin-left: auto; align-items: center; gap: .5rem; background: none; border: 2px solid var(--petrol); color: var(--petrol); border-radius: 4px; padding: .45rem .75rem; font: inherit; font-weight: 600; cursor: pointer; }
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
.nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -6px; } .nav-toggle__icon::after { top: 6px; }

@media (max-width: 1180px) {
	.header-search input { width: 9rem; }
	.site-nav .menu a { padding-inline: .5rem; }
	.site-header__bar { gap: 1rem; }
}
@media (max-width: 960px) {
	.nav-toggle { display: inline-flex; }
	.site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); padding: .75rem var(--gutter) 1.25rem; flex-direction: column; align-items: stretch; box-shadow: 0 12px 24px -12px rgba(14, 59, 67, .35); }
	.site-nav.is-open { display: flex; }
	.site-nav .menu { flex-direction: column; }
	.site-nav .menu a { padding: .8rem .25rem; border-bottom: 1px solid var(--steel); border-radius: 0; }
	.header-search input { width: 100%; flex: 1; }
	.site-header__bar { position: relative; }
}

/* ---------- Herói (malha de P&ID) ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hero__title { font-size: clamp(2.6rem, 5.6vw, 4.4rem); line-height: 1; margin-bottom: .4em; max-width: 14ch; }
.hero__lead { font-size: 1.2rem; color: var(--muted); max-width: 44ch; margin-bottom: 1.75rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__pid { margin: 0; position: relative; }
.hero__pid::before { /* papel quadriculado de desenho técnico */
	content: ""; position: absolute; inset: -8% -20% -8% -6%; z-index: 0;
	background-image: linear-gradient(var(--steel) 1px, transparent 1px), linear-gradient(90deg, var(--steel) 1px, transparent 1px);
	background-size: 24px 24px;
}
.hero__pid figcaption { position: relative; font-size: .9rem; color: var(--muted); margin-top: .5rem; }
.pid { position: relative; z-index: 1; width: 100%; color: var(--signal); overflow: visible; }
.pid__vessel { fill: #fff; stroke: var(--petrol); stroke-width: 2.5; }
.pid__liquid { color: var(--signal); }
.pid__level { stroke: var(--signal); stroke-width: 1.5; }
.pid__equip { font-family: var(--font-display); font-weight: 600; font-size: 15px; fill: var(--petrol); }
.pid__pipe { fill: none; stroke: var(--petrol); stroke-width: 3; }
.pid__valve { fill: #fff; stroke: var(--petrol); stroke-width: 2.5; stroke-linejoin: round; }
.pid__actuator { fill: #fff; stroke: var(--petrol); stroke-width: 2.5; }
.pid__tap { fill: none; stroke: var(--petrol); stroke-width: 1.75; }
.pid__signal { fill: none; stroke: var(--petrol); stroke-width: 1.75; stroke-dasharray: 9 6; }
.pid__note { font-family: var(--font-text); font-weight: 600; font-size: 13px; fill: var(--signal); }
.pid__bubble { fill: #fff; stroke: var(--petrol); stroke-width: 2.5; transition: fill .15s, stroke .15s; }
.pid__bubble-line { stroke: var(--petrol); stroke-width: 2.5; }
.pid__tag { font-family: var(--font-display); font-weight: 700; font-size: 16px; fill: var(--petrol); text-anchor: middle; }
.pid__num { font-family: var(--font-display); font-weight: 600; font-size: 13px; fill: var(--muted); text-anchor: middle; }
.pid__label { font-family: var(--font-text); font-weight: 600; font-size: 14px; fill: var(--ink); }
.pid__inst { cursor: pointer; }
.pid__inst:hover .pid__bubble, .pid__inst:focus .pid__bubble { fill: var(--safety); stroke: var(--safety-ink); }
.pid__inst:hover .pid__tag, .pid__inst:focus .pid__tag, .pid__inst:hover .pid__num, .pid__inst:focus .pid__num { fill: #1b0d03; }
.pid__inst:hover .pid__label, .pid__inst:focus .pid__label { fill: var(--safety-ink); text-decoration: underline; }
.pid__inst:focus { outline: none; }
.pid__inst:focus-visible .pid__bubble { stroke-width: 4; }
.pid__inst--note:hover .pid__note { text-decoration: underline; }
/* Um único momento de movimento: o sinal percorre a malha quando a página carrega. */
.js .pid__signal { animation: pid-signal 1.6s ease-out .3s both; }
@keyframes pid-signal { from { stroke-dashoffset: 300; opacity: .2; } to { stroke-dashoffset: 0; opacity: 1; } }

@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__title { max-width: 18ch; }
	.hero__pid::before { inset: 0 calc(-1 * var(--gutter)); }
}

/* ---------- Faixa da ferramenta ---------- */
.section--tool { background: var(--steel); }
.tool-strip { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.tool-strip__intro p { color: var(--muted); }
.tool-strip .tg-tool { margin: 0; }
@media (max-width: 860px) { .tool-strip { grid-template-columns: 1fr; } }

/* ---------- Cabeçalhos de seção ---------- */
.section__head { max-width: 62ch; margin-bottom: 2rem; }
.section__head p { color: var(--muted); }
.section__head--row { max-width: none; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }

/* ---------- Índice de módulos ---------- */
.section--library { background: var(--surface); border-block: 1px solid var(--line); }
.module-index { list-style: none; margin: 0 0 2.5rem; padding: 0; columns: 2 320px; column-gap: 3rem; }
.module-index li { break-inside: avoid; border-top: 1px solid var(--line); }
.module-index a { display: grid; grid-template-columns: 3.6rem 1fr auto; align-items: baseline; gap: .5rem; padding: .85rem 0; text-decoration: none; color: var(--ink); }
.module-index__num { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .03em; color: var(--signal); transition: color .15s; }
.module-index__name { font-weight: 600; font-size: 1.1rem; }
.module-index__count { font-size: .9rem; color: var(--muted); white-space: nowrap; }
.module-index a:hover .module-index__num { color: var(--safety); }
.module-index a:hover .module-index__name { color: var(--petrol); text-decoration: underline; }

/* ---------- Mapas ---------- */
.map-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 280px); gap: 1rem; overflow-x: auto; padding-bottom: 1rem; scroll-snap-type: x mandatory; scrollbar-color: var(--petrol) var(--steel); }
.map-strip > * { scroll-snap-align: start; }
.map-strip__more { display: grid; place-items: center; text-align: center; border: 2px dashed var(--line); border-radius: var(--radius); font-weight: 600; text-decoration: none; padding: 1rem; min-height: 150px; }
.map-strip__more:hover { border-color: var(--safety); color: var(--safety-ink); }
.map-card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.map-card__img { display: block; aspect-ratio: 1200 / 760; background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.map-card__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease-out; }
.map-card:hover .map-card__img img { transform: scale(1.04); }
.map-card:hover .map-card__img { border-color: var(--petrol); }
.map-card__meta { display: flex; flex-direction: column; padding-top: .55rem; }
.map-card__num { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--signal); }
.map-card__title { font-weight: 600; line-height: 1.3; }
.map-card:hover .map-card__title { color: var(--petrol); text-decoration: underline; }
.map-card--cover .map-card__img { border: 2px solid var(--petrol); }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1.75rem 1.25rem; }

/* ---------- Ferramentas (home) ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 3rem); }
.split__head p { color: var(--muted); }
.split .tg-tool-list { margin: 0; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); column-gap: 2rem; border-top: 0; }
.split .tg-tool-list li:first-child, .split .tg-tool-list li:nth-child(2) { border-top: 1px solid var(--line); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split .tg-tool-list li:nth-child(2) { border-top: 0; } }

/* ---------- Artigos ---------- */
.section--articles { background: var(--surface); border-block: 1px solid var(--line); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.article-grid .post-card--lead { grid-column: span 3; display: grid; grid-template-columns: 1fr; border-bottom: 1px solid var(--line); padding-bottom: 2rem; }
.article-grid .post-card--lead .post-card__title { font-size: clamp(1.8rem, 3.2vw, 2.4rem); max-width: 26ch; }
.article-grid .post-card--lead .post-card__excerpt { font-size: 1.15rem; max-width: 60ch; }
.article-grid--3 .post-card--lead { grid-column: auto; }
.post-card__img { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 4px; margin-bottom: .9rem; background: var(--steel); }
.post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.post-card__cat { display: inline-block; font-size: .9rem; font-weight: 600; color: var(--signal); text-decoration: none; margin-bottom: .35rem; }
.post-card__title { font-size: 1.45rem; margin-bottom: .4rem; }
.post-card__title a { color: var(--petrol); text-decoration: none; }
.post-card__title a:hover { text-decoration: underline; }
.post-card__excerpt { color: var(--muted); margin-bottom: .5rem; }
.post-card__meta { font-size: .875rem; color: var(--muted); margin: 0; }
@media (max-width: 900px) { .article-grid { grid-template-columns: 1fr 1fr; } .article-grid .post-card--lead { grid-column: span 2; } }
@media (max-width: 600px) { .article-grid { grid-template-columns: 1fr; } .article-grid .post-card--lead { grid-column: auto; } }

/* ---------- Cursos ---------- */
.course-list { border-top: 3px solid var(--petrol); }
.course-row { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem 2.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.course-row__title { font-size: 1.65rem; margin-bottom: .35rem; }
.course-row__title a { color: var(--petrol); text-decoration: none; }
.course-row__title a:hover { text-decoration: underline; }
.course-row__main p { color: var(--muted); margin: 0; }
.course-row__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .75rem 1rem; margin: 0; align-content: center; }
.course-row__facts dt, .buy-box__facts dt { font-size: .8rem; color: var(--muted); }
.course-row__facts dd, .buy-box__facts dd { margin: 0; font-weight: 600; }
.course-row__price dd { font-family: var(--font-display); font-size: 1.4rem; color: var(--petrol); }
@media (max-width: 760px) { .course-row { grid-template-columns: 1fr; } }

/* ---------- Faixa para empresas ---------- */
.b2b { background: var(--petrol); color: #dce8ea; padding-block: clamp(2.5rem, 6vw, 4rem); }
.b2b h2 { color: #fff; max-width: 20ch; }
.b2b__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.b2b__links { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .2); }
.b2b__links li { border-bottom: 1px solid rgba(255, 255, 255, .2); }
.b2b__links a { display: flex; flex-direction: column; padding: 1rem 0; text-decoration: none; color: #fff; }
.b2b__links strong { font-family: var(--font-display); font-size: 1.4rem; font-weight: 600; }
.b2b__links span { color: #a9c4c9; }
.b2b__links a:hover strong { color: var(--safety); }
@media (max-width: 760px) { .b2b__grid { grid-template-columns: 1fr; } }

/* ---------- Newsletter ---------- */
.tg-news { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.5rem 2.5rem; background: var(--surface); border: 1px solid var(--line); border-left: 6px solid var(--safety); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.25rem); }
.tg-news h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
.tg-news__text p { color: var(--muted); }
.tg-news__form { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; align-items: end; }
.tg-news__field { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
.tg-news__field:nth-of-type(3) { grid-column: span 2; }
.tg-news input[type=text], .tg-news input[type=email], .tg-news select { font: inherit; font-size: 1rem; padding: .65rem .7rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); width: 100%; }
.tg-news__consent { grid-column: span 2; display: flex; gap: .5rem; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.tg-news__consent input { margin-top: .3rem; }
.tg-news .btn { grid-column: span 2; justify-self: start; }
.tg-news__error { grid-column: span 2; color: #b3261e; margin: 0; }
.tg-hp { position: absolute; left: -9999px; }
.wrap--text .tg-news, .article__foot .tg-news { grid-template-columns: 1fr; margin-top: 2.5rem; }
@media (max-width: 760px) { .tg-news { grid-template-columns: 1fr; } .tg-news__form { grid-template-columns: 1fr; } .tg-news__field:nth-of-type(3), .tg-news__consent, .tg-news .btn, .tg-news__error { grid-column: auto; } }

/* ---------- Cabeçalho de páginas internas ---------- */
.page-head { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: clamp(1.25rem, 3vw, 2rem) clamp(1.75rem, 4vw, 2.75rem); }
.page-head__title { margin-bottom: .3em; }
.page-head__lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.page-head__lead p:last-child { margin: 0; }
.page-head__kicker { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; color: var(--signal); margin: 0 0 .25rem; }
.page-head__split { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; }
.page-head__module { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; }
.page-head__bignum { font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 16vw, 12rem); line-height: .78; color: transparent; -webkit-text-stroke: 2px var(--steel-2); user-select: none; }
.page-head__tool { display: flex; align-items: center; gap: 1rem; }
.page-head__tool .page-head__title { margin: 0; }
.tg-bubble--lg { width: 4.5rem; height: 4.5rem; font-size: 1rem; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; padding: 0; margin: 0 0 1rem; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .5rem; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--ink); max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.chips a { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .95rem; background: #fff; }
.chips a:hover { border-color: var(--petrol); }
.chips a[aria-current] { background: var(--petrol); color: #fff; border-color: var(--petrol); }

/* ---------- Biblioteca ---------- */
.library { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; padding-block: 2rem 3.5rem; }
.library > :not(.module-nav) { grid-column: 2; }
.module-nav { grid-row: 1 / span 6; }
.module-nav ul { list-style: none; margin: 0; padding: 0; position: sticky; top: 96px; }
.module-nav a { display: block; padding: .5rem .6rem; text-decoration: none; color: var(--ink); border-left: 3px solid transparent; font-size: .97rem; line-height: 1.3; }
.module-nav a:hover { background: #fff; border-left-color: var(--line); }
.module-nav a[aria-current] { border-left-color: var(--safety); background: #fff; font-weight: 600; color: var(--petrol); }
.module-nav__num { font-family: var(--font-display); font-weight: 700; color: var(--signal); margin-right: .2rem; }
@media (max-width: 900px) {
	.library { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
	.library > :not(.module-nav) { grid-column: auto; }
	.module-nav { grid-row: auto; }
	.module-nav ul { position: static; display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; }
	.module-nav a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: .35rem .8rem; }
	.module-nav a[aria-current] { background: var(--petrol); color: #fff; border-color: var(--petrol); }
	.module-nav a[aria-current] .module-nav__num { color: #fff; }
}
.empty { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3rem; }
.pager a { display: flex; flex-direction: column; padding: 1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--petrol); }
.pager a span { font-size: .875rem; color: var(--muted); }
.pager a:hover { border-color: var(--petrol); }
.pager__next { grid-column: 2; text-align: right; }
.pager--stack { grid-template-columns: 1fr; margin-top: 2rem; }
.pager--stack .pager__next { grid-column: auto; text-align: left; }
.related { margin-top: 3rem; }

/* ---------- Tema da Biblioteca (página em HTML com desenho vetorial) ---------- */
.tema-head { background: var(--petrol); color: #fff; padding-block: 1.25rem 2.4rem; position: relative; }
.tema-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: repeating-linear-gradient(135deg, var(--safety) 0 22px, var(--petrol) 22px 40px); }
.tema-head .crumbs ol, .tema-head .crumbs a { color: #9fc3cb; }
.tema-head .crumbs li + li::before { color: #4f7a83; }
.tema-head .crumbs [aria-current] { color: #e7eced; }
.tema-head__row { display: flex; gap: clamp(1rem, 3vw, 2rem); align-items: center; }
.tema-head__bubble { flex: 0 0 auto; width: clamp(72px, 9vw, 112px); aspect-ratio: 1; border-radius: 50%; border: 4px solid #fff; background: var(--petrol-2); display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.1rem, 2vw, 1.6rem); letter-spacing: .03em; }
.tema-head__text { flex: 1; min-width: 0; }
.tema-head__kicker { margin: 0 0 .25rem; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: .1em; text-transform: uppercase; color: var(--safety); }
.tema-head__kicker a { color: inherit; text-decoration: none; }
.tema-head__kicker a:hover { text-decoration: underline; }
.tema-head__title { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.02; margin: 0 0 .5rem; }
.tema-head__lead { margin: 0; font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: #d6e4e7; max-width: 62ch; }
.tema-head__actions { flex: 0 0 auto; display: grid; gap: .3rem; justify-items: end; }
.tema-head .btn--ghost { color: #fff; border-color: #9fc3cb; }
.tema-head .btn--ghost:hover { background: var(--safety); border-color: var(--safety); color: #1b0d03; }
.tema-pdf__hint { font-size: .85rem; color: #9fc3cb; }
.tema-body { padding-block: 2rem 1rem; }
.tema-dg { margin: 0; position: relative; background-color: #fff; border: 2px solid var(--line); border-radius: 10px; padding: 1.6rem 1rem .6rem;
	background-image: linear-gradient(#f1f5f6 1px, transparent 1px), linear-gradient(90deg, #f1f5f6 1px, transparent 1px); background-size: 20px 20px; }
.tema-dg__label { position: absolute; left: 1rem; top: -.75rem; background: #fff; padding: 0 .5rem; font-family: var(--font-display); font-weight: 700; font-size: .95rem; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); }
.tema-dg__scroll { overflow-x: auto; }
.tema-dg__scroll svg, .tema-dg__scroll img { display: block; width: 100%; max-width: 1100px; height: auto; margin: 0 auto; }
.tema-content.entry-content { max-width: none; margin: 0; }
.tema-content.entry-content > * { max-width: none; }
.tg-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.75rem; }
.tg-card { background: #fff; border: 2px solid var(--line); border-top: 8px solid var(--petrol); border-radius: 10px; padding: 1.1rem 1.25rem; font-size: 1.08rem; line-height: 1.5; }
.tg-card--2 { border-top-color: var(--signal); }
.tg-card--3 { border-top-color: var(--muted); }
.tg-cards .tg-card h2 { display: flex; gap: .55rem; align-items: center; margin: 0 0 .6rem; font-size: 1.25rem; letter-spacing: .08em; text-transform: uppercase; color: var(--petrol); }
.tg-cards .tg-card h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.tg-cards .tg-card--2 h2 { color: var(--signal); }
.tg-cards .tg-card--3 h2 { color: var(--muted); }
.tg-cards .tg-card p { margin: 0 0 .6rem; }
.tg-cards .tg-card ul, .tg-cards .tg-card ol { margin: 0 0 .6rem; padding-left: 1.25rem; }
.tg-cards .tg-card .f { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--petrol); background: var(--steel); border-radius: 6px; padding: .45rem .7rem; margin: .3rem 0 .7rem; text-align: center; overflow-x: auto; }
.tema-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; margin-top: 1.25rem; }
.tema-strip__item { display: flex; gap: 1rem; align-items: flex-start; border-radius: 10px; padding: 1rem 1.25rem; font-size: 1.08rem; line-height: 1.5; }
.tema-strip__item h2 { margin: 0 0 .25rem; font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.tema-strip__item p { margin: 0; }
.tema-strip__ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; }
.tema-strip__item--warn { background: #fff3ea; border: 2px solid #f6b48a; }
.tema-strip__item--warn .tema-strip__ic { background: var(--safety); }
.tema-strip__item--warn h2 { color: var(--safety-ink); }
.tema-strip__item--key { background: #e9f1f3; border: 2px solid #a9c4cb; }
.tema-strip__item--key .tema-strip__ic { background: var(--petrol); }
.tema-strip__item--key h2 { color: var(--petrol); }
.tema-lower { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; margin-top: 1rem; }
.tema-lower__side .map-single__tools h2 { margin-top: 2rem; }
.map-single__tools h2 { font-size: 1.4rem; }
.map-single__calc { margin-top: 2rem; background: var(--steel); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.5rem); border-top: 5px solid var(--safety); }
.map-single__calc h2 { font-size: 1.5rem; margin: 0 0 .25rem; }
.map-single__calc > p { color: var(--muted); margin-top: 0; }
.tema-lower__side .pager { margin-top: 2rem; }
@media (max-width: 960px) {
	.tg-cards { grid-template-columns: 1fr; }
	.tema-strip, .tema-lower { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.tema-head__row { flex-wrap: wrap; }
	.tema-head__text { flex-basis: 100%; }
	.tema-dg::after { content: "Deslize para o lado para ver o desenho inteiro"; display: block; text-align: center; font-size: .8rem; color: var(--muted); padding-top: .4rem; }
	.tema-head__bubble { display: none; }
	.tema-head__actions { justify-items: start; }
	.tema-dg { padding-inline: .5rem; }
	.tema-dg__scroll svg, .tema-dg__scroll img { width: 680px; max-width: none; }
}

/* ---------- Ferramenta ---------- */
.tool-page { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); padding-block: 2rem 3.5rem; }
.tool-page__aside h2 { font-size: 1.3rem; }
.tool-page__aside section + section, .tool-page__aside .tg-ad { margin-top: 2rem; }
.mini-maps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.mini-maps a { display: grid; grid-template-columns: 64px 1fr; gap: .75rem; align-items: center; text-decoration: none; color: var(--ink); }
.mini-maps img { width: 64px; height: 64px; object-fit: cover; object-position: top; border: 1px solid var(--line); border-radius: 3px; }
.mini-maps small { display: block; color: var(--signal); font-weight: 600; }
.mini-maps a:hover span { text-decoration: underline; color: var(--petrol); }
.plain-links { list-style: none; margin: 0; padding: 0; }
.plain-links li { border-bottom: 1px solid var(--line); }
.plain-links a { display: block; padding: .55rem 0; text-decoration: none; }
.plain-links a:hover { text-decoration: underline; }
@media (max-width: 900px) { .tool-page { grid-template-columns: 1fr; } }

/* ---------- Artigo ---------- */
.article { background: var(--surface); padding-bottom: 3rem; }
.article__head { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.article__title { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
.article__lead { font-size: 1.25rem; color: var(--muted); }
.article__meta { font-size: .9rem; color: var(--muted); }
.article__cover { margin-block: 0 2rem; }
.article__cover img { border-radius: 4px; width: 100%; }
.article__foot { margin-top: 2rem; }
.see-also { background: var(--steel); padding: .9rem 1rem; border-radius: 4px; }
.tags { font-size: .95rem; color: var(--muted); }
.related.wrap { padding-block: 3rem; }

.entry-content > * { max-width: var(--text); }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--signal); font-weight: 600; }
.entry-content blockquote { margin: 1.5em 0; padding: .5em 1.25em; border-left: 4px solid var(--signal); color: var(--petrol); font-size: 1.15rem; }
.entry-content img { border-radius: 4px; }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border-bottom: 1px solid var(--line); padding: .5rem; text-align: left; }
.entry-content .alignwide { max-width: none; }
.tg-disclosure { font-size: .9rem; color: var(--muted); background: var(--steel); padding: .6rem .8rem; border-radius: 4px; }
.tg-ad { margin: 2rem 0; padding-top: .4rem; border-top: 1px solid var(--line); text-align: center; }
.tg-ad__label { display: block; font-size: .75rem; color: var(--muted); margin-bottom: .4rem; }

/* ---------- Curso / vaga ---------- */
.course-head, .job-single, .course-body { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.job-single, .course-body { padding-block: 2rem 3rem; }
.course-body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.buy-box { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--safety); border-radius: var(--radius); padding: 1.25rem; }
.page-head .buy-box { background: var(--steel); }
.buy-box__price { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; color: var(--petrol); margin: 0 0 .5rem; line-height: 1; }
.buy-box__from { margin: 0; color: var(--muted); font-size: .9rem; }
.buy-box__facts { display: grid; gap: .6rem; margin: 0 0 .5rem; }
.buy-box__note { font-size: .85rem; color: var(--muted); margin: .75rem 0 0; }
.buy-box__logo img { max-height: 80px; width: auto; margin-bottom: 1rem; }
.syllabus { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.syllabus ol { margin: 0; padding-left: 1.4em; }
.syllabus li { padding: .4rem 0; border-bottom: 1px solid var(--steel); }
.syllabus li::marker { font-family: var(--font-display); font-weight: 700; color: var(--signal); }
.callout { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; margin-block: 2.5rem; }
@media (max-width: 860px) { .course-head, .job-single, .course-body { grid-template-columns: 1fr; } }

.job-list { border-top: 3px solid var(--petrol); }
.job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem 2rem; align-items: center; padding: 1.1rem .25rem; border-bottom: 1px solid var(--line); background: transparent; }
.job-row--featured { background: #fff; border-left: 4px solid var(--safety); padding-left: 1rem; }
.job-row__title { font-size: 1.4rem; margin: 0; }
.job-row__title a { color: var(--petrol); text-decoration: none; }
.job-row__title a:hover { text-decoration: underline; }
.job-row__company { margin: 0; color: var(--muted); }
.job-row__facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; color: var(--muted); justify-content: flex-end; }
@media (max-width: 700px) { .job-row { grid-template-columns: 1fr; } .job-row__facts { justify-content: flex-start; } }

/* ---------- Busca, 404, paginação ---------- */
.search-form { display: flex; gap: .5rem; max-width: 560px; margin-top: 1rem; }
.search-form input { flex: 1; font: inherit; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; min-width: 0; }
.results { list-style: none; padding: 0; margin: 0; }
.result { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.result__type { font-size: .85rem; font-weight: 600; color: var(--signal); }
.result__title { font-size: 1.45rem; margin: .1rem 0 .3rem; }
.result__title a { text-decoration: none; color: var(--petrol); }
.result p { margin: 0; color: var(--muted); }
.results-count { color: var(--muted); }
.notfound__signal { font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 14vw, 8rem); line-height: 1; color: var(--safety); margin: 0; }

.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.pagination .page-numbers { display: inline-block; min-width: 2.6rem; text-align: center; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 4px; background: #fff; text-decoration: none; color: var(--ink); }
.pagination .page-numbers.current { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.pagination a.page-numbers:hover { border-color: var(--petrol); }

/* ---------- Comentários ---------- */
.comments { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.comment-list { list-style: none; padding: 0; }
.comment-body { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; font: inherit; padding: .6rem; border: 1px solid var(--line); border-radius: 4px; }
.comment-form .submit { font: inherit; font-weight: 600; background: var(--safety); border: 0; padding: .75rem 1.2rem; border-radius: 4px; cursor: pointer; }

/* ---------- Rodapé ---------- */
.site-footer { background: #0a2d33; color: #c3d5d8; padding-top: clamp(2.5rem, 5vw, 3.5rem); font-size: .97rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h2 { font-family: var(--font-text); font-size: 1rem; font-weight: 600; color: #fff; margin-bottom: .8rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .45rem; }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; padding-bottom: 2.5rem; }
.site-footer__brand p { margin-top: 1rem; max-width: 34ch; }
.social { display: flex; gap: 1rem; }
.site-footer__legal { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 1.25rem; font-size: .85rem; color: #93acb1; }
.site-footer__legal p { margin: 0; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: span 2; } }

/* ---------- bbPress (fórum) ---------- */
#bbpress-forums { font-size: 1rem; }
#bbpress-forums li.bbp-header { background: var(--petrol); color: #fff; }
#bbpress-forums .button, #bbpress-forums button[type=submit] { background: var(--safety); border: 0; border-radius: 4px; padding: .6rem 1rem; font-weight: 600; }

@media print {
	.site-header, .site-footer, .tg-news, .tg-ad, .crumbs, .pager { display: none !important; }
	body { background: #fff; }
}
