/* Portal ERP BR — identidade visual
   Cores de categoria carregam significado: ERP, CRM, MRP e E-commerce
   aparecem sempre com a mesma cor (logo, busca, matriz de cobertura). */

:root {
  --paper: #f4f5f8;
  --surface: #ffffff;
  --ink: #161a33;
  --ink-2: #4a5068;
  --ink-3: #6d7389;
  --line: #dcdfe8;
  --line-strong: #c3c8d6;

  --erp: #2e48e6;
  --crm: #d23f63;
  --mrp: #b7791f;
  --ecom: #0f8a7e;
  /* versões para texto pequeno sobre fundo claro (contraste AA) */
  --erp-text: #2a40c9;
  --crm-text: #b8304f;
  --mrp-text: #8a5a10;
  --ecom-text: #0b6f65;

  --sans: 'Bricolage Grotesque', system-ui, sans-serif;
  --serif: 'Newsreader', Georgia, serif;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 6px;
  --radius-m: 12px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--erp);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -60px; z-index: 50;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius-s);
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Marca ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.125rem; letter-spacing: -0.02em;
  text-decoration: none; white-space: nowrap;
}
.brand-mark {
  width: 30px; height: 30px; display: block; flex: none;
  overflow: hidden; border-radius: 7px;
  background: url('/public/logo-portal-erp-br.png') center / contain no-repeat;
}
.brand-mark i { display: none; }
.brand small { font-weight: 400; color: var(--ink-3); font-size: inherit; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(244, 245, 248, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: 68px; display: flex; align-items: center; gap: 32px;
}
.main-nav { display: flex; gap: 4px; margin-left: auto; }
.main-nav a {
  text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--ink-2);
  padding: 8px 12px; border-radius: var(--radius-s);
}
.main-nav a:hover { color: var(--ink); background: rgba(22, 26, 51, 0.05); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.header-cta { margin-left: 8px; }
.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-strong); border-radius: var(--radius-s);
  cursor: pointer; place-items: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ---------- Botões ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-s); border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: #2b3159; }
.button-ghost { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.button-ghost:hover { border-color: var(--ink); }
.button-small { min-height: 40px; padding: 0 16px; font-size: 0.925rem; }

.text-button {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--erp-text); font-weight: 600; text-decoration: underline;
  text-underline-offset: 3px; text-decoration-thickness: 1px;
}

/* ---------- Hero: problema + busca em frase ---------- */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(56px, 8vw, 96px); }
.hero h1 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  font-weight: 500; color: var(--ink-2); line-height: 1.45;
  max-width: 34em;
}
.hero h1 strong { color: var(--ink); font-weight: 600; }

.composer { margin-top: clamp(20px, 3vw, 32px); }
.composer-sentence {
  font-size: clamp(2.3rem, 6.2vw, 5.6rem);
  font-weight: 700; letter-spacing: -0.028em; line-height: 1.14;
  font-variation-settings: "wdth" 92;
  max-width: 21ch;
}
.composer-sentence .word { white-space: nowrap; }
.slot {
  position: relative; display: inline-block; vertical-align: baseline;
}
.slot select {
  appearance: none; -webkit-appearance: none;
  font: inherit; letter-spacing: inherit; line-height: inherit;
  font-variation-settings: inherit;
  color: var(--slot-color, var(--ink));
  background: transparent; border: 0; border-radius: 0;
  padding: 0 0.5em 0 0; margin: 0; cursor: pointer;
  border-bottom: 0.05em solid currentColor;
  max-width: 100%;
}
.slot::after {
  content: ""; position: absolute; right: 0.08em; top: 52%;
  width: 0.24em; height: 0.24em;
  border-right: 0.065em solid var(--slot-color, var(--ink));
  border-bottom: 0.065em solid var(--slot-color, var(--ink));
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}
.slot select:hover { background: rgba(22, 26, 51, 0.04); }
.slot select:focus-visible { outline: 3px solid var(--erp); outline-offset: 4px; }
.slot select option { font-size: 1rem; color: var(--ink); font-weight: 500; letter-spacing: 0; }
.slot[data-kind="ERP"] { --slot-color: var(--erp); }
.slot[data-kind="CRM"] { --slot-color: var(--crm); }
.slot[data-kind="MRP"] { --slot-color: var(--mrp); }
.slot[data-kind="E-commerce"] { --slot-color: var(--ecom); }
.slot-segment { --slot-color: var(--ink); }

.composer-actions {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.name-search {
  position: relative; flex: 0 1 340px; min-width: 0;
}
.name-search svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--ink-3); pointer-events: none;
}
.name-search input {
  width: 100%; min-height: 48px; padding: 0 14px 0 42px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); font-size: 1rem;
}
.name-search input::placeholder { color: var(--ink-3); }
.name-search input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(46, 72, 230, .25); }
.composer-actions .button-primary { min-width: 190px; }
.composer-note { width: 100%; color: var(--ink-3); font-size: 0.925rem; }

/* ---------- Seções ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-title {
  font-size: clamp(1.75rem, 3.4vw, 2.6rem);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.15;
  max-width: 22ch;
}
.section-lead {
  margin-top: 14px; color: var(--ink-2); font-size: 1.075rem; max-width: 56ch;
}

/* ---------- Consequência ---------- */
.cost {
  background: var(--ink); color: #e8eaf4;
  padding: clamp(56px, 8vw, 96px) 0;
}
.cost .section-title { color: #fff; }
.cost-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(32px, 6vw, 80px); align-items: start;
}
.cost-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.cost-list li {
  padding: 22px 0; border-top: 1px solid rgba(255, 255, 255, .14);
  display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 8px 32px;
}
.cost-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.cost-list strong { color: #fff; font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.cost-list p { color: #b9bdd3; max-width: 46ch; }

/* ---------- Siglas ---------- */
.acronyms {
  margin-top: clamp(32px, 5vw, 48px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  overflow: hidden;
}
.acronym {
  padding: 28px 26px 26px; display: flex; flex-direction: column; gap: 10px;
  border-left: 1px solid var(--line);
  border-top: 4px solid var(--cat);
}
.acronym:first-child { border-left: 0; }
.acronym h3 {
  font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1;
  color: var(--cat-text);
}
.acronym .expand { font-size: 0.9rem; color: var(--ink-3); font-weight: 500; }
.acronym p { color: var(--ink-2); }
.acronym .for { font-size: 0.925rem; color: var(--ink-3); }
.acronym .for b { color: var(--ink-2); font-weight: 600; }
.acronym .text-button { margin-top: auto; padding-top: 8px; text-align: left; color: var(--cat-text); }
.cat-erp { --cat: var(--erp); --cat-text: var(--erp-text); }
.cat-crm { --cat: var(--crm); --cat-text: var(--crm-text); }
.cat-mrp { --cat: var(--mrp); --cat-text: var(--mrp-text); }
.cat-ecom { --cat: var(--ecom); --cat-text: var(--ecom-text); }

/* ---------- Diretório ---------- */
.directory { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.directory-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px;
}
.result-summary { color: var(--ink-2); font-size: 1.05rem; }
.result-summary strong { color: var(--ink); }

.filters {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-weight: 500; font-size: 0.95rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.chip:hover { border-color: var(--ink); }
.chip .dot { width: 9px; height: 9px; border-radius: 2px; background: var(--cat, var(--ink)); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .count { color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.chip[aria-pressed="true"] .count { color: #c3c7dc; }
.segment-filter { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.segment-filter label { color: var(--ink-3); font-size: 0.95rem; }
.segment-filter select {
  min-height: 40px; padding: 0 36px 0 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1.5 5 5 5-5' stroke='%23161a33' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}

.system-list { list-style: none; margin: 0; padding: 0; }
.system {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) auto auto;
  gap: 8px 32px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.system-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.system-name h3 { font-size: 1.2rem; font-weight: 650; letter-spacing: -0.015em; line-height: 1.25; }
.system-name span { color: var(--ink-3); font-size: 0.9rem; }
.system-desc { color: var(--ink-2); max-width: 60ch; }
.system-desc small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 0.875rem; }

.coverage { display: grid; grid-template-columns: repeat(4, auto); gap: 4px; list-style: none; margin: 0; padding: 0; }
.coverage li {
  min-width: 46px; padding: 5px 7px; border-radius: 4px; text-align: center; white-space: nowrap;
  font-size: 0.75rem; font-weight: 600; line-height: 1.2;
  border: 1px solid var(--line); color: #a9aec0; background: transparent;
}
.coverage li.on { color: #fff; border-color: transparent; }
.coverage li.on.erp { background: var(--erp); }
.coverage li.on.crm { background: var(--crm); }
.coverage li.on.mrp { background: var(--mrp-text); }
.coverage li.on.ecom { background: var(--ecom); }

.visit {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  min-height: 40px; padding: 0 14px; border-radius: var(--radius-s);
  border: 1px solid var(--line-strong); text-decoration: none; font-weight: 600; font-size: 0.925rem;
}
.visit:hover { border-color: var(--ink); }
.visit svg { width: 14px; height: 14px; }

.list-footer { margin-top: 28px; display: flex; justify-content: center; }
.empty-state {
  padding: 48px 0; text-align: center; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-state strong { color: var(--ink); font-size: 1.15rem; }
.empty-state[hidden] { display: none; }

.ad-slot:empty { display: none; }
.ad-slot { margin-top: 40px; }

/* ---------- Guias ---------- */
.guide-feature {
  margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px); align-items: center;
  text-decoration: none; padding: clamp(24px, 4vw, 40px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.guide-feature:hover { border-color: var(--line-strong); }
.guide-feature:hover :is(h2, h3) { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.guide-meta { color: var(--ink-3); font-size: 0.925rem; }
.guide-feature h2, .guide-feature h3 {
  margin-top: 10px; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2;
}
.guide-feature p { margin-top: 12px; color: var(--ink-2); max-width: 54ch; }
.guide-feature .read { margin-top: 20px; display: inline-block; font-weight: 600; color: var(--erp-text); }
.guide-note { margin-top: 18px; color: var(--ink-3); }

/* Ciclo de locação — ilustra o guia com o próprio conteúdo */
.cycle {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  counter-reset: etapa;
}
.cycle li {
  counter-increment: etapa;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-s);
  background: var(--paper); font-size: 0.925rem; font-weight: 500;
}
.cycle li::before {
  content: counter(etapa); flex: none;
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); border: 1px solid var(--line-strong);
  font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums;
}
.cycle li.loop { grid-column: 1 / -1; background: rgba(15, 138, 126, .1); color: var(--ecom-text); }
.cycle li.loop::before { content: "↺"; border-color: transparent; background: var(--ecom); color: #fff; font-size: 0.9rem; }

/* ---------- Parte racional ---------- */
.terms-grid {
  margin-top: clamp(32px, 5vw, 48px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
}
.term { border-top: 2px solid var(--ink); padding-top: 18px; }
.term h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.015em; }
.term p { margin-top: 8px; color: var(--ink-2); }

/* ---------- Cadastro ---------- */
.submit {
  margin-top: clamp(56px, 8vw, 88px);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(24px, 4vw, 48px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.submit h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.submit-copy p { margin-top: 12px; color: var(--ink-2); max-width: 44ch; }
.submit-copy ul { margin: 20px 0 0; padding-left: 1.1em; color: var(--ink-2); }
.submit-copy li + li { margin-top: 6px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-content: start; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field label .opt { font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface);
  font-size: 1rem;
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='m1 1.5 5 5 5-5' stroke='%23161a33' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
}
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(46, 72, 230, .25);
}
.field .hint { font-size: 0.85rem; color: var(--ink-3); }
.form-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.form-actions small { color: var(--ink-3); font-size: 0.875rem; max-width: 36ch; }
.form-feedback { grid-column: 1 / -1; font-weight: 500; min-height: 1.5em; }
.form-feedback.ok { color: var(--ecom-text); }
.form-feedback.error { color: var(--crm-text); }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 32px; color: var(--ink-2); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-left: auto; }
.footer-inner nav a { text-decoration: none; }
.footer-inner nav a:hover { color: var(--ink); text-decoration: underline; }
.footer-legal { width: 100%; font-size: 0.875rem; color: var(--ink-3); }

/* ---------- Páginas editoriais ---------- */
.page-intro { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); }
.page-intro h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem); font-weight: 700; letter-spacing: -0.035em; line-height: 1.08;
  max-width: 18ch;
}
.page-intro p { margin-top: 16px; color: var(--ink-2); font-size: 1.125rem; max-width: 52ch; }

.breadcrumb { padding-top: 28px; font-size: 0.925rem; color: var(--ink-3); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { text-decoration: none; color: var(--ink-2); }
.breadcrumb a:hover { text-decoration: underline; }

.article-header { padding: clamp(28px, 5vw, 56px) 0 clamp(24px, 4vw, 40px); max-width: 820px; }
.article-kind { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 10px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 0.85rem; font-weight: 500; color: var(--ink-2);
}
.tag .dot { width: 8px; height: 8px; border-radius: 2px; background: var(--cat, var(--ink)); }
.article-header h1 {
  margin-top: 18px; font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 700;
  letter-spacing: -0.03em; line-height: 1.1;
}
.article-deck {
  margin-top: 18px; font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.5; color: var(--ink-2); max-width: 40em;
}
.byline { margin-top: 22px; color: var(--ink-3); font-size: 0.95rem; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.byline strong { color: var(--ink-2); font-weight: 600; }

.article-figure {
  margin: 0; padding: clamp(20px, 3vw, 32px);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
}
.article-figure .cycle { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.article-figure figcaption { margin-top: 16px; color: var(--ink-3); font-size: 0.925rem; }

.article-layout {
  display: grid; grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px); padding: clamp(40px, 6vw, 64px) 0 clamp(64px, 9vw, 112px);
}
.toc { position: sticky; top: 92px; align-self: start; font-size: 0.925rem; }
.toc h2 { font-size: 0.95rem; font-weight: 600; margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent;
  color: var(--ink-2); text-decoration: none; line-height: 1.35;
}
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--erp); font-weight: 600; }

.prose {
  min-width: 0;
  font-family: var(--serif); font-size: 1.2rem; line-height: 1.72; color: #262a40;
  max-width: 38em;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-family: var(--sans); font-size: clamp(1.45rem, 2.4vw, 1.85rem); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.2; color: var(--ink);
  margin-top: 2.2em;
}
.prose h3 {
  font-family: var(--sans); font-size: 1.2rem; font-weight: 650; line-height: 1.3; color: var(--ink);
  margin-top: 1.8em;
}
.prose h3 + p { margin-top: 0.5em; }
.prose strong { font-weight: 600; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.55em; }
.prose li::marker { color: var(--ink-3); font-family: var(--sans); font-weight: 600; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative;
  font-family: var(--sans); font-size: 1.1rem; font-weight: 600; color: var(--ink); line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px;
  border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { padding-bottom: 20px; margin: 0; }

.callout {
  margin-top: 2.6em; padding: 28px; border-radius: var(--radius-m);
  background: var(--ink); color: #e8eaf4; font-family: var(--sans);
}
.callout h2 { margin: 0; color: #fff; font-size: 1.5rem; }
.callout p { margin-top: 8px; color: #b9bdd3; font-size: 1.05rem; line-height: 1.5; }
.callout .button { margin-top: 18px; background: #fff; color: var(--ink); }
.callout .button:hover { background: #e3e6f2; }

.article-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.article-list + .guide-note { padding-bottom: clamp(64px, 9vw, 112px); }
.article-list .guide-feature { margin-top: 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 1020px) {
  .acronyms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acronym:nth-child(3) { border-left: 0; }
  .system { grid-template-columns: minmax(0, 1fr) auto; }
  .system-desc { grid-column: 1 / -1; grid-row: 2; }
  .coverage { grid-column: 1; grid-row: 3; justify-self: start; }
  .visit { grid-column: 2; grid-row: 1; }
  .cost-grid { grid-template-columns: 1fr; }
  .article-figure .cycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .main-nav, .header-cta { display: none; }
  .menu-toggle { display: grid; }
  .site-header.open .main-nav {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .site-header.open .main-nav a { padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-header.open .main-nav a:hover { background: none; }
  .guide-feature, .submit { grid-template-columns: 1fr; }
  .terms-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; }
  .cost-list li { grid-template-columns: 1fr; }
  .segment-filter { margin-left: 0; }
}

@media (max-width: 560px) {
  .acronyms { grid-template-columns: 1fr; }
  .acronym { border-left: 0; }
  .composer-sentence .word { white-space: normal; }
  .composer-actions .button-primary, .name-search { flex: 1 1 100%; }
  .form { grid-template-columns: 1fr; }
  .prose { font-size: 1.125rem; }
  .article-figure .cycle { grid-template-columns: 1fr; }
  .system-name h3 { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.cost .section-lead { color: #b9bdd3; }
.section-tight { padding-top: 0; }

/* =========================================================
   Análise com IA — seção, botão flutuante e janela
   ========================================================= */
.button-large { min-height: 56px; padding: 0 28px; font-size: 1.075rem; }

.ai-promo {
  padding: clamp(64px, 9vw, 112px) 0;
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(46, 72, 230, .10), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}
.ai-promo-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px); align-items: center;
}
.ai-promo-problem { color: var(--ink-2); font-size: 1.075rem; max-width: 50ch; margin-bottom: 16px; }
.ai-promo .section-title { max-width: 20ch; }
.ai-promo-steps {
  list-style: none; margin: 32px 0 0; padding: 0; counter-reset: passo;
  display: grid; gap: 14px;
}
.ai-promo-steps li {
  counter-increment: passo; display: grid; grid-template-columns: 36px minmax(0, 1fr);
  column-gap: 14px; align-items: baseline;
}
.ai-promo-steps li::before {
  content: counter(passo); grid-row: span 2; align-self: start;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 1px solid var(--line-strong);
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.ai-promo-steps strong { font-size: 1.1rem; font-weight: 650; }
.ai-promo-steps span { color: var(--ink-2); }
.ai-promo-cta { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.ai-promo-terms { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--ink-2); font-size: 0.95rem; }
.ai-promo-terms li { display: inline-flex; align-items: center; gap: 7px; }
.ai-promo-terms li::before {
  content: ""; width: 14px; height: 14px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='m2.5 7.5 3 3 6-7' stroke='%230b6f65' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
}

/* Prévia da conversa */
.ai-preview {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 18px; box-shadow: 0 24px 60px -28px rgba(22, 26, 51, .35);
  transform: rotate(1.2deg);
}
.ai-preview-head { display: flex; align-items: center; gap: 10px; font-weight: 650; padding: 4px 4px 14px; border-bottom: 1px solid var(--line); }
.ai-preview-log { display: flex; flex-direction: column; gap: 10px; padding-top: 16px; }
.ai-preview-result {
  margin-top: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
}
.ai-preview-label { font-weight: 650; font-size: 0.95rem; }
.ai-preview-result ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 12px; }
.ai-preview-result li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 4px; align-items: baseline; }
.ai-preview-result .bar {
  grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--line);
  position: relative; overflow: hidden;
}
.ai-preview-result .bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--fit); background: var(--erp); border-radius: inherit; }
.ai-preview-result li:nth-child(2) .bar::after { background: var(--ecom); }
.ai-preview-result li:nth-child(3) .bar::after { background: var(--mrp); }
.ai-preview-result b { font-weight: 650; }
.ai-preview-result em { font-style: normal; color: var(--ink-3); font-size: 0.9rem; }

/* Mensagens (usadas na prévia e no chat) */
.ai-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 16px; line-height: 1.45; font-size: 0.975rem;
  overflow-wrap: anywhere;
}
.ai-bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.ai-bot a { color: var(--erp-text); }

.ai-fab-mark { width: 20px; height: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; flex: none; }
.ai-fab-mark i { border-radius: 2px; }
.ai-fab-mark i:nth-child(1) { background: var(--erp); }
.ai-fab-mark i:nth-child(2) { background: var(--crm); }
.ai-fab-mark i:nth-child(3) { background: var(--mrp); }
.ai-fab-mark i:nth-child(4) { background: var(--ecom); }

/* Botão flutuante */
.ai-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--erp); color: #fff; text-align: left;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .25), 0 14px 34px -10px rgba(22, 26, 51, .6);
  opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1), background-color .15s ease;
}
.ai-fab.ai-fab-in { opacity: 1; transform: none; pointer-events: auto; }
.ai-fab.ai-fab-in.ai-fab-hidden { opacity: 0; transform: translateY(24px); pointer-events: none; }
.ai-fab:hover { background: #2238c4; }
.ai-fab .ai-fab-mark { background: #fff; padding: 3px; border-radius: 5px; }
.ai-fab .ai-fab-mark { width: 24px; height: 24px; }
.ai-fab-text { display: flex; flex-direction: column; line-height: 1.2; }
.ai-fab-text strong { font-weight: 650; font-size: 0.975rem; }
.ai-fab-text small { color: #d6dcff; font-size: 0.8rem; }

/* Janela */
.ai-dialog {
  padding: 0; border: 0; background: transparent; color: var(--ink);
  width: min(560px, calc(100vw - 32px)); max-width: none;
  height: min(720px, calc(100dvh - 48px)); max-height: none;
  margin: auto;
}
.ai-dialog::backdrop { background: rgba(22, 26, 51, .45); backdrop-filter: blur(3px); }
.ai-dialog[open] { animation: ai-in .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes ai-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
html.ai-open { overflow: hidden; }
.ai-shell {
  height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: var(--paper); border-radius: 18px; box-shadow: 0 30px 80px -20px rgba(22, 26, 51, .5);
}
.ai-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 20px; background: var(--surface); }
.ai-head-text { display: flex; flex-direction: column; line-height: 1.25; }
.ai-head h2 { font-size: 1.05rem; font-weight: 650; }
.ai-head-text span { color: var(--ink-3); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.ai-close {
  margin-left: auto; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; background: transparent; border-radius: 50%; cursor: pointer; color: var(--ink-2);
}
.ai-close:hover { background: var(--paper); color: var(--ink); }
.ai-close svg { width: 20px; height: 20px; }
.ai-progress { height: 3px; background: var(--line); }
.ai-progress span { display: block; height: 100%; width: 0; background: var(--erp); transition: width .4s ease; }

.ai-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Fase 1: uma pergunta por tela */
.ai-form-phase { justify-content: center; padding: clamp(24px, 5vw, 48px); overflow-y: auto; }
.ai-intro { color: var(--ink-2); margin-bottom: 28px; max-width: 42ch; }
.ai-intro strong { color: var(--ink); font-weight: 600; }
.ai-step { display: flex; flex-direction: column; animation: ai-step .3s ease; }
@keyframes ai-step { from { opacity: 0; transform: translateY(10px); } }
.ai-q { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.ai-hint { margin-top: 8px; color: var(--ink-3); }
.ai-input {
  margin-top: 22px; width: 100%; padding: 8px 0; font-size: clamp(1.3rem, 3.4vw, 1.6rem);
  border: 0; border-bottom: 2px solid var(--line-strong); background: transparent; border-radius: 0;
}
.ai-input::placeholder { color: #a9aec0; }
.ai-input:focus { outline: none; border-bottom-color: var(--erp); }
.ai-input[aria-invalid="true"] { border-bottom-color: var(--crm); }
.ai-error { min-height: 1.5em; margin-top: 8px; color: var(--crm-text); font-weight: 500; font-size: 0.95rem; }
.ai-step-actions { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.ai-enter { color: var(--ink-3); font-size: 0.875rem; }
.ai-enter kbd { font: inherit; font-weight: 600; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); }
.ai-back { background: none; border: 0; padding: 8px 4px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.ai-back:hover { color: var(--ink); text-decoration: underline; }
.ai-legal { margin-top: 20px; color: var(--ink-3); font-size: 0.85rem; }

/* Fase 2: chat */
.ai-log { flex: 1; min-height: 0; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ai-log .ai-msg { animation: ai-msg .25s ease; }
@keyframes ai-msg { from { opacity: 0; transform: translateY(6px); } }
.ai-typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.ai-typing span:not(.sr-only) { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: ai-dot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.ai-composer { padding: 14px 20px 20px; background: var(--surface); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.ai-composer:empty { display: none; }
.ai-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-option {
  min-height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); font-weight: 500;
}
.ai-option:hover { border-color: var(--erp); color: var(--erp-text); }
.ai-option[aria-pressed="true"] { background: var(--erp); border-color: var(--erp); color: #fff; }
.ai-send, .ai-done { align-self: flex-end; }
.ai-free textarea {
  width: 100%; padding: 12px; border: 1px solid var(--line-strong); border-radius: 12px; resize: none; font-size: 1rem;
}
.ai-free textarea:focus { outline: none; border-color: var(--erp); box-shadow: 0 0 0 3px rgba(46, 72, 230, .2); }
.ai-free-actions { margin-top: 10px; display: flex; justify-content: flex-end; align-items: center; gap: 12px; }

.ai-summary { align-self: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; animation: ai-msg .3s ease; }
.ai-summary h3 { font-size: 1rem; font-weight: 650; }
.ai-summary dl { margin: 10px 0 0; display: grid; gap: 6px; }
.ai-summary dl div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; }
.ai-summary dt { color: var(--ink-3); }
.ai-summary dd { margin: 0; font-weight: 500; }

@media (max-width: 900px) {
  .ai-promo-grid { grid-template-columns: 1fr; }
  .ai-preview { transform: none; max-width: 520px; }
}
@media (max-width: 560px) {
  .ai-fab { padding: 10px 16px 10px 12px; }
  .ai-fab-text small { display: none; }
  .ai-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; }
  .ai-shell { border-radius: 0; }
  .ai-enter { display: none; }
  .ai-promo-cta .button { width: 100%; }
}

/* Chat com IA: campo livre + sugestões */
.ai-msg p { margin: 0; }
.ai-msg p + p, .ai-msg p + ul, .ai-msg ul + p { margin-top: 8px; }
.ai-msg ul { margin: 6px 0 0; padding-left: 1.15em; }
.ai-msg li + li { margin-top: 3px; }
.ai-msg strong { font-weight: 650; }
.ai-options:empty { display: none; }
.ai-option:disabled { opacity: .5; cursor: default; }
.ai-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 22px; background: var(--surface);
  padding: 5px 5px 5px 16px;
}
.ai-input-row:focus-within { border-color: var(--erp); box-shadow: 0 0 0 3px rgba(46, 72, 230, .2); }
.ai-input-row[hidden] { display: none; }
.ai-input-row textarea {
  flex: 1; min-width: 0; border: 0; resize: none; background: transparent;
  font-size: 1rem; line-height: 1.4; padding: 8px 0; max-height: 140px;
}
.ai-input-row textarea:focus { outline: none; }
.ai-send-btn {
  flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; background: var(--erp); color: #fff;
}
.ai-send-btn:hover { background: #2238c4; }
.ai-send-btn:disabled { background: var(--line-strong); cursor: default; }
.ai-send-btn svg { width: 20px; height: 20px; }
.ai-retry {
  display: block; margin-top: 10px; background: none; border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 6px 14px; cursor: pointer; font-weight: 600;
}
.ai-retry:hover { border-color: var(--ink); }
.ai-summary p { margin-top: 6px; color: var(--ink-2); }
.ai-composer .ai-done { align-self: flex-end; }

/* Campo-armadilha contra robôs no cadastro de empresas */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Tabelas dentro dos artigos */
.table-wrap { overflow-x: auto; margin-top: 1.2em; border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.975rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prose thead th { background: var(--paper); font-weight: 650; color: var(--ink); white-space: nowrap; }
.prose tbody th { font-weight: 650; color: var(--ink); white-space: nowrap; }
.prose tbody tr:last-child > * { border-bottom: 0; }
.prose td { color: var(--ink-2); }
.prose a { color: var(--erp-text); text-underline-offset: 3px; }
.callout .button { color: var(--ink); }

/* =========================================================
   Painel administrativo (/admin)
   ========================================================= */
body.adm { background: var(--paper); }
.adm-head { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.adm-head-inner { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 8px; padding-bottom: 8px; }
.adm-tabs { display: flex; gap: 4px; }
.adm-tabs a { text-decoration: none; padding: 8px 14px; border-radius: var(--radius-s); color: var(--ink-2); font-weight: 500; }
.adm-tabs a span { font-variant-numeric: tabular-nums; color: var(--ink-3); font-size: 0.85rem; margin-left: 4px; }
.adm-tabs a:hover { background: var(--paper); color: var(--ink); }
.adm-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.adm-tabs a[aria-current="page"] span { color: #c3c7dc; }
.adm-site { margin-left: auto; color: var(--ink-2); font-size: 0.95rem; }
.adm-main { padding-top: 32px; padding-bottom: 64px; }
.adm-title { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; }
.adm-title h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: -0.02em; }
.adm-title p { color: var(--ink-2); margin-top: 4px; }
.adm-filtros { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.adm-filtros input, .adm-filtros select {
  min-height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-s); background: var(--surface); font-size: 0.95rem;
}
.adm-filtros input { flex: 1 1 320px; min-width: 0; }
.adm-table-wrap { margin-top: 20px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.adm-table th, .adm-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.adm-table thead th { background: var(--paper); font-weight: 600; color: var(--ink-2); font-size: 0.875rem; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #fafbfd; }
.adm-table a { color: var(--erp-text); }
.adm-nowrap { white-space: nowrap; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.adm-interesse { max-width: 420px; color: var(--ink-2); }
.adm-desc { max-width: 460px; color: var(--ink-2); }
.adm-muted { color: var(--ink-3); font-size: 0.875rem; }
.adm-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line-strong); font-size: 0.8rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.adm-badge.ok { background: rgba(15, 138, 126, .12); border-color: transparent; color: var(--ecom-text); }
.adm-vazio { margin-top: 24px; padding: 40px 24px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius-m); }
.adm-lead { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.adm-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; }
.adm-card h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.adm-card h2 { font-size: 1.05rem; font-weight: 650; margin: 24px 0 8px; }
.adm-conversa h2 { margin-top: 0; }
.adm-conversa { display: flex; flex-direction: column; gap: 10px; background: var(--paper); }
.adm-conversa .ai-msg { white-space: pre-wrap; }
.adm-dl { margin: 16px 0 0; display: grid; gap: 10px; }
.adm-dl div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 8px; }
.adm-dl dt { color: var(--ink-3); }
.adm-dl dd { margin: 0; overflow-wrap: anywhere; }
.adm-login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.adm-login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 32px; display: grid; gap: 16px; }
.adm-login-card h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.adm-login-card .brand-mark { width: 28px; height: 28px; }
.adm-erro { color: var(--crm-text); font-weight: 500; background: rgba(210, 63, 99, .08); padding: 10px 12px; border-radius: var(--radius-s); }
@media (max-width: 820px) {
  .adm-lead { grid-template-columns: 1fr; }
  .adm-site { margin-left: 0; }
}
.ai-legal a, .form-actions small a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Funil de CRM (cor da categoria CRM) */
.cycle-crm li.loop { background: rgba(210, 63, 99, .09); color: var(--crm-text); }
.cycle-crm li.loop::before { background: var(--crm); }
/* Link para o guia dentro do cartão de cada sigla */
.acronym .acronym-guide { font-size: 0.925rem; color: var(--ink-2); text-underline-offset: 3px; }
.acronym .acronym-guide:hover { color: var(--cat-text); }

/* Aviso de cookies (LGPD) */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 45;
  max-width: 720px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 16px 18px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-m);
  box-shadow: 0 18px 50px -18px rgba(22, 26, 51, .45);
}
.cookie-bar p { flex: 1 1 320px; font-size: 0.925rem; color: var(--ink-2); line-height: 1.45; }
.cookie-bar a { color: var(--erp-text); }
.cookie-actions { display: flex; gap: 8px; margin-left: auto; }
html.has-cookie-bar .ai-fab { bottom: calc(max(16px, env(safe-area-inset-bottom)) + var(--cookie-bar-h, 96px)); }
@media (max-width: 560px) {
  .cookie-bar { left: 8px; right: 8px; bottom: 8px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .button { flex: 1; }
  html.has-cookie-bar { --cookie-bar-h: 150px; }
}

/* =========================================================
   Painel: estatísticas
   ========================================================= */
.est-periodo { display: flex; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 3px; }
.est-periodo a { text-decoration: none; padding: 6px 12px; border-radius: 4px; font-size: 0.9rem; color: var(--ink-2); font-weight: 500; }
.est-periodo a:hover { color: var(--ink); background: var(--paper); }
.est-periodo a[aria-current="page"] { background: var(--ink); color: #fff; }
.est-tiles { margin-top: 24px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.est-tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; }
.est-tile span { color: var(--ink-2); font-size: 0.9rem; font-weight: 500; }
.est-tile strong { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.est-tile small { color: var(--ink-3); font-size: 0.825rem; }
.est-card { margin-top: 16px; }
.est-card h2 { margin: 0 0 4px; font-size: 1.1rem; font-weight: 650; }
.est-card > .adm-muted { margin-bottom: 12px; }
.est-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.est-grid2 .est-card { margin-top: 16px; }
.est-chart { position: relative; margin-top: 12px; }
.est-svg { width: 100%; height: auto; display: block; overflow: visible; }
.est-grid { stroke: var(--line); stroke-width: 1; }
.est-base { stroke: var(--line-strong); stroke-width: 1; }
.est-eixo { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.est-bar { fill: var(--erp); }
.est-hit { fill: transparent; }
.est-col.on .est-hit { fill: rgba(46, 72, 230, .06); }
.est-col.on .est-bar { fill: #2238c4; }
.est-tip {
  position: absolute; pointer-events: none; z-index: 2; white-space: nowrap;
  background: var(--ink); color: #fff; font-size: 0.85rem; padding: 6px 10px; border-radius: 6px;
  box-shadow: 0 8px 20px -8px rgba(22, 26, 51, .5);
}
.est-tabela { margin-top: 12px; }
.est-tabela summary { cursor: pointer; color: var(--erp-text); font-size: 0.9rem; font-weight: 500; }
.est-bars { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.est-bar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 0.925rem; margin-bottom: 5px; }
.est-bar-head span { color: var(--ink); overflow-wrap: anywhere; }
.est-bar-head b { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.est-bar-head em { font-style: normal; font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.est-track { height: 10px; background: var(--paper); border-radius: 5px; overflow: hidden; }
.est-track i { display: block; height: 100%; background: var(--erp); border-radius: 0 4px 4px 0; }
.est-rank th[scope="row"] { font-weight: 500; }
.est-rank .est-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.est-rank thead th:nth-child(2), .est-rank thead th:nth-child(4), .est-rank thead th:nth-child(5) { text-align: right; }
.est-col-bar { width: 34%; min-width: 120px; vertical-align: middle !important; }
@media (max-width: 1020px) { .est-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) { .est-grid2 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .est-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .est-col-bar { display: none; } }

/* Link "Preferências de cookies" (botão com aparência de link) */
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.link-button:hover { color: var(--ink); text-decoration: underline; }

/* "Continue lendo": guias relacionados no fim de cada artigo */
.related { margin-top: 2.6em; padding-top: 1.6em; border-top: 1px solid var(--line); font-family: var(--sans); }
.related h2 { margin: 0 0 14px; font-size: 1.25rem; }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.related li { margin: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); display: flex; flex-direction: column; gap: 2px; }
.related li a { font-weight: 650; font-size: 1.05rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.related li a:hover { text-decoration: underline; text-underline-offset: 3px; }
.related li span { color: var(--ink-3); font-size: 0.925rem; line-height: 1.45; }
.related p { margin-top: 14px; font-size: 0.975rem; }

/* Glossário dentro dos artigos */
.prose .glossario { margin: 1.2em 0 0; display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); border-top: 1px solid var(--line); font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
.prose .glossario dt, .prose .glossario dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.prose .glossario dt { font-weight: 650; color: var(--ink); padding-right: 16px; }
.prose .glossario dd { color: var(--ink-2); }
@media (max-width: 560px) {
  .prose .glossario { grid-template-columns: 1fr; }
  .prose .glossario dt { border-bottom: 0; padding-bottom: 0; }
  .prose .glossario dd { padding-top: 4px; }
}
