/* Tema "Luz de vela" para a leitura de "O pavio que ainda fumega": página de cera clara, tinta carvão-azulada e uma só luz amarela.
   Todas as regras começam em .tema para não vazar para o resto do site. Fontes: Libre Franklin (títulos) e Source Serif 4 (texto). */

.tema {
  --cera: #fbf6e6;
  --cera2: #f1e8c8;
  --carvao: #1b2230;
  --ardosia: #55627f;
  --luz: #f2b81c;
  --luz2: #ffd45e;
  --ambar: #8a6200;
  --texto: #202636;
  --f-titulo: "Libre Franklin", "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  --f-texto: "Source Serif 4", Cambria, Georgia, serif;
  background: var(--cera);
  color: var(--texto);
}
.tema .tema-hero, .tema .tema-sumario, .tema .leitura-tematica { font-family: var(--f-texto); }

/* ── Cabeçalho (noite com vela) ─────────────────────────── */
.tema .tema-hero { background: radial-gradient(60rem 28rem at 78% 70%, rgba(242, 184, 28, .22), rgba(242, 184, 28, 0) 60%), linear-gradient(#111620, #1b2230); color: #fff7dc; border-bottom: .3rem solid var(--luz); }
.tema .tema-hero-in { max-width: 64rem; margin: 0 auto; padding: 2rem 1.25rem 2.75rem; display: grid; gap: 2rem; align-items: center; }
@media (min-width: 768px) { .tema .tema-hero-in { grid-template-columns: 1fr 15.5rem; padding: 3.5rem 1.5rem 4rem; gap: 3rem; } }
.tema .tema-trilha { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .85rem; color: #c7cfe2; margin-bottom: 1.75rem; }
.tema .tema-trilha a { color: #c7cfe2; text-decoration: none; }
.tema .tema-trilha a:hover { color: var(--luz2); text-decoration: underline; }
.tema .tema-sup { font-family: var(--f-titulo); font-size: .75rem; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--luz2); margin: 0 0 .9rem; }
.tema .tema-hero h1 { font-family: var(--f-titulo); font-weight: 800; font-size: clamp(2.2rem, 7.5vw, 3.6rem); line-height: 1.04; text-transform: uppercase; letter-spacing: .02em; color: #fff7dc; margin: 0; overflow-wrap: break-word; }
.tema .tema-orn { color: var(--luz); letter-spacing: .5em; margin: 1.1rem 0; font-size: 1rem; }
.tema .tema-sub { font-style: italic; color: #dfe4f0; font-size: 1.25rem; line-height: 1.45; max-width: 34rem; margin: 1rem 0 0; }
.tema .tema-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .95rem; color: #aab3c9; margin: 1.6rem 0 0; }
.tema .tema-baixar { display: inline-block; margin-top: 1.4rem; padding: .65rem 1.3rem; border-radius: 2rem; background: var(--luz); color: var(--carvao); font-family: var(--f-titulo); font-weight: 700; text-decoration: none; transition: background .15s; }
.tema .tema-baixar:hover { background: var(--luz2); }
.tema .tema-capa { justify-self: center; width: min(15.5rem, 70%); border-radius: .35rem; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 212, 94, .45), 0 0 3rem -.5rem rgba(242, 184, 28, .45), 0 1.5rem 2.5rem -1rem rgba(0, 0, 0, .7); }
.tema .tema-capa img { display: block; width: 100%; height: auto; }
@media (max-width: 767px) { .tema .tema-capa { width: 11.5rem; } }

/* ── Corpo ───────────────────────────────────────────────── */
.tema .tema-corpo { max-width: 42rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
@media (min-width: 640px) { .tema .tema-corpo { padding: 3.5rem 1.5rem 5rem; } }

/* Sumário */
.tema .tema-sumario { margin: 0 0 3.5rem; padding: 1.5rem 1.4rem; border-top: .25rem solid var(--luz); border-radius: 0 0 .6rem .6rem; background: var(--cera2); }
.tema .tema-sumario h2 { font-family: var(--f-titulo); font-weight: 800; font-size: 1.4rem; text-transform: uppercase; letter-spacing: .06em; color: var(--carvao); margin: 0 0 1rem; }
.tema .tema-sumario ol { list-style: none; margin: 0; padding: 0; }
.tema .tema-sumario li { border-bottom: 1px solid #e0d4a9; }
.tema .tema-sumario li:last-child { border-bottom: 0; }
.tema .tema-sumario a { display: flex; align-items: baseline; gap: .8rem; padding: .55rem .2rem; text-decoration: none; color: var(--carvao); }
.tema .tema-sumario a:hover .nome { color: var(--ambar); text-decoration: underline; }
.tema .tema-sumario .rot { flex: 0 0 6.4rem; font-family: var(--f-titulo); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ambar); }
.tema .tema-sumario .nome { flex: 1; font-size: 1.02rem; line-height: 1.3; }
@media (max-width: 480px) { .tema .tema-sumario a { flex-direction: column; gap: .1rem; } .tema .tema-sumario .rot { flex-basis: auto; } }

/* Texto de leitura (A− / A+ adicionam .reading-sm / .reading-lg) */
.tema .leitura-tematica { font-size: 1.14rem; line-height: 1.7; }
.tema .leitura-tematica.reading-sm { font-size: 1.02rem; }
.tema .leitura-tematica.reading-lg { font-size: 1.32rem; }
.tema .leitura-tematica p { margin: 0 0 1.05em; overflow-wrap: break-word; }
@media (min-width: 640px) { .tema .leitura-tematica p { text-align: justify; hyphens: auto; } }
.tema .leitura-tematica strong { color: var(--carvao); font-weight: 700; }
.tema .leitura-tematica em { font-style: italic; }

/* Capítulos */
.tema .cap { position: relative; margin-top: 4.5rem; scroll-margin-top: 5rem; }
.tema .cap:first-child { margin-top: 0; }
.tema .ilus { margin: 0 0 2rem; border-radius: 40% 40% 0 0 / 3.5rem 3.5rem 0 0; overflow: hidden; border-bottom: .3rem solid var(--luz); background: var(--carvao); }
.tema .ilus img { display: block; width: 100%; height: auto; }
.tema .cap[data-tipo="capitulo"]:has(.ilus)::before { content: attr(data-n); position: absolute; top: .9rem; right: .9rem; z-index: 2; width: 2.9rem; height: 2.9rem; border-radius: 50%; background: var(--luz); color: var(--carvao); font-family: var(--f-titulo); font-weight: 800; font-size: 1.25rem; line-height: 2.9rem; text-align: center; box-shadow: 0 0 0 .3rem rgba(17, 22, 32, .55); }
.tema .cap h2 { margin: 0 0 1.5rem; }
.tema .cap h2 .rot { display: block; font-family: var(--f-titulo); font-size: .76rem; font-weight: 700; letter-spacing: .34em; text-transform: uppercase; color: var(--ambar); margin-bottom: .5rem; }
.tema .cap h2 .nome { display: block; font-family: var(--f-titulo); font-weight: 800; font-size: clamp(1.7rem, 5.2vw, 2.2rem); line-height: 1.1; color: var(--carvao); overflow-wrap: break-word; }
.tema .cap h2 .nome::after { content: ""; display: block; width: .8rem; height: 1.1rem; margin-top: .8rem; border-radius: 50% 50% 50% 50% / 68% 68% 32% 32%; background: var(--luz); }
.tema .cap h3 { font-family: var(--f-titulo); font-weight: 700; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; line-height: 1.3; color: var(--ardosia); margin: 2.2rem 0 .6rem; }

/* Destaques */
.tema .cap blockquote { margin: 1.6rem 0; padding: 1rem 1.2rem; background: #fff3c4; border-left: .35rem solid var(--luz); border-radius: 0 .6rem .6rem 0; color: var(--carvao); font-style: normal; }
.tema .cap blockquote p { margin: 0 0 .7em; text-align: left; hyphens: none; }
.tema .cap blockquote p:last-child { margin-bottom: 0; }
.tema .cap blockquote.ideia { margin: 0 0 1.8rem; background: var(--cera2); font-style: italic; }
.tema .cap blockquote.ideia strong { display: block; font-family: var(--f-titulo); font-style: normal; font-size: .74rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ambar); margin-bottom: .2rem; }
.tema .cap blockquote.ideia + p::first-letter { float: left; font-family: var(--f-titulo); font-weight: 800; font-size: 3.6em; line-height: .8; color: var(--carvao); padding: .08em .12em 0 0; }
.tema .cap blockquote.antes { background: rgba(135, 148, 176, .14); border-left: 0; border: 1.3px solid #8794b0; border-radius: .6rem; }
.tema .cap blockquote.antes strong { font-family: var(--f-titulo); color: var(--ardosia); }
.tema .cap blockquote.versiculo { margin: 2rem .5rem; padding: 1.4rem 1.2rem 1.2rem; text-align: center; background: var(--carvao); border-left: 0; border-top: .3rem solid var(--luz); border-radius: .6rem; font-size: 1.15em; font-style: italic; color: #fff7dc; }
.tema .cap blockquote.versiculo p { text-align: center; }
.tema .cap blockquote.versiculo strong { display: block; font-family: var(--f-titulo); font-style: normal; font-size: .72rem; letter-spacing: .26em; text-transform: uppercase; color: var(--luz2); margin-bottom: .5rem; }

/* Listas, linhas, links */
.tema .cap ul, .tema .cap ol { margin: 0 0 1.2em; padding-left: 1.5rem; }
.tema .cap ul { list-style: disc; }
.tema .cap ol { list-style: decimal; }
.tema .cap li { margin-bottom: .45em; padding-left: .2rem; }
.tema .cap li::marker { color: var(--ambar); font-weight: 700; }
.tema .cap hr { border: 0; border-top: .2rem solid var(--luz); width: 4rem; margin: 2rem 0; }
.tema .cap a { color: var(--ardosia); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; overflow-wrap: break-word; }
.tema .cap a:hover { color: var(--ambar); }

/* Glossário e referências */
.tema .cap.glossario ul { list-style: none; padding: 0; }
.tema .cap.glossario li { padding: .6rem 0; border-bottom: 1px solid #e0d4a9; margin: 0; }
.tema .cap.glossario li strong { color: var(--ambar); }
.tema .cap.ref p, .tema .cap.ref li { font-size: .88em; line-height: 1.5; text-align: left; hyphens: none; }

/* Faixa de convite para assinar (abaixo da prévia): mantém o visual do site */
.tema .tema-corpo > :not(.tema-sumario):not(.leitura-tematica) { margin-top: 2.5rem; }

@media (prefers-reduced-motion: reduce) { .tema .tema-baixar { transition: none; } }
