/* Tema "Lã e Terra" para a leitura de "No passo do rebanho": marrom-terra de pasto à noite, lã creme, sálvia, barro-rosado e ouro de feno.
   Títulos em itálico de serifa clássica, capítulos marcados por uma pedra de passagem numerada e separador de pedras que crescem.
   Todas as regras começam em .tema para não vazar para o site. Fontes: Goudy Bookletter 1911 (títulos), Jost (rótulos) e EB Garamond (texto). */

.tema {
  --gruta: #2a1c13;
  --gruta2: #3a2819;
  --trigo: #dcb860;
  --trigo2: #f4dc98;
  --creme: #f2e9d9;
  --barro: #e08a72;
  --texto: #ece2d0;
  --mudo: #b7a48d;
  --linha: #4a3523;
  --f-titulo: "Goudy Bookletter 1911", Georgia, serif;
  --f-rot: "Jost", "Segoe UI", sans-serif;
  --f-texto: "EB Garamond", Georgia, serif;
  background: var(--gruta);
  color: var(--texto);
}
/* A fonte do tema vale só para o cabeçalho, o sumário e o texto; o convite para assinar mantém o visual do site */
.tema .tema-hero, .tema .tema-sumario, .tema .leitura-tematica { font-family: var(--f-texto); }

/* ── Cabeçalho ───────────────────────────────────────────── */
.tema .tema-hero { background: radial-gradient(120% 90% at 85% 0%, #3a2819 0%, var(--gruta) 60%); border-bottom: 4px solid var(--trigo); }
.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: var(--mudo); margin-bottom: 1.75rem; }
.tema .tema-trilha a { color: var(--mudo); text-decoration: none; }
.tema .tema-trilha a:hover { color: var(--trigo2); text-decoration: underline; }
.tema .tema-sup { font-family: var(--f-rot); text-transform: uppercase; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.3em; color: var(--trigo); margin: 0 0 1.1rem; }
.tema .tema-sup::after { content: ""; display: block; width: 3.4rem; height: 3px; background: var(--trigo); margin-top: .9rem; }
.tema .tema-hero h1 { font-family: var(--f-titulo); font-weight: 400; font-size: clamp(2.9rem, 10vw, 5.2rem); line-height: .94;  letter-spacing: .005em; color: var(--creme); margin: 0; }
.tema .tema-orn { display: none; }
.tema .tema-sub { font-style: italic; color: var(--trigo2); font-size: 1.15rem; line-height: 1.45; max-width: 32rem; margin: 1.4rem 0 0; }
.tema .tema-meta { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .9rem; color: var(--mudo); margin: 1.6rem 0 0; }
.tema .tema-baixar { display: inline-block; margin-top: 1.4rem; padding: .6rem 1.2rem; border: 1.5px solid var(--trigo); color: var(--trigo2); font-family: var(--f-rot); text-transform: uppercase; font-size: 0.84rem; font-weight: 600; letter-spacing: 0.14em; text-decoration: none; transition: background .15s, color .15s; }
.tema .tema-baixar:hover { background: var(--trigo); color: var(--gruta); }
.tema .tema-capa { justify-self: center; width: min(15.5rem, 70%); border: 1.5px solid rgba(220, 184, 96, .6); box-shadow: 0 0 0 .3rem var(--gruta), 0 0 0 calc(.3rem + 1px) rgba(220, 184, 96, .35), 0 1.5rem 3rem -1rem rgba(0, 0, 0, .8); }
.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: 3px solid var(--trigo); background: var(--gruta2); }
.tema .tema-sumario h2 { font-family: var(--f-titulo); font-weight: 400; font-size: 1.9rem;  letter-spacing: .02em; color: var(--creme); margin: 0 0 1rem; }
.tema .tema-sumario ol { list-style: none; margin: 0; padding: 0; }
.tema .tema-sumario li { border-bottom: 1px solid var(--linha); }
.tema .tema-sumario li:last-child { border-bottom: 0; }
.tema .tema-sumario a { display: flex; align-items: baseline; gap: .8rem; padding: .6rem .1rem; text-decoration: none; color: var(--texto); }
.tema .tema-sumario a:hover .nome { color: var(--trigo2); }
.tema .tema-sumario .rot { flex: 0 0 6.6rem; font-family: var(--f-rot); text-transform: uppercase; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; color: var(--trigo); }
.tema .tema-sumario .nome { flex: 1; font-size: 1rem; 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 (o tamanho muda com A− / A+, que adicionam .reading-sm / .reading-lg) */
.tema .leitura-tematica { font-size: 1.1rem; line-height: 1.72; }
.tema .leitura-tematica.reading-sm { font-size: 1rem; }
.tema .leitura-tematica.reading-lg { font-size: 1.28rem; }
.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, .tema .leitura-tematica em { color: var(--creme); }

/* 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-bottom: 4px solid var(--trigo); background: var(--gruta2); }
.tema .ilus img { display: block; width: 100%; height: auto; }
.tema .cap[data-tipo="capitulo"]:has(.ilus)::before { content: attr(data-n); position: absolute; top: .4rem; right: .8rem; z-index: 2; font-family: var(--f-titulo); font-weight: 400;  width: 4.4rem; height: 2.5rem; line-height: 2.5rem; text-align: center; border-radius: 50%; background: var(--creme); color: var(--gruta); font-size: 1.5rem; box-shadow: 0 .25rem 0 #d9ccb4, 0 0 0 .3rem rgba(29, 19, 12, .85); }
.tema .cap h2 { margin: 0 0 1.5rem; padding-left: 1rem; border-left: 5px solid var(--trigo); }
.tema .cap h2 .rot { display: block; font-family: var(--f-rot); text-transform: uppercase; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.3em; color: var(--trigo); margin-bottom: .3rem; }
.tema .cap h2 .nome { display: block; font-family: var(--f-titulo); font-weight: 400; font-size: clamp(2.3rem, 8vw, 3.3rem); line-height: 1;  letter-spacing: .01em; color: var(--creme); }
.tema .cap h3 { font-family: var(--f-rot); text-transform: uppercase; font-weight: 600; font-size: 0.92rem; letter-spacing: 0.16em; color: var(--trigo2); margin: 2.2rem 0 .6rem; }
.tema .cap h3::before { content: ""; display: inline-block; width: .8rem; height: .4rem; border-radius: 50%; background: var(--barro); margin-right: .55rem; vertical-align: .1em; }

/* Destaques */
.tema .cap blockquote { margin: 1.6rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--barro); color: #e2d6c0; font-style: italic; }
.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; padding: 1rem 1.2rem 1rem 1.6rem; background: var(--gruta2); border: 0; border-radius: 2.6rem .4rem .4rem .4rem; color: var(--creme); }
.tema .cap blockquote.ideia strong { font-family: var(--f-rot); text-transform: uppercase; font-style: normal; font-size: 0.76rem; letter-spacing: 0.26em; color: var(--trigo); }
.tema .cap blockquote.ideia + p::first-letter { float: left; font-family: var(--f-titulo); font-weight: 400; font-size: 4.4em; line-height: .78; color: var(--trigo); padding: .1em .12em 0 0; }
.tema .cap blockquote.antes { padding: 1rem 1.2rem; background: rgba(220, 184, 96, .07); border: 1.2px dashed var(--trigo); border-radius: .4rem; font-style: normal; color: var(--texto); }
.tema .cap blockquote.antes strong { font-family: var(--f-rot); text-transform: uppercase; font-size: 0.76rem; letter-spacing: 0.22em; color: var(--trigo); }
.tema .cap blockquote.versiculo { margin: 2rem .2rem; padding: 1.6rem 1.4rem 1.3rem; border-radius: 40% 40% .4rem .4rem / 2.2rem 2.2rem .4rem .4rem; text-align: center; background: var(--trigo); border-left: 0; color: var(--gruta); font-size: 1.12em; }
.tema .cap blockquote.versiculo p { text-align: center; }
.tema .cap blockquote.versiculo strong { display: block; font-family: var(--f-rot); text-transform: uppercase; font-style: normal; font-size: 0.76rem; letter-spacing: 0.3em; color: #a34a33; 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(--trigo); }
.tema .cap hr { border: 0; border-top: 1px solid #7c6246; margin: 2rem 0; }
.tema .cap a { color: var(--trigo2); text-decoration: underline; text-underline-offset: 3px; word-break: break-word; }
.tema .cap a:hover { color: var(--trigo); }

/* 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 var(--linha); margin: 0; }
.tema .cap.glossario li strong { color: var(--trigo); }
.tema .cap.ref p, .tema .cap.ref li { font-size: .88em; line-height: 1.5; text-align: left; hyphens: none; color: #cdbfa6; }

.tema .tema-corpo > :not(.tema-sumario):not(.leitura-tematica) { margin-top: 2.5rem; }
@media (prefers-reduced-motion: reduce) { .tema .tema-baixar { transition: none; } }

.tema .cap h2 .nome::after { content: ""; display: block; width: 9rem; height: 1.1rem; margin-top: .8rem; background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 5'><ellipse cx='2' cy='4' rx='.8' ry='.6' fill='%23dcb860'/><ellipse cx='7' cy='3.9' rx='.95' ry='.6' fill='%23dcb860'/><ellipse cx='14' cy='3.7' rx='1.25' ry='.7' fill='%23dcb860'/><ellipse cx='23' cy='3.5' rx='1.6' ry='.9' fill='%23dcb860'/><ellipse cx='34' cy='3.3' rx='2' ry='1.1' fill='%23dcb860'/></svg>") no-repeat left bottom / 100% 100%; }
