/* Tema que reproduz o Beamer "Boadilla" com cor MyBlue, 11pt, 16:9.
 * Todas as medidas estão em pt, iguais às do PDF original (453.543pt x 255.118pt).
 * Fonte: Latin Modern Sans (a mesma do LaTeX). Para essa fonte, a linha de base de
 * um texto fica a  L/2 + 0.4225*tamanho  do topo da caixa de linha de altura L. */

@font-face { font-family: "LM Sans"; src: url(../fonts/lmsans10-regular.otf); font-weight: 400; font-style: normal; }
@font-face { font-family: "LM Sans"; src: url(../fonts/lmsans10-bold.otf); font-weight: 700; font-style: normal; }
@font-face { font-family: "LM Sans"; src: url(../fonts/lmsans10-oblique.otf); font-weight: 400; font-style: italic; }
@font-face { font-family: "LM Sans"; src: url(../fonts/lmsans10-boldoblique.otf); font-weight: 700; font-style: italic; }
@font-face { font-family: "LM Sans 12"; src: url(../fonts/lmsans12-regular.otf); }
@font-face { font-family: "LM Sans 9"; src: url(../fonts/lmsans9-regular.otf); }
@font-face { font-family: "LM Sans 9"; src: url(../fonts/lmsans9-oblique.otf); font-style: italic; }
@font-face { font-family: "LM Sans 8"; src: url(../fonts/lmsans8-regular.otf); }

:root {
  --myblue: #0061A5;
  --brickred: #B6321D;
  --foot-l: #1A71AE;
  --foot-r: #E5EEF5;
  --block-title: #CCDFED;
  --block-body: #E6EFF6;
  --textwidth: 403.7pt;
  --bg: #2b2b2b;
}

html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; }
html:not(.ready) #deck { visibility: hidden; }

#deck {
  position: absolute; left: 50%; top: 50%;
  width: 453.543pt; height: 255.118pt;
  transform-origin: center center;
}

/* ---------- Frame ---------- */
.frame {
  position: absolute; inset: 0;
  display: none;
  overflow: hidden;
  background: #fff; color: #000;
  font-family: "LM Sans", sans-serif;
  font-size: 10.91pt; line-height: 13.55pt;
  text-align: left;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
}
.frame.active { display: block; }

/* Título (linha de base em 21.1pt) e subtítulo (linha de base em 35.1pt) */
.ft { position: absolute; left: 8.5pt; right: 8.5pt; top: 0; color: var(--myblue); }
.ft h2 { position: absolute; left: 0; top: 6.84pt; margin: 0; white-space: nowrap;
  font: 400 14.35pt/17pt "LM Sans 12", sans-serif; }
.ft .subtitle { position: absolute; left: 0; top: 26.11pt; white-space: nowrap;
  font: 400 8.97pt/11pt "LM Sans 9", sans-serif; }

/* Área de texto do frame (\textheight). Margens: 30pt à esquerda e 20pt à direita.
 * Frame centralizado: o Beamer usa 1fill acima e 1.5fill abaixo do conteúdo.
 * Frame [t]: 0.2cm acima do conteúdo. */
.fc {
  position: absolute; left: 29.9pt; right: 19.85pt; top: 38.9pt; bottom: 19.12pt;
  display: flex; flex-direction: column;
}
/* só título: calibrado na aula 6 (frames [t] só com título; a aula 5 não tinha nenhum) */
.frame.only-title .fc { top: 24.9pt; }
.frame.t.only-title .fc { top: 26.28pt; }
.frame.t.only-title .fc > .center:first-child { margin-top: 6.42pt; }
.frame.notitle .fc { top: 0; }
.fc::before { content: ""; flex: 1 1 0; }
.fc::after  { content: ""; flex: 1.5 1 0; }
.frame.t .fc::before { flex: none; height: 5.69pt; }
.frame.t .fc::after  { flex: 1 1 0; }
.fc > * { flex: none; }

/* Rodapé */
.frame > footer {
  position: absolute; left: 0; right: 0; bottom: 0; height: 12.398pt;
  font: 400 6.97pt/12.398pt "LM Sans 8", sans-serif;
  white-space: nowrap;
}
.foot-l { position: absolute; left: 0; top: 0; bottom: 0; width: 181.415pt;
  background: var(--foot-l); color: #fff; text-align: center; }
.foot-r { position: absolute; left: 181.415pt; top: 0; bottom: 0; width: 317.48pt;
  background: var(--foot-r); color: var(--myblue); text-align: center; }
.foot-num { margin-left: 32.1pt; margin-right: 3.1pt; }

/* ---------- Texto ---------- */
p { margin: 0; }
b, strong { font-weight: 700; }
b i, i b { font-style: normal; }  /* cmss não tem negrito itálico: o LaTeX usa negrito reto */
.jus { text-align: justify; hyphens: manual; -webkit-hyphens: manual; }
.rag { text-align: left; hyphens: manual; }
/* linhas já quebradas pelo algoritmo do TeX (js/texbreak.js) */
.tl { white-space: nowrap; }
.c-myblue { color: var(--myblue); }
.c-brickred { color: var(--brickred); }

/* Fórmulas inline não aumentam a altura da linha (como no TeX) */
.katex { font-size: 1em !important; line-height: 0; }
.katex .katex-html { display: inline-block; height: 0; line-height: 0; vertical-align: baseline; }
.katex-display > .katex > .katex-html { display: block; height: auto; }

/* Espaçamentos verticais (equivalentes às colas do TeX) */
.fc > p:first-child { margin-top: -1.2pt; }

/* Ambiente center */
.center { text-align: center; margin: 5.8pt 0 4.5pt; display: flex; flex-direction: column; }
.imgs { display: flex; justify-content: safe center; align-items: flex-end; flex-wrap: wrap;
  column-gap: 3.6pt; line-height: 0; }
.imgs img { display: block; }
.center + p { margin-top: 6.8pt; }
p + .center { margin-top: 8.2pt; }
.tcb > .center:first-child { margin-top: 0; }
/* dentro da tcolorbox (\parskip = 0) o center fica a 8.97pt do texto antes e depois
 * (medido na aula 7: linhas de base a 22.52pt nos dois lados) */
.tcb > p + .center { margin-top: 8.97pt; }
.tcb > .center + p { margin-top: 4.47pt; }
.tcb > .center:last-child { margin-bottom: 0; }
ol + p, ul + p { margin-top: 2.2pt; }

/* ---------- tcolorbox ---------- */
.tcb {
  box-shadow: inset 0 0 0 1.42pt var(--myblue);
  border-radius: 0.28pt;
  background: #fff;
  padding: 6.37pt 15.62pt 9.84pt;  /* inclui a borda de 1.42pt */
  margin: 6.7pt 0 0;
  display: flex; flex-direction: column;
}
.tcb.bs0 { padding: 3.52pt 12.77pt 6.99pt; }
.tcb + p { margin-top: 3.9pt; }

/* ---------- block (Boadilla: rounded + shadow) ---------- */
.block {
  margin: 6.7pt -4pt 5.5pt;
  border-radius: 4pt;
  box-shadow: 2.4pt 2.4pt 3pt rgba(0,0,0,0.5);
  display: flex; flex-direction: column;
}
.frame.t .fc > .block:first-child { margin-top: 3.1pt; }
.tcb + .block { margin-top: 13.8pt; }
.block + p { margin-top: 0; }
.block-title {
  background: var(--block-title); color: var(--myblue);
  border-radius: 4pt 4pt 0 0;
  font-weight: 400; font-size: 11.96pt; line-height: 16.2pt; height: 16.7pt;
  padding: 0 4pt; text-align: center;
  white-space: nowrap;
}
.block-title .center { margin: 0; display: block; }
.block-body {
  background: var(--block-body);
  border-radius: 0 0 4pt 4pt;
  padding: 1.12pt 4pt 3.8pt;
  display: flex; flex-direction: column;
}
.block-body > ol:first-child, .block-body > ul:first-child { margin-top: -1.5pt; }


/* ---------- Listas ---------- */
ol.enum, ul.itemz { list-style: none; margin: 3.05pt 0 0; padding: 0 0 0 21.8pt; }
.fc > ol.enum:first-child, .fc > ul.itemz:first-child,
.tcb > ol.enum:first-child, .tcb > ul.itemz:first-child { margin-top: 0; }
ol.enum { counter-reset: it; }
ol.enum > li, ul.itemz > li { position: relative; margin-top: 2.95pt; }
ol.enum > li:first-child, ul.itemz > li:first-child { margin-top: 0; }
ol.enum > li { counter-increment: it; }
ol.enum > li::before {
  content: counter(it) ".";
  position: absolute; right: calc(100% + 5.4pt); top: 0;
  color: var(--myblue);
}
ol.enum > li[data-label]::before { content: attr(data-label); }
ul.itemz > li::before {
  content: ""; position: absolute; right: calc(100% + 5.6pt); top: 4.6pt;
  width: 4.1pt; height: 4.1pt; background: var(--myblue);
}
/* listas de 2º nível: fonte \small (10pt / 12pt) */
li ul.itemz, li ol.enum { font-size: 9.96pt; line-height: 11.96pt; padding-left: 21.8pt; margin-top: 1.5pt; }
li ul.itemz > li, li ol.enum > li { margin-top: 0; }
li ul.itemz > li::before { width: 3.3pt; height: 3.3pt; top: 5pt; }

/* ---------- Colunas ---------- */
/* Beamer (sem [onlytextwidth]) distribui as colunas por toda a largura do slide */
.columns { display: flex; align-items: center; justify-content: space-evenly; margin: 13.2pt -19.85pt 0 -29.9pt; }
.column { display: flex; flex-direction: column; flex: none; }
.column > .center, .column > .tcb { margin-top: 0; margin-bottom: 0; }

/* ---------- Fórmulas em destaque ---------- */
/* Como no TeX: a linha de base da fórmula fica 24.55pt (\abovedisplayskip + \baselineskip)
 * abaixo da linha anterior e 24.55pt acima da seguinte. Uma caixa de linha de 35.55pt
 * produz exatamente isso. Fórmulas altas aumentam a linha, como o \lineskip do TeX. */
.eq { margin: 0; line-height: 35.55pt; text-align: center; position: relative; }
.eq .katex-display { display: inline; margin: 0; }
.eq .katex-display > .katex { display: inline; }
.eq .katex-display > .katex > .katex-html { display: inline-block; height: auto; }
.eq-row > span + span { margin-left: 0.2778em; }
.eqno { position: absolute; right: 0; top: 0; }
/* \abovedisplayshortskip / \belowdisplayshortskip: linha anterior curta (marcado pelo JS) */
.eq.short { margin-top: -11pt; margin-bottom: -4.5pt; }

/* ---------- Algoritmo (algorithm + algpseudocode) ---------- */
.algorithm { margin: 11.5pt 0 0; padding: 0.8pt 0 0.4pt;
  background:
    linear-gradient(#000, #000) top / 100% 0.8pt no-repeat,
    linear-gradient(#000, #000) bottom / 100% 0.4pt no-repeat; }
.alg-cap { padding-bottom: 0.4pt;
  background: linear-gradient(#000, #000) bottom / 100% 0.4pt no-repeat; }
.alg-body { padding: 0 0 2.8pt; }
/* algorithmic solto (sem o float algorithm): sem réguas nem espaços */
.algorithm.bare { margin: 0; padding: 0; background: none; }
.algorithm.bare .alg-body { padding: 0; }
/* \scalebox{f}{...}: dentro da \hbox a caixa não tem espaço vertical antes; a quebra de linha
 * logo após "{" vira um espaço de palavra (3.64pt) antes da caixa (aula 7, pseudocódigo) */
.scalebox > .tcb:first-child { margin-top: 0; margin-left: 3.64pt; margin-right: -3.64pt; }
.frame.t .fc > .scalebox:first-child { margin-top: -3pt; }  /* medido no PDF (topo da caixa em y = 29.45) */
.alg-body div { padding-left: 10.9pt; }
.alg-body .l2 { padding-left: 27.3pt; }
.alg-body .l3 { padding-left: 43.7pt; }
.alg-body .l4 { padding-left: 60.1pt; }
.alg-body .l5 { padding-left: 76.5pt; }
/* \Comment do algpseudocode: \hfill + triângulo, alinhado à margem direita */
.alg-body > div { position: relative; }
.alg-body > div > .alg-cmt { position: absolute; right: 0; top: 0; padding-left: 0; }
/* pseudocódigo executado passo a passo (componente pseudo, js/anim/buscalocal.js) */
.alg-body > div { transition: background-color .25s, box-shadow .25s; }
.alg-body > div.alg-on { background-color: #dbe8f3; box-shadow: inset 1.6pt 0 0 var(--myblue); }
.c-alert { color: #ff0000; }

/* ---------- Páginas especiais ---------- */
.frame.titlepage .fc { align-items: center; text-align: center; }
.frame.titlepage .fc::before { flex: none; height: 26.5pt; }
.tp-title { color: var(--myblue); font: 400 14.35pt/17pt "LM Sans 12", sans-serif; }
.tp-author { margin-top: 24.2pt; }
.tp-date { margin-top: 28.3pt; }
.tp-img { margin-top: 17.4pt; line-height: 0; }

.frame.sec .fc { align-items: center; }
.frame.sec .fc::before { flex: 2 1 0; }
.frame.sec .fc::after { flex: 2.5 1 0; }
.sec-title { color: var(--myblue); font: 400 14.35pt/17pt "LM Sans 12", sans-serif; padding: 8pt; position: relative; top: -0.5pt; }

/* Sumário: \vfill com pesos 2 (acima) : 1 (entre seções) : 2.5 (abaixo). Ajustado com 5 seções
 * (aulas 5 e 6: linhas de base 49.6 + 34.3k) e 8 seções (aula 7: 31.71 + 25.355k). */
.frame.toc .fc::before { flex: 2 1 0; }
.frame.toc .fc::after { flex: 2.5 1 0; }
.frame.toc .fc > .toc-gap { flex: 1 1 0; }
.toc-item { color: var(--myblue); display: flex; align-items: center; height: 13.55pt; }
.frame.toc .fc > .toc-item:first-of-type { margin-top: -3.3pt; }
.frame.toc .fc > .toc-item:last-of-type { margin-bottom: -4.93pt; }
.toc-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 8.5pt; height: 8.5pt; border-radius: 50%;
  background: var(--myblue); color: #fff;
  font: 400 6.4pt/1 "LM Sans 8", sans-serif;
  margin: 0 3.7pt 0 -2.5pt; flex: none;
}

/* ---------- Figuras animadas (js/anim/) ---------- */
.anim { display: block; line-height: 0; }
.anim svg { display: block; overflow: visible; }
.cube-v { cursor: pointer; }
.cube-v:hover circle + circle { stroke: var(--myblue); }
.tsp-v { cursor: pointer; }
.cont-h { cursor: grab; touch-action: none; }
.cont-h:active { cursor: grabbing; }
.tsp-v:hover circle + circle { stroke: var(--myblue); }
.lo-ball { cursor: grab; touch-action: none; }
.lo-ball:active { cursor: grabbing; }
.s3d { position: relative; display: inline-block; line-height: 0; touch-action: none; cursor: grab; }
.s3d:active { cursor: grabbing; }
.s3d img { display: block; }
.s3d-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: none; }
.anim[data-anim="reveal"] { display: inline-block; }

/* ---------- lstlisting (listings) — aula Lab3 ----------
 * Cada token é posicionado na sua coluna (left = coluna x largura da coluna); o estilo
 * (fonte, tamanho, cores, moldura) vem inline do tex2html.py, calculado das opções do .tex. */
.lst { margin-top: 0; margin-bottom: 0; flex: none; }
.lst-l { position: relative; height: var(--lst-bs); white-space: pre; }
.lst-l > span { position: absolute; top: var(--lst-top); line-height: var(--lst-bs); }

/* ---------- tabular (+ booktabs) — aula Lab3 ----------
 * Linha = strut de 0.7/0.3 \baselineskip: caixa de 9.75pt (linha de base a 9.485pt do topo,
 * L/2 + 0.4225·10.91) + 3.8pt embaixo = 13.55pt. Réguas são divs (bordas CSS arredondam para pixels). */
.tab { display: inline-grid; align-self: center; line-height: 9.75pt; }
.tab .td { height: 9.75pt; padding-bottom: 3.8pt; white-space: nowrap; }  /* altura fixa: o negrito tem métricas maiores */
.tab .td.c { text-align: center; } .tab .td.l { text-align: left; } .tab .td.r { text-align: right; }
.tab-rule { grid-column: 1 / -1; background: #000; }

/* ---------- Ajustes medidos no PDF da aula Lab3 ----------
 * texto -> tcolorbox: o TeX deixa 10.84 pt da linha de base ao topo da caixa (também nos PDFs das
 * aulas 5 e 7); com 6.7 pt o HTML ficava com 8.6 pt. tcolorbox -> texto: 16.26 pt (topo da caixa -> base). */
p + .tcb { margin-top: 8.55pt; }
.tcb + p { margin-top: 4.7pt; }
/* center dentro de center (slide 4: \begin{center}\begin{center}REMOVER\end{center}...): sem espaço,
 * as duas linhas ficam a 13.55 pt */
.center > .center { margin: 0; }
.center > .center + p { margin-top: 0; }
/* tabela num center: linha de base anterior -> régua de cima 12.09 pt; régua de baixo -> próxima base 17.55 pt */
p + .center:has(> .tab) { margin-top: 10.9pt; }
.center:has(> .tab) + p { margin-top: 1.9pt; }
/* tcolorbox no fim do frame: o after skip (4.1pt TeX) fica no fim da caixa vertical e entra na centralização
 * de frames [c] (slide 3: espaço livre 35.7 : 54.7 = 1 : 1.5 só contando os 4.08pt) */
.fc > .tcb:last-child { margin-bottom: 4.08pt; }

/* ---------- Overlays ---------- */
.ov-hidden { visibility: hidden !important; }
.ov-gone { display: none !important; }
.ov-block { display: flex; flex-direction: column; }

/* ---------- Impressão: um frame por página, todos os overlays visíveis ---------- */
@page { size: 453.543pt 255.118pt; margin: 0; }
@media print {
  html, body { background: #fff; overflow: visible; height: auto; }
  #deck { position: static; transform: none !important; width: auto; height: auto; }
  .frame { position: relative; display: block !important; width: 453.543pt; height: 255.118pt;
    page-break-after: always; break-after: page; }
  .ov-hidden { visibility: visible !important; }
}

/* ---- aula 8: figure do Beamer + \centerline ---- */
.figure { display: flex; flex-direction: column; margin: 0; }
.cline { display: flex; justify-content: center; }
.cline img { display: block; }
/* medidas no PDF (posição exata dos XObjects):
 *  \centerline no topo de frame [t]: topo da figura em y = 29.45; linha seguinte = uma \baselineskip (13.55) abaixo do fim.
 *  figure: 9pt (8.97) acima da figura; abaixo, 8.97 + 13.55 até a próxima linha de base (36.06 do fim da figura).
 *  frame [c] só com uma figure que não cabe (slides 4 e 20): topo em y = 27.77 (o TeX encolhe a cola de cima). */
.frame.t .fc > .cline:first-child { margin-top: -2.52pt; }
.frame.t .fc > .figure:first-child { margin-top: 6.45pt; }
.figure { margin-top: 8.97pt; margin-bottom: 8.97pt; }
.cline + p { margin-top: 1.71pt; }
.figure + p { margin-top: 15.25pt; }
.frame:not(.t) .fc > .figure:only-child { margin-top: 2.87pt; margin-bottom: 0; }
.frame:not(.t) .fc:has(> .figure:only-child)::before { flex: none; height: 0; }
.figure + .tcb { margin-top: 14.7pt; }   /* slide 16: fim da figura -> 1a linha de base da caixa = 41.88 */

/* ---- matemática sans (aula 8: preâmbulo sem \usefonttheme[onlymath]{serif}) ----
 * O Beamer troca as fontes da matemática: letras em cmssi (sans itálico), dígitos, letras retas e
 * ( ) [ ] = + : ; ! ? em cmss; o resto continua nas fontes de matemática (< > , . / em cmmi,
 * ∗ − ′ e caligráficas em cmsy). unicode-range limita a troca a esses caracteres; os demais caem
 * na fonte seguinte da lista (KaTeX_Main / KaTeX_Math). */
@font-face { font-family: "MathSans"; src: url(../fonts/lmsans10-regular.otf);
  unicode-range: U+0021, U+0028-0029, U+002B, U+0030-003B, U+003D, U+003F, U+0041-005B, U+005D, U+0061-007A; }
@font-face { font-family: "MathSansIt"; src: url(../fonts/lmsans10-oblique.otf);
  unicode-range: U+0041-005A, U+0061-007A; }
@font-face { font-family: "MathSansBf"; src: url(../fonts/lmsans10-bold.otf);
  unicode-range: U+0021, U+0028-0029, U+002B, U+0030-003B, U+003D, U+003F, U+0041-005B, U+005D, U+0061-007A; }
.sansmath .katex { font-family: "MathSans", KaTeX_Main, "Times New Roman", serif; }
.sansmath .katex .mathnormal { font-family: "MathSansIt", KaTeX_Math; font-style: normal; }
.sansmath .katex .mathrm, .sansmath .katex .mop { font-family: "MathSans", KaTeX_Main; }
.sansmath .katex .mathbf { font-family: "MathSansBf", KaTeX_Main; }

/* Réguas de 0.4pt do algorithm: o Chrome descarta imagens de fundo com menos de 1px (antes da escala
 * do slide) -> a régua sob a legenda e a de baixo não apareciam. Desenhadas como pseudo-elementos. */
.algorithm { position: relative;
  background: linear-gradient(#000, #000) top / 100% 0.8pt no-repeat; }
.algorithm:not(.bare)::after, .alg-cap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 0.4pt; background: #000; }
.alg-cap { position: relative; background: none; }
.algorithm.bare { background: none; }
/* aula 8 (PDF, slides 15 e 52): régua de cima em y = 55.49 (centro), régua da legenda em 69.76,
 * 1ª linha de base do corpo 15.75 abaixo dela */
.algorithm:not(.bare) { margin-top: 10.45pt; }
.algorithm:not(.bare) > .alg-body { padding-top: 4.6pt; }
/* algorithm dentro de center (aula 8, slide 56): as linhas continuam alinhadas à esquerda */
.algorithm { text-align: left; }
/* espaço extra (\Until{ texto}: o espaço do início do argumento soma-se ao da macro) */
.sp { margin-left: 0.3333em; }
/* slide 56 (dois algorithm em colunas; o da esquerda não cabe no frame): posições medidas no PDF —
 * régua de cima da esquerda em y = 46.10, da direita em 54.08 (centro da régua) */
.cols-alg .columns { align-items: flex-start; }
.cols-alg .column > .center { margin: 0 !important; }
.cols-alg .column:first-child { margin-top: -2.84pt; }
.cols-alg .column:last-child { margin-top: 5.14pt; }
/* fim da área útil dos frames [c] de conteúdo (aula 8): y = 239.0, não 236.0 — com 236 todos os frames [c] da aula 8
 * ficavam 0.8–2.6 pt altos (a aula 7 registrava o mesmo desvio); conferido nos slides 5, 6, 17, 18, 21, 22, 28, 54–57 */
.frame:not(.t):not(.sec):not(.toc):not(.titlepage) .fc { bottom: 16.12pt; }
/* figure no início de um frame [c] seguida de outro conteúdo (slide 16, único caso): medido 5.3 pt acima */
.frame:not(.t) .fc > .figure:first-child:not(:only-child) { margin-top: 5.3pt; }
/* sumário: o texto da seção num span (num flex, o espaço antes de \textit{} sumia: "ILS Nofitness") */
.toc-txt { white-space: nowrap; }
/* lista no topo de frame [t] (slides 23–27): 1ª linha de base em y = 45.00 */
.frame.t .fc > ol.enum:first-child, .frame.t .fc > ul.itemz:first-child { margin-top: 1.65pt; }
/* lista -> tcolorbox: 10.84 pt da última linha de base ao topo da caixa (como p + .tcb) */
.enum + .tcb, .itemz + .tcb { margin-top: 8.68pt; }
/* enumerate -> texto (slide 54, único caso nesta aula): 3.0 pt no PDF (a aula 5 calibrou 2.2) */
ol.enum + p { margin-top: 3.0pt; }

/* ---------- aula 9 ---------- */
/* frame [plain] só com TikZ/pgfplots: a própria página do PDF (o conversor gera img/pagina-N.svg) */
.frame.plain .fc { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }
.frame.plain .pagina { position: absolute; left: 0; top: 0; width: 453.543pt; height: 255.118pt; }
/* \footnote: marca = \textsuperscript no \scriptsize (cmss8, 7.97pt) elevada 0.3629 em (sup2 do cmsy, 10.95pt);
   o texto vai para o pé do frame: régua 0.4\textwidth de 0.4pt em y = 217.26, \footnotesize (cmss9 8.97/10.96pt),
   marca numa caixa de 1.8em alinhada à direita, linha de base da 1ª linha em y = 227.78, \raggedright */
.fnm { font: 400 7.97pt/0 "LM Sans 8", sans-serif; vertical-align: 3.97pt; }
.footnotes { position: absolute; left: 29.89pt; width: 403.7pt; top: 217.06pt; padding-top: 0.4pt;
  background: linear-gradient(#000, #000) no-repeat 0 0 / 161.49pt 0.4pt; }
.footnotes .fn { font: 400 8.97pt/10.96pt "LM Sans 9", sans-serif; text-align: left; margin-top: 1.05pt; }
.footnotes .fn i { font-family: "LM Sans 9"; }
.footnotes .fn-mark { display: inline-block; width: 16.59pt; text-align: right; font: 400 5.98pt/0 "LM Sans 8", sans-serif;
  vertical-align: 3.81pt; }
/* fórmula em destaque que abre parágrafo (classe do conversor): linha vazia (13.55) + \abovedisplayshortskip (0)
   antes; \belowdisplayshortskip (6.5) depois. Medido: slides 17, 19, 23 e 50 (= .short + 13.55 acima) */
.eq.par { margin-top: 2.55pt; margin-bottom: -4.5pt; }
/* espaço que não some no início da linha (texbreak.js; a largura final é calculada linha a linha) */
.xsp { display: inline-block; width: 0.3333em; }
.xsp[data-sf="3000"], .xsp[data-sf="2000"] { width: 0.4444em; }
/* linha com fórmula inline alta: o slides.js põe um strut com a altura que o \lineskip do TeX daria */
.lstrut { display: inline-block; width: 0; vertical-align: baseline; }
/* linha vazia que o TeX compõe antes do parágrafo (ex.: "}" de um \onslide depois de uma fórmula + linha em branco) */
p.vazia { margin-top: 13.55pt; }
/* .par cuja fórmula começa a menos de 2em da margem (coluna estreita): linha vazia + colas normais (11 / 11) */
.eq.par.parlong { margin-top: 13.55pt; margin-bottom: 0; }
/* fórmula no topo de uma tcolorbox: o conteúdo começa 9.92pt abaixo da borda de fora; linha vazia no topo (sem cola
   entre linhas) e a fórmula a 13.55 (curta) ou 11 + 13.55 (normal) dela. Medido: slides 22, 24 e 25 */
.tcb > .eq.par:first-child { margin-top: -5.285pt; }
.tcb > .eq.par.parlong:first-child { margin-top: 5.715pt; }
/* aspas duplas (conversor): 0.5em como no cmss OT1, sem kerning com o vizinho (aula 9, slide 8) */
.q { display: inline-block; width: 0.5em; }
/* block (aula 9, medido nas aulas 5 e 9): título com a linha de base 11.31pt abaixo do topo da barra (antes 1.44pt
   baixa); a barra começa 1.71pt mais abaixo do que o css antigo punha; 1ª linha do corpo a 27.99pt do topo da barra
   (mais se a linha for alta, ver slides.js) */
.block-title { line-height: 13.32pt; }
.block { margin-top: 8.41pt; }
.frame.t .fc > .block:first-child { margin-top: 4.81pt; }
.tcb + .block { margin-top: 15.51pt; }
.block-body { padding-top: 0.05pt; }
.block + p { margin-top: 0.92pt; }
/* texto depois de um center só com figura: linha de base = fim da figura + topsep (6.57) + 13.55 (aula 9, slide 6) */
.center:has(> p.imgs:only-child) + p { margin-top: 4.48pt; }
/* \text{} nas fórmulas (o conversor troca por \textsf): no PDF é o cmss do texto -> mesma fonte do texto (o
   KaTeX_SansSerif tem outras larguras; aula 9, slides 21 e 23) */
.katex .textsf { font-family: "LM Sans", sans-serif; }
/* lista logo depois de uma tcolorbox: 1ª linha de base 20.87pt abaixo da caixa (aula 9, slide 11) */
.tcb + ol.enum, .tcb + ul.itemz { margin-top: 9.62pt; }
/* espaços dentro de fórmulas (\text{...}) não esticam com a justificação da linha (no TeX são uma hbox) */
.katex { word-spacing: 0; }
/* center só com uma fórmula inline alta (cases, aula 9 slides 21 e 23): medido no PDF */
p + .center:has(> p:only-child .katex):not(:has(.tl, img)) { margin-top: 8.84pt; }
.center:has(> p:only-child .katex):not(:has(.tl, img)) { margin-bottom: 2.04pt; }
/* algorithm (aula 9, conferido nos PDFs das aulas 8 e 9), a partir do topo T da régua de cima: legenda com a
   linha de base em T + 10.36, régua da legenda (centro) em T + 14.67, 1ª linha do corpo em T + 25.05; com
   \label depois do \caption (aula 8) o algorithmic ganha o \topsep: T + 30.42 (classe .lbl, do conversor);
   régua de baixo 4.37 abaixo da última linha de base */
.alg-cap { margin-top: -1.83pt; padding-bottom: 2.35pt; }
.algorithm:not(.bare) > .alg-body { padding-top: 0; margin-top: -1.2pt; padding-bottom: 2pt; }
.algorithm.lbl:not(.bare) > .alg-body { margin-top: 4.17pt; }
.frame.t .fc > .algorithm:not(.bare):first-child { margin-top: 7.47pt; }
/* columns depois de texto: topo das caixas 14.57pt abaixo da linha de base (aula 9, slides 24 e 25) */
.columns { margin-top: 12.5pt; }
/* \vspace (conversor) */
.vsp { flex: none; }
/* texto depois de columns + \vspace{0.3cm}: 17.08pt do fim das caixas até a linha de base (aula 9, slide 25) */
.columns + .vsp + p { margin-top: -3.2pt; }
/* frames [t] também: a área útil termina em y = 239.0 (aula 9, slide 20: com 236 o shrinkToFit encolhia 3pt a mais
   que o TeX) */
.frame.t .fc { bottom: 16.12pt; }
/* o KaTeX escreve os espaços de \text{} como &nbsp;, que no LM Sans mede 0.5em (o espaço do cmss mede 0.3333em) */
.katex .textsf { word-spacing: -0.1667em; }
/* roletas do slide 25 (passo extra): abaixo do texto */
.anim.roleta { position: absolute; left: 0; top: 150pt; }
