/* Estrutura das aulas: moldura, modo estudo e componentes.
   Não define a cara da aula. Cores, fontes, tamanhos e texturas vêm de estilo/estilo.css,
   que sobrescreve as variáveis abaixo e o que mais quiser.
   Medidas dos slides valem para a tela de 1920 x 1080; o reveal.js escala o resto. */

:root {
  /* cores */
  --bg: #F7F6F2;
  --surface: #FFFFFF;
  --fg: #151515;
  --muted: #5E5E5E;
  --line: #DCDBD5;
  --accent: #C8102E;
  --accent-ink: #FFFFFF;
  --accent-fg: var(--accent);
  --ok: #2F6F55;
  --bad: #B8342B;
  --texture: none;

  /* fontes */
  --font-display: system-ui, sans-serif;
  --font-title: var(--font-display);
  --font-body: system-ui, sans-serif;
  --font-ui: var(--font-body);
  --font-quote: var(--font-display);
  --w-display: 700;
  --w-title: 700;
  --w-body: 400;
  --w-strong: 700;
  --title-case: none;
  --title-tracking: -0.01em;
  --display-tracking: -0.02em;
  --lh-title: 1.05;
  --lh-body: 1.35;

  /* tamanhos no slide (piso de leitura: 20px) */
  --t-label: 16px;
  --t-small: 22px;
  --t-body: 28px;
  --t-lead: 36px;
  --t-quote: 48px;
  --t-h3: 36px;
  --t-h2: 64px;
  --t-h1: 96px;
  --t-display: 180px;

  /* espaço */
  --pad-y: 120px;
  --pad-x: 120px;
  --gap: 32px;
  --radius: 12px;

  /* movimento */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --dur: 700ms;

  /* moldura (fica fora do slide, medida na tela) */
  --frame-fg: var(--fg);
  --frame-muted: var(--muted);
  --frame-line: var(--line);
  --frame-size: clamp(10px, 0.7vw, 14px);
  --frame-gap: clamp(16px, 2.6vw, 52px);
}

/* ---------- base ---------- */

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

body { background-image: var(--texture); }

.reveal-viewport { background: var(--bg); background-image: var(--texture); }

.reveal {
  font-family: var(--font-body);
  font-size: var(--t-body);
  font-weight: var(--w-body);
  line-height: var(--lh-body);
  color: var(--fg);
}

.reveal .slides { text-align: left; }

.reveal .slides > section {
  height: 100%;
  padding: var(--pad-y) var(--pad-x);
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap);
}

.reveal h1,
.reveal h2,
.reveal h3 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: var(--w-title);
  line-height: var(--lh-title);
  letter-spacing: var(--title-tracking);
  text-transform: var(--title-case);
  color: var(--fg);
  text-wrap: balance;
}

.reveal h1 { font-size: var(--t-h1); max-width: 1500px; }
.reveal h2 { font-size: var(--t-h2); max-width: 1500px; }
.reveal h3 { font-size: var(--t-h3); text-transform: none; }

.reveal p { margin: 0; max-width: 1250px; text-wrap: pretty; }
.reveal strong, .reveal b { font-weight: var(--w-strong); }
.reveal em { font-style: italic; } /* o reset.css do reveal tira o itálico; termos estrangeiros precisam dele */
.reveal .slides img { cursor: zoom-in; }
.reveal .ov-stage img { cursor: inherit; }

.reveal .lead { font-size: var(--t-lead); line-height: 1.25; color: var(--muted); }
.reveal .small { font-size: var(--t-small); }
.reveal .muted { color: var(--muted); }
.reveal .accent { color: var(--accent-fg); }

.reveal .quote {
  font-family: var(--font-quote);
  font-size: var(--t-quote);
  line-height: 1.12;
  letter-spacing: var(--display-tracking);
  max-width: 1400px;
}

.reveal .quote cite {
  display: block;
  margin-top: var(--gap);
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* rótulo acima do título: "EPÍGRAFE   abertura do livro" */
.reveal .kicker {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg);
}

.reveal .kicker span {
  font-weight: 500;
  color: var(--muted);
}

/* fonte do dado: obrigatória em todo número, definição e citação */
.reveal .source {
  position: absolute;
  left: var(--pad-x);
  bottom: calc(var(--pad-y) * 0.55);
  max-width: 1300px;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-fg);
}

.reveal .hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  color: var(--muted);
}

.reveal kbd {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-ui);
  font-size: 0.8em;
}

.reveal .ph { line-height: 1; }

/* texto de apoio do modo estudo: some na apresentação */
.reveal .estudo { display: none; }

/* ---------- movimento ---------- */

.reveal [data-anim] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms + 150ms);
}

.reveal .slides > section.present [data-anim] { opacity: 1; transform: none; }

.reveal .fragment {
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.reveal .w { opacity: 0.22; }

@keyframes pulse { to { opacity: 0.45; } }

/* ---------- tipos de slide ---------- */

.reveal .s-cover { justify-content: flex-end; }
.reveal .s-cover h1 { font-family: var(--font-display); font-weight: var(--w-display); letter-spacing: var(--display-tracking); }
.reveal .s-cover .meta { font-family: var(--font-ui); font-size: var(--t-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

.reveal .s-section .num {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: var(--w-display);
  line-height: 0.9;
  letter-spacing: var(--display-tracking);
  color: var(--accent-fg);
}

.reveal .s-statement [data-words] {
  max-width: 1550px;
  font-family: var(--font-display);
  font-size: calc(var(--t-h1) * 0.85);
  font-weight: var(--w-display);
  line-height: 1.06;
  letter-spacing: var(--display-tracking);
}

.reveal .s-question h2 { font-size: calc(var(--t-h2) * 1.1); }

/* ---------- listas ---------- */

.reveal .points {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.reveal .points.cols-2 { grid-template-columns: 1fr 1fr; column-gap: calc(var(--gap) * 2); }

.reveal .points li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
  font-size: var(--t-lead);
  line-height: 1.2;
}

.reveal .points li .ph { font-size: 44px; color: var(--accent-fg); }

.reveal .points small {
  display: block;
  margin-top: 8px;
  font-size: var(--t-small);
  line-height: 1.35;
  color: var(--muted);
}

.reveal .takeaways {
  display: grid;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: t;
}

.reveal .takeaways li {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: baseline;
  font-size: var(--t-lead);
  counter-increment: t;
}

.reveal .takeaways li::before {
  content: counter(t, decimal-leading-zero);
  font-family: var(--font-display);
  color: var(--accent-fg);
  font-variant-numeric: tabular-nums;
}

/* ---------- grades e cartões ---------- */

.reveal .split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--gap) * 2);
  align-items: center;
}

.reveal .grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

.reveal .card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.reveal .card p { font-size: var(--t-small); color: var(--muted); }

.reveal .card .label {
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-fg);
}

.reveal .card .ph { font-size: 48px; color: var(--accent-fg); }

.reveal .card.is-accent { border-color: var(--accent); background: var(--accent); }

.reveal .card.is-accent,
.reveal .card.is-accent h3,
.reveal .card.is-accent p,
.reveal .card.is-accent .label,
.reveal .card.is-accent .ph { color: var(--accent-ink); }

.reveal .tags { display: flex; flex-wrap: wrap; gap: 10px; }

.reveal .tag {
  display: inline-flex;
  padding: 6px 14px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- número grande ---------- */

.reveal .stat {
  font-family: var(--font-display);
  font-size: var(--t-display);
  font-weight: var(--w-display);
  line-height: 0.95;
  letter-spacing: var(--display-tracking);
  color: var(--accent-fg);
  font-variant-numeric: tabular-nums;
}

.reveal .stat .unit { margin-left: 0.08em; font-size: 0.4em; }

/* ---------- imagem e vídeo ---------- */

.reveal figure { margin: 0; }

.reveal figure img,
.reveal figure video {
  display: block;
  width: 100%;
  max-height: 760px;
  object-fit: cover;
  border-radius: var(--radius);
}

.reveal figcaption {
  margin-top: 12px;
  font-family: var(--font-ui);
  font-size: var(--t-label);
  color: var(--muted);
}

/* imagem que encosta na borda direita do slide */
.reveal .bleed-right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 42%;
  margin: 0;
}

.reveal .bleed-right img,
.reveal .bleed-right video { width: 100%; height: 100%; max-height: none; border-radius: 0; object-fit: cover; }

.reveal .video-fundo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reveal .video-fundo ~ * { position: relative; z-index: 1; }

/* espaço provisório para imagem, vídeo ou animação que ainda não existe */
.reveal .placeholder {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 320px;
  padding: 32px;
  box-sizing: border-box;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: var(--t-label);
  color: var(--muted);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}

.reveal .placeholder b { font-size: var(--t-small); color: var(--fg); }

/* ---------- gráfico e diagrama ---------- */

.reveal .chart-box { position: relative; width: 100%; height: 600px; }

.reveal .diagram {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
}

.reveal pre.mermaid {
  width: 100%;
  margin: 0;
  background: none;
  box-shadow: none;
  font-size: inherit;
  text-align: center;
}

.reveal pre.mermaid:not([data-processed]) { visibility: hidden; }
.reveal pre.mermaid svg { max-width: 100%; max-height: 640px; width: auto; height: auto; }

/* ---------- linha do tempo ---------- */

.reveal .timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--steps, 5), minmax(0, 1fr));
  gap: var(--gap);
  padding-top: 64px;
}

.reveal .timeline::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line);
}

.reveal .timeline .step { position: relative; display: flex; flex-direction: column; gap: 8px; }

.reveal .timeline .step::before {
  content: "";
  position: absolute;
  top: -52px;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 8px var(--bg);
}

.reveal .timeline .when {
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-fg);
}

.reveal .timeline p { font-size: var(--t-small); color: var(--muted); }

/* ---------- quiz, enquete, cronômetro ---------- */

.reveal .quiz,
.reveal .poll { display: grid; gap: 16px; max-width: 1400px; }

.reveal .quiz [data-option],
.reveal .poll [data-vote] {
  all: unset;
  box-sizing: border-box;
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  overflow: hidden;
  padding: 20px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: var(--t-lead);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.reveal .quiz [data-option]:hover,
.reveal .poll [data-vote]:hover { border-color: var(--fg); }

.reveal .quiz [data-option]:focus-visible,
.reveal .poll [data-vote]:focus-visible,
.reveal .timer:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.reveal .quiz .key {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.6);
  font-family: var(--font-ui);
  font-size: var(--t-label);
  font-weight: 700;
}

.reveal .quiz.is-done [data-option] { opacity: 0.35; cursor: default; }
.reveal .quiz.is-done .is-right { opacity: 1; border-color: var(--ok); background: color-mix(in srgb, var(--ok) 16%, var(--surface)); }
.reveal .quiz.is-done .is-wrong { opacity: 1; border-color: var(--bad); background: color-mix(in srgb, var(--bad) 16%, var(--surface)); }

.reveal .quiz-feedback {
  opacity: 0;
  transform: translateY(12px);
  font-size: var(--t-body);
  color: var(--muted);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.reveal .quiz-feedback.is-visible { opacity: 1; transform: none; }

.reveal .poll [data-vote] { justify-content: space-between; }
.reveal .poll [data-vote] > span { position: relative; z-index: 1; }

.reveal .poll .fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  transition: width var(--dur) var(--ease);
}

.reveal .poll .is-top .fill { background: color-mix(in srgb, var(--accent) 34%, transparent); }
.reveal .poll .count { color: var(--accent-fg); font-variant-numeric: tabular-nums; }

.reveal .timer {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-display);
  font-size: 160px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.reveal .timer .ph { font-size: 104px; color: var(--accent-fg); }
.reveal .timer.is-running { color: var(--accent-fg); }
.reveal .timer.is-over { color: var(--bad); animation: pulse 900ms var(--ease) infinite alternate; }

/* ---------- 3D e Lottie ---------- */

.reveal .s-3d { justify-content: flex-end; }
.reveal .three-stage { position: absolute; inset: 0; z-index: 0; }
.reveal .three-stage canvas { display: block; width: 100%; height: 100%; }
.reveal .s-3d > :not(.three-stage) { position: relative; z-index: 1; max-width: 900px; }
.reveal .lottie { width: 100%; max-width: 720px; aspect-ratio: 1; }

/* ---------- moldura da apresentação ---------- */

.reveal .controls,
.reveal .progress,
.reveal .slide-number { display: none !important; }

.frame {
  position: fixed;
  left: var(--frame-gap);
  right: var(--frame-gap);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--font-ui);
  font-size: var(--frame-size);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--frame-muted);
  pointer-events: none;
}

.frame > * { pointer-events: auto; }
.frame-top { top: calc(var(--frame-gap) * 0.7); justify-content: space-between; }
.frame-bottom { bottom: calc(var(--frame-gap) * 0.7); }

.frame-title { display: flex; align-items: baseline; gap: 12px; color: var(--frame-fg); }
.frame-title b { font-weight: 700; }
.frame-title span { color: var(--frame-muted); }

.frame-title::before {
  content: "";
  align-self: center;
  width: 0.75em;
  height: 0.75em;
  border-radius: 999px;
  background: var(--accent);
}

.frame-chapters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 26px; }

/* fundo translúcido: a moldura continua legível quando passa por cima de imagem ou vídeo */
.frame-chapters,
.frame-title {
  padding: 4px 12px;
  margin: -4px -12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
}

.frame-chapters button,
.frame-bottom button {
  all: unset;
  pointer-events: auto; /* all: unset herdaria o pointer-events: none da barra */
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.frame-chapters button { padding: 4px 0; color: var(--frame-muted); transition: color 300ms var(--ease); }
.frame-chapters button i { margin-right: 6px; font-style: normal; opacity: 0.6; }
.frame-chapters button:hover,
.frame-chapters button.is-current { color: var(--frame-fg); }
.frame-chapters button.is-current { box-shadow: 0 1px 0 currentColor; }

.frame-track {
  position: relative;
  flex: 1;
  height: 1px;
  margin-right: 12px;
  background: var(--frame-line);
}

.frame-track i {
  position: absolute;
  left: 0;
  top: -1px;
  height: 3px;
  width: 0;
  background: var(--frame-fg);
  transition: width 500ms var(--ease);
}

.frame-count { color: var(--frame-fg); font-variant-numeric: tabular-nums; white-space: nowrap; }

.frame-bottom button {
  padding: 0.55em 1.1em;
  border: 1px solid var(--frame-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(6px);
  color: var(--frame-fg);
  white-space: nowrap;
  transition: background 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}

.frame-bottom button:hover { border-color: var(--frame-fg); }
.frame-bottom button.is-on { background: var(--frame-fg); border-color: var(--frame-fg); color: var(--bg); }
.frame-bottom button[hidden] { display: none; }
.frame-bottom button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* moldura some na visão geral, no PDF e quando pedido (tecla B) */
.reveal.overview ~ .frame,
html.frame-off .frame { opacity: 0; pointer-events: none; }
.frame { transition: opacity 300ms var(--ease); }

/* ---------- painéis: ajuda e LAB ---------- */

.panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  overflow: auto;
  padding: clamp(24px, 5vw, 96px);
  box-sizing: border-box;
  background: var(--bg); /* opaco: o slide de trás não pode aparecer por baixo do texto */
  background-image: var(--texture);
  color: var(--fg);
  font-family: var(--font-body);
}

.panel.is-open { display: block; }

.panel-close {
  all: unset;
  position: fixed;
  top: clamp(16px, 2.5vw, 40px);
  right: clamp(16px, 2.5vw, 40px);
  padding: 0.5em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: var(--frame-size);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.panel h2 {
  margin: 0 0 24px;
  font-family: var(--font-title);
  font-weight: var(--w-title);
  font-size: clamp(28px, 3vw, 56px);
  letter-spacing: var(--title-tracking);
  text-transform: var(--title-case);
}

.help-keys {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 12px 32px;
  max-width: 760px;
  font-size: clamp(14px, 1.1vw, 20px);
}

.help-keys kbd {
  justify-self: start;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: var(--font-ui);
}

/* ---------- visão geral em grade ---------- */

.ov-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px 20px;
}

.ov-card {
  all: unset;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
}

.ov-card .ov-thumb { transition: outline-color 200ms var(--ease); outline: 3px solid transparent; outline-offset: 3px; }
.ov-card:hover .ov-thumb,
.ov-card:focus-visible .ov-thumb { outline-color: var(--line); }
.ov-card.is-current .ov-thumb { outline-color: var(--accent); }

.ov-label {
  display: flex;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

.ov-label b { color: var(--fg); font-variant-numeric: tabular-nums; }

.ov-stage [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }
.ov-stage .w { opacity: 1 !important; }
.ov-stage * { animation: none !important; }
.ov-stage .ov-canvas { display: block; width: 100%; height: 100%; object-fit: contain; }

/* ---------- imagem ampliada ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: color-mix(in srgb, #000 88%, transparent);
  cursor: zoom-out;
}

.lightbox[hidden] { display: none; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 0; }

.lightbox img {
  display: block;
  max-width: 94vw;
  max-height: 86vh;
  object-fit: contain;
  cursor: zoom-in;
  transition: transform 350ms var(--ease);
}

.lightbox.is-zoom img { transform: scale(2.6); cursor: zoom-out; }
.lightbox.is-zoom figcaption { visibility: hidden; }

.lightbox figcaption {
  max-width: 80ch;
  font-family: var(--font-body);
  font-size: clamp(13px, 1vw, 18px);
  line-height: 1.4;
  text-align: center;
  color: #e9e6df;
}

.lightbox .panel-close { color: #e9e6df; border-color: rgba(255, 255, 255, 0.4); }

/* ---------- glossário ---------- */

.reveal dfn {
  font-style: inherit;
  text-decoration: underline dotted;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.18em;
  cursor: help;
}

.glossario-tip {
  position: fixed;
  z-index: 70;
  max-width: min(440px, 90vw);
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) * 0.5);
  background: var(--surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1.4;
}

.glossario-tip[hidden] { display: none; }
.glossario-tip b { display: block; margin-bottom: 4px; font-family: var(--font-title); color: var(--accent-fg); }
.glossario-tip p { margin: 0; }

.study-glossario dl { display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; max-width: 72ch; }
.study-glossario dt { font-weight: var(--w-strong); }
.study-glossario dd { margin: 0; }

/* ---------- modo estudo ---------- */

html.is-study,
html.is-study body { overflow: auto; height: auto; }

.study-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px clamp(16px, 3vw, 48px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  font-family: var(--font-ui);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.study-bar .frame-title { margin-right: auto; }

.study-bar button {
  all: unset;
  padding: 0.5em 1em;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--fg);
  white-space: nowrap;
}

.study-bar button:hover { border-color: var(--fg); }
.study-bar [data-act="sumario"] { display: none; }
.study-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.study {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1000px);
  justify-content: center;
  gap: clamp(24px, 4vw, 72px);
  padding: clamp(16px, 3vw, 48px);
}

.study-toc {
  position: sticky;
  top: 72px;
  align-self: start;
  max-height: calc(100vh - 96px);
  overflow: auto;
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.35;
}

.study-toc a { display: block; padding: 5px 0 5px 12px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; }
.study-toc a.is-chapter { margin-top: 16px; padding-left: 0; color: var(--fg); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; }
.study-toc a.is-current { color: var(--fg); border-left-color: var(--accent); }

.study-main { min-width: 0; font-size: calc(19px * var(--study-scale, 1)); }

.study-chapter {
  margin: 56px 0 8px;
  font-family: var(--font-title);
  font-weight: var(--w-title);
  font-size: calc(30px * var(--study-scale, 1));
  letter-spacing: var(--title-tracking);
  text-transform: var(--title-case);
}

.study-chapter small {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-ui);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent-fg);
}

.study-item { margin: 0 0 56px; scroll-margin-top: 80px; }

.study-slide {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  background-image: var(--texture);
}

.study-slide > .reveal {
  position: absolute;
  top: 0;
  left: 0;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  transform-origin: 0 0;
  transform: scale(var(--k, 0.5));
}

.study-slide > .reveal .slides {
  position: static;
  width: 1920px;
  height: 1080px;
  margin: 0;
  inset: auto;
  transform: none;
  pointer-events: auto;
}

.study-slide > .reveal .slides > section {
  position: relative;
  display: flex;
  width: 1920px;
  height: 1080px;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.study-slide .fragment { opacity: 1 !important; visibility: visible !important; transform: none !important; }

.study-text {
  max-width: 72ch;
  margin-top: 20px;
  font-family: var(--font-body);
  line-height: 1.6;
}

.study-text p { margin: 0 0 0.8em; }
.study-text .source-line { font-family: var(--font-ui); font-size: 0.75em; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }

.study-lab { margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }

@media (max-width: 1000px) {
  .study-bar [data-act="sumario"] { display: inline-block; }
  .study-bar .frame-title span { display: none; }
  .study { grid-template-columns: minmax(0, 1fr); }
  .study-toc { display: none; }
  .study-toc.is-open { display: block; position: fixed; inset: 56px 0 0 0; max-height: none; z-index: 19; padding: 16px; background: var(--bg); }
}

/* ---------- PDF e movimento reduzido ---------- */

html.print-pdf .frame,
html.reveal-print .frame,
html.print-pdf .panel,
html.reveal-print .panel { display: none !important; }

html.print-pdf .reveal [data-anim],
html.reveal-print .reveal [data-anim] { opacity: 1 !important; transform: none !important; transition: none !important; }

html.print-pdf .reveal .w,
html.reveal-print .reveal .w,
html.is-study .reveal .w { opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  .reveal [data-anim] { opacity: 1; transform: none; transition: none; }
  .reveal .w { opacity: 1 !important; }
}
