/* Motor das apresentações — curso de Claude Code (versão Opus).
 *
 * Cada slide é um palco fixo de 1600 × 900 escalado para caber na tela.
 * Três movimentos dão a identidade, todos herdados do fluxograma da capa
 * do site (enia-html/assets/css/components/hero.css):
 *   1. morph: elementos com data-morph="chave" atravessam de um slide
 *      para o outro mudando de lugar e de tamanho (View Transitions);
 *   2. ligações: .liga desenha arestas com portas e seta entre nós, que
 *      se traçam sozinhas e levam pacotes de um nó ao outro;
 *   3. passos: data-passo="n" monta o slide em etapas.
 * Paleta, fontes e curvas vêm de enia-html/assets/css/variables.css.
 */

/* ---- Fontes (cópias locais das do site, SIL OFL 1.1) ---------------- */

@font-face {
  font-family: "Exo";
  font-weight: 100 900;
  font-display: swap;
  src: url("fontes/exo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Exo";
  font-weight: 100 900;
  font-display: swap;
  src: url("fontes/exo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3";
  font-weight: 200 900;
  font-display: swap;
  src: url("fontes/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3";
  font-weight: 200 900;
  font-display: swap;
  src: url("fontes/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fira Code";
  font-weight: 300 700;
  font-display: swap;
  src: url("fontes/fira-code-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fira Code";
  font-weight: 300 700;
  font-display: swap;
  src: url("fontes/fira-code-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Coordenadas de .em não passam para os filhos: um .em dentro de outro
   não herda a largura do pai. */
@property --x { syntax: "*"; inherits: false; }
@property --y { syntax: "*"; inherits: false; }
@property --w { syntax: "*"; inherits: false; }
@property --h { syntax: "*"; inherits: false; }

/* ---- Tokens ----------------------------------------------------------- */

:root {
  --fundo: #fafbff;
  --fundo-fora: #eef0f8;
  --tinta: #0e0e0e;
  --tinta-2: #2a3042;
  --tinta-3: #4e576f;
  --tinta-4: #8a91a6;

  --indigo: #2f28ff;
  --indigo-rgb: 47 40 255;
  --indigo-escuro: #2e2f8f;
  --violeta: #8224e1;
  --violeta-rgb: 130 36 225;
  --teal: #0d9488;
  --teal-texto: #0f766e;
  --amarelo: #f6ae2d;
  --coral: #c1441c;

  --borda: rgb(var(--indigo-rgb) / 0.15);
  --borda-forte: rgb(var(--indigo-rgb) / 0.42);
  --traco: rgb(var(--indigo-rgb) / 0.4);
  --sombra: 0 6px 20px -8px rgba(14, 14, 14, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.6);
  --sombra-alta: 0 22px 50px -24px rgba(26, 24, 90, 0.28);

  --mola: cubic-bezier(0.16, 1, 0.3, 1);
  --mola-salto: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-morph: 720ms;

  --fonte-titulo: "Exo", "Segoe UI", system-ui, sans-serif;
  --fonte-texto: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --fonte-codigo: "Fira Code", "Cascadia Code", Consolas, ui-monospace, monospace;

  --trilho-h: 52px;
  --escala: 1;
  --escala-l: 0.6;
}

/* Tons das pílulas do fluxograma da capa, mais teal e âmbar. */
.tom-violeta { --t-fundo: #efebff; --t-borda: #ddd5ff; --t-texto: #4a2fd4; --t-forte: #8224e1; }
.tom-azul    { --t-fundo: #e9efff; --t-borda: #d3defc; --t-texto: #1f4cd6; --t-forte: #2f28ff; }
.tom-coral   { --t-fundo: #ffeee7; --t-borda: #fbd6c8; --t-texto: #c1441c; --t-forte: #e0592c; }
.tom-teal    { --t-fundo: #e5f6f3; --t-borda: #c2e9e3; --t-texto: #0f766e; --t-forte: #0d9488; }
.tom-ambar   { --t-fundo: #fff5e1; --t-borda: #f8dfa9; --t-texto: #8a5a00; --t-forte: #f6ae2d; }
.tom-cinza   { --t-fundo: #f1f2f7; --t-borda: #dfe2ee; --t-texto: #4e576f; --t-forte: #8a91a6; }

/* ---- Página ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fundo-fora);
  color: var(--tinta-2);
  font-family: var(--fonte-texto);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow: hidden; }

.deck {
  position: fixed;
  left: var(--palco-x, 0px);
  top: var(--palco-y, 0px);
  width: 1600px;
  height: 900px;
  transform: scale(var(--escala));
  transform-origin: 0 0;
}

.quadro { display: contents; }
.notas-leitura { display: none; }

/* ---- Slide ------------------------------------------------------------ */

.slide {
  position: absolute;
  inset: 0;
  display: none;
  overflow: hidden;
  padding: 80px 104px 72px;
  background: var(--fundo);
  font-size: 30px;
  line-height: 1.42;
  box-shadow: 0 30px 80px -50px rgba(20, 20, 80, 0.35);
}

.slide.is-ativo { display: block; }

/* Grade de pontos, como uma prancheta de fluxograma; some no centro. */
.slide::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgb(var(--indigo-rgb) / 0.085) 1.3px, transparent 1.6px);
  background-size: 32px 32px;
  background-position: 16px 16px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 55% 50%, transparent 30%, #000 100%);
  mask-image: radial-gradient(ellipse 75% 70% at 55% 50%, transparent 30%, #000 100%);
}

.slide > * { position: relative; z-index: 1; }
.slide > .ligacoes { position: absolute; z-index: 0; }
.slide > .em { position: absolute; }

.slide h1,
.slide h2,
.slide h3 {
  margin: 0;
  color: var(--tinta);
  font-family: var(--fonte-titulo);
  text-wrap: balance;
}

.slide h1 {
  font-size: 92px;
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.slide h2 {
  max-width: 1240px;
  font-size: 54px;
  line-height: 1.08;
  font-weight: 650;
  letter-spacing: -0.018em;
}

.slide h3 {
  font-size: 32px;
  line-height: 1.2;
  font-weight: 600;
}

.slide p { margin: 0; max-width: 1120px; text-wrap: pretty; }
.slide p + p { margin-top: 18px; }

.slide a { color: var(--indigo); text-decoration-thickness: 1px; text-underline-offset: 4px; }

.rotulo {
  display: block;
  margin-bottom: 18px;
  color: var(--indigo);
  font-family: var(--fonte-texto);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sub {
  margin-top: 18px;
  color: var(--tinta-3);
  font-size: 30px;
  line-height: 1.38;
  max-width: 1080px;
}

.realce { color: var(--indigo); font-weight: 600; }
.realce-violeta { color: var(--violeta); font-weight: 600; }
.realce-teal { color: var(--teal-texto); font-weight: 600; }
.realce-coral { color: var(--coral); font-weight: 600; }
.apagado { color: var(--tinta-4); }
.pequeno { font-size: 22px; line-height: 1.4; color: var(--tinta-3); }

code, .codigo {
  font-family: var(--fonte-codigo);
  font-size: 0.84em;
  color: var(--indigo-escuro);
  background: rgb(var(--indigo-rgb) / 0.065);
  padding: 0.06em 0.34em;
  border-radius: 7px;
  white-space: nowrap;
}

/* Posicionamento livre: class="em" style="--x:120; --y:300; --w:320" */
.em {
  position: absolute;
  left: calc(var(--x, 0) * 1px);
  top: calc(var(--y, 0) * 1px);
  width: calc(var(--w) * 1px);
  height: calc(var(--h) * 1px);
}

.centro-x { transform: translateX(-50%); }

.fonte-slide {
  position: absolute !important;
  left: 104px;
  bottom: 34px;
  color: var(--tinta-4);
  font-size: 17px;
  letter-spacing: 0.01em;
}

.fonte-slide::before { content: "Documentação · "; }

/* Colunas simples */
.colunas {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: var(--vao, 40px);
  align-items: start;
}

.pilha { display: flex; flex-direction: column; gap: var(--vao, 18px); }
.linha { display: flex; align-items: center; gap: var(--vao, 18px); flex-wrap: wrap; }

/* ---- Nó (cartão do fluxograma) --------------------------------------- */

.no {
  position: relative;
  display: block;
  padding: 20px 26px 21px;
  background: #fff;
  border: 1.3px solid var(--borda);
  border-radius: 18px;
  box-shadow: var(--sombra);
  transition:
    border-color 0.45s ease,
    background-color 0.45s ease,
    opacity 0.45s ease;
}

.no .t {
  display: block;
  color: var(--tinta);
  font-family: var(--fonte-titulo);
  font-size: 27px;
  font-weight: 600;
  line-height: 1.16;
}

.no .s {
  display: block;
  margin-top: 6px;
  color: var(--tinta-3);
  font-size: 21px;
  line-height: 1.32;
}

.no .t code, .no .s code { white-space: nowrap; }

.no.centro { text-align: center; }
.no.compacto { padding: 13px 20px 14px; border-radius: 14px; }
.no.compacto .t { font-size: 23px; }
.no.compacto .s { font-size: 18px; margin-top: 3px; }

.no.forte {
  border-color: var(--borda-forte);
  box-shadow: 0 0 0 7px rgb(var(--indigo-rgb) / 0.07), var(--sombra);
}

.no.suave {
  background: rgb(255 255 255 / 0.55);
  border-style: dashed;
  box-shadow: none;
}

.no.cheio { background: var(--t-fundo, #f4f3ff); border-color: var(--t-borda, var(--borda)); }
.no.cheio .t { color: var(--t-texto, var(--tinta)); }

.no.escuro {
  background: #12142a;
  border-color: #12142a;
  box-shadow: var(--sombra-alta);
}
.no.escuro .t { color: #fff; }
.no.escuro .s { color: #a9aed0; }

.no.redondo {
  display: grid;
  place-items: center;
  width: calc(var(--d, 180) * 1px);
  height: calc(var(--d, 180) * 1px);
  padding: 18px;
  border-radius: 50%;
  text-align: center;
}

.no.apagado-no { opacity: 0.35; }

/* Recebe um pacote: um anel que se expande e some. */
.no.recebe { animation: no-recebe 0.95s var(--mola); }

@keyframes no-recebe {
  0% { box-shadow: 0 0 0 0 rgb(var(--indigo-rgb) / 0.3), var(--sombra); }
  100% { box-shadow: 0 0 0 18px rgb(var(--indigo-rgb) / 0), var(--sombra); }
}

/* Processando: um feixe dá a volta na borda (o "pensando" da capa). */
@property --giro {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.no::after {
  content: "";
  position: absolute;
  inset: -2px;
  padding: 2.6px;
  border-radius: inherit;
  background: conic-gradient(from var(--giro), transparent 0 70%, rgb(var(--violeta-rgb) / 0.15) 76%, var(--violeta) 88%, var(--indigo) 94%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  animation: no-giro 1.35s linear infinite;
  animation-play-state: paused;
}

.no.processa::after,
.no.girando::after {
  opacity: 1;
  animation-play-state: running;
}

@keyframes no-giro { to { --giro: 360deg; } }

/* ---- Pílula ----------------------------------------------------------- */

.pilula {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 17px 7px;
  border: 1px solid var(--t-borda, #ddd5ff);
  border-radius: 999px;
  background: var(--t-fundo, #efebff);
  color: var(--t-texto, #4a2fd4);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.pilula.codigo-p { font-family: var(--fonte-codigo); font-size: 19px; font-weight: 500; }

.ponto-cor {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--t-forte, var(--indigo));
  vertical-align: middle;
}

/* ---- Tecla ------------------------------------------------------------ */

.tecla {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.7em;
  padding: 0.04em 0.42em 0.1em;
  border: 1px solid #cdd1e4;
  border-bottom-width: 3px;
  border-radius: 9px;
  background: #fff;
  color: var(--tinta-2);
  font-family: var(--fonte-codigo);
  font-size: 0.78em;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

/* ---- Terminal --------------------------------------------------------- */

.term {
  overflow: hidden;
  border-radius: 16px;
  background: #101327;
  color: #e7e9f4;
  box-shadow: var(--sombra-alta);
  font-family: var(--fonte-codigo);
  font-size: 21px;
  line-height: 1.55;
}

.term > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  background: #181c35;
  color: #8f95b8;
  font-family: var(--fonte-texto);
  font-size: 16px;
  letter-spacing: 0.02em;
}

.term > header i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #353a5e;
}

.term > header span { margin-left: 8px; }

.term .corpo { padding: 18px 24px 22px; }

.term .l {
  display: block;
  min-height: 1.55em;
  white-space: pre-wrap;
  word-break: break-word;
}

.term .eu { color: #ffffff; }
.term .eu::before { content: "> "; color: var(--amarelo); }
.term .sh::before { content: "$ "; color: #7f86ad; }
.term .sh { color: #dfe2f5; }
.term .ferr { color: #86e3d6; }
.term .ferr::before { content: "● "; color: #3fcfb9; }
.term .res { color: #9ba2c6; padding-left: 1.3em; }
.term .res::before { content: "⎿ "; color: #5b6189; margin-left: -1.3em; }
.term .claude { color: #e7e9f4; }
.term .claude::before { content: "● "; color: #c9b8ff; }
.term .ok { color: #8fe3a0; }
.term .aviso { color: #f6c35f; }
.term .erro { color: #ff9a85; }
.term .apag { color: #6c7299; }
.term .modo { color: #b9a6ff; font-size: 0.86em; }

/* ---- Janela de aplicativo (Desktop) ---------------------------------- */

.janela {
  overflow: hidden;
  border: 1.3px solid var(--borda);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--sombra-alta);
  font-size: 20px;
}

.janela > header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-bottom: 1px solid rgb(var(--indigo-rgb) / 0.08);
  background: #f7f8fd;
  color: var(--tinta-3);
  font-size: 16px;
}

.janela > header i { width: 11px; height: 11px; border-radius: 50%; background: #dfe1ee; }
.janela > header span { margin-left: 8px; }

/* ---- Arquivo (conteúdo de CLAUDE.md, SKILL.md, JSON...) --------------- */

.arquivo {
  overflow: hidden;
  border: 1.3px solid var(--borda);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--sombra);
}

.arquivo > header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-bottom: 1px solid rgb(var(--indigo-rgb) / 0.09);
  background: #f7f7ff;
  color: var(--indigo-escuro);
  font-family: var(--fonte-codigo);
  font-size: 17px;
}

.arquivo pre {
  margin: 0;
  padding: 16px 22px 18px;
  color: var(--tinta-2);
  font-family: var(--fonte-codigo);
  font-size: 19px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.arquivo .k { color: var(--violeta); }
.arquivo .v { color: var(--teal-texto); }
.arquivo .c { color: var(--tinta-4); }
.arquivo .h { color: var(--indigo); font-weight: 600; }

/* ---- Frase grande ----------------------------------------------------- */

.frase {
  max-width: 1280px;
  color: var(--tinta);
  font-family: var(--fonte-titulo);
  font-size: 68px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.frase em { color: var(--indigo); font-style: normal; }

/* ---- Lista com portas ------------------------------------------------- */

.lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lista > li {
  position: relative;
  padding-left: 40px;
  margin: 0 0 16px;
  line-height: 1.38;
}

.lista > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.48em;
  width: 13px;
  height: 13px;
  border: 2px solid var(--indigo);
  border-radius: 50%;
  background: #fff;
}

.lista.compacta > li { margin-bottom: 9px; font-size: 26px; }

.passos {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.passos > li {
  position: relative;
  padding-left: 66px;
  margin-bottom: 20px;
  counter-increment: passo;
  line-height: 1.36;
}

.passos > li::before {
  content: counter(passo);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.6px solid var(--borda-forte);
  border-radius: 50%;
  background: #fff;
  color: var(--indigo);
  font-family: var(--fonte-titulo);
  font-size: 22px;
  font-weight: 700;
}

/* ---- Tabela ----------------------------------------------------------- */

.tabela {
  width: 100%;
  border-collapse: collapse;
  font-size: 24px;
  line-height: 1.32;
}

.tabela th {
  padding: 0 18px 12px 0;
  border-bottom: 1.6px solid rgb(var(--indigo-rgb) / 0.22);
  color: var(--tinta-3);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: left;
  text-transform: uppercase;
}

.tabela td {
  padding: 14px 18px 14px 0;
  border-bottom: 1px solid rgb(var(--indigo-rgb) / 0.09);
  vertical-align: top;
}

.tabela td:first-child { color: var(--tinta); font-weight: 600; }
.tabela tr.marcada td { background: rgb(var(--indigo-rgb) / 0.04); }

/* ---- Antes e depois --------------------------------------------------- */

.contraste {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}

.contraste > div {
  padding: 24px 28px;
  border-radius: 18px;
  font-size: 25px;
  line-height: 1.4;
}

.contraste .antes { background: #f3f4f9; border: 1.3px dashed #d4d8e8; color: var(--tinta-3); }
.contraste .depois { background: #fff; border: 1.3px solid var(--borda-forte); box-shadow: 0 0 0 7px rgb(var(--indigo-rgb) / 0.06); color: var(--tinta-2); }

.contraste .rot {
  display: block;
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contraste .antes .rot { color: var(--tinta-4); }
.contraste .depois .rot { color: var(--indigo); }

/* ---- Barra de contexto ------------------------------------------------ */

.barra {
  position: relative;
  display: flex;
  height: 74px;
  overflow: hidden;
  border: 1.3px solid var(--borda);
  border-radius: 14px;
  background: #fff;
}

.barra .seg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 calc(var(--w) * 1%);
  overflow: hidden;
  border-right: 2px solid #fff;
  background: var(--t-fundo, #efebff);
  color: var(--t-texto, #4a2fd4);
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  transition: flex-basis 0.6s var(--mola);
}

/* ---- Capa ------------------------------------------------------------- */

.slide.capa { padding: 92px 110px; }

.slide.capa::after {
  content: "";
  position: absolute;
  right: -240px;
  top: -260px;
  width: 980px;
  height: 980px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(var(--violeta-rgb) / 0.12), rgb(var(--indigo-rgb) / 0.05) 45%, transparent 70%);
  pointer-events: none;
}

.capa .marca {
  display: block;
  width: 236px;
  height: auto;
  margin-bottom: 70px;
}

.capa .num {
  display: block;
  margin-bottom: 18px;
  color: var(--indigo);
  font-family: var(--fonte-titulo);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.capa h1 { max-width: 900px; }

.capa .sub { max-width: 760px; margin-top: 30px; }

/* ---- Seção (abertura de bloco dentro da aula) ------------------------- */

.slide.secao { display: none; }
.slide.secao.is-ativo { display: flex; flex-direction: column; justify-content: center; }

/* ---- Prática ---------------------------------------------------------- */

.slide.pratica { background: linear-gradient(180deg, #fbfbff 0%, #f5f4ff 100%); }

/* ---- Passos (montagem do slide) -------------------------------------- */

[data-passo] {
  transition:
    opacity 0.55s ease,
    transform 0.65s var(--mola),
    border-color 0.45s ease,
    background-color 0.45s ease;
}

[data-passo]:not(.passo-visivel) {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.em[data-passo].centro-x:not(.passo-visivel) { transform: translate(-50%, 12px); }

/* Esmaece quem já passou, quando o slide pede foco no passo atual. */
.slide[data-foco] [data-passo].passo-visivel:not(.passo-atual):not(.liga) { opacity: 0.42; }

.sem-transicao,
.sem-transicao * { transition: none !important; }

/* Entrada escalonada de elementos marcados com .surge */
.slide.is-ativo .surge {
  animation: surgir 0.7s var(--mola) both;
  animation-delay: calc(var(--i, 0) * 90ms + 140ms);
}

@keyframes surgir {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---- Ligações (SVG gerado pelo motor) -------------------------------- */

.ligacoes {
  position: absolute;
  left: 0;
  top: 0;
  width: 1600px;
  height: 900px;
  overflow: visible;
  pointer-events: none;
}

.ligacoes .aresta {
  fill: none;
  stroke: var(--cor-aresta, rgb(var(--indigo-rgb) / 0.42));
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 0.85s var(--mola), opacity 0.4s ease;
}

.ligacoes .tracejada { stroke-dasharray: 7 8; stroke-dashoffset: 0; opacity: 0; }
.ligacoes .visivel .aresta { stroke-dashoffset: 0; }
.ligacoes .visivel .tracejada { opacity: 1; }

.ligacoes .porta {
  fill: #fff;
  stroke: var(--cor-aresta, rgb(var(--indigo-rgb) / 0.55));
  stroke-width: 1.8;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.ligacoes .seta {
  fill: none;
  stroke: var(--cor-aresta, rgb(var(--indigo-rgb) / 0.6));
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.35s ease 0.45s;
}

.ligacoes .visivel .porta { opacity: 1; }
.ligacoes .visivel .seta { opacity: 1; }

.ligacoes .rotulo-aresta {
  fill: var(--tinta-3);
  font-family: var(--fonte-texto);
  font-size: 18px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--fundo);
  stroke-width: 8px;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.4s ease 0.35s;
}

.ligacoes .visivel .rotulo-aresta { opacity: 1; }

.ligacoes .cauda {
  fill: none;
  stroke: var(--cor-pacote, var(--indigo));
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.16 1.2;
  opacity: 0.55;
}

.ligacoes .pacote { fill: var(--cor-pacote, var(--indigo)); }
.ligacoes .halo { fill: var(--cor-pacote, var(--indigo)); opacity: 0.16; }

.ligacoes .tom-violeta { --cor-aresta: rgb(var(--violeta-rgb) / 0.5); --cor-pacote: var(--violeta); }
.ligacoes .tom-teal { --cor-aresta: rgb(13 148 136 / 0.55); --cor-pacote: var(--teal); }
.ligacoes .tom-coral { --cor-aresta: rgb(224 89 44 / 0.55); --cor-pacote: #e0592c; }
.ligacoes .tom-ambar { --cor-aresta: rgb(214 146 20 / 0.6); --cor-pacote: #e09b12; }
.ligacoes .tom-cinza { --cor-aresta: rgb(138 145 166 / 0.55); --cor-pacote: var(--tinta-4); }

.liga { display: none; }

/* ---- Notas ------------------------------------------------------------ */

.notas { display: none; }

.painel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: var(--trilho-h);
  z-index: 30;
  width: min(460px, 92vw);
  overflow-y: auto;
  padding: 28px 30px 40px;
  border-left: 1px solid rgb(var(--indigo-rgb) / 0.1);
  background: #fff;
  color: var(--tinta-2);
  font-size: 17px;
  line-height: 1.58;
  transform: translateX(105%);
  transition: transform 0.45s var(--mola);
  view-transition-name: painel;
}

.painel.is-aberto { transform: none; }

.painel h4 {
  margin: 0 0 14px;
  color: var(--indigo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.painel .titulo-painel {
  margin: 0 0 18px;
  color: var(--tinta);
  font-family: var(--fonte-titulo);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
}

.painel p { margin: 0 0 12px; }
.painel ul { margin: 0 0 12px; padding-left: 20px; }
.painel li { margin-bottom: 6px; }
.painel a { color: var(--indigo); }
.painel code { font-size: 0.88em; white-space: normal; }
.painel .doc { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgb(var(--indigo-rgb) / 0.1); font-size: 15px; color: var(--tinta-3); }

.sumario-lista { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.sumario-lista li { counter-increment: s; }
.sumario-lista button {
  display: flex;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--tinta-2);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.sumario-lista button::before { content: counter(s); min-width: 22px; color: var(--tinta-4); font-variant-numeric: tabular-nums; }
.sumario-lista button:hover { background: rgb(var(--indigo-rgb) / 0.05); }
.sumario-lista button.is-atual { background: rgb(var(--indigo-rgb) / 0.08); color: var(--indigo); font-weight: 600; }

.ajuda-teclas { width: 100%; border-collapse: collapse; }
.ajuda-teclas td { padding: 7px 0; border-bottom: 1px solid rgb(var(--indigo-rgb) / 0.07); vertical-align: top; }
.ajuda-teclas td:first-child { width: 130px; }
.ajuda-teclas .tecla { font-size: 13px; }

/* ---- Trilho (barra inferior) ----------------------------------------- */

.trilho {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--trilho-h);
  padding: 0 14px 0 18px;
  border-top: 1px solid rgb(var(--indigo-rgb) / 0.08);
  background: rgb(250 251 255 / 0.92);
  color: var(--tinta-3);
  font-size: 14px;
  view-transition-name: trilho;
}

.trilho a.trilho-marca {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--tinta-3);
  text-decoration: none;
}

.trilho a.trilho-marca img { width: 22px; height: auto; flex: none; }
.trilho .trilho-titulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 38vw; }
.trilho .trilho-titulo b { color: var(--tinta); font-weight: 600; }

.trilho-pontos {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
}

.trilho-pontos::before {
  content: "";
  position: absolute;
  left: var(--linha-ini, 0);
  right: var(--linha-fim, 0);
  top: 50%;
  height: 1.5px;
  background: rgb(var(--indigo-rgb) / 0.16);
}

.trilho-pontos button {
  position: relative;
  width: 11px;
  height: 11px;
  padding: 0;
  border: 1.7px solid rgb(var(--indigo-rgb) / 0.38);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--mola-salto);
}

.trilho-pontos button.is-visto { background: rgb(var(--indigo-rgb) / 0.32); border-color: rgb(var(--indigo-rgb) / 0.5); }
.trilho-pontos button.is-atual { background: var(--indigo); border-color: var(--indigo); box-shadow: 0 0 0 5px rgb(var(--indigo-rgb) / 0.13); transform: scale(1.15); }
.trilho-pontos button.is-secao { border-radius: 3px; }

.trilho .contagem { font-variant-numeric: tabular-nums; min-width: 54px; text-align: right; }

.trilho .botoes { display: flex; gap: 2px; }

.trilho .botoes button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--tinta-3);
  cursor: pointer;
}

.trilho .botoes button:hover { background: rgb(var(--indigo-rgb) / 0.07); color: var(--indigo); }
.trilho .botoes button.is-ligado { color: var(--indigo); background: rgb(var(--indigo-rgb) / 0.08); }
.trilho .botoes svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 760px) {
  .trilho .trilho-titulo { display: none; }
  .trilho-pontos { display: none; }
}

/* ---- View Transitions ------------------------------------------------- */

::view-transition-group(*) {
  animation-duration: var(--dur-morph);
  animation-timing-function: var(--mola);
}

::view-transition-old(root) { animation: 300ms ease both vt-sai; }
::view-transition-new(root) { animation: 460ms 90ms ease both vt-entra; }
::view-transition-group(trilho),
::view-transition-group(painel) { animation-duration: 0s; }

@keyframes vt-sai { to { opacity: 0; } }
@keyframes vt-entra { from { opacity: 0; } }

/* Sem movimento: tudo aparece de uma vez. */
.sem-movimento .slide.is-ativo .surge { animation: none; }
.sem-movimento [data-passo] { transition: none; }
.sem-movimento .ligacoes * { transition: none !important; }
.sem-movimento .no::after { animation: none; }

/* ---- Modo leitura ----------------------------------------------------- */

body.modo-leitura { overflow: auto; background: #f3f4fa; }

.modo-leitura .deck {
  position: static;
  width: auto;
  height: auto;
  margin: 0 auto;
  padding: 40px 0 120px;
  transform: none;
}

.modo-leitura .quadro {
  position: relative;
  display: block;
  width: calc(1600px * var(--escala-l));
  height: calc(900px * var(--escala-l));
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 18px 50px -30px rgba(20, 20, 80, 0.35);
}

.modo-leitura .slide {
  display: block;
  left: 0;
  top: 0;
  width: 1600px;
  height: 900px;
  transform: scale(var(--escala-l));
  transform-origin: 0 0;
  box-shadow: none;
}

.modo-leitura .slide.secao { display: flex; flex-direction: column; justify-content: center; }
.modo-leitura .slide .surge { animation: none; }

.modo-leitura .notas-leitura {
  display: block;
  width: calc(1600px * var(--escala-l));
  margin: 18px auto 56px;
  color: var(--tinta-2);
  font-size: 17.5px;
  line-height: 1.62;
}

.modo-leitura .notas-leitura .n-num {
  display: block;
  margin-bottom: 6px;
  color: var(--tinta-4);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.modo-leitura .notas-leitura p { margin: 0 0 10px; }
.modo-leitura .notas-leitura a { color: var(--indigo); }
.modo-leitura .notas-leitura code { white-space: normal; }
.modo-leitura .notas-leitura .doc { font-size: 15px; color: var(--tinta-3); }

.modo-leitura .painel { display: none; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
  html, body { background: #fff; overflow: visible; height: auto; }
  .trilho, .painel { display: none !important; }
  .modo-leitura .deck { padding: 0; }
  .modo-leitura .quadro { box-shadow: none; border: 1px solid #e3e5ef; break-inside: avoid; }
  .modo-leitura .notas-leitura { break-before: avoid; margin-bottom: 28px; }
  .modo-leitura .quadro, .modo-leitura .notas-leitura { break-inside: avoid; }
}

/* Ajustes */
.pilha { align-items: flex-start; }
.modo-leitura .slide[data-foco] [data-passo].passo-visivel { opacity: 1; }

/* ---- Atalhos de teclado ---------------------------------------------- */

.atalhos {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  gap: 20px 64px;
}

.atalhos > div {
  display: flex;
  align-items: baseline;
  gap: 20px;
  font-size: 25px;
  line-height: 1.3;
}

.atalhos .teclas {
  display: flex;
  flex: 0 0 var(--larg-teclas, 200px);
  justify-content: flex-end;
  gap: 6px;
}

/* ---- Peças de interface dentro de .janela ---------------------------- */

.janela .lateral {
  position: absolute;
  left: 0;
  top: 44px;
  bottom: 0;
  width: 230px;
  padding: 18px 16px;
  border-right: 1px solid rgb(var(--indigo-rgb) / 0.08);
  background: #f7f8fd;
  font-size: 17px;
  color: var(--tinta-3);
}

.janela .lateral b { display: block; margin: 0 0 12px; color: var(--tinta); font-size: 17px; }
.janela .lateral span { display: block; margin: 0 -8px 6px; padding: 6px 8px; border-radius: 8px; }
.janela .lateral span.ativa { background: rgb(var(--indigo-rgb) / 0.08); color: var(--indigo-escuro); font-weight: 600; }

.janela .caixa-prompt {
  border: 1.3px solid rgb(var(--indigo-rgb) / 0.2);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px -14px rgba(20, 20, 80, 0.25);
}

.janela .bolha {
  padding: 14px 18px;
  border-radius: 14px;
  background: #f4f4fb;
  color: var(--tinta-2);
  font-size: 18px;
  line-height: 1.45;
}

.janela .bolha .f { display: block; color: var(--teal-texto); font-family: var(--fonte-codigo); font-size: 15px; }
.tabela.em { width: calc(var(--w, 1392) * 1px); }
.slide > .ligacoes.acima { z-index: 3; }
.arquivo .bl { display: block; }
