/* FISCO-E – artigos (lista e páginas de artigo) */

/* Barra de leitura no topo */
.art-progresso { position: fixed; z-index: 55; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.art-progresso i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, #E39A2E, var(--gold), #FFE9A8); box-shadow: 0 0 12px rgba(242,193,78,.6); }

/* Abertura com luzes que flutuam */
.art-hero { position: relative; overflow: hidden; padding: calc(140px + env(safe-area-inset-top, 0px)) 0 clamp(2.5rem, 6vw, 4.5rem); border-bottom: 1px solid var(--panel-line); }
.art-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--panel-line) 1px, transparent 1px), linear-gradient(90deg, var(--panel-line) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask: radial-gradient(70% 90% at 70% 30%, #000, transparent 75%); mask: radial-gradient(70% 90% at 70% 30%, #000, transparent 75%); }
.art-hero-fx { position: absolute; inset: 0; pointer-events: none; }
.art-hero-fx span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: art-flutua 18s ease-in-out infinite alternate; }
.art-hero-fx span:nth-child(1) { width: 420px; height: 420px; right: -80px; top: -120px; background: rgba(242,193,78,.35); }
.art-hero-fx span:nth-child(2) { width: 320px; height: 320px; right: 22%; top: 40%; background: rgba(58,168,255,.25); animation-duration: 22s; animation-delay: -6s; }
.art-hero-fx span:nth-child(3) { width: 260px; height: 260px; left: -60px; bottom: -120px; background: rgba(227,154,46,.2); animation-duration: 26s; animation-delay: -12s; }
@keyframes art-flutua { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-40px, 30px) scale(1.1); } 100% { transform: translate(30px, -20px) scale(.95); } }
.art-hero-in { position: relative; max-width: 900px; margin-left: max(0px, calc((100% - var(--wrap)) / 2)); }
.art-hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); margin: 0 0 1.2rem; }
.art-hero h1, .art-hero .kicker, .art-lead, .art-autor-linha, .art-migalhas { animation: art-sobe .9s var(--ease) both; }
.art-hero .kicker { animation-delay: .05s; } .art-hero h1 { animation-delay: .12s; } .art-lead { animation-delay: .22s; } .art-autor-linha { animation-delay: .32s; }
@keyframes art-sobe { from { opacity: .01; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.art-lead { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--text-2); max-width: 720px; margin-bottom: 1.8rem; }
.art-migalhas { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .8rem; color: var(--muted); margin-bottom: 1.2rem; }
.art-migalhas a { color: var(--text-2); text-decoration: none; } .art-migalhas a:hover { color: var(--gold); }
.art-migalhas b { color: var(--text-2); font-weight: 500; }
.art-autor-linha { display: flex; align-items: center; gap: .8rem; }
.art-autor-linha img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid rgba(242,193,78,.5); }
.art-autor-linha b { display: block; font-size: .95rem; }
.art-autor-linha span { font-size: .82rem; color: var(--muted); }

/* Corpo com sumário fixo ao lado */
.art-grade { display: grid; grid-template-columns: 240px minmax(0, 760px); gap: clamp(2rem, 5vw, 4.5rem); padding-top: clamp(2.5rem, 5vw, 4rem); justify-content: center; }
.art-sumario > div { position: sticky; top: 110px; }
.art-sumario b { display: block; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: .9rem; }
.art-sumario ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--panel-line); }
.art-sumario a { position: relative; display: block; padding: .42rem 0 .42rem 1rem; font-size: .86rem; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .25s; }
.art-sumario a::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 2px; background: var(--gold); transform: scaleY(0); transition: transform .35s var(--ease); }
.art-sumario a:hover { color: var(--text); }
.art-sumario a.ativo { color: var(--text); } .art-sumario a.ativo::before { transform: scaleY(1); }

.art-corpo { font-size: 1.04rem; line-height: 1.8; color: var(--text-2); min-width: 0; }
.art-corpo > p, .art-corpo > ul, .art-corpo > ol { margin: 0 0 1.25rem; }
.art-corpo h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--text); margin: 3.2rem 0 1rem; scroll-margin-top: 100px; }
.art-corpo h3 { font-size: 1.15rem; color: var(--text); margin: 0 0 .4rem; }
.art-corpo b { color: var(--text); }
.art-corpo a { color: var(--gold); text-underline-offset: 3px; }
.art-corpo li { margin-bottom: .45rem; }
.art-corpo li::marker { color: var(--gold); }

.art-resumo { border: 1px solid rgba(242,193,78,.3); background: linear-gradient(135deg, rgba(242,193,78,.08), rgba(242,193,78,.02)); border-radius: 18px; padding: 1.4rem 1.6rem .6rem; margin-bottom: 2.2rem; }
.art-resumo > b { font: 600 .74rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.art-resumo ul { margin: .9rem 0 0; padding-left: 1.1rem; font-size: .98rem; }

.art-passos { counter-reset: passo; list-style: none; padding: 0; }
.art-passos li { counter-increment: passo; position: relative; padding: 0 0 1.1rem 3.2rem; margin: 0; }
.art-passos li::before { content: counter(passo); position: absolute; left: 0; top: .1rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center;
  font: 600 .9rem/1 var(--display); color: #1A1200; background: linear-gradient(180deg, var(--gold-2), var(--gold)); }
.art-passos li:not(:last-child)::after { content: ""; position: absolute; left: 1.03rem; top: 2.4rem; bottom: .2rem; width: 1px; background: linear-gradient(var(--gold), transparent); opacity: .5; }

.art-check { list-style: none; padding: 0; }
.art-check li { position: relative; padding-left: 2rem; }
.art-check li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 1.1rem; height: 1.1rem; border-radius: 6px; border: 1px solid rgba(242,193,78,.5);
  background: rgba(242,193,78,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F2C14E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center / 70% no-repeat; }

/* Tabelas */
.art-tabela { overflow-x: auto; margin: 0 0 1.6rem; border: 1px solid var(--panel-line); border-radius: 16px; background: var(--panel); }
.art-tabela table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.5; }
.art-tabela th, .art-tabela td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--panel-line); vertical-align: top; }
.art-tabela th { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.art-tabela tbody tr:last-child td { border-bottom: 0; }
.art-tabela tbody tr { transition: background .2s; } .art-tabela tbody tr:hover { background: rgba(242,193,78,.05); }
.art-tabela tfoot td { color: var(--text); font-weight: 600; border-top: 1px solid rgba(242,193,78,.35); border-bottom: 0; }
.art-tabela .n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Exemplo prático com índice animado */
.art-caso { margin: 2rem 0 2.4rem; padding: clamp(1.2rem, 3vw, 2rem); border-radius: 22px; border: 1px solid var(--panel-line);
  background: radial-gradient(120% 80% at 100% 0%, rgba(58,168,255,.08), transparent 55%), var(--bg-2); }
.art-caso-head p { font-size: .85rem; color: var(--muted); margin: 0 0 1.2rem; }
.art-tag { display: inline-block; font-size: .7rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); padding: .3rem .7rem; border: 1px solid rgba(242,193,78,.35); border-radius: 999px; margin-bottom: .8rem; }
.art-indice { margin: .4rem 0 1.4rem; }
.art-indice-txt { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1rem; margin-bottom: .8rem; }
.art-indice-txt span { font-size: .85rem; color: var(--text-2); }
.art-indice-txt strong { font: 600 clamp(2rem, 5vw, 2.8rem)/1 var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.art-indice-txt small { font-size: .8rem; color: var(--muted); }
.art-barra { position: relative; height: 14px; border-radius: 999px; overflow: hidden; background: rgba(255,255,255,.08); }
.art-barra i { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: inherit; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, #E39A2E, var(--gold), #FFE9A8); transition: transform 1.6s var(--ease) .2s; }
.art-barra em { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); }
.art-indice.on .art-barra i { transform: scaleX(1); }
.art-indice.on .art-barra em { animation: art-brilho 1.6s ease-out 1.6s; }
@keyframes art-brilho { to { transform: translateX(100%); } }
.art-barra-leg { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; margin-top: .6rem; font-size: .78rem; color: var(--muted); }
.art-barra-leg i { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; background: rgba(255,255,255,.2); }
.art-barra-leg i.ok { background: var(--gold); }
.art-numeros { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.art-numeros div { padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid var(--panel-line); background: var(--panel); display: flex; flex-direction: column; gap: .2rem; }
.art-numeros span { font-size: .78rem; color: var(--muted); }
.art-numeros strong { font: 600 1.15rem/1.2 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.art-numeros small { font-size: .74rem; color: var(--muted); }
.art-numeros .destaque { border-color: rgba(242,193,78,.45); background: rgba(242,193,78,.08); }
.art-numeros .destaque strong { color: var(--gold); }

.art-corpo .faq-list { margin-bottom: 1rem; }
.art-autor { display: flex; gap: 1.2rem; align-items: center; margin-top: 3rem; padding: 1.4rem; border-radius: 18px; border: 1px solid var(--panel-line); background: var(--panel); }
.art-autor img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; flex: none; border: 1px solid rgba(242,193,78,.5); }
.art-autor span { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.art-autor b { display: block; font-size: 1.05rem; margin: .2rem 0 .3rem; }
.art-autor p { margin: 0; font-size: .9rem; line-height: 1.6; }
.art-aviso { font-size: .8rem !important; color: var(--muted); margin-top: 1.4rem !important; }

/* Lista de artigos */
.art-hero-lista .art-hero-in { max-width: 820px; }
.art-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 1.4rem; }
.art-card { text-decoration: none; color: inherit; }
.art-card-in { padding: 1.8rem; display: flex; flex-direction: column; align-items: flex-start; height: 100%; }
.art-card h2 { font-size: 1.35rem; line-height: 1.25; margin-bottom: .8rem; }
.art-card p { color: var(--text-2); font-size: .95rem; flex: 1; }
.art-card-meta { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
.art-card-ler { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; font-size: .9rem; color: var(--gold); }
.art-card-ler svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.art-card:hover .art-card-ler svg { transform: translateX(5px); }
.art-lista .reveal:nth-child(2) { transition-delay: .08s; } .art-lista .reveal:nth-child(3) { transition-delay: .16s; }

@media (max-width: 980px) {
  .art-grade { grid-template-columns: minmax(0, 1fr); }
  .art-sumario { display: none; }
}
@media (max-width: 640px) {
  .art-numeros { grid-template-columns: 1fr; }
  .art-autor { flex-direction: column; align-items: flex-start; }
  .art-hero-fx span { filter: blur(50px); }
}
@media (prefers-reduced-motion: reduce) {
  .art-hero-fx span, .art-hero h1, .art-hero .kicker, .art-lead, .art-autor-linha, .art-migalhas { animation: none; }
  .art-barra i { transition: none; }
}

/* Tema claro */
:root[data-theme="light"] .art-hero-fx span { opacity: .3; }
:root[data-theme="light"] .art-sumario b, :root[data-theme="light"] .art-corpo a, :root[data-theme="light"] .art-tag,
:root[data-theme="light"] .art-resumo > b, :root[data-theme="light"] .art-tabela th, :root[data-theme="light"] .art-indice-txt strong,
:root[data-theme="light"] .art-numeros .destaque strong, :root[data-theme="light"] .art-autor span, :root[data-theme="light"] .art-card-ler { color: var(--gold-ink); }
:root[data-theme="light"] .art-barra { background: rgba(20,24,30,.1); }
:root[data-theme="light"] .art-caso { background: var(--card); }

/* Caso real: números, frase, gráfico por área e gráfico mensal (crescem ao aparecer) */
.art-numeros-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 1.6rem; }
.art-caso-frase { margin: 0 0 2rem; padding: 1rem 1.2rem; border-left: 3px solid var(--gold); background: rgba(242,193,78,.06); border-radius: 0 12px 12px 0; font-size: .98rem; }
.art-sub { font: 600 .74rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin: 0 0 1rem; }
.art-setores { list-style: none; padding: 0; margin: 0 0 2.2rem; display: grid; gap: .55rem; }
.art-setores li { display: grid; grid-template-columns: minmax(0, 15rem) 1fr auto; align-items: center; gap: .9rem; font-size: .86rem; margin: 0; }
.art-setores span { color: var(--text-2); }
.art-setores i { height: 10px; border-radius: 999px; background: linear-gradient(90deg, #3AA8FF, #7cc4ff); width: var(--w); min-width: 3px; transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.1s var(--ease); }
.art-setores li:first-child i { background: linear-gradient(90deg, #E39A2E, var(--gold)); }
.art-setores b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: .82rem; }
.art-setores small { color: var(--muted); font-weight: 400; margin-left: .3rem; }
.art-setores.on i { transform: scaleX(1); }
.art-setores li:nth-child(2) i { transition-delay: .08s; } .art-setores li:nth-child(3) i { transition-delay: .16s; } .art-setores li:nth-child(4) i { transition-delay: .24s; }
.art-setores li:nth-child(5) i { transition-delay: .32s; } .art-setores li:nth-child(6) i { transition-delay: .4s; } .art-setores li:nth-child(7) i { transition-delay: .48s; } .art-setores li:nth-child(8) i { transition-delay: .56s; }
.art-meses { list-style: none; padding: 0; margin: 0; height: 170px; display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(4px, 1vw, 10px); align-items: end; }
.art-meses li { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: .45rem; margin: 0; }
.art-meses i { width: 100%; height: var(--h); border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--gold), rgba(227,154,46,.35)); transform-origin: 50% 100%; transform: scaleY(0); transition: transform 1s var(--ease); }
.art-meses li:hover i { filter: brightness(1.2); }
.art-meses span { font-size: .7rem; color: var(--muted); }
.art-meses.on i { transform: scaleY(1); }
.art-meses li:nth-child(n) i { transition-delay: calc(var(--d, 0) * 1s); }
.art-caso-nota { font-size: .84rem; color: var(--muted); margin: 1rem 0 0; }
@media (max-width: 760px) { .art-numeros-4 { grid-template-columns: 1fr 1fr; } .art-setores li { grid-template-columns: 1fr auto; } .art-setores i { grid-column: 1 / -1; grid-row: 2; } }
@media (prefers-reduced-motion: reduce) { .art-setores i, .art-meses i { transition: none; } }
:root[data-theme="light"] .art-sub { color: var(--gold-ink); }
