/* ============================================================
   IAtualidades — main.css
   Folha única do site. Duas camadas:

   PARTE A — Design System (padrão "PRO"): tokens, temas claro/
             escuro, header, seções, cards, rodapé.
   PARTE B — Camada de artigo: sumário, prompts, callouts,
             comparativos, FAQ e demais componentes editoriais,
             reescritos sobre os tokens da Parte A.

   Regra de ouro: nenhuma cor literal dentro de componente.
   Tudo sai de token. Trocou o token, trocou o site inteiro.
   ============================================================ */

/* ============================================================
   PARTE A — DESIGN SYSTEM
   ============================================================ */

:root {
  /* ---- Tipografia ---- */
  --font-display: 'Sora', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* ---- Cores de marca ---- */
  --brand-1: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #22d3ee;
  --gradient-brand: linear-gradient(100deg, var(--brand-1), var(--brand-2) 45%, var(--brand-3-grad, var(--brand-3)));
  /* Gradiente para superfícies com texto branco: sem o trecho ciano (contraste AA) */
  --gradient-btn: linear-gradient(100deg, #4f46e5, #7c3aed);

  /* ---- Forma e movimento ---- */
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* ============================================================
     ESCALA FLUIDA
     ------------------------------------------------------------
     O site não "tem uma versão mobile": ele acompanha a tela de
     forma contínua. Cada valor abaixo cresce junto com a largura
     da janela entre um piso e um teto, com clamp().

     Por que isso importa: com valores fixos, o layout fica igual
     de 520px a 1023px e depois SALTA. O leitor de um tablet ou de
     um celular grande recebe uma tela pensada para outro aparelho.
     Com clamp(), cada tamanho de tela recebe a medida certa.

     Os breakpoints continuam existindo — mas só para mudanças de
     ESTRUTURA (grade que empilha, menu que vira hambúrguer), não
     para ajuste de tamanho.
     ============================================================ */

  /* Altura do cabeçalho: 56px no celular, 68px no desktop */
  --header-h: clamp(56px, 5vw, 68px);

  /* Respiro vertical das seções: 56px no celular, 92px no desktop */
  --space-secao: clamp(56px, 8vw, 92px);

  /* Respiro interno de cards */
  --space-card: clamp(18px, 2.2vw, 26px);

  /* Distância entre itens de grade */
  --gap-grade: clamp(12px, 1.6vw, 18px);

  /* Corpo de texto do artigo: 16px no celular, 17.6px no desktop.
     Passar disso cansa; menos que isso obriga a aproximar o rosto. */
  --texto-corpo: clamp(1rem, .96rem + .35vw, 1.1rem);

  /* Largura útil do conteúdo. Cresce em monitor grande, mas nunca
     ao ponto de a linha ficar longa demais para acompanhar. */
  --largura-site: min(92%, clamp(1120px, 82vw, 1360px));
  --largura-leitura: min(92%, 820px);

  /* Artigo: um pouco mais estreito que o site, porque a coluna de
     texto é limitada a 800px de qualquer forma — o que cresce é a
     distância até o sumário, e passar disso desgruda os dois. */
  --largura-artigo: min(92%, clamp(1040px, 78vw, 1200px));
}

/* ---------- Temas ---------- */
[data-theme="dark"] {
  --bg: #07080f;
  --bg-alt: #0c0e1a;
  --surface: #11142299;
  --surface-solid: #121527;
  --border: #ffffff14;
  --border-strong: #ffffff26;
  --text: #eef0ff;
  --text-2: #a6abc8;
  --text-3: #8188ac;
  --accent-text: #22d3ee;
  --shadow: 0 20px 50px -12px rgb(0 0 0 / .55);
  --glow: 0 0 60px -12px #6366f180;
  --chip-bg: #ffffff0d;
  --code-bg: #05060c;
  --code-text: #9fe8ff;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f8fd;
  --bg-alt: #eef0fa;
  --surface: #ffffffcc;
  --surface-solid: #ffffff;
  --border: #0f174a14;
  --border-strong: #0f174a26;
  --text: #12142b;
  --text-2: #4b5170;
  --text-3: #5f6688;
  --accent-text: #0e7490;
  --brand-3-grad: #0891b2; /* ciano mais escuro: legível em títulos sobre fundo claro */
  --shadow: 0 20px 45px -18px rgb(30 35 90 / .18);
  --glow: 0 0 60px -18px #6366f14d;
  --chip-bg: #0f174a08;
  --code-bg: #12142b;
  --code-text: #a5f3fc;
  color-scheme: light;
}

/* ---------- Tema por categoria ----------
   Define só --accent. Todo componente editorial (barra do
   sumário, número do prompt, tags, links do corpo) lê daqui.
   Dois valores por categoria: o claro precisa ser mais escuro
   para manter contraste AA sobre fundo branco.                */
[data-theme] { --accent: var(--brand-1); }

[data-theme="dark"] .tema-tecnologia,
[data-theme="dark"] .tema-gestao,
[data-theme="dark"] .tema-engenharia { --accent: #6366f1; }
[data-theme="dark"] .tema-juridico    { --accent: #8b5cf6; }
[data-theme="dark"] .tema-financas,
[data-theme="dark"] .tema-saude,
[data-theme="dark"] .tema-agro        { --accent: #10b981; }
[data-theme="dark"] .tema-rh          { --accent: #ec4899; }
[data-theme="dark"] .tema-educacao    { --accent: #22d3ee; }
[data-theme="dark"] .tema-arquitetura { --accent: #f59e0b; }

[data-theme="light"] .tema-tecnologia,
[data-theme="light"] .tema-gestao,
[data-theme="light"] .tema-engenharia { --accent: #4f46e5; }
[data-theme="light"] .tema-juridico    { --accent: #7c3aed; }
[data-theme="light"] .tema-financas,
[data-theme="light"] .tema-saude,
[data-theme="light"] .tema-agro        { --accent: #047857; }
[data-theme="light"] .tema-rh          { --accent: #be185d; }
[data-theme="light"] .tema-educacao    { --accent: #0e7490; }
[data-theme="light"] .tema-arquitetura { --accent: #b45309; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: inline-block; vertical-align: middle; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.02em; }

/* Foco visível global — obrigatório para navegação por teclado */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-1); }

.container { width: var(--largura-site); margin-inline: auto; }
.container--narrow { width: var(--largura-leitura); }

.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Skip link ---------- */
.skip-link {
  position: fixed; top: 10px; left: 10px;
  z-index: 1200;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--gradient-btn);
  color: #fff; font-weight: 600; font-size: .9rem;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Barra de progresso ---------- */
.progress-bar {
  position: fixed; inset: 0 auto auto 0;
  height: 3px; width: 0%;
  background: var(--gradient-brand);
  z-index: 1000;
  transition: width .1s linear;
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 900;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.header.is-scrolled { border-bottom-color: var(--border); }
.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 28px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.logo__bg { fill: #6366f1; }
.logo__text em { font-style: normal; color: var(--text-2); font-weight: 600; }
.logo:hover .logo__text em { color: var(--text); transition: color .3s; }

.nav { display: flex; align-items: center; gap: 4px; margin-inline: auto; }
.nav__link {
  padding: 8px 14px; border-radius: 99px;
  font-size: .92rem; font-weight: 500; color: var(--text-2);
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .25s, background .25s;
}
.nav__link:hover { color: var(--text); background: var(--chip-bg); }
.nav__link.is-active { color: var(--text); background: var(--chip-bg); }

.nav__more { position: relative; }
.nav__dropdown {
  position: absolute; top: calc(100% + 10px); left: 50%;
  translate: -50% 6px;
  min-width: 190px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  display: grid; gap: 2px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), translate .25s var(--ease);
}
.nav__more:hover .nav__dropdown,
.nav__more:focus-within .nav__dropdown { opacity: 1; pointer-events: auto; translate: -50% 0; }
.nav__dropdown a { padding: 9px 12px; border-radius: 8px; font-size: .9rem; color: var(--text-2); }
.nav__dropdown a:hover { background: var(--chip-bg); color: var(--text); }

.header__actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: color .25s, border-color .25s, background .25s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--chip-bg); }

[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon { display: none; }

.nav-burger { display: none; }

/* Menu mobile */
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 10px 4% 20px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}
.mobile-menu a { padding: 12px 6px; border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 500; }
.mobile-menu a:last-child { border: 0; }
.mobile-menu__cta { color: var(--accent-text) !important; font-weight: 700 !important; }
.mobile-menu.is-open { display: flex; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 99px;
  font-weight: 600; font-size: .95rem;
  transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--sm { padding: 9px 16px; font-size: .87rem; }
.btn--primary {
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 8px 24px -8px #6366f199;
}
.btn--primary:hover { box-shadow: 0 14px 30px -8px #6366f1b3; }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--brand-2); background: var(--chip-bg); }
.btn--copy {
  padding: 8px 14px; font-size: .84rem;
  border: 1px solid var(--border-strong); border-radius: 10px;
  color: var(--text-2);
}
.btn--copy:hover { color: var(--text); border-color: var(--accent-text); }
.btn--copy.is-copied { color: #10b981; border-color: #10b981; }

/* ---------- Chips / Badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 99px;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  font-size: .84rem; font-weight: 500; color: var(--text-2);
  transition: color .25s, border-color .25s, background .25s;
  cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip--active { background: var(--gradient-btn); color: #fff; border-color: transparent; }

.badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 99px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  background: var(--chip-bg); border: 1px solid var(--border);
  color: var(--text-2);
}
.badge--hot { background: #f59e0b1f; border-color: #f59e0b55; color: #b45309; }
[data-theme="dark"] .badge--hot { color: #f59e0b; }
.badge--new { background: #22d3ee1f; border-color: #22d3ee55; color: #0e7490; }
[data-theme="dark"] .badge--new { color: #22d3ee; }
.badge--free { background: #10b9811f; border-color: #10b98155; color: #047857; }
[data-theme="dark"] .badge--free { color: #10b981; }
.badge--pro { background: #8b5cf61f; border-color: #8b5cf655; color: #6d28d9; }
[data-theme="dark"] .badge--pro { color: #a78bfa; }
/* Badge que assume a cor da categoria — usado nos cards de artigo */
.badge--cat {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 34%, transparent);
  color: var(--accent);
}

/* ---------- Ícones (sprite SVG) ---------- */
.ic {
  width: 24px; height: 24px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic--sm { width: 15px; height: 15px; stroke-width: 2; }

/* ---------- Busca (overlay) ---------- */
.search-overlay {
  position: fixed; inset: 0; z-index: 950;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  display: none;
  flex-direction: column; align-items: center;
  padding-top: 18vh;
}
.search-overlay.is-open { display: flex; }
.search-overlay__box {
  width: min(640px, 90%);
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 6px 16px;
  box-shadow: var(--shadow), var(--glow);
}
.search-overlay__box input {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--text); font-size: 1.05rem; padding: 14px 0;
}
.search-overlay__close {
  font-family: var(--font-mono); font-size: .72rem;
  border: 1px solid var(--border-strong); border-radius: 6px;
  padding: 4px 8px; color: var(--text-3);
}
.search-overlay__hints {
  width: min(640px, 90%);
  margin-top: 16px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .85rem; color: var(--text-3);
}
/* Resultados da busca local */
.search-results {
  width: min(640px, 90%);
  margin-top: 14px;
  max-height: 46vh; overflow-y: auto;
  display: grid; gap: 6px;
}
.search-results a {
  display: block; padding: 12px 16px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s, transform .2s var(--ease), background .2s;
}
.search-results a:hover { border-color: var(--brand-2); }
/* Item apontado pelas setas: precisa se distinguir do hover, porque
   os dois podem estar ativos ao mesmo tempo (mouse parado + teclado). */
.search-results a.is-selected {
  border-color: var(--brand-2);
  background: color-mix(in srgb, var(--brand-2) 12%, var(--surface-solid));
  box-shadow: 0 0 0 1px var(--brand-2);
}
.search-results strong { display: block; font-size: .93rem; font-weight: 600; }
.search-results span { font-size: .8rem; color: var(--text-3); }
/* Trecho que casou com a busca */
.search-results mark {
  background: color-mix(in srgb, var(--accent-text) 26%, transparent);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}
.search-results__count {
  padding: 2px 4px 6px;
  font-size: .76rem; color: var(--text-3);
}
.search-results__count kbd {
  display: inline-block;
  padding: 1px 5px; margin: 0 1px;
  font-family: var(--font-mono); font-size: .72rem;
  background: var(--chip-bg);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
}
.search-results__empty {
  padding: 14px 4px; font-size: .9rem; line-height: 1.6;
  color: var(--text-3);
}
.search-results__empty strong { color: var(--text-2); }
.search-results__empty a { color: var(--accent-text); text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 72px) 0 80px;
  overflow: hidden;
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
.hero__orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: float 12s ease-in-out infinite;
}
.hero__orb--1 { width: 480px; height: 480px; background: #6366f1; top: -180px; left: -120px; }
.hero__orb--2 { width: 420px; height: 420px; background: #22d3ee; top: -80px; right: -160px; animation-delay: -6s; opacity: .3; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(34px) } }

.hero__inner { position: relative; text-align: center; }

.hero__badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 18px; border-radius: 99px;
  background: var(--chip-bg); border: 1px solid var(--border-strong);
  font-size: .85rem; font-weight: 500; color: var(--text-2);
  margin-bottom: 28px;
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 0 0 #22d3ee66;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 #22d3ee66 }
  70% { box-shadow: 0 0 0 12px transparent }
  100% { box-shadow: 0 0 0 0 transparent }
}

.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 4.6rem);
  font-weight: 800;
  margin-bottom: 22px;
}
.hero__rotator { display: inline-block; min-height: 1.2em; white-space: nowrap; }
.hero__word { display: inline-block; animation: wordIn .5s var(--ease); }
@keyframes wordIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}

.hero__subtitle {
  max-width: 640px; margin: 0 auto 36px;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--text-2);
}
.hero__subtitle strong { color: var(--text); }

.hero__search {
  display: flex; align-items: center; gap: 10px;
  width: min(620px, 100%);
  margin: 0 auto 18px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: 99px;
  padding: 8px 8px 8px 20px;
  box-shadow: var(--shadow);
  transition: border-color .3s, box-shadow .3s;
}
.hero__search:focus-within { border-color: var(--brand-2); box-shadow: var(--shadow), var(--glow); }
.hero__search svg { color: var(--text-3); flex-shrink: 0; }
.hero__search input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0;
  color: var(--text); font-size: 1rem;
}

.hero__quick {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  font-size: .85rem; color: var(--text-3);
  margin-bottom: 56px;
}

.hero__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 760px; margin: 0 auto;
  padding: 26px 12px;
  border-block: 1px solid var(--border);
}
.stat { text-align: center; }
.stat__num, .stat__plus {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { display: block; font-size: .82rem; color: var(--text-3); margin-top: 2px; }

/* ---------- Seções ---------- */
.section { padding: var(--space-secao) 0; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding: calc(var(--space-secao) * .65) 0; }
.section__head {
  text-align: center; max-width: 680px;
  margin: 0 auto clamp(32px, 4.5vw, 52px);
}
.section__tag {
  display: inline-block;
  font-family: var(--font-mono); font-size: .76rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 14px;
}
.section__head h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); font-weight: 800; margin-bottom: 14px; }
.section__head p { color: var(--text-2); font-size: 1.02rem; }
.section__cta { text-align: center; margin-top: 44px; }

/* ---------- Cards de categoria ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
  gap: var(--gap-grade);
}
.cat-card {
  position: relative;
  padding: var(--space-card);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
  overflow: hidden;
}
.cat-card::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 3px;
  background: var(--accent);
  opacity: 0; transition: opacity .3s;
}
.cat-card:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: var(--shadow); }
.cat-card:hover::before { opacity: 1; }
.cat-card__icon {
  display: inline-grid; place-items: center;
  width: 52px; height: 52px;
  color: var(--accent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 16px;
  transition: transform .35s var(--ease);
}
.cat-card__icon .ic { width: 26px; height: 26px; stroke-width: 1.7; }

.cat-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.cat-card p { font-size: .89rem; color: var(--text-2); margin-bottom: 16px; }
.cat-card__count { font-size: .84rem; font-weight: 600; color: var(--accent); }

/* ---------- Cards de ferramenta ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
  gap: var(--gap-grade);
}
.tool-card {
  padding: var(--space-card);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.tool-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.tool-card__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.tool-card__logo {
  display: inline-grid; place-items: center;
  min-width: 46px; height: 46px; padding-inline: 8px;
  border-radius: 13px;
  font-family: var(--font-display); font-weight: 800; font-size: 1rem;
  color: #fff;
  background: var(--tc);
  box-shadow: 0 8px 20px -8px var(--tc);
}
.tool-card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.tool-card p { font-size: .89rem; color: var(--text-2); margin-bottom: 16px; }
.tool-card__meta {
  display: flex; gap: 14px;
  font-size: .8rem; color: var(--text-3);
  border-top: 1px solid var(--border); padding-top: 14px;
}
.tool-card__meta span:first-child { color: #b45309; font-weight: 600; }
[data-theme="dark"] .tool-card__meta span:first-child { color: #f59e0b; }

/* ---------- Prompts (cards da home) ---------- */
.prompt-filters {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 36px;
}
.prompt-grid {
  display: grid;
  /* min() na largura mínima: em tela de 320px o card encolhe em
     vez de forçar 320px e empurrar a página para o lado. Sem
     isso, celular pequeno ganha rolagem horizontal. */
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: var(--gap-grade);
}
.prompt-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.prompt-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.prompt-card__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.prompt-card__level { font-size: .76rem; color: var(--text-3); }
.prompt-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.prompt-card__code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 16px;
  flex: 1;
}
.prompt-card__code pre { white-space: pre-wrap; word-break: break-word; }
.prompt-card__code code {
  font-family: var(--font-mono);
  font-size: .8rem; line-height: 1.6;
  color: var(--code-text);
}
.prompt-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prompt-card__tools { font-size: .78rem; color: var(--text-3); }

/* ---------- Cards de artigo ---------- */
.article-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap-grade);
}
.article-card {
  grid-column: span 6;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.article-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.article-card--featured { grid-column: span 12; flex-direction: row; }
.article-card--featured .article-card__img { width: 42%; min-height: 240px; }
.article-card--featured h3 { font-size: 1.5rem; }
.article-card--featured p { display: block; }
/* Grade de listagem (categoria/arquivo): 3 colunas, sem destaque */
.article-grid--list .article-card { grid-column: span 4; }

.article-card__img {
  position: relative;
  min-height: 150px;
  background: var(--img, linear-gradient(135deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--brand-2) 16%, transparent)));
  display: grid; place-items: center;
  overflow: hidden;
}
.article-card__img::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(#ffffff14 1px, transparent 1px), linear-gradient(90deg, #ffffff14 1px, transparent 1px);
  background-size: 28px 28px;
}
.article-card__emoji { font-size: 3rem; position: relative; z-index: 1; filter: drop-shadow(0 6px 18px rgb(0 0 0 / .35)); }
.article-card__img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 2;
  transition: transform .5s var(--ease);
}

.article-card__body { padding: var(--space-card); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.article-card__tags { display: flex; gap: 8px; flex-wrap: wrap; }
.article-card h3 { font-size: 1.08rem; }
.article-card p { font-size: .92rem; color: var(--text-2); display: none; }
.article-grid--list .article-card p { display: block; }
.article-card__meta {
  margin-top: auto;
  display: flex; gap: 14px; flex-wrap: wrap;
  font-size: .8rem; color: var(--text-3);
}

/* ---------- Downloads ---------- */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));
  gap: 16px;
}
.dl-card {
  display: flex; align-items: center; gap: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.dl-card:hover { border-color: var(--brand-2); box-shadow: var(--shadow); }
.dl-card__icon {
  width: 58px; height: 58px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 15px;
  color: var(--brand-2);
  background: var(--chip-bg);
  border: 1px solid var(--border);
  transition: transform .35s var(--ease);
}
.dl-card__icon .ic { width: 27px; height: 27px; }

[data-theme="light"] .dl-card__icon { color: #7c3aed; }
.dl-card__tags { margin-bottom: 6px; }
.dl-card h3 { font-size: 1.02rem; margin-bottom: 4px; }
.dl-card p { font-size: .85rem; color: var(--text-2); }
.dl-card__action {
  margin-left: auto; flex-shrink: 0;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  transition: background .3s, color .3s, border-color .3s;
}
.dl-card:hover .dl-card__action { background: var(--gradient-btn); color: #fff; border-color: transparent; }

/* ---------- Newsletter ---------- */
.newsletter { padding: 40px 0 92px; }
.newsletter__box {
  position: relative;
  text-align: center;
  padding: clamp(40px, 7vw, 72px) clamp(20px, 6vw, 80px);
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.newsletter__glow {
  position: absolute; inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(ellipse at center, #6366f14d, transparent 70%);
  pointer-events: none;
}
.newsletter__emoji { display: block; margin-bottom: 16px; position: relative; }
.newsletter__emoji .ic {
  width: 46px; height: 46px; margin: 0 auto;
  color: #fff; stroke-width: 1.5;
  padding: 10px; border-radius: 14px;
  background: var(--gradient-btn);
  box-shadow: 0 10px 26px -8px #6366f1aa;
}
.newsletter__box h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; margin-bottom: 12px; position: relative; }
.newsletter__box > p { color: var(--text-2); max-width: 520px; margin: 0 auto 28px; position: relative; }
.newsletter__form {
  position: relative;
  display: flex; gap: 10px;
  width: min(520px, 100%);
  margin: 0 auto 16px;
}
.newsletter__form input {
  flex: 1; min-width: 0;
  padding: 13px 20px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  outline: 0;
  font-size: .95rem;
  transition: border-color .3s;
}
.newsletter__form input:focus { border-color: var(--brand-2); }
.newsletter__proof { font-size: .84rem; color: var(--text-3); position: relative; }
.newsletter__proof strong { color: var(--accent-text); }

/* ---------- FAQ (<details> — home e institucionais) ---------- */
.faq { display: grid; gap: 12px; }
.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 22px;
  transition: border-color .3s;
}
.faq__item[open] { border-color: var(--border-strong); }
.faq__item summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 0;
  font-family: var(--font-display);
  font-weight: 600; font-size: 1rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-size: 1.3rem; font-weight: 400;
  color: var(--accent-text);
  transition: rotate .3s var(--ease);
}
.faq__item[open] summary::after { rotate: 45deg; }
.faq__item p { padding: 0 0 18px; color: var(--text-2); font-size: .94rem; }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 60px 0 30px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 36px;
  margin-bottom: 44px;
}
.footer__brand p { margin-top: 14px; font-size: .9rem; color: var(--text-2); max-width: 280px; }
.footer__grid h4 { font-size: .92rem; margin-bottom: 14px; }
.footer__grid nav { display: flex; flex-direction: column; gap: 9px; }
.footer__grid nav a { font-size: .88rem; color: var(--text-2); transition: color .25s; }
.footer__grid nav a:hover { color: var(--accent-text); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-size: .82rem; color: var(--text-3);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%;
  translate: -50% 80px;
  background: var(--surface-solid);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 12px 22px;
  border-radius: 99px;
  font-size: .9rem; font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: translate .35s var(--ease), opacity .35s;
  z-index: 1100;
  pointer-events: none;
}
.toast.is-visible { translate: -50% 0; opacity: 1; }

/* ---------- Voltar ao topo ---------- */
.btt {
  position: fixed; bottom: 26px; right: 26px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--gradient-btn);
  color: #fff;
  box-shadow: 0 10px 26px -10px #6366f1cc;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .25s var(--ease);
  z-index: 880;
}
.btt.show { opacity: 1; pointer-events: auto; }


/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(38px) scale(.975);
  filter: blur(8px);
  transition:
    opacity .7s var(--ease),
    transform .8s var(--ease),
    filter .7s var(--ease);
  transition-delay: calc(var(--rd, 0) * 75ms);
  will-change: opacity, transform, filter;
}
.reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

.reveal--left  { transform: translateX(-46px) scale(.98); filter: blur(8px); }
.reveal--right { transform: translateX(46px) scale(.98); filter: blur(8px); }
.reveal--left.is-visible,
.reveal--right.is-visible { transform: none; filter: blur(0); }


/* ============================================================
   PARTE B — CAMADA DE ARTIGO
   Componentes editoriais reescritos sobre os tokens acima.
   Herdam tema claro/escuro e a cor da categoria (--accent).
   ============================================================ */

/* ---------- Trilha (breadcrumb) ---------- */
.crumb-wrap { width: var(--largura-artigo); margin-inline: auto; padding-top: calc(var(--header-h) + 26px); }
.crumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .78rem; color: var(--text-3);
}
.crumb a { color: var(--text-2); transition: color .2s; }
.crumb a:hover { color: var(--accent); }
.crumb .current { color: var(--text); }

/* ---------- Cabeçalho do artigo ---------- */
.art-header { width: var(--largura-leitura); margin-inline: auto; padding-top: 22px; }
.a-cat {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
}
.art-title {
  font-size: clamp(1.85rem, 4.4vw, 2.8rem);
  font-weight: 800; line-height: 1.13;
  margin: .55rem 0 .8rem;
}
.art-sub { font-size: 1.08rem; color: var(--text-2); margin-bottom: 1.5rem; }

.author-row {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding: 1rem 0;
  border-block: 1px solid var(--border);
}
.author-ava {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1.15rem;
  background: linear-gradient(135deg, var(--accent), var(--brand-2));
}
.author-info { flex: 1; min-width: 150px; }
.author-name { font-size: .89rem; font-weight: 700; }
.author-meta { font-size: .77rem; color: var(--text-3); }
.share-row { display: flex; gap: 8px; }
.share-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color .2s, border-color .2s, background .2s;
}
.share-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--chip-bg); }
.share-btn.ok { color: #10b981; border-color: #10b981; }

/* ---------- Disclaimer YMYL ---------- */
.disclaimer { width: var(--largura-leitura); margin: 1.3rem auto 0; }
.disclaimer-inner {
  display: flex; gap: 11px;
  padding: .95rem 1.15rem;
  border-radius: var(--radius-sm);
  background: #f59e0b12;
  border: 1px solid #f59e0b40;
}
.disclaimer-ic { flex-shrink: 0; }
.disclaimer-txt { font-size: .82rem; color: var(--text-2); line-height: 1.6; }
.disclaimer-txt strong { color: var(--text); }

/* ---------- Imagem de topo ---------- */
.hero-img { width: var(--largura-leitura); margin: 1.5rem auto 0; }
.hero-img-inner {
  position: relative;
  width: 100%; aspect-ratio: 1200/500;
  display: grid; place-items: center;
  font-size: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent), color-mix(in srgb, var(--brand-2) 14%, transparent));
  overflow: hidden;
}
.hero-img-inner img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Layout artigo + sumário ---------- */
.layout {
  width: var(--largura-artigo);
  margin: 2.2rem auto 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 250px;
  gap: 2.5rem;
}
.main-col { max-width: 800px; min-width: 0; }
.toc-col { position: relative; }
.toc-box {
  position: sticky; top: calc(var(--header-h) + 22px);
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: calc(100vh - var(--header-h) - 44px);
  overflow-y: auto;
}
.toc-title {
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-3);
  margin-bottom: .85rem;
}
.toc-list { list-style: none; }
.toc-list li { margin-bottom: .5rem; }
.toc-list a {
  display: block; line-height: 1.4;
  font-size: .8rem; color: var(--text-2);
  padding-left: 10px;
  border-left: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.toc-list a:hover { color: var(--text); }
.toc-list a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.toc-meta { font-size: .68rem; color: var(--text-3); font-weight: 400; }
.toc-mobile-toggle { display: none; }

/* ---------- Corpo do artigo ---------- */
.art-body { padding-bottom: 2rem; }
.art-body p { font-size: var(--texto-corpo); color: var(--text-2); line-height: 1.8; margin-bottom: 1.25rem; max-width: 68ch; }
.art-body h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.7rem); font-weight: 700;
  color: var(--text);
  margin: 2.7rem 0 1rem;
  scroll-margin-top: calc(var(--header-h) + 22px);
}
.art-body h3 { font-size: 1.16rem; font-weight: 600; color: var(--text); margin: 1.8rem 0 .8rem; }
.art-body strong { color: var(--text); font-weight: 600; }
.art-body ul, .art-body ol { margin: 0 0 1.25rem 1.3rem; color: var(--text-2); max-width: 68ch; }
.art-body li { margin-bottom: .55rem; line-height: 1.7; font-size: var(--texto-corpo); }
.art-body li strong { color: var(--text); }
.art-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: opacity .2s;
}
.art-body a:hover { opacity: .78; }

.pull-quote {
  margin: 1.9rem 0;
  padding: 1rem 1.4rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 1.1rem; font-style: italic;
  color: var(--text);
}

/* ---------- Caixa de prompt (com botão copiar) ---------- */
.prompt-box {
  position: relative;
  margin: 1.2rem 0;
  padding: .9rem 1.1rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.prompt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .55rem; }
.prompt-num {
  display: inline-grid; place-items: center;
  width: 25px; height: 25px; flex-shrink: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: .74rem; font-weight: 700;
}
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 5px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  color: var(--text-2);
  font-size: .75rem; font-weight: 600;
  transition: color .2s, border-color .2s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.copy-btn.ok { color: #10b981; border-color: #10b981; }
.prompt-txt {
  font-family: var(--font-mono);
  font-size: .84rem; line-height: 1.7;
  color: var(--code-text);
  margin: 0 !important; max-width: none !important;
  white-space: pre-wrap;
}
[data-theme="light"] .prompt-txt { color: #0e7490; }
.prompt-txt .ph {
  background: #f59e0b2e;
  color: #b45309;
  border-radius: 4px; padding: 0 4px;
  font-style: normal;
}
[data-theme="dark"] .prompt-txt .ph { color: #fbbf24; }
.prompt-use {
  margin-top: .65rem; padding-top: .6rem;
  border-top: 1px solid var(--border);
  font-size: .81rem; color: var(--text-3);
}
.prompt-use strong { color: var(--text-2); }

/* ---------- Callout / alerta / teoria ---------- */
.callout, .danger, .theory-box {
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
}
.callout { background: #f59e0b12; border: 1px solid #f59e0b40; }
.callout-t { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 700; color: #b45309; margin-bottom: .4rem; }
[data-theme="dark"] .callout-t { color: #f59e0b; }
.danger { background: #ef444412; border: 1px solid #ef444445; }
.danger-t { display: flex; align-items: center; gap: 7px; font-size: .86rem; font-weight: 700; color: #b91c1c; margin-bottom: .4rem; }
[data-theme="dark"] .danger-t { color: #f87171; }
.callout p, .danger p { font-size: .89rem; color: var(--text-2); margin-bottom: 0; }

.theory-box {
  padding: 1.3rem 1.4rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 9%, transparent), color-mix(in srgb, var(--brand-2) 7%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand-1) 28%, transparent);
}
.theory-label {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .6rem;
}
.theory-box p { font-size: .93rem; color: var(--text-2); margin-bottom: .7rem; }
.theory-box p:last-child { margin-bottom: 0; }

/* ---------- Comparativo lado a lado ---------- */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.7rem 0; }
.cmp-col { padding: 1rem 1.1rem; border-radius: var(--radius-sm); }
.cmp-bad  { background: #ef44440d; border: 1px solid #ef444438; }
.cmp-good { background: #10b9810d; border: 1px solid #10b98140; }
.cmp-h { font-size: .79rem; font-weight: 700; margin-bottom: .5rem; }
.cmp-bad .cmp-h  { color: #b91c1c; }
.cmp-good .cmp-h { color: #047857; }
[data-theme="dark"] .cmp-bad .cmp-h  { color: #f87171; }
[data-theme="dark"] .cmp-good .cmp-h { color: #10b981; }
.cmp-col p { font-size: .86rem; color: var(--text-2); line-height: 1.6; margin: 0; }

/* ---------- Barra de estatística ---------- */
.stat-row { margin: 1.1rem 0; }
.stat-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .42rem; }
.stat-lbl { font-size: .86rem; color: var(--text-2); }
.stat-num { font-family: var(--font-display); font-size: 1rem; font-weight: 800; color: var(--accent); }
.stat-track { height: 9px; border-radius: 999px; background: var(--chip-bg); border: 1px solid var(--border); overflow: hidden; }
.stat-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--brand-3)); transition: width 1s var(--ease); }

/* ---------- Espaço de anúncio ---------- */
.in-ad {
  margin: 2.2rem 0;
  padding: 14px 20px; min-height: 90px;
  display: flex; flex-direction: column; justify-content: center;
  text-align: center;
  background: var(--chip-bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}
.in-ad-lbl {
  display: block; margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: .64rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--text-3);
}
.in-ad-ph { font-size: .79rem; color: var(--text-3); }

/* ---------- FAQ do artigo (accordion por botão) ---------- */
.faq-box {
  margin: 1.3rem 0;
  padding: .3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1.05rem 0;
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 600;
  color: var(--text);
}
.faq-arrow { flex-shrink: 0; font-size: .75rem; color: var(--accent-text); transition: transform .25s var(--ease); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s var(--ease); }
.faq-a p { font-size: .9rem; color: var(--text-2); line-height: 1.7; margin: 0; }
.faq-item.open .faq-a { max-height: 700px; padding-bottom: 1.05rem; }

/* ---------- CTA de produto ---------- */
.product-cta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 2.3rem 0;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 12%, transparent), color-mix(in srgb, var(--brand-2) 9%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand-1) 30%, transparent);
}
.pcta-ic { font-size: 2.3rem; flex-shrink: 0; }
.pcta-body { flex: 1; min-width: 200px; }
.pcta-tag {
  font-family: var(--font-mono);
  font-size: .66rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent); margin-bottom: .3rem;
}
.pcta-title { font-family: var(--font-display); font-size: 1.02rem; font-weight: 700; margin-bottom: .3rem; }
.pcta-desc { font-size: .85rem; color: var(--text-2); }
.pcta-btn {
  padding: 11px 22px; border-radius: 99px;
  background: var(--gradient-btn); color: #fff;
  font-size: .87rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 8px 22px -8px #6366f199;
  transition: transform .25s var(--ease);
}


/* ---------- Newsletter dentro do artigo ---------- */
.nl-inline {
  margin: 2.5rem 0;
  padding: 2rem;
  text-align: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 10%, transparent), color-mix(in srgb, var(--brand-2) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand-1) 26%, transparent);
}
.nl-inline h3 { font-size: 1.22rem; margin-bottom: .5rem; }
.nl-inline p { font-size: .89rem; color: var(--text-2); margin-bottom: 1.2rem; }
.nl-form-inline { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nl-form-inline input {
  min-width: 240px; padding: 12px 18px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text);
  font-size: .89rem; outline: 0;
  transition: border-color .3s;
}
.nl-form-inline input:focus { border-color: var(--brand-2); }
.nl-btn {
  padding: 12px 24px; border-radius: 99px;
  background: var(--gradient-btn); color: #fff;
  font-size: .89rem; font-weight: 600;
  box-shadow: 0 8px 22px -8px #6366f199;
}

/* ---------- Tags + caixa do autor ---------- */
.tags-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 1.9rem 0; }
/* Hoje as tags são rótulos (<span>), não links: as páginas de
   tag ficariam com 1 artigo cada, e página rasa derruba a
   avaliação do site. Quando houver volume, basta voltar a
   renderizá-las como <a> — o estilo de hover já está pronto. */
.art-tag {
  display: inline-flex; align-items: center; min-height: 32px;
  padding: 6px 15px; border-radius: 99px;
  font-size: .79rem;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  transition: background .2s;
}
a.art-tag:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); }

.author-box {
  display: flex; gap: 15px;
  margin: 2rem 0; padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.author-box .author-ava { width: 56px; height: 56px; font-size: 1.4rem; }
.author-box-name { font-size: .97rem; font-weight: 700; margin-bottom: .3rem; }
.author-box-bio { font-size: .86rem; color: var(--text-2); line-height: 1.6; }

/* ---------- Artigos relacionados ---------- */
.related-sec { width: var(--largura-artigo); margin-inline: auto; padding: 2.2rem 0 4rem; }
.related-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.rel-c {
  display: block; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.rel-c:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.rel-img {
  position: relative;
  aspect-ratio: 16/9;
  display: grid; place-items: center;
  font-size: 2.2rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--brand-2) 12%, transparent));
  overflow: hidden;
}
.rel-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rel-body { padding: 1rem 1.1rem; }
.rel-cat {
  display: inline-block; margin-bottom: .5rem;
  padding: 3px 10px; border-radius: 99px;
  font-size: .64rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.rel-ttl { font-size: .9rem; font-weight: 600; color: var(--text); line-height: 1.4; }

/* ---------- Páginas institucionais / legais ---------- */
.pagina-legal { width: var(--largura-leitura); margin-inline: auto; padding: calc(var(--header-h) + 56px) 0 72px; }
.pagina-legal .art-title { margin-bottom: .6rem; }
.pagina-legal__meta { font-size: .82rem; color: var(--text-3); margin-bottom: 2.2rem; }
.pagina-legal h2 {
  font-size: 1.4rem; margin: 2.4rem 0 .9rem;
  scroll-margin-top: calc(var(--header-h) + 22px);
}
.pagina-legal h3 { font-size: 1.08rem; margin: 1.6rem 0 .7rem; }
.pagina-legal p, .pagina-legal li { color: var(--text-2); line-height: 1.8; font-size: var(--texto-corpo); }
.pagina-legal p { margin-bottom: 1.1rem; max-width: 68ch; }
.pagina-legal ul, .pagina-legal ol { margin: 0 0 1.2rem 1.3rem; max-width: 68ch; }
.pagina-legal li { margin-bottom: .5rem; }
.pagina-legal a { color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.pagina-legal strong { color: var(--text); }

/* Cabeçalho padrão das páginas de listagem (categoria, arquivo) */
.pagina-topo {
  width: var(--largura-site); margin-inline: auto;
  padding: calc(var(--header-h) + 56px) 0 40px;
}
.pagina-topo__tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .74rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent);
  margin-bottom: 12px;
}
.pagina-topo h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 14px; }
.pagina-topo p { color: var(--text-2); font-size: 1.05rem; max-width: 62ch; }

/* Estado vazio — categoria ainda sem artigos publicados */
.vazio {
  padding: 56px 26px; text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.vazio h3 { font-size: 1.1rem; margin-bottom: 8px; }
.vazio p { font-size: .92rem; color: var(--text-2); margin-bottom: 20px; }


/* ============================================================
   PARTE C — COMPONENTES EDITORIAIS DOS ARTIGOS
   ------------------------------------------------------------
   Blocos que existem no HTML dos artigos desde a Fase 0 e que
   a consolidação do CSS deixou para trás: renderizavam como
   texto solto, sem card, sem cor e sem contenção no mobile.

   Todos reescritos sobre os tokens da Parte A, então herdam
   tema claro/escuro e a cor da categoria automaticamente.
   ============================================================ */

/* ---------- Card de boa prática (8 artigos) ---------- */
.practice-c {
  margin: 1.3rem 0;
  padding: 1.1rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.practice-t {
  font-family: var(--font-display);
  font-size: .96rem; font-weight: 700;
  color: var(--text);
  margin-bottom: .45rem;
}
.practice-d { font-size: .92rem; color: var(--text-2); line-height: 1.7; }
.practice-prompt {
  margin-top: .8rem;
  padding: .8rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .82rem; line-height: 1.65;
  color: var(--code-text);
  overflow-wrap: break-word;
}
[data-theme="light"] .practice-prompt { color: #a5f3fc; }

/* ---------- Caixa de referências (9 artigos) ---------- */
.refs-box {
  margin: 2.2rem 0 1.5rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.refs-title {
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-3);
  margin-bottom: .8rem;
}
.refs-box ul { margin: 0 0 0 1.1rem; }
.refs-box li {
  font-size: .84rem; line-height: 1.65;
  color: var(--text-2);
  margin-bottom: .5rem;
  overflow-wrap: break-word;
}
.refs-box li:last-child { margin-bottom: 0; }

/* Referência curta no fim de um bloco de teoria */
.theory-ref {
  font-size: .78rem !important;
  color: var(--text-3) !important;
  line-height: 1.6;
  margin-top: .6rem;
}

/* ---------- Números dentro de um alerta ---------- */
.danger-stat {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 14px;
  margin-top: .9rem;
}
.danger-stat > div {
  padding: .8rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.danger-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem; font-weight: 800;
  color: var(--accent);
  margin-bottom: .2rem;
}
.danger-stat span { font-size: .8rem; color: var(--text-2); line-height: 1.5; }

/* ---------- Passo a passo numerado ---------- */
.step-box {
  display: flex; gap: 14px;
  margin: 1.1rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.step-n, .step-num {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 700;
}
.step-body { min-width: 0; }
.step-title, .step-t {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  margin-bottom: .35rem;
}
.step-desc, .step-d { font-size: .9rem; color: var(--text-2); line-height: 1.7; }
.step-tip {
  margin-top: .7rem; padding: .6rem .85rem;
  background: #f59e0b12;
  border: 1px solid #f59e0b38;
  border-radius: var(--radius-sm);
  font-size: .84rem; color: var(--text-2);
}

/* ---------- Grade de conceitos e ideias ---------- */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px;
  margin: 1.4rem 0;
}
.concept-c {
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.concept-ic { font-size: 1.6rem; display: block; margin-bottom: .5rem; }
.concept-t {
  font-family: var(--font-display);
  font-size: .96rem; font-weight: 700;
  color: var(--text); margin-bottom: .35rem;
}
.concept-d { font-size: .86rem; color: var(--text-2); line-height: 1.6; }

.idea-c {
  margin: 1.1rem 0;
  padding: 1.05rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s;
}
.idea-c:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.idea-t {
  font-family: var(--font-display);
  font-size: .98rem; font-weight: 700;
  color: var(--text); margin-bottom: .35rem;
}
.idea-d { font-size: .9rem; color: var(--text-2); line-height: 1.7; }

/* ---------- Card de aplicação numerada ---------- */
.app-c {
  margin: 1.6rem 0;
  padding: 1.3rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  scroll-margin-top: calc(var(--header-h) + 22px);
}
.app-head { display: flex; align-items: center; gap: 13px; margin-bottom: .9rem; }
.app-num {
  flex-shrink: 0;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: var(--gradient-btn);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 800;
}
.app-title-area { min-width: 0; }
.app-title {
  font-family: var(--font-display);
  font-size: 1.08rem; font-weight: 700;
  color: var(--text); line-height: 1.3;
}
.app-desc { font-size: .92rem; color: var(--text-2); line-height: 1.7; margin-bottom: .8rem; }
.app-example {
  padding: .85rem 1rem;
  background: var(--chip-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: .87rem; color: var(--text-2); line-height: 1.65;
}

/* Etiquetas de público-alvo */
.who-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: .9rem; }
.who-tag {
  display: inline-flex; align-items: center;
  padding: 4px 11px; border-radius: 99px;
  font-size: .74rem; font-weight: 600;
  background: var(--chip-bg);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.wt-ag   { border-color: #8b5cf655; color: #7c3aed; }
.wt-corp { border-color: #6366f155; color: #4f46e5; }
.wt-pme  { border-color: #10b98155; color: #047857; }
[data-theme="dark"] .wt-ag   { color: #a78bfa; }
[data-theme="dark"] .wt-corp { color: #818cf8; }
[data-theme="dark"] .wt-pme  { color: #10b981; }

/* ---------- Faixas de estatística ---------- */
.stat-strip, .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 14px;
  margin: 1.6rem 0;
}
.stat-c {
  padding: 1.1rem 1.2rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat-n {
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: .3rem;
}
.stat-l { font-size: .82rem; color: var(--text-2); line-height: 1.5; }

/* ---------- Card "vencedor por tarefa" ---------- */
.usecase-c {
  display: flex; gap: 14px;
  margin: 1.1rem 0;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.uc-ic { font-size: 1.5rem; flex-shrink: 0; line-height: 1.2; }
.uc-body { min-width: 0; }
.uc-winner {
  display: inline-block; margin-bottom: .45rem;
  padding: 3px 12px; border-radius: 99px;
  font-size: .78rem; font-weight: 700;
  border: 1px solid transparent;
}
.w-claude { background: #d9775722; border-color: #d9775766; color: #b45309; }
.w-gpt    { background: #10a37f22; border-color: #10a37f66; color: #047857; }
.w-gemini { background: #4285f422; border-color: #4285f466; color: #1d4ed8; }
[data-theme="dark"] .w-claude { color: #f0a58a; }
[data-theme="dark"] .w-gpt    { color: #34d399; }
[data-theme="dark"] .w-gemini { color: #93b8f8; }
.uc-desc { font-size: .9rem; color: var(--text-2); line-height: 1.7; }

/* ---------- Tabela comparativa ----------
   O wrapper rola na horizontal em vez de esticar a página:
   é o que impede a tabela de furar o layout no celular. */
.cmp-table-wrap {
  margin: 1.5rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cmp-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: .88rem;
}
.cmp-table th, .cmp-table td {
  padding: .8rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.cmp-table th {
  background: var(--chip-bg);
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.cmp-table td { color: var(--text-2); }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-table tr:hover td { background: var(--chip-bg); }

/* Mesma contenção para tabelas soltas nas páginas legais */
.pagina-legal table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: normal;
}
.pagina-legal table th,
.pagina-legal table td { min-width: 140px; }

/* ---------- Fórmula do prompt ---------- */
.formula-box {
  margin: 1.6rem 0;
  padding: 1.4rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand-1) 10%, transparent), color-mix(in srgb, var(--brand-2) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--brand-1) 28%, transparent);
  border-radius: var(--radius);
}
.formula-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem; text-align: center;
}
.formula-parts {
  display: flex; align-items: stretch; justify-content: center;
  gap: 10px; flex-wrap: wrap;
}
.formula-part {
  flex: 1 1 130px;
  padding: .8rem .9rem;
  text-align: center;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.fp-label {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .25rem;
}
.fp-desc { font-size: .8rem; color: var(--text-2); line-height: 1.45; }
.formula-plus {
  display: grid; place-items: center;
  font-size: 1.2rem; font-weight: 700;
  color: var(--text-3);
}

/* ---------- Card de técnica ---------- */
.tech-c {
  margin: 1.2rem 0;
  padding: 1.2rem 1.3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tech-head { display: flex; align-items: center; gap: 11px; margin-bottom: .6rem; }
.tech-ic { font-size: 1.5rem; flex-shrink: 0; }
.tech-name {
  font-family: var(--font-display);
  font-size: 1.02rem; font-weight: 700;
  color: var(--text); line-height: 1.3;
}
.tech-desc { font-size: .9rem; color: var(--text-2); line-height: 1.7; margin-bottom: .8rem; }
.tech-example {
  padding: .8rem 1rem;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: .82rem; line-height: 1.65;
  color: var(--code-text);
  overflow-wrap: break-word;
}
[data-theme="light"] .tech-example { color: #a5f3fc; }

/* ---------- Antes e depois ---------- */
.ba-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 1.5rem 0; }
.ba-col { padding: 1rem 1.1rem; border-radius: var(--radius-sm); }
.ba-bad  { background: #ef44440d; border: 1px solid #ef444438; }
.ba-good { background: #10b9810d; border: 1px solid #10b98140; }
.ba-label { font-size: .8rem; font-weight: 700; margin-bottom: .5rem; }
.ba-bad .ba-label  { color: #b91c1c; }
.ba-good .ba-label { color: #047857; }
[data-theme="dark"] .ba-bad .ba-label  { color: #f87171; }
[data-theme="dark"] .ba-good .ba-label { color: #10b981; }
.ba-text { font-size: .87rem; color: var(--text-2); line-height: 1.65; }

/* ---------- Divisor de nível ---------- */
.level-divider {
  display: flex; align-items: center; gap: 16px;
  margin: 3rem 0 1.5rem;
  padding: 1.2rem 1.3rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  scroll-margin-top: calc(var(--header-h) + 22px);
}
.level-badge {
  flex-shrink: 0;
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
}
.level-info { min-width: 0; }
.lv-tag {
  font-family: var(--font-mono);
  font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .2rem;
}
.level-info h2 { margin: 0 !important; font-size: clamp(1.15rem, 2.4vw, 1.45rem); }

/* ---------- Método STAR ---------- */
.star-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 12px;
  margin: 1.5rem 0;
}
.star-c {
  padding: 1.1rem 1rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.star-letter {
  width: 40px; height: 40px; margin: 0 auto .55rem;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gradient-btn);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 800;
}
.star-name {
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 700;
  color: var(--text); margin-bottom: .25rem;
}
.star-desc { font-size: .8rem; color: var(--text-2); line-height: 1.5; }


/* ============================================================
   PARTE D — PONTEIRO, TOQUE E TELA
   ============================================================ */

/* ------------------------------------------------------------
   HOVER SÓ ONDE EXISTE PONTEIRO
   ------------------------------------------------------------
   Num aparelho de toque não existe "passar o mouse por cima".
   O navegador simula o hover no toque — e ele FICA PRESO: o card
   permanece levantado até você tocar em outro lugar. O usuário
   não sabe nomear, mas sente que a interface está travada.

   Por isso todo efeito de elevação vive aqui dentro. Mudança de
   cor e de borda seguem valendo em qualquer aparelho: são pistas
   úteis, não decoração.
   ------------------------------------------------------------ */
@media (hover: hover) and (pointer: fine) {
  .cat-card:hover     { transform: translateY(-5px); }
  .tool-card:hover    { transform: translateY(-5px); }
  .prompt-card:hover  { transform: translateY(-4px); }
  .article-card:hover { transform: translateY(-5px); }
  .dl-card:hover      { transform: translateY(-4px); }
  .rel-c:hover        { transform: translateY(-5px); }
  .btn--primary:hover { transform: translateY(-2px); }
  .btn--ghost:hover   { transform: translateY(-2px); }
  .pcta-btn:hover     { transform: translateY(-2px); }
  .btt:hover          { transform: translateY(-3px); }
  .search-results a:hover { transform: translateX(3px); }
  
  .dl-card:hover .dl-card__icon   { transform: scale(1.08) rotate(-4deg); }
  
}

/* Em tela de toque, o retorno do toque é imediato e sem resíduo. */
@media (hover: none) {
  .cat-card:active, .tool-card:active, .prompt-card:active,
  .article-card:active, .dl-card:active, .rel-c:active {
    transform: scale(.985);
    transition: transform .12s var(--ease);
  }
}

/* ------------------------------------------------------------
   TELAS LARGAS
   ------------------------------------------------------------
   Acima de 1600px o container já cresceu pelo clamp(). Aqui só
   afinamos o que o crescimento desequilibra.
   ------------------------------------------------------------ */
@media (min-width: 1600px) {
  /* Sumário ganha ar: com a página larga, 250px fica apertado
     e os títulos longos quebram em três linhas. */
  .layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 3.5rem; }

  /* Card de destaque não deve virar uma faixa: limita a imagem
     para o texto não ficar perdido num bloco enorme. */
  .article-card--featured .article-card__img { width: 46%; max-height: 420px; }

  .hero__stats { max-width: 880px; }
}

/* ------------------------------------------------------------
   CELULAR DEITADO
   ------------------------------------------------------------
   Altura útil de ~380px. O hero foi desenhado para tela em pé e,
   deitado, empurra todo o conteúdo para fora da primeira tela —
   o leitor abre o site e vê só o topo.
   ------------------------------------------------------------ */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { padding: calc(var(--header-h) + 28px) 0 40px; }
  .hero__badge { margin-bottom: 16px; }
  .hero__title { font-size: clamp(1.6rem, 4.5vw, 2.2rem); margin-bottom: 12px; }
  .hero__subtitle { margin-bottom: 20px; font-size: .95rem; }
  .hero__quick { margin-bottom: 28px; }
  .hero__stats { padding: 16px 12px; }
  .search-overlay { padding-top: 8vh; }
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1024px) {
  .article-card--featured { flex-direction: column; }
  .article-card--featured .article-card__img { width: 100%; min-height: 190px; }
  .dl-grid { grid-template-columns: 1fr; }
  .article-grid--list .article-card { grid-column: span 6; }
}

@media (max-width: 900px) {
  /* O sumário vira bloco colapsável no topo do conteúdo */
  .layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .toc-col { order: -1; }
  .toc-box { position: static; max-height: none; }
  .toc-mobile-toggle {
    display: flex; width: 100%;
    align-items: center; justify-content: space-between;
    font-family: var(--font-display); font-weight: 700; font-size: .92rem;
    color: var(--text);
  }
  .toc-list.collapsed { display: none; }
  .toc-list { margin-top: .9rem; }
  /* O título fixo sai de cena no mobile: o botão de abrir/fechar
     já mostra "Neste artigo". Sem isto o texto aparece duas vezes. */
  .toc-box > .toc-title { display: none; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .nav-burger { display: grid; }
  .header__actions .btn { display: none; }
  .article-card { grid-column: span 12; }
  .article-grid--list .article-card { grid-column: span 12; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .section { padding: 64px 0; }
  .hero { padding-top: calc(var(--header-h) + 48px); }

  /* iOS dá zoom automático ao focar campo com fonte < 16px, e o
     usuário fica preso numa página ampliada. 16px trava isso. */
  input, textarea, select,
  .newsletter__form input,
  .nl-form-inline input,
  .hero__search input { font-size: 16px; }

  /* Alvos de toque: no dedo, 32px erra. Apple e Google
     recomendam 44px; aqui o mínimo passa a ser 42-44. */
  .copy-btn { min-height: 42px; padding: 8px 14px; }
  .share-btn { width: 42px; height: 42px; }
  .chip { padding: 10px 16px; }
  .toc-list a { padding-top: 6px; padding-bottom: 6px; }
  .faq-q { padding: 1.15rem 0; }
  .footer__grid nav a { padding: 3px 0; }

  /* Blocos editoriais empilham no celular */
  .ba-wrap { grid-template-columns: 1fr; }
  .formula-parts { flex-direction: column; }
  .formula-plus { padding: 2px 0; }
  .level-divider { flex-direction: column; align-items: flex-start; gap: 12px; }
  .usecase-c, .step-box { flex-direction: column; gap: 10px; }
  .app-head { align-items: flex-start; }
  /* Badge em uma única linha no mobile: fonte encolhe com a largura da tela */
  .hero__badge {
    white-space: nowrap;
    padding: 7px 14px;
    font-size: clamp(.62rem, 3.15vw, .8rem);
    max-width: 100%;
  }
  .hero__search { flex-direction: row; }
  .hero__search .btn { padding: 10px 16px; font-size: .85rem; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form .btn { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .dl-card { flex-wrap: wrap; }
  .dl-card__action { display: none; }

  /* Artigo */
  .compare { grid-template-columns: 1fr; }
  .product-cta { flex-direction: column; text-align: center; }
  .nl-form-inline input { min-width: 0; width: 100%; }
  .art-body p, .art-body li { font-size: 1.02rem; }
  .btt { bottom: 18px; right: 18px; }
}

/* ============================================================
   MOVIMENTO REDUZIDO
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal, .reveal--left, .reveal--right { opacity: 1; transform: none; filter: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   IMPRESSÃO — leitor que imprime ou salva em PDF
   ============================================================ */
@media print {
  .header, .mobile-menu, .search-overlay, .progress-bar, .btt,
  .toc-col, .in-ad, .nl-inline, .product-cta, .share-row, .footer { display: none !important; }
  body { background: #fff; color: #000; }
  .layout { display: block; width: 100%; }
  .art-body p, .art-body li { color: #000; }
  .art-body a { text-decoration: underline; }
  .art-body a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
}
