/* ===== Vortex Pro — Portal do Aluno (tema tecnológico) ===== */
:root {
  --bg: #060a14;
  --panel: rgba(255, 255, 255, .045);
  --panel-2: rgba(255, 255, 255, .08);
  --line: rgba(148, 163, 184, .2);
  --txt: #d9e2f1;
  --muted: #9aa9bf;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --amber: #fbbf24;
  --orange: #f97316;
  --green: #34d399;
  --red: #f87171;
  --radius: 22px;
  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --grad-brand: linear-gradient(135deg, #22d3ee, #3b82f6 55%, #8b5cf6);
  --grad-warm: linear-gradient(135deg, #fbbf24, #f97316);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: var(--txt);
  min-height: 100vh;
}
/* Fundo: brilhos + malha técnica */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 46px 46px,
    linear-gradient(90deg, rgba(148, 163, 184, .045) 1px, transparent 1px) 0 0 / 46px 46px,
    radial-gradient(900px 520px at 8% -8%, rgba(34, 211, 238, .2), transparent 62%),
    radial-gradient(820px 520px at 100% 0%, rgba(139, 92, 246, .2), transparent 62%),
    radial-gradient(760px 600px at 50% 112%, rgba(249, 115, 22, .13), transparent 60%),
    var(--bg);
}
[hidden] { display: none !important; }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.22; color: #fff; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.7em; }
p { margin: 0 0 1em; }
a { color: var(--cyan); }
strong { color: #fff; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 10px; }
.grad { background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-w { background: var(--grad-warm); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ===== Botões ===== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 62px; padding: 14px 26px; overflow: hidden;
  font-family: var(--display); font-weight: 700; font-size: 1.08rem; text-decoration: none; text-align: center;
  border: 0; border-radius: 16px; cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.07); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--grad-warm); color: #1c1000; box-shadow: 0 10px 30px rgba(249, 115, 22, .38), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn-primary::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); animation: brilho 3.6s ease-in-out infinite; }
@keyframes brilho { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.btn-green { background: linear-gradient(135deg, #34d399, #059669); color: #022c1e; box-shadow: 0 10px 30px rgba(16, 185, 129, .4), inset 0 1px 0 rgba(255, 255, 255, .4); }
.btn-done { background: rgba(52, 211, 153, .12); color: var(--green); border: 2px solid var(--green); box-shadow: 0 0 26px rgba(52, 211, 153, .25); }
.btn-ghost { background: var(--panel); color: #fff; border: 1.5px solid var(--line); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--cyan); }
.btn-xl { width: 100%; min-height: 72px; font-size: 1.2rem; }
.btn-block { width: 100%; }

/* ===== Tela de entrada ===== */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; position: relative; overflow: hidden; }
.gate::before, .gate::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; filter: blur(90px); opacity: .55; animation: orbita 14s ease-in-out infinite alternate; }
.gate::before { background: #0ea5e9; top: -120px; left: -120px; }
.gate::after { background: #7c3aed; bottom: -140px; right: -120px; animation-delay: -7s; }
@keyframes orbita { to { transform: translate(60px, 50px) scale(1.15); } }
.gate-card {
  position: relative; z-index: 1; width: 100%; max-width: 540px; text-align: center;
  background: rgba(13, 20, 38, .72); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(148, 163, 184, .25); border-radius: 30px; padding: 40px 24px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.logo-big svg { filter: drop-shadow(0 0 28px rgba(34, 211, 238, .55)); animation: flutua 4s ease-in-out infinite; }
@keyframes flutua { 50% { transform: translateY(-7px); } }
.gate-kicker { font-family: var(--display); font-size: .74rem; font-weight: 700; letter-spacing: .2em; color: var(--cyan); margin: 18px 0 6px; }
.gate-fac { display: block; font-size: .42em; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: #cbd5e1; margin-bottom: .35em; }
.gate-card h1 { font-size: clamp(2.1rem, 9.5vw, 2.9rem); margin-bottom: .25em; letter-spacing: -.03em; }
.gate-text { color: var(--txt); font-size: 1.08rem; }
.gate-note { margin: 18px 0 0; font-size: .92rem; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 4px; }
.gate .chips { justify-content: center; margin-bottom: 22px; }
.chips span { font-size: .85rem; font-weight: 600; color: #e2e8f0; padding: 7px 13px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }

/* ===== Validação de acesso ===== */
.loader h2 { font-size: 1.45rem; margin: 18px 0 20px; }
.ld-anel { position: relative; width: 96px; height: 96px; margin: 0 auto; display: grid; place-items: center; }
.ld-anel i { position: absolute; inset: 0; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .1); border-top-color: var(--cyan); border-right-color: var(--violet); animation: spin 1s linear infinite; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .6)); }
.ld-anel b { font-size: 2rem; line-height: 1; }
.ld-anel.ok i { animation: none; border-color: var(--green); filter: drop-shadow(0 0 16px rgba(52, 211, 153, .8)); }
.ld-anel.ok b { color: var(--green); font-size: 2.8rem; text-shadow: 0 0 18px rgba(52, 211, 153, .8); }
.ld-passos { list-style: none; margin: 0 auto 22px; padding: 0; max-width: 330px; text-align: left; display: grid; gap: 10px; }
.ld-passos li { position: relative; padding: 12px 14px 12px 50px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-weight: 600; opacity: .45; transition: opacity .3s, border-color .3s, color .3s; }
.ld-passos li::before { content: ""; position: absolute; left: 14px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .15); }
.ld-passos li.ativo { opacity: 1; color: #fff; border-color: rgba(34, 211, 238, .55); }
.ld-passos li.ativo::before { border-top-color: var(--cyan); animation: spin .8s linear infinite; }
.ld-passos li.ok { opacity: 1; color: #d1fae5; border-color: rgba(52, 211, 153, .45); }
.ld-passos li.ok::before { content: "✓"; border: 0; background: var(--green); color: #022c1e; font-size: .85rem; font-weight: 800; display: grid; place-items: center; }
.ld-barra { max-width: 330px; margin: 0 auto; }

/* ===== Topo ===== */
/* sem backdrop-filter aqui: ele prenderia as abas fixas (position: fixed) dentro do topo */
.topo { position: sticky; top: 0; z-index: 20; background: #070c18; border-bottom: 1px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.topo-in { max-width: 1020px; margin: 0 auto; padding: 10px 16px 12px; display: grid; gap: 10px; }
.marca { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.marca svg { filter: drop-shadow(0 0 12px rgba(34, 211, 238, .5)); }
.marca strong { font-family: var(--display); display: block; font-size: 1.08rem; letter-spacing: .07em; line-height: 1.1; white-space: nowrap; }
.marca small { display: block; color: var(--muted); font-family: var(--display); font-size: .66rem; font-weight: 600; letter-spacing: .3em; margin-bottom: 2px; }
.prog-label { display: flex; justify-content: space-between; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: #e2e8f0; }
.prog-label #prog-pct { font-family: var(--display); font-weight: 800; color: var(--green); }
.barra { height: 12px; background: rgba(255, 255, 255, .1); border-radius: 99px; overflow: hidden; }
.barra i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #22d3ee, #34d399); border-radius: 99px; box-shadow: 0 0 16px rgba(52, 211, 153, .7); transition: width .7s cubic-bezier(.2, .8, .2, 1); }

/* Abas: flutuantes embaixo no celular */
.abas {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: rgba(13, 20, 38, .88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, .28); border-radius: 22px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .55);
}
.abas a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  min-height: 60px; padding: 5px 2px; text-decoration: none; border-radius: 16px;
  color: var(--muted); font-size: .72rem; line-height: 1.2; text-align: center; font-weight: 600; transition: background .2s, color .2s;
}
.abas a b { font-size: 1.25rem; line-height: 1.25; font-weight: 400; }
.abas a.ativa { color: #fff; background: linear-gradient(135deg, rgba(34, 211, 238, .25), rgba(139, 92, 246, .28)); box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .5); }

/* ===== Conteúdo ===== */
main { max-width: 1020px; margin: 0 auto; padding: 22px 16px 40px; outline: none; animation: entra .35s ease-out; }
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
.rodape { max-width: 1020px; margin: 0 auto; padding: 10px 16px 120px; color: var(--muted); font-size: .86rem; text-align: center; }
.rodape p { margin-bottom: .5em; }
.rodape strong { color: #cbd5e1; }

.glass { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

.hero {
  position: relative; overflow: hidden; border-radius: 26px; padding: 26px 20px; margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(34, 211, 238, .16), rgba(59, 130, 246, .12) 45%, rgba(139, 92, 246, .2));
  border: 1px solid rgba(125, 211, 252, .28);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.hero::after { content: ""; position: absolute; width: 260px; height: 260px; right: -90px; top: -110px; border-radius: 50%; background: radial-gradient(circle, rgba(34, 211, 238, .4), transparent 68%); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero p { color: #dbe7f5; margin: 0; }
.hero .btn { margin-top: 20px; }
.hero-top { display: flex; gap: 18px; align-items: center; }

.ring { position: relative; flex: none; width: 108px; height: 108px; display: grid; place-content: center; text-align: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); filter: drop-shadow(0 0 10px rgba(52, 211, 153, .55)); }
.ring circle { fill: none; stroke-width: 10; stroke-linecap: round; }
.ring .rb { stroke: rgba(255, 255, 255, .12); }
.ring .rf { stroke: url(#rg); transition: stroke-dasharray .8s; }
.ring b { font-family: var(--display); font-size: 1.55rem; line-height: 1; color: #fff; }
.ring small { font-size: .68rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.selo { display: inline-block; font-family: var(--display); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; padding: 5px 13px; border-radius: 99px; background: rgba(251, 191, 36, .14); color: var(--amber); border: 1px solid rgba(251, 191, 36, .4); margin-bottom: 12px; }
.selo.azul { background: rgba(34, 211, 238, .12); color: var(--cyan); border-color: rgba(34, 211, 238, .4); }
.selo.verde { background: rgba(52, 211, 153, .12); color: var(--green); border-color: rgba(52, 211, 153, .4); }

.cards { display: grid; gap: 18px; }
.card-prog {
  --c1: #fbbf24; --c2: #f97316;
  position: relative; display: block; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 20px;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card-prog::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--c1), var(--c2)); }
.card-prog::after { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; bottom: -110px; border-radius: 50%; background: radial-gradient(circle, var(--c2), transparent 68%); opacity: .2; transition: opacity .25s; pointer-events: none; }
.card-prog:hover { transform: translateY(-4px); border-color: var(--c1); box-shadow: 0 18px 44px rgba(0, 0, 0, .45), 0 0 0 1px var(--c1); }
.card-prog:hover::after { opacity: .4; }
.card-prog.p2 { --c1: #22d3ee; --c2: #3b82f6; }
.card-prog.bonus { --c1: #34d399; --c2: #059669; }
.card-prog .emoji { display: inline-grid; place-items: center; min-width: 64px; height: 64px; padding: 0 12px; font-size: 1.7rem; line-height: 1; border-radius: 18px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .03)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.card-prog .selo { display: table; }
.card-prog h2 { margin-bottom: .35em; }
.card-prog p { color: var(--muted); margin-bottom: 1em; }
.mini { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: .92rem; color: #e2e8f0; }
.mini .barra { flex: 1; height: 10px; }
.card-cta { position: relative; z-index: 1; display: inline-block; margin-top: 16px; font-family: var(--display); font-weight: 700; font-size: .98rem; color: #fff; background: var(--panel-2); border: 1px solid var(--line); padding: 11px 18px; border-radius: 14px; }
.card-prog:hover .card-cta { background: linear-gradient(90deg, var(--c1), var(--c2)); color: #05101f; border-color: transparent; }

.parabens { background: rgba(52, 211, 153, .1); border: 1px solid var(--green); border-radius: var(--radius); padding: 22px; margin-bottom: 22px; text-align: center; box-shadow: 0 0 40px rgba(52, 211, 153, .2); }
.parabens h2 { color: var(--green); }
.parabens p { margin: 0; }

/* Lista de módulos */
.voltar { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; color: var(--cyan); text-decoration: none; margin-bottom: 8px; }
.voltar:hover { color: #fff; }
.lista-mod { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.lista-mod a {
  display: grid; grid-template-columns: 58px 1fr 24px; gap: 14px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 16px;
  text-decoration: none; color: inherit; min-height: 90px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .18s, border-color .18s, background .18s;
}
.lista-mod a:hover { transform: translateX(5px); border-color: var(--cyan); background: var(--panel-2); }
.num { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 1.02rem; color: #fff; background: linear-gradient(135deg, rgba(34, 211, 238, .28), rgba(139, 92, 246, .32)); border: 1px solid rgba(125, 211, 252, .45); }
.feito .num { background: linear-gradient(135deg, #34d399, #059669); border-color: transparent; color: #022c1e; font-size: 1.5rem; box-shadow: 0 0 22px rgba(52, 211, 153, .5); }
.lista-mod h3 { margin: 0 0 3px; font-size: 1.04rem; font-weight: 600; }
.lista-mod small { color: var(--muted); font-size: .88rem; }
.feito small { color: var(--green); font-weight: 600; }
.seta { font-size: 1.7rem; color: var(--muted); }

/* ===== Aula ===== */
.aula { background: rgba(13, 20, 38, .72); border: 1px solid var(--line); border-radius: 26px; padding: 24px 18px 28px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.aula > h1 { margin-top: 4px; }
.meta { color: var(--muted); font-size: .92rem; font-weight: 500; margin-bottom: 1.1em; }
.lead { font-size: 1.14rem; color: #eaf1fb; padding: 16px 16px 16px 18px; border-radius: 0 16px 16px 0; border-left: 4px solid var(--cyan); background: linear-gradient(90deg, rgba(34, 211, 238, .12), transparent); }
.aula h3 { display: flex; align-items: center; gap: 10px; }
.aula h3::before { content: ""; flex: none; width: 8px; height: 22px; border-radius: 4px; background: var(--grad-brand); }
figure { margin: 1.5em 0; }
figcaption { font-size: .93rem; color: var(--muted); text-align: center; margin-top: 10px; }

.steps { list-style: none; counter-reset: s; margin: 1em 0; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 15px 15px 15px 68px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; min-height: 68px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 13px; width: 40px; height: 40px; border-radius: 12px; background: var(--grad-brand); color: #fff; font-family: var(--display); font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(59, 130, 246, .4); }
.aula ul { padding-left: 1.3em; }
.aula ul li { margin-bottom: .5em; }
.aula ul li::marker { color: var(--cyan); }

.box { position: relative; border-radius: 18px; padding: 18px 16px 18px 20px; margin: 1.5em 0; border: 1px solid; overflow: hidden; }
.box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; }
.box h4 { margin: 0 0 .5em; font-size: 1.08rem; }
.box p:last-child, .box ul:last-child, .box ol:last-child { margin-bottom: 0; }
.box-at { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .45); }
.box-at::before { background: var(--red); }
.box-at h4 { color: #fca5a5; }
.box-2m { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .45); }
.box-2m::before { background: var(--green); }
.box-2m h4 { color: #6ee7b7; }
.box-er { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .45); }
.box-er::before { background: var(--amber); }
.box-er h4 { color: #fcd34d; }
.box-in { background: rgba(34, 211, 238, .09); border-color: rgba(34, 211, 238, .4); }
.box-in::before { background: var(--cyan); }
.box-in h4 { color: #67e8f9; }

.tabela { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1em 0; font-size: .96rem; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tabela th, .tabela td { padding: 11px 9px; text-align: left; border-bottom: 1px solid var(--line); }
.tabela tr:last-child td { border-bottom: 0; }
.tabela th { background: rgba(59, 130, 246, .25); color: #fff; font-family: var(--display); font-size: .86rem; }
.tabela td { background: var(--panel); }
.tabela tr.bom td { background: rgba(52, 211, 153, .16); color: #fff; font-weight: 700; }

.concluir { margin-top: 2.2em; padding-top: 1.6em; border-top: 1px dashed var(--line); text-align: center; }
.concluir p { color: var(--muted); font-size: .95rem; margin: 14px 0 0; }
.nav-aula { display: grid; gap: 12px; margin-top: 18px; }

/* ===== Calculadoras ===== */
.calc { background: rgba(13, 20, 38, .72); border: 1px solid var(--line); border-radius: 26px; padding: 24px 18px; margin-bottom: 24px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }
.campo { margin: 20px 0; }
.campo label, .campo .rot { display: block; font-weight: 600; color: #fff; margin-bottom: 9px; }
.campo small { display: block; color: var(--muted); font-size: .88rem; margin-top: 7px; }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; gap: 8px; align-items: stretch; }
.stepper button { font: inherit; font-size: 2rem; font-weight: 700; line-height: 1; min-height: 64px; border-radius: 16px; border: 1px solid rgba(125, 211, 252, .45); background: linear-gradient(135deg, rgba(34, 211, 238, .2), rgba(139, 92, 246, .22)); color: #fff; cursor: pointer; transition: transform .1s, filter .15s; }
.stepper button:hover { filter: brightness(1.3); }
.stepper button:active { transform: scale(.94); }
.stepper input { font-family: var(--display); font-size: 1.6rem; font-weight: 800; text-align: center; width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 16px; color: #fff; background: rgba(0, 0, 0, .35); -moz-appearance: textfield; appearance: textfield; }
.stepper input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .25); }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cenarios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cenarios button { font: inherit; font-weight: 600; font-size: .92rem; min-height: 60px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; padding: 6px 4px; transition: all .2s; }
.cenarios button[aria-pressed="true"] { border-color: transparent; background: var(--grad-brand); color: #fff; box-shadow: 0 8px 22px rgba(59, 130, 246, .4); }
.resultado { position: relative; overflow: hidden; background: linear-gradient(135deg, rgba(16, 185, 129, .22), rgba(34, 211, 238, .12)); border: 1px solid rgba(52, 211, 153, .5); border-radius: 20px; padding: 20px 16px; margin-top: 24px; box-shadow: 0 0 40px rgba(52, 211, 153, .15); }
.resultado h3 { color: var(--green); margin: 0 0 14px; font-size: .86rem; text-transform: uppercase; letter-spacing: .14em; }
.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-item { background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px; padding: 12px; }
.res-item.full { grid-column: 1 / -1; }
.res-item span { display: block; font-size: .84rem; color: #a7f3d0; font-weight: 500; }
.res-item b { display: block; font-family: var(--display); font-size: 1.45rem; line-height: 1.25; color: #fff; overflow-wrap: anywhere; }
.res-item.destaque { background: var(--grad-warm); border-color: transparent; box-shadow: 0 10px 30px rgba(249, 115, 22, .35); }
.res-item.destaque span { color: #422006; font-weight: 700; }
.res-item.destaque b { color: #1c1000; font-size: 2.1rem; }
.detalhe { font-size: .9rem; color: #a7f3d0; margin: 14px 0 0; }
.nota { font-size: .88rem; color: var(--muted); margin-top: 16px; }

/* ===== Toast ===== */
.toast { position: fixed; left: 50%; bottom: 104px; transform: translate(-50%, 30px); background: linear-gradient(135deg, #34d399, #059669); color: #022c1e; font-family: var(--display); font-weight: 700; padding: 14px 24px; border-radius: 99px; box-shadow: 0 14px 40px rgba(16, 185, 129, .5); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 50; text-align: center; max-width: 92vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ===== Diagramas SVG (painel claro, estilo "tela técnica") ===== */
.dg { width: 100%; height: auto; display: block; background: linear-gradient(180deg, #f6faff, #e8f0fa); border-radius: 18px; border: 1px solid rgba(125, 211, 252, .6); box-shadow: 0 0 0 4px rgba(34, 211, 238, .1), 0 18px 44px rgba(0, 0, 0, .45); }
.dg text { font-family: "Inter", system-ui, sans-serif; fill: #0b2545; font-size: 12px; font-weight: 700; }
.dg .tt { font-size: 14px; font-weight: 800; }
.dg .ts { font-size: 10.5px; font-weight: 600; }
.dg .tr { fill: #b91c1c; }
.dg .tg { fill: #15803d; }
.dg .tb { fill: #0369a1; }
.dg .tw { fill: #fff; }
.dg .ctr { text-anchor: middle; }
.dg .an { transform-box: fill-box; transform-origin: center; }

.a-draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 9s ease-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 1; } 28%, 100% { stroke-dashoffset: 0; } }
.a-fade { animation: fade 9s ease-out infinite; }
@keyframes fade { 0%, 26% { opacity: 0; } 36%, 100% { opacity: 1; } }
.a-drop { animation: drop 1.1s linear infinite; }
.a-drop.slow { animation-duration: 1.7s; }
@keyframes drop { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(var(--dy, 110px)); opacity: 0; } }
.a-flow { stroke-dasharray: 8 8; animation: flow 1s linear infinite; }
.a-flow.rev { animation-direction: reverse; }
@keyframes flow { to { stroke-dashoffset: -16; } }
.a-spin { animation: spin 1.2s linear infinite; }
.a-spin.lento { animation-duration: 3s; }
@keyframes spin { to { transform: rotate(360deg); } }
.a-pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.18); opacity: .7; } }
.a-blink { animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: .15; } }
.a-flick, .a-lid { transform-box: fill-box; }
.a-flick { transform-origin: 50% 100%; animation: flick .5s ease-in-out infinite alternate; }
.a-flick.f2 { animation-duration: .37s; }
@keyframes flick { from { transform: scaleY(1) scaleX(1); } to { transform: scaleY(1.14) scaleX(.92); } }
.a-bub { animation: bub 5s linear infinite; }
@keyframes bub { from { transform: translateX(0); } to { transform: translateX(440px); } }
.a-turn { animation: turn 4s ease-in-out infinite; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 50%, 80% { transform: rotate(90deg); } 100% { transform: rotate(0); } }
.a-lid { transform-origin: 0% 0%; animation: lid 3.5s ease-in-out infinite; }
@keyframes lid { 0%, 15% { transform: rotate(0); } 50%, 85% { transform: rotate(-32deg); } 100% { transform: rotate(0); } }
.a-rise { animation: rise 2.4s ease-out infinite; }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-34px); opacity: 0; } }
.a-push { animation: push 1.8s ease-in-out infinite; }
@keyframes push { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
.a-grow { animation: grow 2.2s ease-out infinite; }
@keyframes grow { 0% { transform: scale(.2); opacity: 0; } 30% { opacity: 1; } 90% { transform: scale(1.25); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.a-needle { animation: needle 1.6s ease-in-out infinite; }
@keyframes needle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(12px); } }
.a-tint { animation: tint 4s ease-in-out infinite; }
@keyframes tint { 0%, 25% { opacity: 0; } 70%, 100% { opacity: .75; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .a-draw { stroke-dashoffset: 0; }
}

/* ===== Telas maiores ===== */
@media (min-width: 800px) {
  body { font-size: 19px; }
  h1 { font-size: 2.2rem; }
  .topo-in { grid-template-columns: auto 1fr; align-items: center; gap: 40px; padding: 14px 20px; }
  .abas { position: static; max-width: 1020px; margin: 0 auto 10px; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 20px; gap: 8px; }
  .abas a { flex-direction: row; gap: 8px; min-height: 50px; font-size: .98rem; border: 1px solid transparent; }
  .abas a:hover { color: #fff; background: var(--panel); }
  .cards { grid-template-columns: 1fr 1fr; }
  .card-prog.bonus { grid-column: 1 / -1; }
  .aula { padding: 38px 44px 42px; }
  .calc { padding: 32px 34px; }
  .nav-aula { grid-template-columns: 1fr 1fr; }
  .rodape { padding-bottom: 40px; }
  .toast { bottom: 40px; }
  .calcs { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  .hero { padding: 36px 38px; }
  .ring { width: 132px; height: 132px; }
  .ring b { font-size: 1.9rem; }
  .lista-mod { grid-template-columns: 1fr 1fr; }
}
