ÿþ<!DOCTYPE html> <html lang="pt-BR" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Aula 02: Função do 1º Grau (A Reta) - Módulo 05</title> <script src="https://cdn.tailwindcss.com"></script> <script> tailwind.config = { darkMode: 'class' } </script> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700;900&display=swap" rel="stylesheet"> <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> <script> MathJax = { tex: { inlineMath: [['$', '$'], ['\\(', '\\)']], displayMath: [['$$', '$$']] } }; </script> <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> <style> body { font-family: 'Inter', sans-serif; transition: background-color 0.3s, color 0.3s; } .bg-engineering { background-color: #ffffff; background-image: linear-gradient(#3b82f605 1.1px, transparent 1.1px), linear-gradient(90deg, #3b82f605 1.1px, transparent 1.1px); background-size: 30px 30px; } html.dark .bg-engineering { background-color: #070d19; background-image: linear-gradient(#3b82f608 1.1px, transparent 1.1px), linear-gradient(90deg, #3b82f608 1.1px, transparent 1.1px); } .box-concept { padding: 2rem; border-radius: 1.5rem; position: relative; overflow: hidden; border-left-width: 6px; margin-bottom: 2rem; } .tag { display: inline-block; padding: 0.25rem 1rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; } .math-block { overflow-x: auto; padding: 1rem 0; margin: 1rem 0; } </style> </head> <body class="bg-engineering text-slate-800 dark:text-slate-200 min-h-screen p-4 md:p-8"> <main class="max-w-4xl mx-auto bg-white dark:bg-slate-900 rounded-3xl shadow-2xl p-6 md:p-10 border border-slate-200 dark:border-slate-800 relative overflow-hidden"> <div class="absolute top-0 left-0 w-full h-2 bg-gradient-to-r from-blue-500 to-indigo-600"></div> <div class="flex items-center gap-4 mb-8"> <div class="w-12 h-12 rounded-2xl bg-indigo-100 dark:bg-indigo-900/50 flex items-center justify-center text-indigo-600 dark:text-indigo-400 font-black text-xl shadow-inner"> 02 </div> <div> <h3 class="text-indigo-600 dark:text-indigo-400 font-bold text-sm tracking-wider uppercase">Módulo 05</h3> <h1 class="text-3xl md:text-4xl font-black text-slate-800 dark:text-white">Função do 1º Grau (A Reta)</h1> </div> </div> <p class="text-lg mb-8 leading-relaxed text-slate-600 dark:text-slate-400"> A função do 1º grau é como uma máquina que obedece sempre ao mesmo ritmo. Se você ganha $10$ reais a cada hora de trabalho, seu crescimento é constante. Na matemática, quando colocamos isso num gráfico, o resultado visual é sempre uma <strong>reta</strong> (linha reta sem curvas). </p> <div class="box-concept bg-indigo-50 dark:bg-indigo-900/20 border-indigo-500"> <span class="tag bg-indigo-200 dark:bg-indigo-800 text-indigo-800 dark:text-indigo-200">Estrutura Clássica</span> <p class="mb-4">Toda função do 1º grau tem a cara da fórmula mágica:</p> <div class="math-block text-2xl font-black text-center text-indigo-600 dark:text-indigo-400"> $$ f(x) = ax + b $$ </div> <p class="text-sm text-center text-slate-500 dark:text-slate-400 mb-6">(Também pode ser escrita como $y = ax + b$)</p> <div class="grid grid-cols-1 md:grid-cols-2 gap-6"> <div class="bg-white dark:bg-slate-800 p-5 rounded-2xl border border-indigo-100 dark:border-indigo-800/50"> <div class="flex items-center gap-3 mb-2"> <span class="w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900 text-blue-600 dark:text-blue-400 font-black flex items-center justify-center">a</span> <h4 class="font-bold text-lg">Coeficiente Angular</h4> </div> <p class="text-sm text-slate-600 dark:text-slate-400"> Ã0 a <strong>Taxa de Variação</strong> (inclinação). <br>Se $a > 0$, a reta sobe (Crescente).<br>Se $a < 0$, a reta desce (Decrescente). </p> </div> <div class="bg-white dark:bg-slate-800 p-5 rounded-2xl border border-indigo-100 dark:border-indigo-800/50"> <div class="flex items-center gap-3 mb-2"> <span class="w-8 h-8 rounded-full bg-emerald-100 dark:bg-emerald-900 text-emerald-600 dark:text-emerald-400 font-black flex items-center justify-center">b</span> <h4 class="font-bold text-lg">Coeficiente Linear</h4> </div> <p class="text-sm text-slate-600 dark:text-slate-400"> Ã0 o <strong>Valor Fixo</strong>. Indica a altura exata onde a reta cruza (corta) o <strong>Eixo Y</strong> vertical. </p> </div> </div> </div> <h2 class="text-2xl md:text-3xl font-black text-slate-800 dark:text-white mb-6 border-b border-slate-200 dark:border-slate-800 pb-2 mt-12">Construindo o Gráfico a partir da Lei</h2> <p class="text-lg mb-6">Como transformar a fórmula $f(x) = 2x + 1$ num desenho? A regra de ouro é: <strong>Para desenhar uma reta, precisamos descobrir apenas dois pontos!</strong></p> <div class="grid grid-cols-1 md:grid-cols-2 gap-8 items-center mb-8"> <div> <p class="mb-4">Tabela Mágica: Escolhemos valores fáceis para $x$ (geralmente $0$ e $1$) e calculamos o $y$.</p> <div class="overflow-hidden rounded-2xl border border-slate-200 dark:border-slate-700 bg-white dark:bg-slate-800 mb-6 shadow-sm"> <table class="w-full text-center"> <thead class="bg-slate-100 dark:bg-slate-900"> <tr> <th class="p-3 border-b border-slate-200 dark:border-slate-700">Entrada $x$</th> <th class="p-3 border-b border-slate-200 dark:border-slate-700">A Morte (Cálculo)</th> <th class="p-3 border-b border-slate-200 dark:border-slate-700">Saída $y$</th> <th class="p-3 border-b border-slate-200 dark:border-slate-700">Ponto $(x,y)$</th> </tr> </thead> <tbody> <tr> <td class="p-3 font-bold border-b border-slate-200 dark:border-slate-700">0</td> <td class="p-3 font-mono text-sm border-b border-slate-200 dark:border-slate-700">2(0) + 1</td> <td class="p-3 font-bold text-indigo-500 border-b border-slate-200 dark:border-slate-700">1</td> <td class="p-3 font-bold text-emerald-500 border-b border-slate-200 dark:border-slate-700">(0, 1)</td> </tr> <tr> <td class="p-3 font-bold">1</td> <td class="p-3 font-mono text-sm">2(1) + 1</td> <td class="p-3 font-bold text-indigo-500">3</td> <td class="p-3 font-bold text-emerald-500">(1, 3)</td> </tr> </tbody> </table> </div> <p class="text-sm text-slate-500 dark:text-slate-400">Dica visual: Perceba que quando $x=0$, o $y=1$. Esse é justamente o nosso coeficiente $b$!</p> </div> <!-- SVG Graph --> <div class="bg-slate-50 dark:bg-slate-800/50 p-4 rounded-3xl flex justify-center border border-slate-200 dark:border-slate-700"> <svg viewBox="-50 -50 300 300" class="w-full max-w-xs font-sans"> <!-- Grid --> <g class="stroke-slate-200 dark:stroke-slate-700" stroke-width="1"> <line x1="-50" y1="200" x2="250" y2="200" /> <line x1="-50" y1="150" x2="250" y2="150" /> <line x1="-50" y1="100" x2="250" y2="100" /> <line x1="-50" y1="50" x2="250" y2="50" /> <line x1="-50" y1="0" x2="250" y2="0" /> <line x1="-50" y1="-50" x2="250" y2="-50" /> <line x1="0" y1="-50" x2="0" y2="250" /> <line x1="50" y1="-50" x2="50" y2="250" /> <line x1="100" y1="-50" x2="100" y2="250" /> <line x1="150" y1="-50" x2="150" y2="250" /> <line x1="200" y1="-50" x2="200" y2="250" /> </g> <!-- Axes --> <g class="stroke-slate-800 dark:stroke-slate-200" stroke-width="2"> <!-- Y-axis --> <line x1="0" y1="-40" x2="0" y2="240" /> <!-- X-axis --> <line x1="-40" y1="200" x2="240" y2="200" /> </g> <text x="245" y="205" class="fill-slate-800 dark:fill-slate-200 text-xs font-bold">X</text> <text x="-15" y="-35" class="fill-slate-800 dark:fill-slate-200 text-xs font-bold">Y</text> <!-- The Line y = 2x + 1 --> <!-- Map: origin at (0, 200). 1 unit = 50px. --> <!-- (0,1) -> x=0, y=150 --> <!-- (1,3) -> x=50, y=50 --> <!-- (2,5) -> x=100, y=-50 --> <!-- (-0.5, 0) -> x=-25, y=200 --> <line x1="-40" y1="230" x2="120" y2="-110" class="stroke-blue-500" stroke-width="4" stroke-linecap="round" /> <!-- Points --> <circle cx="0" cy="150" r="5" class="fill-emerald-500" /> <text x="10" y="155" class="fill-emerald-600 dark:fill-emerald-400 text-[10px] font-bold">(0, 1)</text> <circle cx="50" cy="50" r="5" class="fill-emerald-500" /> <text x="60" y="55" class="fill-emerald-600 dark:fill-emerald-400 text-[10px] font-bold">(1, 3)</text> <line x1="50" y1="200" x2="50" y2="50" class="stroke-emerald-500/50" stroke-width="1" stroke-dasharray="4" /> <line x1="0" y1="50" x2="50" y2="50" class="stroke-emerald-500/50" stroke-width="1" stroke-dasharray="4" /> <text x="45" y="215" class="fill-slate-500 text-[10px]">1</text> <text x="-15" y="153" class="fill-slate-500 text-[10px]">1</text> <text x="-15" y="53" class="fill-slate-500 text-[10px]">3</text> </svg> </div> </div> <h2 class="text-2xl md:text-3xl font-black text-slate-800 dark:text-white mb-6 border-b border-slate-200 dark:border-slate-800 pb-2 mt-12">A Raiz (ou Zero da Função)</h2> <p class="text-lg mb-6">A Raiz é o momento exato em que a reta "colide" contra o chão. Ou seja, é o valor de $x$ quando a saída $y$ é igual a zero ($f(x) = 0$). Ã0 onde o gráfico <strong>corta o Eixo X</strong> (horizontal).</p> <div class="box-concept bg-amber-50 dark:bg-amber-900/20 border-amber-500 flex flex-col md:flex-row gap-8 items-center"> <div class="flex-1"> <h4 class="font-bold text-xl mb-3 text-amber-800 dark:text-amber-400">Como calcular matematicamente?</h4> <p class="mb-4">Para encontrar a raiz de $f(x) = 2x - 8$, basta forçar a máquina a dar zero:</p> <div class="math-block">$$ 2x - 8 = 0 $$</div> <div class="math-block">$$ 2x = 8 $$</div> <div class="math-block">$$ x = \frac{8}{2} = 4 $$</div> <p class="mt-4 font-bold text-emerald-600 dark:text-emerald-400">A reta corta o Eixo X exatamente no número 4!</p> </div> <div class="w-full md:w-64"> <svg viewBox="-20 0 160 160" class="w-full font-sans"> <g class="stroke-slate-800 dark:stroke-slate-200" stroke-width="2"> <line x1="-20" y1="80" x2="140" y2="80" /> <!-- X --> <line x1="20" y1="0" x2="20" y2="160" /> <!-- Y --> </g> <!-- y = 2x - 8, crossing at x=4, y=0. Origin at (20, 80). 1 unit = 20px. --> <!-- Root: x=4 -> 20 + 4*20 = 100. y=0 -> 80. (100, 80) --> <!-- Y-int: x=0 -> 20. y=-8 -> wait, scale is large. Let's do 1 unit = 10px --> <!-- Origin (20, 80). --> <!-- x=4 -> 20 + 40 = 60. y=0 -> 80. --> <!-- Y-int: x=0 -> 20. y=-8 -> 80 - (-8*10) = 160. Point: (20, 160) --> <!-- x=8 -> 20 + 80 = 100. y=8 -> 80 - (8*10) = 0. --> <line x1="-20" y1="160" x2="140" y2="0" class="stroke-amber-500" stroke-width="3" stroke-linecap="round" /> <!-- Root point --> <circle cx="60" cy="80" r="6" class="fill-amber-600 dark:fill-amber-400 animate-pulse" /> <text x="65" y="70" class="fill-amber-700 dark:fill-amber-300 text-xs font-bold">Raiz (x=4)</text> <!-- Linear cut --> <circle cx="20" cy="120" r="4" class="fill-slate-500" /> <text x="28" y="125" class="fill-slate-500 text-[10px]">-4</text> <text x="8" y="160" class="fill-slate-500 text-[10px]">-8</text> </svg> </div> </div> <h2 class="text-2xl md:text-3xl font-black text-slate-800 dark:text-white mb-6 border-b border-slate-200 dark:border-slate-800 pb-2 mt-12">Famílias da Reta (Tipos Particulares)</h2> <p class="text-lg mb-6">Dependendo dos valores de $a$ e $b$, a reta muda de "família". Veja as quatro mais famosas cobradas em provas:</p> <div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-10"> <!-- Afim --> <div class="bg-white dark:bg-slate-800 p-5 rounded-2xl border border-slate-200 dark:border-slate-700 flex flex-col items-center text-center"> <h4 class="font-black text-lg text-indigo-600 dark:text-indigo-400 mb-2">Função Afim</h4> <p class="text-sm mb-4">Ã0 a completa: $y = ax + b$ (onde $a$ e $b$ são diferentes de zero). Ela cruza o eixo Y fora da origem (do ponto 0,0).</p> <svg viewBox="0 0 100 100" class="w-32 h-32"> <line x1="10" y1="50" x2="90" y2="50" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="50" y1="10" x2="50" y2="90" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="20" y1="90" x2="80" y2="10" class="stroke-blue-500" stroke-width="3" /> </svg> </div> <!-- Linear --> <div class="bg-white dark:bg-slate-800 p-5 rounded-2xl border border-slate-200 dark:border-slate-700 flex flex-col items-center text-center"> <h4 class="font-black text-lg text-indigo-600 dark:text-indigo-400 mb-2">Função Linear</h4> <p class="text-sm mb-4">O coeficiente $b = 0$. Ela é $y = ax$. Como não tem altura fixa, a reta <strong>sempre cruza a origem (0,0)</strong>.</p> <svg viewBox="0 0 100 100" class="w-32 h-32"> <line x1="10" y1="50" x2="90" y2="50" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="50" y1="10" x2="50" y2="90" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="20" y1="80" x2="80" y2="20" class="stroke-emerald-500" stroke-width="3" /> <circle cx="50" cy="50" r="4" class="fill-emerald-600" /> </svg> </div> <!-- Constante --> <div class="bg-white dark:bg-slate-800 p-5 rounded-2xl border border-slate-200 dark:border-slate-700 flex flex-col items-center text-center"> <h4 class="font-black text-lg text-indigo-600 dark:text-indigo-400 mb-2">Função Constante</h4> <p class="text-sm mb-4">O coeficiente $a = 0$. Ela é $y = b$. Não sobe nem desce. Ã0 uma reta <strong>horizontal</strong> (paralela ao Eixo X).</p> <svg viewBox="0 0 100 100" class="w-32 h-32"> <line x1="10" y1="50" x2="90" y2="50" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="50" y1="10" x2="50" y2="90" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="10" y1="30" x2="90" y2="30" class="stroke-purple-500" stroke-width="3" /> </svg> </div> <!-- Identidade --> <div class="bg-white dark:bg-slate-800 p-5 rounded-2xl border border-slate-200 dark:border-slate-700 flex flex-col items-center text-center"> <h4 class="font-black text-lg text-indigo-600 dark:text-indigo-400 mb-2">Função Identidade</h4> <p class="text-sm mb-4">Um caso especial da Linear: $y = x$. Aqui $a=1$ e $b=0$. Corta os quadrantes exatamente no meio em 45º.</p> <svg viewBox="0 0 100 100" class="w-32 h-32"> <line x1="10" y1="50" x2="90" y2="50" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="50" y1="10" x2="50" y2="90" class="stroke-slate-300 dark:stroke-slate-600" stroke-width="2" /> <line x1="10" y1="90" x2="90" y2="10" class="stroke-pink-500" stroke-width="3" /> <circle cx="50" cy="50" r="4" class="fill-pink-600" /> </svg> </div> </div> <h2 class="text-2xl md:text-3xl font-black text-slate-800 dark:text-white mb-6 border-b border-slate-200 dark:border-slate-800 pb-2 mt-12">Formando a Lei através do Gráfico</h2> <p class="text-lg mb-6">Muitas provas te dão apenas o desenho da reta e pedem para você <strong>descobrir a fórmula</strong> $y = ax + b$. Para fazer isso, pescamos dois pontos do gráfico e montamos um Sistema (como vimos no Módulo 04).</p> <div class="bg-slate-50 dark:bg-slate-800/50 p-6 rounded-2xl border border-slate-200 dark:border-slate-700 my-8 shadow-sm"> <div class="flex flex-col md:flex-row gap-8"> <!-- Visual Graph --> <div class="flex-1"> <p class="font-bold mb-4 text-center text-slate-800 dark:text-white">O Gráfico Misterioso</p> <svg viewBox="0 0 200 200" class="w-full max-w-xs mx-auto font-sans bg-white dark:bg-slate-900 rounded-xl border border-slate-200 dark:border-slate-700"> <g class="stroke-slate-300 dark:stroke-slate-600" stroke-width="1"> <line x1="20" y1="180" x2="180" y2="180" /> <line x1="20" y1="150" x2="180" y2="150" /> <line x1="20" y1="120" x2="180" y2="120" /> <line x1="20" y1="90" x2="180" y2="90" /> <line x1="20" y1="60" x2="180" y2="60" /> <line x1="20" y1="30" x2="180" y2="30" /> <line x1="60" y1="180" x2="60" y2="20" /> <line x1="100" y1="180" x2="100" y2="20" /> <line x1="140" y1="180" x2="140" y2="20" /> </g> <!-- Axes --> <g class="stroke-slate-800 dark:stroke-slate-200" stroke-width="2"> <line x1="20" y1="180" x2="190" y2="180" /> <!-- X --> <line x1="20" y1="180" x2="20" y2="10" /> <!-- Y --> </g> <!-- Line: Passes through (1,5) and (3,11). --> <!-- Let's map X: origin 20. 1 unit = 40px. x=1 -> 60. x=3 -> 140 --> <!-- Map Y: origin 180. 1 unit = 10px. y=5 -> 180-50 = 130. y=11 -> 180-110 = 70. --> <line x1="20" y1="160" x2="160" y2="20" class="stroke-blue-600 dark:stroke-blue-400" stroke-width="4" stroke-linecap="round" /> <!-- Point A (1, 5) --> <circle cx="60" cy="130" r="6" class="fill-indigo-600" /> <text x="68" y="135" class="fill-indigo-800 dark:fill-indigo-300 font-bold text-[12px]">(1, 5)</text> <line x1="60" y1="180" x2="60" y2="130" class="stroke-indigo-500" stroke-width="1" stroke-dasharray="3" /> <line x1="20" y1="130" x2="60" y2="130" class="stroke-indigo-500" stroke-width="1" stroke-dasharray="3" /> <!-- Point B (3, 11) --> <circle cx="140" cy="70" r="6" class="fill-indigo-600" /> <text x="148" y="75" class="fill-indigo-800 dark:fill-indigo-300 font-bold text-[12px]">(3, 11)</text> <line x1="140" y1="180" x2="140" y2="70" class="stroke-indigo-500" stroke-width="1" stroke-dasharray="3" /> <line x1="20" y1="70" x2="140" y2="70" class="stroke-indigo-500" stroke-width="1" stroke-dasharray="3" /> </svg> </div> <div class="flex-1"> <p class="font-bold text-indigo-600 dark:text-indigo-400">Passo 1: Extrair e Montar o Sistema</p> <p class="text-sm">Lendo o gráfico, vimos que: $x=1 \rightarrow y=5$ e $x=3 \rightarrow y=11$. Jogando no molde $y = ax + b$:</p> <div class="math-block">$$ \begin{cases} a(1) + b = 5 \\ a(3) + b = 11 \end{cases} $$</div> <p class="font-bold text-indigo-600 dark:text-indigo-400 mt-4">Passo 2: Subtrair para achar o $a$</p> <p class="text-sm">Subtraindo a de cima pela de baixo, o $+b$ corta fora:</p> <div class="math-block">$$ 3a - 1a = 11 - 5 $$</div> <div class="math-block">$$ 2a = 6 \implies a = 3 $$</div> <p class="font-bold text-indigo-600 dark:text-indigo-400 mt-4">Passo 3: Achar o $b$ e juntar</p> <p class="text-sm">Pegamos a mais fácil ($a+b=5$) e trocamos $a$ por 3:</p> <div class="math-block">$$ 3 + b = 5 \implies b = 2 $$</div> <div class="math-block text-xl font-black text-emerald-600 mt-2">$$ f(x) = 3x + 2 $$</div> </div> </div> </div> <div class="text-center mt-12 mb-8"> <a href="m5_t2_quiz.html?v=1" class="inline-flex items-center gap-3 bg-gradient-to-r from-blue-500 to-indigo-500 hover:from-blue-600 hover:to-indigo-600 shadow-blue-500/20 text-white font-bold py-3.5 px-6 rounded-xl shadow-lg hover:scale-[1.02] active:scale-[0.98] transition-all w-full md:w-auto justify-center select-none cursor-pointer"> Iniciar Missão Prática (+225 XP) <svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2.5" fill="none"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg> </a> </div> <div class="flex flex-col md:flex-row justify-between items-center gap-4 mt-8 pt-8 border-t border-slate-200 dark:border-slate-800 w-full"> <a href="m5_t1.html?v=1" class="w-full md:w-auto flex-1 inline-flex items-center justify-center md:justify-start gap-2 text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400 font-bold transition-colors px-4 py-3"> <svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2.5" fill="none"><polyline points="15 18 9 12 15 6"></polyline></svg> Aula Anterior </a> <a href="modulo5.html?v=1" class="w-full md:w-auto flex-1 inline-flex items-center justify-center gap-2 text-slate-600 dark:text-slate-300 hover:text-blue-600 dark:hover:text-blue-400 font-bold transition-colors px-4 py-3"> <svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none"><rect x="3" y="3" width="7" height="7"></rect><rect x="14" y="3" width="7" height="7"></rect><rect x="14" y="14" width="7" height="7"></rect><rect x="3" y="14" width="7" height="7"></rect></svg> Sumário </a> <a href="m5_t3.html?v=1" class="w-full md:w-auto flex-1 inline-flex items-center justify-center md:justify-end gap-2 text-slate-600 dark:text-slate-400 hover:text-blue-600 dark:hover:text-blue-400 font-bold transition-colors px-4 py-3 group"> Próxima Aula <svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2.5" fill="none" class="group-hover:translate-x-1 transition-transform"><polyline points="9 18 15 12 9 6"></polyline></svg> </a> </div> </main> <script src="progress.js"></script> <button id="theme-toggle" class="fixed bottom-6 right-6 z-[99999] bg-white dark:bg-slate-800 text-slate-800 dark:text-yellow-400 p-3.5 rounded-full shadow-2xl border border-slate-200 dark:border-slate-700 hover:scale-110 active:scale-95 transition-all flex items-center justify-center w-12 h-12 select-none cursor-pointer" title="Alternar Tema Escuro/Claro"> <span id="theme-toggle-icon" class="text-xl">âܬ ️</span> </button> <script> const themeToggleBtn = document.getElementById('theme-toggle'); const themeToggleIcon = document.getElementById('theme-toggle-icon'); if (localStorage.getItem('matematica_tema') === 'dark' || (!('matematica_tema' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) { document.documentElement.classList.add('dark'); if (themeToggleIcon) themeToggleIcon.textContent = 'ðxR"!'; } else { document.documentElement.classList.remove('dark'); if (themeToggleIcon) themeToggleIcon.textContent = 'âܬ ️'; } if (themeToggleBtn) { themeToggleBtn.addEventListener('click', () => { if (document.documentElement.classList.contains('dark')) { document.documentElement.classList.remove('dark'); localStorage.setItem('matematica_tema', 'light'); if (themeToggleIcon) themeToggleIcon.textContent = 'âܬ ️'; } else { document.documentElement.classList.add('dark'); localStorage.setItem('matematica_tema', 'dark'); if (themeToggleIcon) themeToggleIcon.textContent = 'ðxR"!'; } }); } </script> </body> </html>