/* eConnect - estilos da área de artigos (usa os tokens de site.css) */

.pagina-artigos main { padding-top: var(--header-h); }

/* ---------- Trilha (breadcrumb) ---------- */
.art-trilha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted-2); margin-bottom: 20px; }
.art-trilha a { color: var(--muted); font-weight: 600; }
.art-trilha a:hover { color: var(--violet); }

/* ---------- Lista de artigos ---------- */
.art-lista-topo { background: var(--ink); color: #cbd5e1; padding: 56px 0 64px; position: relative; overflow: hidden; }
.art-lista-topo::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 360px at 90% -20%, rgb(124 58 237 / .45), transparent 60%); pointer-events: none; }
.art-lista-topo .container { position: relative; }
.art-lista-topo .art-trilha, .art-lista-topo .art-trilha a { color: #94a3b8; }
.art-lista-topo .kicker { color: var(--violet-light); }
.art-lista-topo h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 800; max-width: 820px; }
.art-lista-topo p { margin-top: 16px; font-size: 1.08rem; max-width: 680px; }
.art-lista { padding-top: 56px; }

.art-filtros { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.art-filtro { font: inherit; font-size: .9rem; padding: 8px 16px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.art-filtro:hover { border-color: var(--violet); }
.art-filtro[aria-pressed="true"] { background: var(--violet-soft); border-color: var(--violet); color: var(--violet-600); font-weight: 600; }
.art-vazio { color: var(--muted); }

.art-grade { display: grid; gap: 20px; }
@media (min-width: 720px) { .art-grade { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1060px) { .art-grade { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.art-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .25s, box-shadow .25s, transform .25s; }
.art-card:hover { border-color: #c4b5fd; box-shadow: var(--shadow); transform: translateY(-3px); }
.art-card-link { display: flex; flex-direction: column; height: 100%; padding: 26px; }
.art-card-titulo { font-size: 1.22rem; line-height: 1.3; letter-spacing: -.015em; font-weight: 800; color: var(--ink); margin-top: 14px; }
.art-card p { margin-top: 10px; color: var(--muted); font-size: .95rem; }
.art-card .art-meta { margin-top: auto; padding-top: 18px; }
.art-card-mais { margin-top: 10px; font-weight: 600; font-size: .92rem; color: var(--violet-600); }

.art-cat { display: inline-block; align-self: flex-start; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--violet-600); background: var(--violet-soft); padding: 4px 10px; border-radius: 999px; }
.art-meta { font-size: .86rem; color: var(--muted-2); }

/* ---------- Página do artigo ---------- */
.art-container { max-width: 1120px; }
.art-topo { background: #fff; border-bottom: 1px solid var(--line); padding: 40px 0 44px; }
.art-topo h1 { margin-top: 16px; font-size: clamp(1.9rem, 4.6vw, 3rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 800; color: var(--ink); max-width: 860px; }
.art-lead { margin-top: 16px; font-size: 1.15rem; color: var(--muted); max-width: 760px; }
.art-topo .art-meta { margin-top: 20px; }

.art-layout { display: grid; gap: 32px; padding-top: 40px; padding-bottom: 72px; }
@media (min-width: 1000px) {
    .art-layout { grid-template-columns: minmax(0, 1fr) 260px; column-gap: 56px; align-items: start; }
    .art-sumario { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: calc(var(--header-h) + 24px); }
    .art-corpo, .art-rodape { grid-column: 1; }
}

/* Sumário */
.art-sumario details { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.art-sumario summary { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); cursor: pointer; }
.art-sumario ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: sumario; }
.art-sumario li { counter-increment: sumario; }
.art-sumario a { display: flex; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: .9rem; color: var(--muted); line-height: 1.4; transition: background-color .2s, color .2s; }
.art-sumario a::before { content: counter(sumario, decimal-leading-zero); font-variant-numeric: tabular-nums; color: #94a3b8; font-weight: 600; }
.art-sumario a:hover { background: var(--bg); color: var(--ink); }
.art-sumario a.is-active { background: var(--violet-soft); color: var(--violet-600); font-weight: 600; }
.art-sumario a.is-active::before { color: var(--violet); }

/* Corpo do texto */
.art-corpo { font-size: 1.06rem; line-height: 1.75; color: var(--ink-2); min-width: 0; max-width: 760px; }
.art-corpo > * + * { margin-top: 1.1em; }
.art-corpo h2 { font-size: clamp(1.45rem, 2.6vw, 1.8rem); line-height: 1.2; letter-spacing: -.02em; font-weight: 800; color: var(--ink); margin-top: 2.2em; scroll-margin-top: calc(var(--header-h) + 20px); }
.art-corpo h3 { font-size: 1.2rem; line-height: 1.3; font-weight: 800; color: var(--ink); margin-top: 1.8em; scroll-margin-top: calc(var(--header-h) + 20px); }
.art-corpo h2 + *, .art-corpo h3 + * { margin-top: .7em; }
.art-corpo a { color: var(--violet-600); text-decoration: underline; text-underline-offset: 3px; }
.art-corpo strong { color: var(--ink); }
.art-corpo ul, .art-corpo ol { padding-left: 1.4em; }
.art-corpo li + li { margin-top: .45em; }
.art-corpo li::marker { color: var(--violet); font-weight: 700; }
.art-corpo :not(pre) > code { font-family: var(--mono); font-size: .88em; background: var(--violet-soft); color: var(--violet-600); padding: .12em .4em; border-radius: 6px; word-break: break-word; }

/* Blocos de código */
.art-corpo pre { position: relative; background: var(--ink); color: #e2e8f0; border-radius: 14px; padding: 44px 20px 20px; overflow-x: auto; font-size: .86rem; line-height: 1.65; box-shadow: 0 18px 40px -24px rgb(15 23 42 / .6); }
.art-corpo pre::before { content: attr(data-lang); position: absolute; top: 12px; left: 20px; font-family: Inter, system-ui, sans-serif; font-size: .7rem; font-weight: 700; letter-spacing: .1em; color: #64748b; }
.art-corpo pre code { font-family: var(--mono); white-space: pre; }
.art-copiar-codigo { position: absolute; top: 8px; right: 8px; font: inherit; font-family: Inter, system-ui, sans-serif; font-size: .75rem; font-weight: 600; color: #cbd5e1; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); border-radius: 8px; padding: 5px 10px; cursor: pointer; transition: background-color .2s; }
.art-copiar-codigo:hover { background: rgb(255 255 255 / .16); }

/* Tabelas */
.tabela { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.tabela table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.5; }
.tabela th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); font-weight: 700; }
.tabela th, .tabela td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tabela tr:last-child td { border-bottom: 0; }
.tabela td:first-child { font-weight: 600; color: var(--ink); }
@media (max-width: 640px) { .tabela table { min-width: 560px; } }

/* Destaques */
.callout { border-left: 4px solid var(--violet); background: var(--violet-soft); border-radius: 0 12px 12px 0; padding: 16px 20px; }
.callout p { margin: 0; }
.callout-alerta { border-left-color: #d97706; background: #fef3c7; }
.callout-alerta strong { color: #92400e; }

/* Lista de verificação */
.checklist ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding: 12px 16px 12px 48px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.checklist li::before { content: ""; position: absolute; left: 16px; top: 14px; width: 18px; height: 18px; border: 2px solid var(--violet); border-radius: 5px; }

/* ---------- Rodapé do artigo ---------- */
.art-rodape { max-width: 760px; display: grid; gap: 28px; padding-top: 12px; }
.art-tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.art-tags li { font-size: .82rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; }
.art-compartilhar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .92rem; }
.art-compartilhar span { color: var(--muted-2); font-weight: 600; }
.art-compartilhar a, .art-copiar { font: inherit; font-weight: 600; color: var(--violet-600); background: none; border: 0; padding: 0; cursor: pointer; }
.art-compartilhar a:hover, .art-copiar:hover { text-decoration: underline; }

.art-cta { display: grid; gap: 24px; background: var(--ink); color: #cbd5e1; border-radius: 20px; padding: 32px; position: relative; overflow: hidden; }
.art-cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(500px 260px at 100% 0, rgb(124 58 237 / .45), transparent 65%); pointer-events: none; }
.art-cta > * { position: relative; }
.art-cta .kicker { color: var(--violet-light); }
.art-cta h2 { color: #fff; font-size: 1.5rem; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; }
.art-cta p { margin-top: 10px; }
.art-cta-botoes { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .art-cta { padding: 24px; } .art-cta-botoes .btn { flex: 1 1 100%; } }

.art-continuar .h2 { margin-bottom: 32px; }
