/*
 * Manual do sistema do Lumen. Os tokens vêm do design system do app (packages/design/src/tokens.css):
 * "Tungstênio" no escuro, "Luz do dia" no claro, acento âmbar, Onest + JetBrains Mono. O tema segue o
 * sistema até o leitor escolher (botão no topo da barra lateral).
 */
@font-face {
  font-family: 'Onest';
  src: url('fontes/onest.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fontes/jetbrains-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('fontes/jetbrains-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light;
  --fundo: #eceef2;
  --fundo-2: #e4e7ec;
  --folha: #f7f8fa;
  --folha-forte: #ffffff;
  --texto: #15171c;
  --texto-medio: #2f3440;
  --texto-fraco: #4f5562;
  --divisor: rgb(20 30 50 / 0.1);
  --acento: #e3a857;
  --acento-texto: #8a5a12;
  --acento-fundo: rgb(227 168 87 / 0.18);
  --sobre-acento: #1a1410;
  --perigo: #b32a1d;
  --perigo-fundo: rgb(200 50 30 / 0.08);
  --no-ar: #c53122;
  --ok: #1f6b38;
  --ok-fundo: rgb(40 140 70 / 0.1);
  --luz-1: rgb(255 205 150 / 0.55);
  --luz-2: rgb(160 195 245 / 0.45);
  --quadro: #0f0d0b;
  --sombra: 0 24px 48px -28px rgb(40 50 80 / 0.35);
  --fonte-ui: 'Onest', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fonte-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --largura-texto: 46rem;
  --largura-figura: 68rem;
  --mov: 160ms cubic-bezier(0.2, 0, 0, 1);
}
:root[data-tema='escuro'] {
  color-scheme: dark;
  --fundo: #0f0d0b;
  --fundo-2: #15120f;
  --folha: #1a1612;
  --folha-forte: #221d18;
  --texto: #f4eee7;
  --texto-medio: #d3c8bb;
  --texto-fraco: #bcb0a2;
  --divisor: rgb(255 236 210 / 0.09);
  --acento-texto: #e3a857;
  --acento-fundo: rgb(227 168 87 / 0.13);
  --perigo: #ff8f7f;
  --perigo-fundo: rgb(255 120 100 / 0.1);
  --ok: #7fd49a;
  --ok-fundo: rgb(90 200 120 / 0.1);
  --luz-1: rgb(227 168 87 / 0.32);
  --luz-2: rgb(178 92 40 / 0.22);
  --sombra: 0 30px 60px -30px rgb(0 0 0 / 0.8);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema='claro']) {
    color-scheme: dark;
    --fundo: #0f0d0b;
    --fundo-2: #15120f;
    --folha: #1a1612;
    --folha-forte: #221d18;
    --texto: #f4eee7;
    --texto-medio: #d3c8bb;
    --texto-fraco: #bcb0a2;
    --divisor: rgb(255 236 210 / 0.09);
    --acento-texto: #e3a857;
    --acento-fundo: rgb(227 168 87 / 0.13);
    --perigo: #ff8f7f;
    --perigo-fundo: rgb(255 120 100 / 0.1);
    --ok: #7fd49a;
    --ok-fundo: rgb(90 200 120 / 0.1);
    --luz-1: rgb(227 168 87 / 0.32);
    --luz-2: rgb(178 92 40 / 0.22);
    --sombra: 0 30px 60px -30px rgb(0 0 0 / 0.8);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-padding-top: 1.5rem;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--fundo);
  color: var(--texto);
  font-family: var(--fonte-ui);
  font-size: 17px;
  line-height: 1.62;
  font-feature-settings: 'ss01';
  -webkit-font-smoothing: antialiased;
}
::selection {
  background: var(--acento);
  color: var(--sobre-acento);
}
a {
  color: var(--acento-texto);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── estrutura ───────────────────────────────────────────────────────────────────────────── */
.pagina {
  display: grid;
  grid-template-columns: 18.5rem minmax(0, 1fr);
  min-height: 100vh;
}
.lateral {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 1.6rem 1.25rem 2rem;
  border-right: 1px solid var(--divisor);
  background: var(--fundo-2);
  scrollbar-width: thin;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--texto);
  text-decoration: none;
  margin-bottom: 1.6rem;
}
.marca img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.marca b {
  display: block;
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.marca small {
  display: block;
  font-family: var(--fonte-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-fraco);
}
.indice {
  list-style: none;
  margin: 0;
  padding: 0;
}
.indice > li > a {
  display: grid;
  grid-template-columns: 2rem 1fr;
  align-items: baseline;
  padding: 0.42rem 0.55rem;
  border-radius: 10px;
  color: var(--texto-medio);
  text-decoration: none;
  font-size: 0.93rem;
  line-height: 1.35;
  transition: background var(--mov), color var(--mov);
}
.indice > li.parte {
  margin: 1.1rem 0.55rem 0.35rem;
  font-family: var(--fonte-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texto-fraco);
}
.indice > li > a:hover {
  background: var(--acento-fundo);
  color: var(--texto);
}
.indice > li > a span {
  font-family: var(--fonte-mono);
  font-size: 11px;
  color: var(--texto-fraco);
}
.indice > li.atual > a {
  background: var(--acento-fundo);
  color: var(--texto);
  font-weight: 600;
}
.indice > li.atual > a span {
  color: var(--acento-texto);
}
.indice ol {
  list-style: none;
  margin: 0.2rem 0 0.6rem 2.55rem;
  padding: 0 0 0 0.7rem;
  border-left: 1px solid var(--divisor);
}
.indice ol a {
  display: block;
  padding: 0.22rem 0.4rem;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--texto-fraco);
  text-decoration: none;
  border-radius: 6px;
}
.indice ol a:hover,
.indice ol a.vista {
  color: var(--texto);
}
.indice ol a.vista {
  box-shadow: inset 2px 0 0 var(--acento);
  border-radius: 0 6px 6px 0;
}
.tema {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.35rem;
  font-family: var(--fonte-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tema button {
  flex: 1;
  padding: 0.45rem 0.3rem;
  border: 1px solid var(--divisor);
  border-radius: 8px;
  background: transparent;
  color: var(--texto-fraco);
  font: inherit;
  cursor: pointer;
}
.tema button[aria-pressed='true'] {
  border-color: var(--acento);
  color: var(--acento-texto);
  background: var(--acento-fundo);
}
.versao {
  margin-top: 1rem;
  font-family: var(--fonte-mono);
  font-size: 10.5px;
  color: var(--texto-fraco);
  letter-spacing: 0.04em;
}

main {
  min-width: 0;
  width: 100%;
  max-width: calc(var(--largura-figura) + 8rem);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 4rem) 6rem;
}
/* tudo começa na mesma margem esquerda: o texto numa coluna de leitura, as fotos mais largas */
main > * {
  max-width: var(--largura-texto);
  margin-left: 0;
  margin-right: 0;
}
main > .larga,
main > figure.tela,
main > .grade-figuras {
  max-width: var(--largura-figura);
}

/* ── abertura do capítulo ────────────────────────────────────────────────────────────────── */
.abertura {
  position: relative;
  max-width: var(--largura-figura);
  margin: 0 0 3rem;
  padding: 4.5rem 0 2.6rem;
  border-bottom: 1px solid var(--divisor);
  isolation: isolate;
}
.abertura::before {
  /* a luz de palco do Lumen: duas manchas quentes atrás do título */
  content: '';
  position: absolute;
  inset: -2rem -30% auto -10%;
  height: 26rem;
  z-index: -1;
  background:
    radial-gradient(38% 60% at 18% 30%, var(--luz-1), transparent 70%),
    radial-gradient(30% 50% at 62% 10%, var(--luz-2), transparent 70%);
  filter: blur(10px);
  opacity: 0.9;
  pointer-events: none;
}
.abertura .numero {
  font-family: var(--fonte-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acento-texto);
}
.abertura h1 {
  margin: 0.4rem 0 1rem;
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 18ch;
}
.abertura .resumo {
  margin: 0;
  max-width: 40rem;
  font-size: 1.2rem;
  line-height: 1.55;
  color: var(--texto-medio);
}
.neste {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.6rem 0 0;
  padding: 0;
  list-style: none;
}
.neste a {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid var(--divisor);
  border-radius: 99px;
  font-size: 0.85rem;
  color: var(--texto-medio);
  text-decoration: none;
  background: color-mix(in srgb, var(--folha) 70%, transparent);
}
.neste a:hover {
  border-color: var(--acento);
  color: var(--texto);
}

/* ── texto ───────────────────────────────────────────────────────────────────────────────── */
h2 {
  margin: 4.5rem 0 1rem;
  font-size: 2rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 700;
}
h2 .num,
h3 .num {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--fonte-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--acento-texto);
}
h3 {
  margin: 3rem 0 0.7rem;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 650;
}
p,
ul,
ol {
  margin-top: 0;
  margin-bottom: 1rem;
}
main li + li {
  margin-top: 0.3rem;
}
strong {
  font-weight: 650;
}
kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.45em 0.1em;
  border: 1px solid var(--divisor);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--folha-forte);
  font-family: var(--fonte-mono);
  font-size: 0.78em;
  line-height: 1.5;
  text-align: center;
  color: var(--texto);
  white-space: nowrap;
}
.ui {
  /* um rótulo literal da interface: "Próximo slide", "Limpar letra" */
  padding: 0.04em 0.38em;
  border-radius: 5px;
  background: var(--acento-fundo);
  color: var(--texto);
  font-weight: 600;
  font-size: 0.95em;
  white-space: nowrap;
}

/* "Como funciona" e "Exemplo de uso" — o par que toda funcionalidade tem */
.funcao {
  margin: 0;
}
.rotulo-bloco {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 0.45rem;
  font-family: var(--fonte-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--texto-fraco);
}
.rotulo-bloco::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--texto-fraco);
  opacity: 0.5;
}
.exemplo {
  position: relative;
  margin: 1.2rem 0 1.6rem;
  padding: 1.15rem 1.35rem 0.6rem 1.35rem;
  border: 1px solid var(--divisor);
  border-left: 3px solid var(--acento);
  border-radius: 4px 14px 14px 4px;
  background: var(--folha);
}
.exemplo .rotulo-bloco {
  margin-top: 0;
  color: var(--acento-texto);
}
.exemplo .rotulo-bloco::before {
  background: var(--acento);
  opacity: 1;
}
.exemplo p.cenario {
  color: var(--texto-medio);
  font-style: italic;
}
.exemplo ol {
  counter-reset: passo;
  list-style: none;
  padding-left: 0;
}
.exemplo ol > li {
  counter-increment: passo;
  position: relative;
  padding-left: 2.2rem;
}
.exemplo ol > li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: 0.12rem;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--acento-fundo);
  color: var(--acento-texto);
  font-family: var(--fonte-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45rem;
  text-align: center;
}

.aviso,
.dica {
  margin: 1.2rem 0 1.4rem;
  padding: 0.85rem 1.1rem 0.85rem 3rem;
  border-radius: 12px;
  position: relative;
  font-size: 0.96rem;
}
.aviso {
  background: var(--perigo-fundo);
  border: 1px solid color-mix(in srgb, var(--perigo) 35%, transparent);
}
.dica {
  background: var(--ok-fundo);
  border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent);
}
.aviso::before,
.dica::before {
  position: absolute;
  left: 1rem;
  top: 0.8rem;
  font-family: var(--fonte-mono);
  font-weight: 500;
  font-size: 13px;
}
.aviso::before {
  content: '!';
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: var(--perigo);
  color: var(--folha-forte);
  text-align: center;
  line-height: 1.3rem;
  top: 0.95rem;
}
.dica::before {
  content: '✓';
  color: var(--ok);
  font-size: 15px;
  left: 1.15rem;
}
.aviso > :last-child,
.dica > :last-child,
.exemplo > :last-child {
  margin-bottom: 0.6rem;
}
.aviso b:first-child,
.dica b:first-child {
  margin-right: 0.2rem;
}

/* tabela de atalhos */
table.atalhos {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.6rem;
  font-size: 0.95rem;
}
table.atalhos th,
table.atalhos td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--divisor);
  vertical-align: top;
}
table.atalhos th {
  font-family: var(--fonte-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-fraco);
}
table.atalhos td:first-child {
  white-space: nowrap;
  width: 1%;
}

/* ── figuras: a foto da tela e as áreas marcadas por cima ───────────────────────────────── */
figure.tela {
  margin: 1.8rem 0 2.2rem;
}
.quadro {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--quadro);
  box-shadow:
    0 0 0 1px var(--divisor),
    var(--sombra);
  cursor: zoom-in;
}
.quadro img {
  display: block;
  width: 100%;
  height: auto;
}
.quadro .area {
  position: absolute;
  border-radius: 8px;
  pointer-events: none;
  transition:
    box-shadow 220ms ease,
    opacity 220ms ease,
    outline-color 220ms ease;
}
/* modo "marcas": todas as áreas com contorno leve e o número no canto */
.quadro .area.marcada {
  outline: 2px solid rgb(227 168 87 / 0.85);
  outline-offset: -1px;
  box-shadow: inset 0 0 0 9999px rgb(227 168 87 / 0.06);
}
.quadro.com-destaque .area.marcada {
  outline-color: rgb(227 168 87 / 0.25);
  box-shadow: none;
}
.quadro.com-destaque .area.marcada.acesa {
  outline-color: var(--acento);
  outline-width: 3px;
  box-shadow:
    0 0 0 9999px rgb(8 6 4 / 0.58),
    0 0 24px 4px rgb(227 168 87 / 0.55);
  z-index: 2;
}
/* modo "foco": uma área só, o resto da tela apagado como num palco */
.quadro .area.foco {
  outline: 3px solid var(--acento);
  outline-offset: 2px;
  box-shadow:
    0 0 0 9999px rgb(8 6 4 / 0.62),
    0 0 30px 6px rgb(227 168 87 / 0.5);
}
.quadro .area.foco.segunda {
  box-shadow: 0 0 30px 6px rgb(227 168 87 / 0.5);
}
.quadro .marcador {
  position: absolute;
  z-index: 3;
  transform: translate(-30%, -30%);
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--acento);
  color: var(--sobre-acento);
  font-family: var(--fonte-mono);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.7rem;
  text-align: center;
  box-shadow:
    0 0 0 3px rgb(15 13 11 / 0.85),
    0 4px 12px rgb(0 0 0 / 0.5);
  cursor: pointer;
  pointer-events: auto;
  transition: transform var(--mov);
}
.quadro .marcador:hover,
.quadro .marcador.aceso {
  transform: translate(-30%, -30%) scale(1.18);
}
.quadro .falta {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  z-index: 4;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: #b32a1d;
  color: #fff;
  font-family: var(--fonte-mono);
  font-size: 11px;
}
/* recorte ampliado de uma área (controles pequenos) */
.quadro.recorte {
  cursor: zoom-in;
}
.quadro.recorte img {
  position: absolute;
  max-width: none;
}
figure.tela figcaption {
  margin-top: 0.7rem;
  max-width: var(--largura-texto);
  font-size: 0.88rem;
  color: var(--texto-fraco);
}
figure.tela figcaption b {
  color: var(--texto-medio);
}
.grade-figuras {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.2rem;
  margin: 1.8rem 0 2.2rem;
}
.grade-figuras figure.tela {
  margin: 0;
}

/* a legenda numerada que acompanha uma figura com marcas */
ol.legenda {
  list-style: none;
  padding: 0;
  margin: -0.6rem 0 2rem;
  display: grid;
  gap: 0.15rem;
}
ol.legenda > li {
  display: grid;
  grid-template-columns: 2.2rem 1fr;
  gap: 0.2rem;
  padding: 0.55rem 0.7rem;
  margin: 0;
  border-radius: 10px;
  transition: background var(--mov);
}
ol.legenda > li:hover,
ol.legenda > li.acesa {
  background: var(--acento-fundo);
}
ol.legenda > li::before {
  content: attr(data-n);
  width: 1.55rem;
  height: 1.55rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--acento);
  color: var(--sobre-acento);
  font-family: var(--fonte-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.55rem;
  text-align: center;
}
ol.legenda b {
  font-weight: 650;
}
ol.legenda a.ver {
  font-size: 0.85rem;
  white-space: nowrap;
}

/* ── capa (index) ────────────────────────────────────────────────────────────────────────── */
.capitulos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 0.9rem;
  max-width: var(--largura-figura);
  margin: 2rem 0 3rem;
  padding: 0;
  list-style: none;
}
.capitulos a {
  display: block;
  height: 100%;
  padding: 1.15rem 1.25rem 1.2rem;
  border: 1px solid var(--divisor);
  border-radius: 16px;
  background: var(--folha);
  color: var(--texto);
  text-decoration: none;
  transition:
    border-color var(--mov),
    transform var(--mov);
}
.capitulos a:hover {
  border-color: var(--acento);
  transform: translateY(-2px);
}
.capitulos span {
  font-family: var(--fonte-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--acento-texto);
}
.capitulos b {
  display: block;
  margin: 0.25rem 0 0.35rem;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}
.capitulos small {
  display: block;
  color: var(--texto-fraco);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ── navegação entre capítulos ───────────────────────────────────────────────────────────── */
.proximo-capitulo {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--largura-figura);
  margin: 5rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--divisor);
}
.proximo-capitulo a {
  display: block;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--divisor);
  border-radius: 12px;
  color: var(--texto);
  text-decoration: none;
  min-width: 14rem;
}
.proximo-capitulo a:hover {
  border-color: var(--acento);
}
.proximo-capitulo small {
  display: block;
  font-family: var(--fonte-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--texto-fraco);
}
.proximo-capitulo .seguinte {
  margin-left: auto;
  text-align: right;
}

/* ── foto ampliada ───────────────────────────────────────────────────────────────────────── */
dialog.ampliada {
  width: min(96vw, 2000px);
  max-height: 96vh;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  overflow: visible;
}
dialog.ampliada::backdrop {
  background: rgb(6 5 4 / 0.86);
  backdrop-filter: blur(6px);
}
dialog.ampliada .quadro {
  cursor: zoom-out;
}
dialog.ampliada .fechar {
  position: absolute;
  top: -2.6rem;
  right: 0;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgb(255 255 255 / 0.25);
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-family: var(--fonte-mono);
  font-size: 12px;
  cursor: pointer;
}

/* ── botão de menu no celular ────────────────────────────────────────────────────────────── */
.abre-menu {
  display: none;
}
@media (max-width: 960px) {
  .pagina {
    grid-template-columns: 1fr;
  }
  .lateral {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(20rem, 86vw);
    z-index: 50;
    transform: translateX(-102%);
    transition: transform 220ms ease;
    box-shadow: var(--sombra);
  }
  body.menu-aberto .lateral {
    transform: none;
  }
  .abre-menu {
    display: inline-flex;
    position: fixed;
    top: 0.8rem;
    left: 0.8rem;
    z-index: 40;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--divisor);
    border-radius: 10px;
    background: var(--folha);
    color: var(--texto);
    font: 500 12px var(--fonte-mono);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .abertura {
    padding-top: 4.5rem;
  }
  /* uma faixa fixa atrás do botão de capítulos: ele não cobre o texto ao rolar */
  body::before {
    content: '';
    position: fixed;
    inset: 0 0 auto 0;
    height: 3.6rem;
    z-index: 30;
    background: color-mix(in srgb, var(--fundo) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--divisor);
  }
  html {
    scroll-padding-top: 4.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

@media print {
  .lateral,
  .abre-menu,
  .proximo-capitulo,
  .neste {
    display: none !important;
  }
  .pagina {
    display: block;
  }
  body {
    font-size: 11pt;
    background: #fff;
    color: #000;
  }
  .abertura::before {
    display: none;
  }
  figure.tela,
  .exemplo,
  .aviso,
  .dica {
    break-inside: avoid;
  }
  h2,
  h3 {
    break-after: avoid;
  }
  .quadro,
  .quadro .area,
  .quadro .marcador {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* letra de exemplo e trechos literais */
code {
  padding: 0.05em 0.35em;
  border-radius: 5px;
  background: var(--folha-forte);
  font-family: var(--fonte-mono);
  font-size: 0.86em;
}
pre.letra {
  margin: 0.4rem 0 1rem 2.2rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--divisor);
  border-radius: 10px;
  background: var(--folha-forte);
  font-family: var(--fonte-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* no exemplo de arquivo, o que NÃO vai para o Lumen */
pre.letra .pular {
  color: var(--texto-fraco);
  opacity: 0.6;
  text-decoration: line-through;
  text-decoration-color: var(--perigo);
}

/* "No Ao ar: …" — a variação de um passo, discreta, presa à lista de cima */
p.nota {
  margin: -0.2rem 0 1.4rem;
  padding: 0.45rem 0.9rem;
  border-left: 3px solid var(--acento);
  border-radius: 0 8px 8px 0;
  background: var(--acento-fundo);
  font-size: 0.93rem;
  color: var(--texto-medio);
}
p.nota b {
  color: var(--texto);
}
