@font-face { font-family: Chivo; src: url(fontes/Chivo-400.woff2) format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: Chivo; src: url(fontes/Chivo-400i.woff2) format('woff2'); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: 'Zilla Slab'; src: url(fontes/ZillaSlab-700.woff2) format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --tinta: #2f2a5c;
  --azul: #091747;
  --vermelho: #e94943;
  --verde: #15d17d;
  --marca: #fefccf;
  /* Títulos: SF Pro nos aparelhos Apple (fonte do sistema), Chivo nos demais */
  --titulos: -apple-system, BlinkMacSystemFont, 'SF Pro Display', Chivo, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #fff; color: var(--azul); font-family: Chivo, Arial, sans-serif; font-size: 18px; line-height: 1.3; }
img { max-width: 100%; height: auto; }
a { color: inherit; }

/* ---------- porta de entrada ---------- */
.porta { width: 100%; max-width: 400px; margin: 0 auto; padding: 17px 20px 40px; text-align: center; }
.porta h1 { margin: 6px 0 16px; font-size: 24px; font-weight: 400; line-height: 1.25; color: #000; }
.porta .capa { display: block; width: 74%; max-width: 280px; margin: 0 auto 12px; }
.porta .capa-menor { width: 62%; margin-top: 14px; }
.porta p { margin: 0 0 10px; }
.porta .chamada { line-height: 1.35; margin-bottom: 14px; }
.porta .menor { font-size: 16px; }
.porta .miudo { font-size: 14px; }
.porta .aviso { margin-top: 24px; line-height: 1.25; overflow-wrap: anywhere; }
.marca { background: var(--marca); padding: 0 2px; }
.porta .erro { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fdecea; color: #8a1f1a; font-size: 16px; }
.porta input { display: block; width: 100%; max-width: 250px; height: 48px; margin: 0 auto 16px; padding: 0 12px; border: 1px solid rgba(0, 0, 0, .41); border-radius: 10px; background: #fcfcfc; font: inherit; font-size: 17px; text-align: center; color: var(--azul); }
.porta input:focus-visible, .porta button:focus-visible, .indice a:focus-visible, .voltar:focus-visible { outline: 3px solid #5b8def; outline-offset: 2px; }
.porta button { display: block; width: 100%; max-width: 230px; height: 54px; margin: 0 auto; border: 0; border-radius: 10px; background: var(--verde); color: #fff; font: inherit; font-size: 18px; font-weight: 700; cursor: pointer; }
.porta button:hover { filter: brightness(.95); }

/* ---------- livro ---------- */
.livro { width: 100%; max-width: 700px; margin: 0 auto; padding: 0 20px 60px; color: var(--tinta); }
.capa-livro { display: block; width: 100%; max-width: 644px; margin: 40px auto 30px; }
.indice-titulo { margin: 0 0 30px; font-family: var(--titulos); font-size: 32px; font-weight: 600; line-height: 1.2; }
.indice a { display: block; padding: 12px 0; border-bottom: 1px solid #dedede; font-family: var(--titulos); font-size: 26px; font-weight: 600; line-height: 1.2; text-decoration: none; overflow-wrap: anywhere; }
.indice a:hover { color: var(--vermelho); }
.rodape { margin: 40px 0 0; font-size: 14px; color: #777; overflow-wrap: anywhere; }

.aula { padding-bottom: 120px; }
.cabecalho { display: block; width: 303px; max-width: 70%; margin: 25px auto 30px; }
.cabecalho img { display: block; }
.cap-titulo { margin: 0 0 30px; font-family: var(--titulos); font-size: 35px; font-weight: 700; line-height: 1.4; color: var(--vermelho); overflow-wrap: anywhere; }
.texto { font-size: 22px; line-height: 1.3; overflow-wrap: break-word; }
.texto h2, .texto h3 { margin: .2em 0; line-height: 1.25; }
.texto h2 { font-size: 1.35em; }
.texto h3 { font-size: 1.17em; }
.texto ul, .texto ol { margin: .3em 0; padding-left: 1.4em; }
.texto li { margin: .15em 0; }
.texto a { color: #337ab7; }
.texto mark { color: inherit; padding: 0 2px; }
.texto img { display: block; margin: .4em 0; }
.texto .al-right { text-align: right; }
.texto .al-center { text-align: center; }

.voltar { position: fixed; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; min-height: 72px; padding-bottom: env(safe-area-inset-bottom); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 -1px 6px rgba(0, 0, 0, .12); color: var(--tinta); font-family: 'Zilla Slab', Georgia, serif; font-size: 24px; text-decoration: none; }
.voltar:hover { background: #fff; }

@media (max-width: 500px) {
  .livro { padding-left: 16px; padding-right: 16px; }
  .capa-livro { margin-top: 20px; }
  .indice-titulo { font-size: 26px; margin-bottom: 18px; }
  .indice a { font-size: 20px; }
  .cap-titulo { font-size: 24px; margin-bottom: 20px; }
  .texto { font-size: 19px; line-height: 1.38; }
  .voltar { min-height: 60px; font-size: 21px; }
}
