/* =============================================================================
   FULL — Estilo de Artigo do Blog
   Escopo: .elementor-widget-theme-post-content (widget Post Content do Elementor)
   Como subir: Elementor → Configurações do site → CSS personalizado  (ou tema filho)
   Tokens reaproveitados do WP Fixer (Inter, #FFD700, cards 10px). Zero mudança no HTML.
   Pré-requisito: a fonte Inter precisa estar carregada (Elementor → Fontes globais,
   ou já é a fonte do seu body). O ícone de link externo e o acordeão são CSS puro.

   OBS sobre o TL;DR: hoje o pipe emite o TL;DR como <p> entre comentários
   <!-- TL;DR START/END -->. CSS não consegue mirar comentário. Para virar o card
   destacado (.cie-tldr abaixo), o pipe precisa envolver o bloco num
   <aside class="cie-tldr">...</aside>. Sem isso, o TL;DR renderiza como parágrafo normal.
   ============================================================================= */

.elementor-widget-theme-post-content{
  --f-text:#1a1a2e; --f-muted:#667085; --f-light:#98a2b3;
  --f-border:#e2e8f0; --f-bg:#f8fafc; --f-white:#fff;
  --f-accent:#FFD700; --f-accent-ink:#7a5c00; --f-link:#1f6feb;
  --f-radius:10px; --f-radius-sm:6px;
  --f-shadow:0 1px 3px rgba(0,0,0,.07),0 1px 2px rgba(0,0,0,.04);

  font-family:'Inter',system-ui,-apple-system,sans-serif;
  color:var(--f-text);
  font-size:17px;
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
  counter-reset:step;
}

/* ---- headings ---- */
.elementor-widget-theme-post-content h2{
  font-size:1.6rem;line-height:1.25;font-weight:700;letter-spacing:-.01em;
  margin:64px 0 16px;color:var(--f-text);scroll-margin-top:24px;
}
.elementor-widget-theme-post-content h3{
  font-size:1.22rem;line-height:1.3;font-weight:700;margin:32px 0 12px;color:var(--f-text);
}

/* ---- passos: número em círculo (aplique class="cie-step" no h3 do passo) ---- */
.elementor-widget-theme-post-content h3.cie-step{
  counter-increment:step;position:relative;padding-left:56px;min-height:40px;
  display:flex;align-items:center;margin-top:40px;
}
.elementor-widget-theme-post-content h3.cie-step::before{
  content:counter(step);position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:40px;height:40px;border-radius:50%;background:var(--cie-c-step,var(--f-accent));
  color:#1a1a2e;font-weight:800;font-size:18px;
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 2px 6px color-mix(in srgb,var(--cie-c-step,var(--f-accent)) 40%,transparent);
}

/* ---- callout de atenção (envolva o aviso em <div class="cie-warning">) ---- */
.elementor-widget-theme-post-content .cie-warning{
  display:flex;gap:12px;
  background:var(--cie-c-warning-bg,#fffaf0);
  border:1px solid var(--cie-c-warning-border,#fde4b8);
  border-left:4px solid var(--cie-c-warning,#f59e0b);
  border-radius:var(--f-radius);padding:14px 18px;margin:24px 0;font-size:15.5px;
  color:var(--cie-c-warning-ink,#7a4f08);
}
.elementor-widget-theme-post-content .cie-warning::before{content:"⚠️";font-size:18px;flex-shrink:0;line-height:1.5;}
.elementor-widget-theme-post-content .cie-warning p{margin:0;}
.elementor-widget-theme-post-content .cie-warning a{color:var(--cie-c-warning-ink,#7a4f08);}

/* ---- texto ---- */
.elementor-widget-theme-post-content p{margin:0 0 20px;}
.elementor-widget-theme-post-content strong{font-weight:700;color:var(--f-text);}
.elementor-widget-theme-post-content hr{border:none;border-top:1px solid var(--f-border);margin:40px 0;}
.elementor-widget-theme-post-content ul:not(.cie-toc ul),
.elementor-widget-theme-post-content ol{margin:0 0 20px;padding-left:1.3em;}
.elementor-widget-theme-post-content li{margin:0 0 8px;}

/* ---- links: interno = sublinhado fino / externo = ganha ícone ↗ ---- */
.elementor-widget-theme-post-content p a,
.elementor-widget-theme-post-content li a{
  color:var(--f-link);text-decoration:none;font-weight:500;
  border-bottom:1px solid color-mix(in srgb,var(--f-link) 35%,transparent);
  transition:border-color .15s;
}
.elementor-widget-theme-post-content p a:hover,
.elementor-widget-theme-post-content li a:hover{border-bottom-color:var(--f-link);}
.elementor-widget-theme-post-content a[target="_blank"]::after{
  content:"";display:inline-block;width:.62em;height:.62em;margin-left:3px;vertical-align:baseline;
  background:currentColor;opacity:.7;
  -webkit-mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat;
          mask:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M14 4h6v6M20 4l-9 9M18 13v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h5" fill="none" stroke="black" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/></svg>') center/contain no-repeat;
}

/* ---- TOC acordeão (.cie-toc gerado pelo pipe) ---- */
.elementor-widget-theme-post-content .cie-toc{
  border:1px solid var(--f-border);border-radius:var(--f-radius);
  background:var(--f-white);box-shadow:var(--f-shadow);margin:0 0 36px;overflow:hidden;
}
.elementor-widget-theme-post-content .cie-toc>summary{
  list-style:none;cursor:pointer;padding:16px 20px;font-weight:700;font-size:15px;color:var(--f-text);
  display:flex;align-items:center;justify-content:space-between;
}
.elementor-widget-theme-post-content .cie-toc>summary::-webkit-details-marker{display:none;}
.elementor-widget-theme-post-content .cie-toc>summary::after{
  content:"";width:10px;height:10px;border-right:2px solid var(--f-muted);border-bottom:2px solid var(--f-muted);
  transform:rotate(45deg);transition:transform .2s ease;margin-left:12px;flex-shrink:0;
}
.elementor-widget-theme-post-content .cie-toc[open]>summary::after{transform:rotate(-135deg);}
.elementor-widget-theme-post-content .cie-toc[open]>summary{border-bottom:1px solid var(--f-border);}
.elementor-widget-theme-post-content .cie-toc nav{padding:12px 20px 18px;}
.elementor-widget-theme-post-content .cie-toc ul{margin:0;padding:0;list-style:none;counter-reset:toc;}
.elementor-widget-theme-post-content .cie-toc li{counter-increment:toc;margin:0;}
.elementor-widget-theme-post-content .cie-toc a{
  display:flex;gap:10px;padding:7px 0;color:var(--f-muted);text-decoration:none;
  font-size:15px;line-height:1.4;font-weight:500;border:none;
}
.elementor-widget-theme-post-content .cie-toc a::before{
  content:counter(toc,decimal-leading-zero);color:var(--f-light);
  font-variant-numeric:tabular-nums;font-weight:600;flex-shrink:0;
}
.elementor-widget-theme-post-content .cie-toc a:hover{color:var(--f-link);}

/* ---- TL;DR callout (precisa do pipe envolver em <aside class="cie-tldr">) ---- */
.elementor-widget-theme-post-content .cie-tldr{
  background:var(--cie-c-tldr-bg,#fffdf2);border:1px solid var(--cie-c-tldr-border,#f3e8a8);
  border-left:4px solid var(--cie-c-tldr,var(--f-accent));
  border-radius:var(--f-radius);padding:18px 22px;margin:0 0 32px;
}
.elementor-widget-theme-post-content .cie-tldr>p:last-child{margin-bottom:0;}

/* ---- tabelas ---- */
.elementor-widget-theme-post-content table{
  width:100%;border-collapse:separate;border-spacing:0;margin:24px 0 28px;font-size:15px;
  border:1px solid var(--f-border);border-radius:var(--f-radius);
}
.elementor-widget-theme-post-content caption{
  caption-side:top;text-align:left;font-size:13px;color:var(--f-muted);margin-bottom:10px;font-weight:600;
}
.elementor-widget-theme-post-content thead th{
  background:var(--f-bg);font-weight:700;text-align:left;font-size:13px;
  text-transform:uppercase;letter-spacing:.03em;color:var(--f-muted);
}
/* divisórias uniformes (1px): reset do tema + só bottom/right; última coluna e
   última linha sem borda pra não dobrar com a borda externa do table */
.elementor-widget-theme-post-content th,
.elementor-widget-theme-post-content td{
  padding:11px 16px;
  border:0;
  border-bottom:1px solid var(--f-border);
  border-right:1px solid var(--f-border);
}
.elementor-widget-theme-post-content th:last-child,
.elementor-widget-theme-post-content td:last-child{border-right:none;}
.elementor-widget-theme-post-content tbody tr:last-child th,
.elementor-widget-theme-post-content tbody tr:last-child td{border-bottom:none;}
.elementor-widget-theme-post-content tbody th{font-weight:600;color:var(--f-text);}
/* zebra sutil: background nas células (respeita o radius dos cantos) */
.elementor-widget-theme-post-content tbody tr:nth-child(even) th,
.elementor-widget-theme-post-content tbody tr:nth-child(even) td{background:rgba(0,0,0,.018);}
/* cantos arredondados via as células dos cantos (robusto — não usa overflow:hidden,
   que deixava o topo reto por causa do fundo do cabeçalho) */
.elementor-widget-theme-post-content thead tr:first-child th:first-child{border-top-left-radius:var(--f-radius);}
.elementor-widget-theme-post-content thead tr:first-child th:last-child{border-top-right-radius:var(--f-radius);}
.elementor-widget-theme-post-content tbody tr:last-child th:first-child,
.elementor-widget-theme-post-content tbody tr:last-child td:first-child{border-bottom-left-radius:var(--f-radius);}
.elementor-widget-theme-post-content tbody tr:last-child td:last-child,
.elementor-widget-theme-post-content tbody tr:last-child th:last-child{border-bottom-right-radius:var(--f-radius);}

/* ---- imagens / legendas ---- */
.elementor-widget-theme-post-content figure{margin:28px 0;}
.elementor-widget-theme-post-content figure img{border-radius:var(--f-radius);display:block;}
.elementor-widget-theme-post-content figcaption,
.elementor-widget-theme-post-content .wp-caption-text{
  font-size:13px;color:var(--f-muted);margin-top:8px;text-align:center;font-style:italic;
}

/* ---- FAQ: <details> sem classe (não toca no .cie-toc) ---- */
.elementor-widget-theme-post-content details:not(.cie-toc){
  border:1px solid var(--f-border);border-radius:var(--f-radius);
  background:var(--f-white);box-shadow:var(--f-shadow);margin:0 0 12px;overflow:hidden;
}
/* respiro maior entre o título do FAQ e o primeiro card */
.elementor-widget-theme-post-content h2 + details:not(.cie-toc){margin-top:28px;}
.elementor-widget-theme-post-content details:not(.cie-toc)>summary{
  list-style:none;cursor:pointer;padding:18px 22px;font-weight:600;font-size:16px;color:var(--f-text);
  display:flex;align-items:center;justify-content:space-between;gap:16px;
}
.elementor-widget-theme-post-content details:not(.cie-toc)>summary::-webkit-details-marker{display:none;}
.elementor-widget-theme-post-content details:not(.cie-toc)>summary::after{
  content:"+";font-size:22px;font-weight:400;color:var(--f-light);line-height:1;flex-shrink:0;transition:transform .2s;
}
.elementor-widget-theme-post-content details:not(.cie-toc)[open]>summary::after{transform:rotate(45deg);}
.elementor-widget-theme-post-content details:not(.cie-toc)[open]>summary{border-bottom:1px solid var(--f-border);}
.elementor-widget-theme-post-content details:not(.cie-toc)>p{
  margin:0;padding:16px 22px 20px;color:var(--f-muted);font-size:15.5px;
}

/* ---- responsivo ---- */
@media(max-width:600px){
  .elementor-widget-theme-post-content{font-size:16px;}
  .elementor-widget-theme-post-content h2{font-size:1.35rem;margin-top:36px;}
}

/* =============================================================================
   TOC STICKY LATERAL  (componente da coluna lateral — NÃO fica no post-content)
   Markup: <nav class="toc-sticky"> dentro de um widget HTML na coluna lateral.
   A lista é populada por JS clonando o .cie-toc inline do artigo.
   ============================================================================= */
.toc-sticky{
  position:sticky;top:24px;border:1px solid #e2e8f0;border-radius:12px;padding:18px 20px;background:#fff;
  font-family:'Inter',system-ui,-apple-system,sans-serif;
}
/* tempo de leitura: faltante (destaque) + total (referência) */
.toc-sticky .toc-time{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:9px;}
.toc-sticky .toc-time-left{font-size:13px;font-weight:700;color:#1a1a2e;white-space:nowrap;}
.toc-sticky .toc-time-left .clock{color:#caa500;}
.toc-sticky .toc-time-total{font-size:12px;font-weight:500;color:#98a2b3;white-space:nowrap;}
.toc-sticky .toc-time.done .toc-time-left{color:#16a34a;}
/* barra de progresso */
.toc-sticky .toc-progress{height:3px;background:#f1f5f9;border-radius:3px;margin-bottom:16px;overflow:hidden;}
.toc-sticky .toc-progress span{display:block;height:100%;background:var(--cie-c-toc,#FFD700);width:0;transition:width .1s;}
/* título + lista */
.toc-sticky .toc-sticky-title{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.06em;color:#98a2b3;margin:0 0 14px;}
.toc-sticky ol{list-style:none;margin:0;padding:0;counter-reset:stoc;}
.toc-sticky li{counter-increment:stoc;margin:0;}
.toc-sticky a{display:flex;gap:11px;align-items:center;box-sizing:border-box;min-height:58px;padding:9px 12px;margin:2px 0;border-radius:8px;
  color:#667085;text-decoration:none;font-size:13.5px;line-height:1.4;font-weight:500;
  border-left:2px solid transparent;transition:background .15s,color .15s;}
.toc-sticky a::before{content:counter(stoc,decimal-leading-zero);color:#cbd5e1;font-variant-numeric:tabular-nums;
  font-weight:600;font-size:12px;flex-shrink:0;}
.toc-sticky a:hover{background:#f8fafc;color:#1a1a2e;}
.toc-sticky a.active{background:var(--cie-c-toc-bg,#fffdf2);color:#1a1a2e;border-left-color:var(--cie-c-toc,#FFD700);}
.toc-sticky a.active::before{color:#caa500;}

/* no mobile o TOC sticky some — o TOC inline do artigo assume */
@media(max-width:900px){ .toc-sticky{display:none;} }

/* =============================================================================
   HEADING ANCHOR — botão "copiar link" ao lado de cada H2
   (markup criado por JS; ver full-heading-anchors.html)
   ============================================================================= */
/* TODAS as sub-regras escopadas sob `...post-content h2` (mesma especificidade do
   seletor-base) — senao o reset de SVG do tema/Elementor (`...post-content h2 svg`)
   colapsa o icone pra width:0, e o seletor-base (mais especifico) engole o :hover. */
.elementor-widget-theme-post-content h2 .full-anchor{
  display:inline-flex;align-items:center;justify-content:center;position:relative;
  width:30px;height:30px;margin-left:8px;vertical-align:middle;
  border:0;background:transparent;cursor:pointer;border-radius:6px;color:#98a2b3;
  opacity:1;transition:color .15s,background .15s;-webkit-tap-highlight-color:transparent;
}
.elementor-widget-theme-post-content h2 .full-anchor:hover{color:#1a1a2e;background:#f1f5f9;}
.elementor-widget-theme-post-content h2 .full-anchor:focus-visible{outline:2px solid #FFD700;outline-offset:2px;}
.elementor-widget-theme-post-content h2 .full-anchor svg{
  width:17px;height:17px;flex:0 0 auto;pointer-events:none;color:inherit;
}
.elementor-widget-theme-post-content h2 .full-anchor.copied{color:#16a34a;}
.elementor-widget-theme-post-content h2 .full-anchor.copied::after{
  content:"Link copiado!";position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);
  background:#1a1a2e;color:#fff;font-size:12px;font-weight:600;white-space:nowrap;line-height:1;letter-spacing:0;
  padding:5px 9px;border-radius:6px;font-family:'Inter',system-ui,sans-serif;pointer-events:none;
}
/* mobile / touch: sem hover, deixa o ícone discreto mas visível */


/* =============================================================================
   CALLOUTS RICOS — base .cie-callout + variações por tipo (só trocam cor + ícone)
   Markup do pipe: <aside class="cie-callout cie-veredito"> com <h2> + <ul>/<p>
   Para um novo tipo, crie .cie-XXX definindo as 6 variáveis --cl-*.
   ============================================================================= */
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc){
  margin:40px 0;padding:24px 26px;border:1px solid var(--cl-border,#e2e8f0);
  border-left:4px solid var(--cl-accent,#94a3b8);border-radius:14px;
  background:var(--cl-bg,#fff);box-shadow:0 1px 3px rgba(0,0,0,.04);
}
/* título do card: vira "header" do callout (neutraliza o H2 gigante padrão) */
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>h2,
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>h3{
  display:flex;align-items:center;gap:11px;margin:0 0 16px;padding:0;
  font-size:1.18rem;line-height:1.3;font-weight:700;letter-spacing:-.01em;color:var(--cl-ink,#1a1a2e);
}
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>h2::before,
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>h3::before{
  content:"";flex-shrink:0;width:24px;height:24px;background:var(--cl-accent,#94a3b8);
  -webkit-mask:var(--cl-icon) center/contain no-repeat;mask:var(--cl-icon) center/contain no-repeat;
}
/* lista do callout: bullets quadradinhos na cor do tipo */
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>ul{margin:0;padding:0;list-style:none;display:grid;gap:12px;}
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>ul>li{position:relative;padding-left:24px;line-height:1.6;}
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>ul>li::before{
  content:"";position:absolute;left:2px;top:.5em;width:8px;height:8px;border-radius:3px;background:var(--cl-accent,#94a3b8);
}
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>ul>li strong{color:var(--cl-strong,#1a1a2e);}
/* parágrafos do callout */
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>p{margin:0 0 14px;}
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>ul+p{margin-top:16px;}
.elementor-widget-theme-post-content .cie-callout:not(.cie-toc)>*:last-child{margin-bottom:0;}

/* ---- RESUMO TÉCNICO (veredito) — índigo: "conclusão analítica" ---- */

/* blindagem: se o TOC cair dentro de um callout (bug do pipe), não herda o visual */
.elementor-widget-theme-post-content .cie-callout .cie-toc{background:#fff;}
.elementor-widget-theme-post-content .cie-callout .cie-toc li::before{content:none;}
.elementor-widget-theme-post-content .cie-veredito{
  --cl-bg:var(--cie-c-veredito-bg,#f5f9ff);--cl-border:var(--cie-c-veredito-border,#dbeafe);--cl-accent:var(--cie-c-veredito,#2563eb);--cl-strong:var(--cie-c-veredito-strong,#1e40af);--cl-ink:var(--cie-c-veredito-ink,#172554);
  --cl-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M22%2011.08V12a10%2010%200%201%201-5.93-9.14%27/%3E%3Cpolyline%20points%3D%2722%204%2012%2014.01%209%2011.01%27/%3E%3C/svg%3E");
}
/* ---- DECISÃO RÁPIDA — verde-esmeralda: "siga por aqui" ---- */
.elementor-widget-theme-post-content .cie-decisao{
  --cl-bg:var(--cie-c-decisao-bg,#f3fcf8);--cl-border:var(--cie-c-decisao-border,#cceee0);--cl-accent:var(--cie-c-decisao,#059669);--cl-strong:var(--cie-c-decisao-strong,#065f46);--cl-ink:var(--cie-c-decisao-ink,#064e3b);
  --cl-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cline%20x1%3D%276%27%20y1%3D%273%27%20x2%3D%276%27%20y2%3D%2715%27/%3E%3Ccircle%20cx%3D%2718%27%20cy%3D%276%27%20r%3D%273%27/%3E%3Ccircle%20cx%3D%276%27%20cy%3D%2718%27%20r%3D%273%27/%3E%3Cpath%20d%3D%27M18%209a9%209%200%200%201-9%209%27/%3E%3C/svg%3E");
}

/* decisão rápida: mais respiro entre título→intro e intro→primeiro bullet */
.elementor-widget-theme-post-content .cie-decisao:not(.cie-toc)>h2{margin-bottom:22px;}
.elementor-widget-theme-post-content .cie-decisao:not(.cie-toc)>p:first-of-type{margin-bottom:22px;}

/* =============================================================================
   METODOLOGIA (cie-metodologia) — âmbar: "como medimos" (cobre o 3o callout do pipe)
   ============================================================================= */
.elementor-widget-theme-post-content .cie-metodologia{
  --cl-bg:var(--cie-c-metodologia-bg,#fffbf2);--cl-border:var(--cie-c-metodologia-border,#fde9c8);--cl-accent:var(--cie-c-metodologia,#d97706);--cl-strong:var(--cie-c-metodologia-strong,#92400e);--cl-ink:var(--cie-c-metodologia-ink,#7c3a06);
  --cl-icon:url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%20stroke%3D%27black%27%20stroke-width%3D%272%27%20stroke-linecap%3D%27round%27%20stroke-linejoin%3D%27round%27%3E%3Cpath%20d%3D%27M9%202h6M10%202v6.5L5%2018a2%202%200%200%200%202%203h10a2%202%200%200%200%202-3L14%208.5V2%27/%3E%3C/svg%3E");
}
