/*
 * article.css — página de artigo (Etapa 5, parte A). Só carrega em is_singular('post').
 * Usa tokens. Coluna de leitura confortável e metadados editoriais.
 */

.article { max-width: 820px; margin: 0 auto; }

/* Breadcrumbs */
.breadcrumbs { font-size: 13px; color: var(--jj-muted); margin-bottom: 22px; }
.breadcrumbs a { color: var(--jj-green); border-bottom: 1px solid transparent; }
.breadcrumbs a:hover { border-color: var(--jj-terra); }
.breadcrumbs [aria-current] { color: var(--jj-muted); }
.breadcrumbs-sep { margin: 0 4px; color: var(--jj-line); }

/* Cabeçalho do artigo */
.article-header { margin-bottom: 30px; }
.article-title { font: 500 clamp(32px, 4.5vw, 52px)/1.12 Georgia, serif; letter-spacing: -.02em; margin: 8px 0 14px; }
.article-lead { font-size: 19px; line-height: 1.6; color: var(--jj-muted); max-width: 68ch; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 20px; font-size: 13px; color: var(--jj-muted); }
.article-author { font-weight: 700; color: var(--jj-ink); }
.article-updated { color: var(--jj-terra); font-weight: 700; }

/* Imagem destacada */
.article-figure { margin: 0 0 34px; }
.article-figure img { width: 100%; height: auto; border-radius: var(--jj-radius-sm); display: block; }

/* Corpo editorial */
.entry-content { max-width: 68ch; font-size: 18px; line-height: 1.75; color: var(--jj-ink); }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 { font: 500 clamp(24px, 3vw, 34px)/1.2 Georgia, serif; margin-top: 1.9em; }
.entry-content h3 { font: 500 clamp(20px, 2.4vw, 26px)/1.25 Georgia, serif; margin-top: 1.5em; }
.entry-content a { color: var(--jj-green); text-decoration: underline; text-underline-offset: 2px; }
.entry-content a:hover { color: var(--jj-terra); }
.entry-content img { max-width: 100%; height: auto; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li + li { margin-top: .4em; }
.entry-content blockquote { border-left: 4px solid var(--jj-terra); padding-left: 20px; margin: 1.6em 0; color: var(--jj-muted); font-style: italic; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .95em; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--jj-line); padding: 10px 12px; text-align: left; }
.entry-content th { background: var(--jj-cream); }
.entry-content code { background: var(--jj-cream); padding: 2px 6px; border-radius: 4px; font-size: .92em; }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { font-size: 13px; color: var(--jj-muted); margin-top: 8px; text-align: center; }

/* Navegação anterior/próximo */
.article-nav { max-width: 820px; margin: 48px auto 0; display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--jj-line); padding-top: 24px; }
.article-nav a { display: block; color: var(--jj-green); }
.article-nav a:hover { color: var(--jj-terra); }
.article-nav span { display: block; font-size: 12px; color: var(--jj-muted); font-weight: 700; }
.article-nav b { display: block; font: 500 18px/1.3 Georgia, serif; margin-top: 4px; }
.article-nav-next { margin-left: auto; text-align: right; }

@media (max-width: 650px) {
	.article-nav { flex-direction: column; }
	.article-nav-next { margin-left: 0; text-align: left; }
}

/* ===== Sumário (parte B) ===== */
.toc { background: var(--jj-paper); border: 1px solid var(--jj-line); border-left: 4px solid var(--jj-green); border-radius: var(--jj-radius-sm); padding: 18px 22px; margin: 0 0 30px; }
.toc-title { font-weight: 800; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-terra); margin: 0 0 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 5px 0; line-height: 1.4; }
.toc li.toc-sub { padding-left: 18px; }
.toc a { color: var(--jj-green); font-size: 15px; }
.toc a:hover { color: var(--jj-terra); text-decoration: underline; }

/* Âncoras não ficam atrás do cabeçalho fixo */
.entry-content h2, .entry-content h3 { scroll-margin-top: 100px; }

/* ===== Barra de progresso de leitura (parte B) ===== */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: transparent; z-index: 30; pointer-events: none; }
.reading-progress-bar { display: block; height: 100%; width: 0; background: var(--jj-terra); }


/* ===== Autor, relacionados, CTA (parte C) ===== */
.author-box { max-width: 820px; margin: 40px auto 0; display: flex; gap: 20px; align-items: flex-start; background: var(--jj-cream); border-radius: var(--jj-radius); padding: 24px; }
.author-box-avatar img { width: 72px; height: 72px; border-radius: 50%; display: block; }
.author-box-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-terra); margin: 0 0 4px; }
.author-box-name { font: 500 24px Georgia, serif; margin: 0 0 8px; }
.author-box-bio { color: var(--jj-muted); font-size: 15px; line-height: 1.6; margin: 0 0 10px; }
.author-box-links a { font-weight: 700; color: var(--jj-green); }
.author-box-links a:hover { color: var(--jj-terra); }

.related { max-width: 820px; margin: 45px auto 0; }
.related-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-terra); margin: 0 0 4px; }
.related-title { font: 500 28px Georgia, serif; margin: 0 0 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { background: var(--jj-paper); border-top: 4px solid var(--jj-green); padding: 20px; }
.related-card small { color: var(--jj-terra); text-transform: uppercase; font-weight: 800; letter-spacing: .1em; font-size: 9px; }
.related-card h3 { font: 500 19px/1.3 Georgia, serif; margin: 10px 0; }
.related-card h3 a { color: var(--jj-ink); }
.related-card h3 a:hover { color: var(--jj-terra); }
.related-card span { font-size: 12px; color: var(--jj-muted); }

.article-cta { max-width: 820px; margin: 45px auto 0; background: var(--jj-green); color: #fff; border-radius: var(--jj-radius); padding: 32px; display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.article-cta h2 { font: 500 26px Georgia, serif; margin: 6px 0; }
.article-cta p { color: var(--jj-on-green-soft); margin: 0; }
.article-cta-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--jj-gold); margin: 0; }
.article-cta .button-cream { flex: none; }

@media (max-width: 650px) {
	.related-grid { grid-template-columns: 1fr; }
	.author-box { flex-direction: column; }
	.article-cta { flex-direction: column; align-items: flex-start; }
}
