/* ============================================================
   PRISMA DO MUNDO — SISTEMA EDITORIAL & FERRAMENTAS PRÁTICAS
   Design Editorial Limpo, Responsivo e Otimizado para Leitura
   ============================================================ */

:root {
  --brand: #14534B;
  --brand-hover: #0E3E38;
  --brand-soft: #E9F3F1;
  --accent: #C25934;
  --accent-hover: #A44726;
  --accent-soft: #FCF0EB;
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --surface-2: #F3F0EA;
  --ink: #172022;
  --ink-muted: #4C5A5E;
  --ink-subtle: #6E7B7F;
  --border: #E5E0D6;
  --border-strong: #CFC8BA;
  --ok: #15803D;
  --ok-bg: #ECFDF5;
  --warn: #B45309;
  --warn-bg: #FFFBEB;
  --danger: #B91C1C;
  --danger-bg: #FEF2F2;
  --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(23, 32, 34, 0.05);
  --shadow-md: 0 8px 24px rgba(23, 32, 34, 0.07);
  --shadow-lg: 0 18px 42px rgba(23, 32, 34, 0.12);
  --max-w: 1200px;
}

[data-theme="dark"] {
  --brand: #4DB6A6;
  --brand-hover: #6AC8B9;
  --brand-soft: #142B28;
  --accent: #E2815D;
  --accent-hover: #EE9674;
  --accent-soft: #2C1D17;
  --bg: #111617;
  --surface: #182022;
  --surface-2: #202A2D;
  --ink: #F2F0EB;
  --ink-muted: #B6C2C5;
  --ink-subtle: #8B9A9E;
  --border: #2B3639;
  --border-strong: #3C4A4E;
  --ok: #4ADE80;
  --ok-bg: #0E2918;
  --warn: #FBBF24;
  --warn-bg: #2B2009;
  --danger: #F87171;
  --danger-bg: #2D1212;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-hover); }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  line-height: 1.22;
  margin-top: 0;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 2.4vw, 1.95rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.35rem); font-weight: 600; }

.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.site { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

/* ---------------- HEADER & NAV ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  flex-shrink: 0;
}
.brand-link:hover { color: var(--brand); }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.brand-mark svg { width: 38px; height: 38px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.18rem; font-weight: 700; color: var(--ink); }
.brand-text small { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); font-weight: 700; margin-top: 2px; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.main-nav a {
  padding: 0.45rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.is-active { color: var(--brand); background: var(--brand-soft); }
.main-nav a.nav-tools {
  background: var(--accent-soft);
  color: var(--accent);
}
.main-nav a.nav-tools:hover { background: var(--accent); color: #fff; }

.header-actions { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.icon-btn--sq { width: 38px; padding: 0; }
.nav-toggle { display: none; }

[data-theme="dark"] .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: none; }

@media (max-width: 1060px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.25rem 1.25rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: 0.65rem 0.85rem; font-size: 0.95rem; }
  .nav-toggle { display: inline-flex; }
  .search-btn-label { display: none; }
}

/* ---------------- BUTTONS & PILLS ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.93rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-hover); color: #fff; }
.btn-outline { background: transparent; border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.84rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent);
}
.cat-pill {
  display: inline-block;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
  letter-spacing: 0.02em;
}
.cat-pill:hover { background: var(--brand); color: #fff; }

/* ---------------- HOME EDITORIAL MASTHEAD & LEAD ---------------- */
.masthead-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0 1.35rem;
}
.masthead-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.masthead-copy { max-width: 680px; }
.masthead-copy h1 {
  font-size: clamp(1.45rem, 2.3vw, 1.95rem);
  margin: 0.2rem 0 0.35rem;
}
.masthead-copy p { margin: 0; color: var(--ink-muted); font-size: 0.96rem; }
.masthead-search {
  display: flex;
  gap: 0.5rem;
  flex: 1;
  min-width: 260px;
  max-width: 390px;
}
.masthead-search input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.92rem;
}
.masthead-search input:focus { outline: 2px solid var(--brand); border-color: var(--brand); }

.topic-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.topic-chip {
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.topic-chip:hover, .topic-chip.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.section { padding: 2.75rem 0; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section--tight { padding: 2rem 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}
.section-head h2 { margin: 0.15rem 0 0; font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
.section-head p { margin: 0.3rem 0 0; color: var(--ink-muted); font-size: 0.94rem; }
.section-more { font-size: 0.88rem; font-weight: 700; white-space: nowrap; color: var(--brand); }

/* Lead Editorial Grid (Above the fold) */
.lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
.lead-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.lead-main__img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; }
.lead-main__body { padding: 1.5rem; }
.lead-main__title { font-size: clamp(1.4rem, 2.2vw, 1.85rem); margin: 0.65rem 0 0.7rem; }
.lead-main__title a { color: var(--ink); }
.lead-main__title a:hover { color: var(--brand); }
.lead-main__excerpt { color: var(--ink-muted); margin: 0 0 1rem; font-size: 0.98rem; }

.lead-side { display: flex; flex-direction: column; gap: 1rem; }
.mini-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  align-items: center;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.mini-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.mini-card__img { width: 120px; height: 84px; object-fit: cover; border-radius: var(--radius-sm); }
.mini-card__title { font-size: 1rem; margin: 0.3rem 0 0.35rem; line-height: 1.3; }
.mini-card__title a { color: var(--ink); }
.mini-card__title a:hover { color: var(--brand); }

@media (max-width: 900px) {
  .lead-grid { grid-template-columns: 1fr; }
}

/* ---------------- POST CARDS GRID ---------------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.4rem;
}
@media (max-width: 960px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.post-card__img-link { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.post-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.25s ease; }
.post-card:hover .post-card__img { transform: scale(1.03); }
.post-card__body { padding: 1.15rem; display: flex; flex-direction: column; flex: 1; }
.post-card__title { font-size: 1.12rem; margin: 0.55rem 0 0.5rem; line-height: 1.32; }
.post-card__title a { color: var(--ink); }
.post-card__title a:hover { color: var(--brand); }
.post-card__excerpt { font-size: 0.9rem; color: var(--ink-muted); margin: 0 0 1rem; flex: 1; }
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
  font-size: 0.8rem;
  color: var(--ink-subtle);
}

/* ---------------- TOOLS SHOWCASE ---------------- */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 1100px) { .tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .tools-grid { grid-template-columns: 1fr; } }

.tools-grid--hub {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.35rem;
}
@media (max-width: 760px) { .tools-grid--hub { grid-template-columns: 1fr; } }

.tool-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-md);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  color: var(--ink);
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent); color: var(--ink); }
.tool-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--brand-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
}
.tool-card h3 { font-size: 1.05rem; margin: 0 0 0.45rem; }
.tool-card p { font-size: 0.86rem; color: var(--ink-muted); margin: 0 0 0.9rem; flex: 1; }
.tool-card__cta { font-size: 0.83rem; font-weight: 700; color: var(--accent); }

/* ---------------- TRUST / E-E-A-T STRIP ---------------- */
.trust-box {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
@media (max-width: 820px) { .trust-box { grid-template-columns: 1fr; padding: 1.4rem; } }
.trust-pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (max-width: 520px) { .trust-pillars { grid-template-columns: 1fr; } }
.trust-pillar {
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.trust-pillar strong { display: block; font-size: 0.92rem; margin-bottom: 0.25rem; color: var(--ink); }
.trust-pillar span { font-size: 0.84rem; color: var(--ink-muted); }

/* ---------------- BREADCRUMBS & ARTICLE LAYOUT ---------------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  color: var(--ink-subtle);
  padding: 1.25rem 0 0.75rem;
}
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--brand); }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 3rem;
}
@media (max-width: 1020px) {
  .article-layout { grid-template-columns: 1fr; gap: 1.5rem; }
}

.article-header { margin-bottom: 1.5rem; }
.article-title { margin: 0.65rem 0 0.85rem; }
.article-lead { font-size: 1.1rem; color: var(--ink-muted); margin: 0 0 1.15rem; }

.byline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.byline-author { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; color: var(--ink); }
.avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.avatar-badge--lg { width: 68px; height: 68px; font-size: 1.55rem; }

.article-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--border);
}

/* Prose typography */
.prose { font-size: 1.04rem; line-height: 1.78; color: var(--ink); }
.prose h2 {
  margin: 2.35rem 0 0.85rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.prose h3 { margin: 1.65rem 0 0.6rem; scroll-margin-top: 90px; }
.prose p { margin: 0 0 1.2rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem; padding-left: 1.35rem; }
.prose li { margin-bottom: 0.45rem; }
.prose a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.prose a:hover { color: var(--accent); }
.prose img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0 0.5rem;
  border: 1px solid var(--border);
}
.prose figure { margin: 1.75rem 0; }
.prose figcaption { font-size: 0.85rem; color: var(--ink-subtle); text-align: center; margin-top: 0.45rem; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-muted);
}
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 0; }
.prose th, .prose td { padding: 0.75rem 0.9rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 700; color: var(--ink); }
.prose tr:last-child td { border-bottom: none; }

/* Inline Tool Callout inside Articles */
.tool-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: var(--radius-md);
}
.tool-callout strong { display: block; font-size: 1.02rem; color: var(--ink); margin-bottom: 0.2rem; }
.tool-callout p { margin: 0; font-size: 0.9rem; color: var(--ink-muted); }

/* Sidebar & TOC */
.article-sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 1.25rem; }
.sidebar-card {
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.sidebar-card__title {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
  margin: 0 0 0.8rem;
}
.toc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.toc-list a {
  display: block;
  font-size: 0.85rem;
  line-height: 1.38;
  color: var(--ink-muted);
  padding-left: 0.65rem;
  border-left: 2px solid var(--border);
}
.toc-list a:hover, .toc-list a.is-active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }

.toc-mobile {
  display: none;
  margin: 0 0 1.5rem;
  padding: 1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.toc-mobile summary { font-weight: 700; cursor: pointer; font-size: 0.93rem; }
@media (max-width: 1020px) {
  .toc-mobile { display: block; }
  .sidebar-toc { display: none; }
  .article-sidebar { position: static; }
}

/* Author Box & Share & Related */
.author-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.5rem;
  margin: 2.25rem 0 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
@media (max-width: 600px) { .author-card { flex-direction: column; } }
.author-card h4 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.author-card p { margin: 0 0 0.65rem; font-size: 0.92rem; color: var(--ink-muted); }

.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1.5rem 0;
}
.share-bar span { font-size: 0.86rem; font-weight: 700; color: var(--ink-muted); margin-right: 0.35rem; }

/* ---------------- INTERACTIVE TOOL WIDGETS ---------------- */
.tool-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 1.75rem;
}
.tool-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.75rem;
  margin: 2rem 0 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .tool-workspace { grid-template-columns: 1fr; } }

.tool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.tool-panel--sticky { position: sticky; top: 90px; }
@media (max-width: 900px) { .tool-panel--sticky { position: static; } }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-size: 0.87rem; font-weight: 700; color: var(--ink); }
.field small { font-size: 0.78rem; color: var(--ink-subtle); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.94rem;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--brand);
  border-color: var(--brand);
}

.result-banner {
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 1.15rem;
}
.result-banner--ok { background: var(--ok-bg); border-color: var(--ok); }
.result-banner--warn { background: var(--warn-bg); border-color: var(--warn); }
.result-banner--danger { background: var(--danger-bg); border-color: var(--danger); }
.result-kpi {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--ink);
  margin: 0.25rem 0;
}
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; margin: 1rem 0; }
.kpi-box {
  padding: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.kpi-box span { display: block; font-size: 0.76rem; color: var(--ink-subtle); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-box strong { font-size: 1.12rem; color: var(--ink); }

.progress-track { width: 100%; height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 0.5rem 0 1rem; }
.progress-fill { height: 100%; background: var(--brand); transition: width 0.2s ease; }

.check-room { border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: 1rem; overflow: hidden; }
.check-room__head { background: var(--surface-2); padding: 0.75rem 1rem; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.check-item {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto minmax(0, 1fr);
  gap: 0.65rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
}
@media (max-width: 720px) { .check-item { grid-template-columns: 1fr; } }
.check-item select, .check-item input {
  padding: 0.42rem 0.6rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-size: 0.85rem;
  font-family: inherit;
}

/* ---------------- ARCHIVE / CATEGORY / PAGE ---------------- */
.page-hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 2.25rem 0 1.85rem;
}
.page-hero p { max-width: 760px; color: var(--ink-muted); margin: 0.65rem 0 0; font-size: 1.02rem; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.5rem 0; }
.filter-tab {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.filter-tab:hover, .filter-tab.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }

.pagination { display: flex; justify-content: center; gap: 0.45rem; margin: 2.25rem 0 1rem; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
}
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------------- SEARCH MODAL ---------------- */
.search-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 24, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 1rem 2rem;
}
.search-modal.is-open { display: flex; }
.search-dialog {
  width: 100%;
  max-width: 660px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.search-dialog__head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.search-dialog__head input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}
.search-results { max-height: 60vh; overflow-y: auto; padding: 0.5rem; }
.search-hit {
  display: block;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-sm);
  color: var(--ink);
}
.search-hit:hover { background: var(--brand-soft); color: var(--ink); }
.search-hit strong { display: block; font-size: 0.96rem; margin-bottom: 0.15rem; }
.search-hit span { display: block; font-size: 0.82rem; color: var(--ink-muted); }

/* ---------------- LGPD COOKIE CONSENT ---------------- */
.consent-bar {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 980px;
  margin: 0 auto;
  z-index: 150;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.25rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.consent-bar.is-visible { display: flex; }
.consent-bar p { margin: 0; font-size: 0.85rem; color: var(--ink-muted); flex: 1; min-width: 240px; }
.consent-bar a { color: var(--brand); text-decoration: underline; font-weight: 600; }
.consent-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---------------- FOOTER ---------------- */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.75rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 0.85rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a { font-size: 0.88rem; color: var(--ink-muted); }
.footer-links a:hover { color: var(--brand); }
.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--ink-subtle);
}

/* ---------------- CONTACT FORM STATUS ---------------- */
.form-status { padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-size: 0.9rem; margin-top: 0.85rem; display: none; }
.form-status.is-ok { display: block; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok); }
.form-status.is-err { display: block; background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger); }

/* ---------------- PRINT STYLES (VISTORIA PDF) ---------------- */
@media print {
  .site-header, .site-footer, .consent-bar, .search-modal, .no-print, .breadcrumbs { display: none !important; }
  body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .tool-workspace { display: block !important; }
  .tool-panel { border: none !important; box-shadow: none !important; padding: 0 !important; }
  .check-room { break-inside: avoid; border-color: #bbb !important; }
}
