/*
 * 05-prose.css — lesson content typography
 * ---------------------------------------------------------------------------
 * Styles for author-written lesson HTML (licoes.conteudo_html). Only the tags
 * inside the strip_tags() whitelist in gestao_academica::salvar_licao() can
 * ever appear here, so those are exactly the tags styled below.
 *
 * NOTE: applying the reading measure requires removing the inline
 * style="font-size:15px;line-height:1.8;color:#374151" from the container in
 * area_do_aluno/licao.php — an inline style beats any class.
 * ---------------------------------------------------------------------------
 */

.lesson-prose {
  max-width: var(--aura-measure);   /* ~75 characters per line at 17px */
  font-size: 17px;
  line-height: 1.7;
  color: var(--aura-text);
}

/* ── Headings ─────────────────────────────────────────────────────────────── */
.lesson-prose h1,
.lesson-prose h2,
.lesson-prose h3,
.lesson-prose h4,
.lesson-prose h5,
.lesson-prose h6 {
  font-family: var(--aura-font-display);
  font-weight: 700;
  color: var(--aura-text);
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-wrap: balance;
}
.lesson-prose h1 { font-size: 1.75rem; margin: 2rem 0 0.75rem; }
.lesson-prose h2 { font-size: 1.4rem;  margin: 1.9rem 0 0.7rem; }
.lesson-prose h3 { font-size: 1.175rem; margin: 1.7rem 0 0.6rem; }
.lesson-prose h4 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }
.lesson-prose h5,
.lesson-prose h6 { font-size: 1rem; margin: 1.4rem 0 0.5rem; }
.lesson-prose > :first-child { margin-top: 0; }

/* ── Body ─────────────────────────────────────────────────────────────────── */
.lesson-prose p { margin: 0 0 1.05em; }
.lesson-prose strong, .lesson-prose b { font-weight: 650; color: var(--aura-text); }
.lesson-prose em, .lesson-prose i { font-style: italic; }
.lesson-prose u { text-decoration: underline; text-underline-offset: 2px; }
.lesson-prose s { text-decoration: line-through; color: var(--aura-text-muted); }
.lesson-prose a {
  color: var(--aura-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.lesson-prose a:hover { color: #5620BC; }

/* ── Lists ────────────────────────────────────────────────────────────────── */
.lesson-prose ul, .lesson-prose ol { margin: 0 0 1.05em; padding-left: 1.5rem; }
.lesson-prose ul { list-style: disc; }
.lesson-prose ol { list-style: decimal; }
.lesson-prose li { margin-bottom: 0.4em; }
.lesson-prose li::marker { color: var(--aura-primary); }
.lesson-prose ul ul, .lesson-prose ol ol, .lesson-prose ul ol, .lesson-prose ol ul { margin: 0.4em 0 0; }

/* ── Blockquote ───────────────────────────────────────────────────────────── */
.lesson-prose blockquote {
  margin: 1.4em 0;
  padding: 0.2em 0 0.2em 1.1rem;
  border-left: 3px solid var(--aura-primary-soft);
  color: var(--aura-text-muted);
  font-style: italic;
}
.lesson-prose blockquote p:last-child { margin-bottom: 0; }

/* ── Code ─────────────────────────────────────────────────────────────────── */
.lesson-prose code {
  font-family: var(--aura-font-mono);
  font-size: 0.875em;
  background: #F3EEFC;
  color: var(--aura-text);
  padding: 0.12em 0.36em;
  border-radius: 4px;
}
.lesson-prose pre {
  margin: 1.4em 0;
  padding: 1rem 1.1rem;
  background: #17141F;
  color: #EDEAF4;
  border-radius: var(--aura-radius-sm);
  overflow-x: auto;          /* wide code scrolls itself, never the page */
  font-size: 0.85rem;
  line-height: 1.65;
}
.lesson-prose pre code { background: none; color: inherit; padding: 0; font-size: inherit; }

/* ── Tables ───────────────────────────────────────────────────────────────── */
.lesson-prose table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 0.9375rem;
  display: block;
  overflow-x: auto;          /* wide tables scroll inside their own box */
}
.lesson-prose th, .lesson-prose td {
  text-align: left;
  padding: 0.6em 0.85em;
  border-bottom: 1px solid var(--aura-content-border);
  vertical-align: top;
}
.lesson-prose thead th {
  background: #F9FAFB;
  font-weight: 650;
  color: var(--aura-text-muted);
  font-size: 0.8125rem;
}
.lesson-prose tbody tr:last-child td { border-bottom: 0; }
.lesson-prose tfoot td { font-weight: 650; }

/* ── Media & rules ────────────────────────────────────────────────────────── */
.lesson-prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--aura-radius-sm);
  margin: 1.4em 0;
}
.lesson-prose hr {
  margin: 2em 0;
  border: 0;
  border-top: 1px solid var(--aura-content-border);
}

/* div/span carry no default styling on purpose — authors use them for
   structure, and imposing looks here would fight the content. */
