/* ============================================================
   Tema Azul-Tecnológico — IA Generativa Aplicada à Auditoria
   Compartilhado pelo deck (index.html) e páginas de exercício.
   Tema escuro é o padrão; claro via html[data-theme='light'].
   ============================================================ */

:root {
    /* ===== Tema ESCURO (padrão) ===== */
    --bg-grad-1: #0a1838;   /* navy escuro */
    --bg-grad-2: #15336b;   /* azul médio */
    --text: #FFFFFF;
    --text-secondary: #abc4e6;
    --accent: #00E5FF;       /* ciano/turquesa */
    --accent-2: #2997ff;
    --accent-soft: rgba(0, 229, 255, 0.16);
    --border: rgba(255, 255, 255, 0.16);
    --card-bg: rgba(255, 255, 255, 0.05);
    --table-header-bg: rgba(255, 255, 255, 0.08);
    --watermark: rgba(255, 255, 255, 0.22);
    --shadow: rgba(0, 0, 0, 0.45);
    --code-bg: rgba(0, 0, 0, 0.35);
}
html[data-theme='light'] {
    /* ===== Tema CLARO — azul-gelo ===== */
    --bg-grad-1: #eef4ff;
    --bg-grad-2: #dceaff;
    --text: #0a1838;
    --text-secondary: #3a5680;
    --accent: #0091a8;       /* ciano mais escuro p/ contraste */
    --accent-2: #0066cc;
    --accent-soft: rgba(0, 145, 168, 0.12);
    --border: rgba(10, 24, 56, 0.14);
    --card-bg: rgba(255, 255, 255, 0.72);
    --table-header-bg: rgba(10, 24, 56, 0.06);
    --watermark: rgba(10, 24, 56, 0.28);
    --shadow: rgba(10, 24, 56, 0.18);
    --code-bg: rgba(10, 24, 56, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-grad-1), var(--bg-grad-2));
    color: var(--text);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* ============================================================
   Controles fixos (toggle de tema, setas, progresso)
   ============================================================ */
.theme-toggle {
    position: fixed; top: 18px; right: 18px;
    background-color: transparent; color: var(--text-secondary);
    border: none; width: 52px; height: 52px; cursor: pointer; z-index: 100;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.6rem; transition: color 0.3s ease, transform 0.3s ease;
}
.theme-toggle:hover { color: var(--accent); transform: scale(1.12); }

/* Controles de zoom (+/−), à esquerda do toggle de tema */
.zoom-controls {
    position: fixed; top: 18px; right: 70px; z-index: 100;
    display: flex; align-items: center;
}
.zoom-ctrl {
    background-color: transparent; color: var(--text-secondary);
    border: none; width: 40px; height: 52px; cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    font-family: inherit; font-size: 1.5rem; font-weight: 700; line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}
.zoom-ctrl:hover { color: var(--accent); transform: scale(1.15); }

/* Rodapé de acesso do público: link (inf. esquerdo) + QR (inf. direito) */
.site-footer-link {
    position: fixed; bottom: 16px; left: 18px; z-index: 90;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.05em;
    color: var(--watermark); text-decoration: none;
    transition: color 0.3s ease;
}
.site-footer-link:hover { color: var(--accent); }
.site-footer-qr {
    position: fixed; bottom: 14px; right: 14px; z-index: 90;
    display: block; width: 96px; height: 96px; padding: 6px;
    background: #fff; border-radius: 10px;
    box-shadow: 0 6px 18px var(--shadow);
}
.site-footer-qr img { display: block; width: 100%; height: 100%; }
@media (max-width: 700px) {
    .site-footer-qr, .site-footer-link { display: none; }
}

/* Barra de navegação inferior: anterior · contador · próximo */
.deck-nav {
    position: fixed; bottom: 14px; left: 50%; transform: translateX(-50%);
    z-index: 100; display: flex; align-items: center; gap: 1rem;
}
.nav-arrow {
    position: relative;
    background-color: transparent; color: var(--text-secondary);
    border: none; width: 40px; height: 40px; cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    transition: color 0.3s ease;
}
.nav-arrow:hover { color: var(--accent); }
.nav-arrow svg { width: 26px; height: 26px; fill: currentColor; }

.slide-counter {
    font-size: 0.85rem; color: var(--watermark);
    letter-spacing: 0.08em; font-weight: 600;
    min-width: 3.6em; text-align: center;
}
.progress-bar {
    position: fixed; bottom: 0; left: 0; height: 4px; width: 0;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
    z-index: 100; transition: width 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ============================================================
   Deck de slides
   ============================================================ */
body.deck { overflow: hidden; }
/* Slides empilhados: só o ativo é visível; a troca é um fade + deslize
   via transição CSS (controlada por deck.js). */
.presentation-container {
    position: relative; width: 100%; height: 100vh; overflow: hidden;
}
.slide {
    position: absolute; inset: 0;
    width: 100vw; height: 100vh;
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    padding: 4vh 6vw;
    opacity: 0; transform: translateX(40px);
    visibility: hidden; pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1),
                visibility 0s linear 0.6s;
    overflow: hidden;
}
.slide.active {
    opacity: 1; transform: translateX(0);
    visibility: visible; pointer-events: auto; z-index: 2;
    transition-delay: 0s;
}
.watermark {
    position: absolute; top: 26px; left: 6vw;
    font-size: 0.78rem; font-weight: 600;
    color: var(--watermark);
    pointer-events: none; z-index: 5; letter-spacing: 0.08em;
    text-transform: uppercase;
}
.slide-content { max-width: 1100px; width: 100%; text-align: center; z-index: 2; }
.slide-content.wide { max-width: 1400px; }
.slide h1 { font-size: clamp(2.5rem, 7vw, 6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; color: var(--text); margin: 0 0 1.2rem; }
.slide h2 { font-size: clamp(1.8rem, 4.8vw, 3.8rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.08; color: var(--text); margin: 0 0 1.6rem; }
.slide h3 { font-size: clamp(1.3rem, 2.4vw, 2rem); font-weight: 600; color: var(--accent); margin: 0 0 0.4rem; }
.slide p, .slide li { font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.5; color: var(--text-secondary); max-width: 1000px; margin-left: auto; margin-right: auto; }
.slide ul { padding-left: 1.4em; text-align: left; display: inline-block; margin: 0 auto; }
.slide li { margin-bottom: 1rem; }
.slide li::marker { color: var(--accent); }
.highlight-text { font-weight: 800; color: var(--accent); }

.kicker {
    display: inline-block; font-size: clamp(0.85rem, 1.3vw, 1.1rem);
    font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 1.2rem;
}

/* Capa */
.slide.cover .slide-content { max-width: 1200px; }
.slide.cover h1 { font-size: clamp(2.8rem, 8vw, 7rem); font-weight: 800; }
.slide.cover .subtitle { font-size: clamp(1.2rem, 2.4vw, 2rem); color: var(--text-secondary); margin-top: 0.5rem; max-width: 900px; }
.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: 0.35; pointer-events: none; z-index: 0; }
.blob.b1 { width: 420px; height: 420px; background: radial-gradient(circle, var(--accent), transparent 70%); top: -120px; right: -80px; }
.blob.b2 { width: 360px; height: 360px; background: radial-gradient(circle, var(--accent-2), transparent 70%); bottom: -120px; left: -100px; }
.circuit { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0.55; }
.circuit svg { width: 100%; height: 100%; }

/* Slides de seção (lead) */
.slide.lead .slide-content h2 { font-size: clamp(2.4rem, 6vw, 5rem); }
.slide.lead .lead-sub { font-size: clamp(1.2rem, 2.2vw, 1.9rem); color: var(--text-secondary); margin-top: 0.4rem; }

/* Slide com imagem de fundo (foto escura): camada de fundo + vinheta
   sutil; o texto fica claro nos dois temas, pois a foto não muda. */
.slide-bg {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
}
.slide-bg .bg-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.slide-bg::after {
    content: ""; position: absolute; inset: 0;
    background: radial-gradient(ellipse at center, transparent 45%, rgba(4, 10, 25, 0.4) 100%);
}
.slide.has-bg .kicker { color: #00E5FF; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7); }
.slide.has-bg h1, .slide.has-bg h2 { color: #fff; text-shadow: 0 3px 28px rgba(0, 0, 0, 0.75); }
.slide.has-bg .lead-sub, .slide.has-bg .subtitle { color: #e8f1fb; text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75); }
.slide.has-bg .watermark { color: rgba(255, 255, 255, 0.4); }
/* Painel local atrás do texto para fundos claros/psicodélicos */
.slide.has-bg .slide-content.scrim {
    position: relative; z-index: 1;
    background: rgba(4, 10, 25, 0.58);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 3rem 3.5rem;
    max-width: min(860px, 88vw);
}
/* eleva o texto para a área escura da imagem, acima do barco */
.slide.has-bg .slide-content.raised { transform: translateY(-9vh); }

/* Layout dividido: texto à esquerda, mídia à direita */
.split { display: flex; align-items: center; gap: 3rem; width: 100%; text-align: left; }
.split-text { flex: 1 1 0; min-width: 0; }
.split-text h2 { text-align: left; }
.split-text p { text-align: left; margin-left: 0; font-size: clamp(1.1rem, 1.9vw, 1.7rem); }
.split-media { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; align-items: center; }

/* Imagem de slide com zoom em tela cheia */
.zoomable { position: relative; margin: 0; display: inline-block; max-width: 100%; }
.slide-image, .slide-video {
    max-width: 100%; max-height: 62vh; height: auto;
    border-radius: 14px; box-shadow: 0 12px 36px var(--shadow);
    cursor: zoom-in;
}
.zoom-btn {
    position: absolute; right: 12px; bottom: 12px;
    width: 42px; height: 42px; border-radius: 12px;
    border: 1.5px solid var(--accent); background: var(--accent-soft);
    color: var(--accent); font-size: 1.3rem; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    cursor: zoom-in; backdrop-filter: blur(4px);
    transition: transform 0.2s ease, background 0.3s ease;
}
.zoom-btn:hover { transform: scale(1.1); }

/* Lightbox: imagem ampliada em tela cheia; ESC ou clique fecha */
.image-lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: none; justify-content: center; align-items: center;
    padding: 3vh 3vw; background: rgba(0, 0, 0, 0.92); cursor: zoom-out;
}
.image-lightbox.open { display: flex; }
.image-lightbox img, .image-lightbox video {
    max-width: 96vw; max-height: 94vh; object-fit: contain;
    border-radius: 8px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.image-lightbox .lightbox-hint {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7); font-size: 0.95rem;
    letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none;
}

/* Nota de fonte/citação no rodapé do slide */
.slide .source-note {
    font-size: clamp(0.75rem, 1vw, 0.95rem); color: var(--watermark);
    margin-top: 1.8rem; letter-spacing: 0.02em;
}
.slide .source-note a { color: var(--text-secondary); text-decoration: none; }
.slide .source-note a:hover { color: var(--accent); }

/* Vídeo embutido (YouTube) em slide */
.video-embed {
    width: min(1100px, 100%, calc(62vh * 16 / 9));
    aspect-ratio: 16 / 9; margin: 1.4rem auto 0;
}
.video-embed iframe {
    width: 100%; height: 100%; border: 0;
    border-radius: 14px; box-shadow: 0 12px 36px var(--shadow);
}

/* Frase de impacto */
.statement { font-size: clamp(1.7rem, 4vw, 3.4rem); font-weight: 800; line-height: 1.25; color: var(--text); max-width: 1000px; margin: 0.5rem auto 0; text-align: center; letter-spacing: -0.01em; }

/* Grade de cards */
.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; width: 100%; text-align: left; margin-top: 1.6rem; }
/* Variante de 3 colunas fixas (3 em cima, 3 embaixo), inclusive em retrato */
.modules-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.module-card { padding: 1.6rem 1.8rem; border: 1px solid var(--border); border-radius: 16px; background-color: var(--card-bg); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.module-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px var(--shadow); border-color: var(--accent); }
.module-card h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); margin: 0 0 0.5rem 0; }
.module-card p { font-size: clamp(1.05rem, 1.6vw, 1.4rem); line-height: 1.45; margin: 0; max-width: 100%; }

/* Grade de emojis */
.emoji-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; width: 100%; margin-top: 1.6rem; }
.emoji-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 1.4rem 1rem; border: 1px solid var(--border); border-radius: 18px; background-color: var(--card-bg); transition: transform 0.3s ease, border-color 0.3s ease; }
.emoji-cell:hover { transform: translateY(-4px); border-color: var(--accent); }
.emoji-cell .emoji { font-size: clamp(2.2rem, 4.6vw, 3.6rem); line-height: 1; }
.emoji-cell .emoji-label { font-size: clamp(1.15rem, 2vw, 1.7rem); font-weight: 800; letter-spacing: 0.01em; color: var(--text); text-align: center; line-height: 1.15; }

/* Fluxo: caixas + setas */
.flow { display: flex; align-items: stretch; justify-content: center; gap: 0.6rem; width: 100%; margin-top: 1.6rem; }
.flow-node { flex: 1 1 0; min-width: 0; text-align: left; padding: 1.4rem; border-radius: 16px; border: 1px solid var(--border); background: var(--card-bg); }
.flow-node .fl-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 800; color: var(--accent); }
.flow-node h3 { font-size: clamp(1.15rem, 1.8vw, 1.6rem); margin: 0.4rem 0; color: var(--text); }
.slide .flow-node p { font-size: clamp(0.95rem, 1.35vw, 1.25rem); line-height: 1.4; margin: 0; color: var(--text-secondary); max-width: 100%; }
.flow-arrow { display: flex; align-items: center; color: var(--accent); font-size: 1.8rem; flex: 0 0 auto; font-weight: 800; }

/* Etapas numeradas */
.steps { display: flex; flex-direction: column; gap: 1.2rem; width: 100%; text-align: left; margin-top: 1.6rem; }
.step { display: flex; align-items: center; gap: 1.4rem; }
.step-num { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: clamp(2.8rem, 4.6vw, 4rem); height: clamp(2.8rem, 4.6vw, 4rem); border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--accent); color: var(--accent); font-weight: 800; font-size: clamp(1.3rem, 2.3vw, 2.1rem); }
.step-text { flex: 1 1 0; min-width: 0; }
.step-text .step-title { color: var(--accent); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.7rem); }
.step-text .step-desc { color: var(--text-secondary); font-size: clamp(1.05rem, 1.7vw, 1.45rem); line-height: 1.35; }

/* Números grandes */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.6rem; width: 100%; margin-top: 1.6rem; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.4rem; padding: 1.4rem 1rem; border: 1px solid var(--border); border-radius: 18px; background-color: var(--card-bg); }
.stat-num { color: var(--accent); font-weight: 800; line-height: 1; font-size: clamp(2.8rem, 6.5vw, 5.4rem); letter-spacing: -0.02em; }
.stat-label { color: var(--text-secondary); font-size: clamp(1.1rem, 1.8vw, 1.6rem); line-height: 1.25; }

/* Camadas / pirâmide */
.layers { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; width: 100%; margin-top: 1.6rem; }
.layer { display: flex; align-items: center; justify-content: center; text-align: center; width: 100%; padding: 1.1rem 1.4rem; border: 2px solid var(--border); border-radius: 14px; background-color: var(--card-bg); color: var(--text); font-weight: 700; font-size: clamp(1.2rem, 2vw, 1.9rem); }
.layers.pyramid .layer:nth-child(1) { width: 56%; }
.layers.pyramid .layer:nth-child(2) { width: 78%; }
.layers.pyramid .layer:nth-child(3) { width: 100%; }
.layers.pyramid .layer { background: var(--accent-soft); border-color: var(--accent); }

/* Caixa de destaque */
.callout { display: flex; align-items: center; gap: 1.4rem; width: 100%; max-width: 1000px; margin: 1.6rem auto 0; text-align: left; padding: 1.5rem 1.7rem; border: 1px solid var(--border); border-left: 8px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.callout .callout-icon { flex: 0 0 auto; font-size: clamp(2.2rem, 3.6vw, 3.2rem); line-height: 1; }
.callout .callout-text { flex: 1 1 0; color: var(--text); font-size: clamp(1.25rem, 2vw, 1.9rem); line-height: 1.35; }

/* Tabela */
.slide-table { width: 100%; border-collapse: collapse; margin-top: 1.4rem; font-size: clamp(0.95rem, 1.5vw, 1.25rem); }
.slide-table th { background-color: var(--table-header-bg); color: var(--text); padding: 0.7rem 1rem; text-align: left; border-bottom: 2px solid var(--accent); }
.slide-table td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid var(--border); color: var(--text-secondary); }

/* Botão "Caso Prático" no slide */
.btn-exercise {
    display: inline-flex; align-items: center; gap: 0.7rem;
    margin-top: 2rem; padding: 0.95rem 2.2rem;
    border: 2px solid var(--accent); border-radius: 999px;
    background: var(--accent-soft); color: var(--accent);
    font-family: inherit; font-size: clamp(1.1rem, 1.8vw, 1.5rem); font-weight: 800;
    letter-spacing: 0.03em; text-decoration: none; cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}
.btn-exercise:hover { transform: translateY(-3px); box-shadow: 0 10px 28px var(--shadow); }

/* Animações sutis de entrada */
@keyframes riseIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.slide.active .flow-node, .slide.active .step, .slide.active .stat, .slide.active .layer,
.slide.active .callout, .slide.active .module-card, .slide.active .emoji-cell { animation: riseIn 0.5s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.slide.active .flow-node:nth-child(n+2), .slide.active .step:nth-child(n+2), .slide.active .stat:nth-child(n+2),
.slide.active .layer:nth-child(n+2), .slide.active .module-card:nth-child(n+2), .slide.active .emoji-cell:nth-child(n+2) { animation-delay: 0.08s; }
.slide.active .flow-node:nth-child(n+4), .slide.active .step:nth-child(n+4), .slide.active .stat:nth-child(n+4),
.slide.active .module-card:nth-child(n+4), .slide.active .emoji-cell:nth-child(n+4) { animation-delay: 0.16s; }
.slide.active .emoji-cell:nth-child(n+6), .slide.active .flow-node:nth-child(n+6) { animation-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
    .slide.active .flow-node, .slide.active .step, .slide.active .stat, .slide.active .layer,
    .slide.active .callout, .slide.active .module-card, .slide.active .emoji-cell { animation: none !important; }
}

/* Links de contato (último slide) */
.contact-links { margin-top: 2.5rem; display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; }
.contact-item .contact-icon { font-size: 1.8rem; }
.contact-item a { font-size: clamp(1.1rem, 1.8vw, 1.4rem); color: var(--text-secondary); text-decoration: none; transition: color 0.3s ease; }
.contact-item a:hover { color: var(--accent); }

/* Slide Contatos: nome em destaque, chamada menor e mais espaçada */
.contact-item.contact-name .contact-icon { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.contact-item.contact-name a { font-size: clamp(1.5rem, 2.8vw, 2.4rem); font-weight: 700; color: var(--text); }
.contact-item.contact-name a:hover { color: var(--accent); }
.slide.cover .subtitle.contact-cta { font-size: clamp(0.95rem, 1.5vw, 1.25rem); margin-top: 4.5rem; }

/* ============================================================
   Página de exercício (layout de leitura)
   ============================================================ */
body.exercise { overflow-x: hidden; overflow-y: auto; min-height: 100vh; }
.exercise-page { max-width: 900px; margin: 0 auto; padding: 5rem 6vw 5rem; }
.exercise-page .kicker { margin-bottom: 0.6rem; }
.exercise-page h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); margin: 0 0 1rem; }
.exercise-page h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--text); margin: 3rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--accent); display: inline-block; }
.exercise-page p, .exercise-page li { font-size: clamp(1.05rem, 1.7vw, 1.2rem); line-height: 1.65; color: var(--text-secondary); }
.exercise-page ul { padding-left: 1.4em; }
.exercise-page li { margin-bottom: 0.5rem; }
.exercise-page li::marker { color: var(--accent); }
.exercise-page a { color: var(--accent); }

.btn-back {
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.6rem 1.4rem; margin-bottom: 2rem;
    border: 1.5px solid var(--border); border-radius: 999px;
    background: var(--card-bg); color: var(--text-secondary);
    font-family: inherit; font-size: 1rem; font-weight: 700;
    text-decoration: none; cursor: pointer;
    transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.btn-back:hover { color: var(--accent); border-color: var(--accent); transform: translateX(-3px); }

/* Cards de insumos */
.resource-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.1rem; margin: 1.4rem 0; }
.resource-card {
    display: flex; align-items: flex-start; gap: 1rem;
    padding: 1.3rem 1.4rem; border: 1px solid var(--border); border-radius: 16px;
    background: var(--card-bg); text-decoration: none;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.resource-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 10px 28px var(--shadow); }
.resource-card .resource-icon { font-size: 1.9rem; flex: 0 0 auto; line-height: 1.2; }
.resource-card .resource-text h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 0 0 0.3rem; }
.resource-card .resource-text p { font-size: 0.95rem; line-height: 1.45; margin: 0; }
.resource-card .resource-text .external-hint { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.82rem; font-weight: 700; color: var(--accent); margin-top: 0.5rem; }

/* Callout na página de exercício */
.exercise-page .callout { margin: 1.6rem 0 0; max-width: 100%; }
.exercise-page .callout .callout-text { font-size: clamp(1rem, 1.6vw, 1.15rem); }

/* Bloco de prompt com botão copiar */
.prompt-block { position: relative; margin: 1.4rem 0; }
.prompt-block pre {
    margin: 0; padding: 1.6rem 1.6rem 1.6rem;
    background: var(--code-bg); border: 1px solid var(--border);
    border-radius: 14px; overflow-x: auto;
    max-height: 560px; overflow-y: auto;
}
.prompt-block code {
    font-family: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.88rem; line-height: 1.6; color: var(--text);
    white-space: pre-wrap; word-break: break-word;
}
.btn-copy {
    position: sticky; top: 0; float: right;
    display: inline-flex; align-items: center; gap: 0.5rem;
    margin: -0.4rem -0.4rem 0.6rem 1rem;
    padding: 0.5rem 1.1rem;
    border: 1.5px solid var(--accent); border-radius: 999px;
    background: var(--bg-grad-1); color: var(--accent);
    font-family: inherit; font-size: 0.9rem; font-weight: 800;
    cursor: pointer; z-index: 2;
    transition: background 0.3s ease, color 0.3s ease, transform 0.2s ease;
}
.btn-copy:hover { transform: translateY(-2px); }
.btn-copy.copied { background: var(--accent); color: var(--bg-grad-1); }

/* Mosaico de imagens em página de exercício */
.image-mosaic {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.7rem; margin: 1.4rem 0;
}
.image-mosaic a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.image-mosaic img {
    display: block; width: 100%; height: 100%; aspect-ratio: 3 / 4;
    object-fit: cover; cursor: zoom-in;
    transition: transform 0.3s ease;
}
.image-mosaic a:hover img { transform: scale(1.05); }
@media (max-width: 768px) { .image-mosaic { grid-template-columns: repeat(2, 1fr); } }

/* Figura ilustrativa em página de exercício */
.exercise-figure { margin: 1.4rem 0; text-align: center; }
.exercise-figure img {
    max-width: 100%; height: auto; border-radius: 14px;
    border: 1px solid var(--border); box-shadow: 0 10px 28px var(--shadow);
}

/* ============================================================
   Menu sanduíche de navegação (deck + exercícios)
   ============================================================ */
.menu-toggle {
    position: fixed; top: 18px; left: 18px;
    background-color: transparent; color: var(--text-secondary);
    border: none; width: 52px; height: 52px; cursor: pointer; z-index: 120;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.7rem; line-height: 1;
    transition: color 0.3s ease, transform 0.3s ease;
}
.menu-toggle:hover { color: var(--accent); transform: scale(1.12); }

.menu-overlay {
    position: fixed; inset: 0; z-index: 130;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0; visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.menu-overlay.open { opacity: 1; visibility: visible; }

.menu-drawer {
    position: fixed; top: 0; left: 0; z-index: 140;
    width: min(360px, 86vw); height: 100%;
    background: linear-gradient(160deg, var(--bg-grad-1), var(--bg-grad-2));
    border-right: 1px solid var(--border);
    box-shadow: 6px 0 32px var(--shadow);
    padding: 4.6rem 1rem 2rem;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.menu-drawer.open { transform: translateX(0); }

.menu-section-title {
    font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--accent);
    margin: 1.2rem 0.8rem 0.5rem; text-align: left;
}
.menu-section-title:first-child { margin-top: 0; }

.menu-item {
    display: flex; align-items: center; gap: 0.7rem;
    padding: 0.6rem 0.8rem; border-radius: 10px;
    color: var(--text); text-decoration: none;
    font-size: 0.95rem; line-height: 1.25; text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}
.menu-item:hover { background: var(--accent-soft); color: var(--accent); }
.menu-num {
    flex: 0 0 auto; min-width: 1.8rem; height: 1.8rem;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px; background: var(--card-bg);
    border: 1px solid var(--border);
    font-size: 0.78rem; font-weight: 800; color: var(--text-secondary);
}
.menu-item:hover .menu-num { border-color: var(--accent); color: var(--accent); }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 768px) {
    .slide { padding: 3vh 7vw; }
    .modules-grid, .modules-grid.cols-3 { grid-template-columns: 1fr; }
    .emoji-grid { grid-template-columns: repeat(2, 1fr); }
    .split { flex-direction: column; gap: 1.5rem; }
    .flow { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); justify-content: center; }
    .layers.pyramid .layer:nth-child(1), .layers.pyramid .layer:nth-child(2) { width: 100%; }
    .exercise-page { padding: 4rem 6vw 4rem; }
    .resource-grid { grid-template-columns: 1fr; }
}
