/* ==========================================================================
   Espectro — Design System
   Tema escuro premium (padrão) + tema claro. Animações respeitam
   prefers-reduced-motion. Prefixo de tokens: --v-*
   ========================================================================== */

/* -------------------------------- Tokens --------------------------------- */
:root {
  /* Marca / acentos (compartilhados) — o "espectro": esmeralda → ciano → violeta */
  --v-primary: #10B981;
  --v-primary-hover: #0EA271;
  --v-primary-press: #047857;
  --v-accent: #22D3EE;
  --v-accent-2: #7C6BFF;
  --v-gradient: linear-gradient(135deg, #10B981 0%, #22D3EE 52%, #7C6BFF 100%);
  --v-gradient-warm: linear-gradient(135deg, #22D3EE 0%, #7C6BFF 100%);
  --v-success: #34D399;
  --v-warning: #FBBF24;
  --v-danger: #F87171;
  --v-info: #60A5FA;
  --v-star: #FBBF24;

  /* Tema escuro (padrão) */
  --v-bg: #0B0F1A;
  --v-bg-2: #0E1320;
  --v-surface: #121826;
  --v-surface-2: #1A2234;
  --v-surface-3: #222C42;
  --v-border: #26304A;
  --v-border-strong: #33405F;
  --v-text: #E8ECF5;
  --v-text-secondary: #9AA6BF;
  --v-text-muted: #64708A;
  --v-overlay: rgba(5, 8, 15, 0.66);
  --v-primary-soft: rgba(16, 185, 129, 0.16);
  --v-accent-soft: rgba(34, 211, 238, 0.14);
  --v-glass-bg: rgba(18, 24, 38, 0.72);

  /* Tipografia */
  --v-font-display: "Sora", system-ui, -apple-system, sans-serif;
  --v-font-body: "Inter", system-ui, -apple-system, sans-serif;
  /* Escala fluida: cresce suave do celular ao desktop (sem "degraus"). */
  --v-text-xs: clamp(0.73rem, 0.71rem + 0.10vw, 0.79rem);
  --v-text-sm: clamp(0.85rem, 0.82rem + 0.18vw, 0.92rem);
  --v-text-base: clamp(0.98rem, 0.95rem + 0.22vw, 1.06rem);
  --v-text-lg: clamp(1.08rem, 1.02rem + 0.34vw, 1.22rem);
  --v-text-xl: clamp(1.24rem, 1.12rem + 0.58vw, 1.5rem);
  --v-h3: clamp(1.5rem, 2.2vw, 1.875rem);
  --v-h2: clamp(1.875rem, 3.2vw, 2.75rem);
  --v-h1: clamp(2.5rem, 5vw, 4rem);

  /* Espaçamento (base 4px) */
  --v-space-1: 4px;  --v-space-2: 8px;  --v-space-3: 12px; --v-space-4: 16px;
  --v-space-5: 24px; --v-space-6: 32px; --v-space-7: 48px; --v-space-8: 64px;
  --v-space-9: 96px; --v-space-10: 128px;

  /* Raio */
  --v-radius-sm: 8px; --v-radius-md: 12px; --v-radius-lg: 16px;
  --v-radius-xl: 24px; --v-radius-2xl: 32px; --v-radius-pill: 999px;

  /* Sombra / efeitos */
  --v-shadow-sm: 0 1px 2px rgba(0, 0, 0, .20), 0 1px 1px rgba(0, 0, 0, .14);
  --v-shadow-md: 0 6px 20px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .18);
  --v-shadow-lg: 0 18px 48px rgba(0, 0, 0, .40), 0 6px 16px rgba(0, 0, 0, .24), 0 2px 6px rgba(0, 0, 0, .16);
  --v-shadow-glow: 0 8px 32px rgba(16, 185, 129, .35);
  --v-ring: 0 0 0 3px rgba(16, 185, 129, .45);
  --v-blur: blur(14px);

  /* Layout */
  --v-container: 1200px;

  /* Movimento */
  --v-dur-fast: 150ms; --v-dur-base: 240ms; --v-dur-slow: 400ms; --v-dur-slower: 640ms;
  --v-ease-standard: cubic-bezier(.4, 0, .2, 1);
  --v-ease-out: cubic-bezier(.16, 1, .3, 1);
  --v-ease-emphasized: cubic-bezier(.2, .8, .2, 1);
  --v-ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: dark;
}

:root[data-theme="light"] {
  --v-bg: #F6F7FB;
  --v-bg-2: #EEF1F8;
  --v-surface: #FFFFFF;
  --v-surface-2: #F4F6FB;
  --v-surface-3: #EAEDF5;
  --v-border: #E4E8F0;
  --v-border-strong: #D2D8E6;
  --v-text: #101623;
  --v-text-secondary: #46506A;
  --v-text-muted: #7A849B;
  --v-overlay: rgba(16, 22, 35, 0.45);
  --v-primary: #0B9E74;
  --v-primary-soft: rgba(11, 158, 116, 0.10);
  --v-accent-soft: rgba(34, 211, 238, 0.14);
  --v-glass-bg: rgba(255, 255, 255, 0.78);
  --v-shadow-sm: 0 1px 2px rgba(16, 22, 35, .08), 0 1px 1px rgba(16, 22, 35, .05);
  --v-shadow-md: 0 6px 20px rgba(16, 22, 35, .10), 0 2px 6px rgba(16, 22, 35, .06);
  --v-shadow-lg: 0 18px 48px rgba(16, 22, 35, .16), 0 6px 16px rgba(16, 22, 35, .08), 0 2px 6px rgba(16, 22, 35, .05);
  color-scheme: light;
}

/* --------------------------------- Reset --------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--v-font-body);
  font-size: var(--v-text-base);
  line-height: 1.6;
  color: var(--v-text);
  background: var(--v-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none; /* nunca simula negrito/itálico — usa só os pesos reais da fonte */
  min-height: 100vh;
  overflow-x: clip; /* elementos decorativos (orbs, marquee) nunca geram rolagem horizontal */
  transition: background var(--v-dur-base) var(--v-ease-standard),
              color var(--v-dur-base) var(--v-ease-standard);
}
html { overflow-x: clip; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--v-font-display); font-weight: 700; line-height: 1.18; letter-spacing: -0.014em; text-wrap: balance; }
ul { list-style: none; padding: 0; }
:focus-visible { outline: none; box-shadow: var(--v-ring); border-radius: var(--v-radius-sm); }

/* Skip-link (acessibilidade por teclado): visível apenas ao focar */
.skip-link { position: absolute; left: -9999px; top: 0; z-index: 2000; padding: .7rem 1.1rem; background: var(--v-primary); color: #fff; border-radius: 0 0 var(--v-radius-md) 0; font-weight: 600; font-size: var(--v-text-sm); }
.skip-link:focus { left: 0; }

/* Conteúdo só para leitores de tela */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ------------------------------ Background glow -------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 15% -5%, rgba(59, 130, 246, .18), transparent 60%),
    radial-gradient(55% 45% at 95% 0%, rgba(34, 197, 94, .12), transparent 55%);
  pointer-events: none;
}
:root[data-theme="light"] body::before {
  background:
    radial-gradient(60% 50% at 15% -5%, rgba(59, 130, 246, .12), transparent 60%),
    radial-gradient(55% 45% at 95% 0%, rgba(34, 197, 94, .10), transparent 55%);
}

/* -------------------------------- Layout --------------------------------- */
.container { width: 100%; max-width: var(--v-container); margin-inline: auto; padding-inline: var(--v-space-5); }
.section { padding-block: var(--v-space-9); }
.section-sm { padding-block: var(--v-space-7); }
main { min-height: 60vh; }

.grid { display: grid; gap: var(--v-space-5); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--v-space-2); } .gap-3 { gap: var(--v-space-3); } .gap-4 { gap: var(--v-space-4); }
.wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.mt-2 { margin-top: var(--v-space-2); } .mt-4 { margin-top: var(--v-space-4); }
.mt-6 { margin-top: var(--v-space-6); } .mt-8 { margin-top: var(--v-space-8); }
.mb-4 { margin-bottom: var(--v-space-4); } .mb-6 { margin-bottom: var(--v-space-6); }

/* -------------------------------- Text ----------------------------------- */
.eyebrow {
  font-size: var(--v-text-xs); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--v-primary);
  display: inline-flex; align-items: center; gap: var(--v-space-2);
}
.section-title { font-size: var(--v-h2); margin-top: var(--v-space-3); }
.section-subtitle { color: var(--v-text-secondary); font-size: var(--v-text-lg); max-width: 60ch; margin-top: var(--v-space-3); text-wrap: pretty; }
.text-muted { color: var(--v-text-muted); }
.text-secondary { color: var(--v-text-secondary); }
.text-gradient {
  background: var(--v-gradient); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.lead { font-size: var(--v-text-lg); color: var(--v-text-secondary); text-wrap: pretty; }

/* -------------------------------- Buttons -------------------------------- */
.btn {
  --btn-bg: var(--v-surface-2);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--v-space-2);
  padding: 0.75rem 1.35rem; border-radius: var(--v-radius-pill);
  border: 1px solid var(--v-border-strong); background: var(--btn-bg);
  color: var(--v-text); font-weight: 600; font-size: var(--v-text-sm);
  cursor: pointer; white-space: nowrap; text-align: center;
  transition: transform var(--v-dur-fast) var(--v-ease-emphasized),
              box-shadow var(--v-dur-base) var(--v-ease-standard),
              background var(--v-dur-base) var(--v-ease-standard),
              border-color var(--v-dur-base) var(--v-ease-standard);
}
.btn:hover { transform: translateY(-2px); border-color: var(--v-primary); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary {
  background: var(--v-gradient); border-color: transparent; color: #fff;
  box-shadow: var(--v-shadow-glow);
}
.btn-primary:hover { box-shadow: 0 12px 40px rgba(59, 130, 246, .5); border-color: transparent; }
.btn-ghost { background: transparent; border-color: var(--v-border); }
.btn-ghost:hover { background: var(--v-primary-soft); }
.btn-danger { background: transparent; border-color: rgba(248,113,113,.4); color: var(--v-danger); }
.btn-danger:hover { background: rgba(248,113,113,.12); border-color: var(--v-danger); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.75rem; font-size: var(--v-text-base); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: var(--v-text-xs); }
.btn-icon { padding: 0.55rem; border-radius: var(--v-radius-md); }

/* -------------------------------- Badges --------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0.3rem 0.7rem; border-radius: var(--v-radius-pill);
  font-size: var(--v-text-xs); font-weight: 600;
  background: var(--v-surface-2); color: var(--v-text-secondary);
  border: 1px solid var(--v-border);
}
.badge-primary { background: var(--v-primary-soft); color: var(--v-primary); border-color: transparent; }
.badge-accent { background: var(--v-accent-soft); color: var(--v-accent); border-color: transparent; }
.badge-success { background: rgba(52,211,153,.14); color: var(--v-success); border-color: transparent; }
.badge-free { background: rgba(52,211,153,.16); color: var(--v-success); border-color: transparent; }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --------------------------------- Cards --------------------------------- */
.card {
  background: var(--v-surface); border: 1px solid var(--v-border);
  border-radius: var(--v-radius-lg); padding: var(--v-space-5);
  transition: transform var(--v-dur-base) var(--v-ease-emphasized),
              box-shadow var(--v-dur-base) var(--v-ease-standard),
              border-color var(--v-dur-base) var(--v-ease-standard);
}
.card-glass { background: var(--v-glass-bg); backdrop-filter: var(--v-blur); -webkit-backdrop-filter: var(--v-blur); }
@media (hover: hover) {
  .card-hover:hover { transform: translateY(-6px); box-shadow: var(--v-shadow-glow); border-color: var(--v-primary); }
  /* Cards informativos (não-clicáveis): elevação sutil, sem glow azul nem borda-primária */
  .card-lift:hover { transform: translateY(-4px); box-shadow: var(--v-shadow-md); border-color: var(--v-border-strong); }
}

/* -------------------------- Thumbnails / gradientes ---------------------- */
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--v-radius-md);
  overflow: hidden; display: grid; place-items: center;
  color: #fff; isolation: isolate;
}
.thumb::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 0% 0%, rgba(255,255,255,.22), transparent 45%);
  mix-blend-mode: soft-light;
}
.thumb .thumb-icon { font-size: 2.6rem; opacity: .92; filter: drop-shadow(0 4px 12px rgba(0,0,0,.35)); z-index: 1; }
.grad-aurora { background: linear-gradient(135deg, #34D399 0%, #22D3EE 55%, #7C6BFF 100%); }
.grad-violet { background: linear-gradient(135deg, #7C6BFF 0%, #A78BFA 50%, #22D3EE 100%); }
.grad-ocean  { background: linear-gradient(135deg, #0EA5E9 0%, #22D3EE 55%, #67E8F9 100%); }
.grad-ember  { background: linear-gradient(135deg, #F472B6 0%, #FB7185 55%, #FBBF24 100%); }
.grad-sunset { background: linear-gradient(135deg, #FB7185 0%, #F59E0B 55%, #FBBF24 100%); }
.grad-forest { background: linear-gradient(135deg, #10B981 0%, #34D399 55%, #A7F3D0 100%); }
.grad-gold   { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 55%, #FDE68A 100%); }

/* ---------------- Capas animadas por curso (SVG vetorial) ---------------- */
.cover-art { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; }
.cover-art .cs { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .92; vector-effect: non-scaling-stroke; }
.cover-art .cf { fill: #fff; opacity: .92; }
.cover-art .cdim { opacity: .34; }
.cover-art .cglow { filter: drop-shadow(0 2px 10px rgba(0,0,0,.25)); }
.thumb .cover-badge { position: absolute; left: 12px; bottom: 10px; z-index: 2; font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.85); }

/* ---- Capas PREMIUM (arte vetorial em camadas) ---- */
.thumb.cover-premium { background: #05070f; } /* base escura; a arte vem do próprio SVG */
.cover-art .ms  { fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.cover-art .mf  { fill: #fff; }
.cover-art .mg  { fill: var(--ac,  #34D399); fill-opacity: .16; stroke: none; }
.cover-art .mg2 { fill: var(--ac2, #22D3EE); fill-opacity: .16; stroke: none; }
.cover-motif { filter: drop-shadow(0 0 6px var(--ac, #34D399)) drop-shadow(0 0 16px var(--ac2, #22D3EE)); }
@keyframes cov-breathe { 0%,100%{ transform: scale(1);    opacity:.40 } 50%{ transform: scale(1.12); opacity:.62 } }
@keyframes cov-bob     { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-5px) } }
@keyframes cov-run     { 0%{ transform: translateX(0); opacity:0 } 8%{ opacity:1 } 86%{ opacity:1 } 100%{ transform: translateX(408px); opacity:0 } }
.cov-breathe { transform-box: fill-box; transform-origin: center; animation: cov-breathe 6s ease-in-out infinite; animation-delay: var(--d,0s); }
.cov-bob     { transform-box: fill-box; transform-origin: center; animation: cov-bob 5s ease-in-out infinite; animation-delay: var(--d,0s); }
.cov-run     { animation: cov-run 4.6s ease-in-out infinite; animation-delay: var(--d,0s); }

/* biblioteca de movimentos ambiente (GPU: transform/opacity/dashoffset) */
@keyframes cov-pulse   { 0%,100%{ transform: scale(1); opacity:.9 } 50%{ transform: scale(1.06); opacity:1 } }
@keyframes cov-ring    { 0%{ transform: scale(.5); opacity:.7 } 100%{ transform: scale(2.2); opacity:0 } }
@keyframes cov-spin    { to { transform: rotate(360deg) } }
@keyframes cov-spinbk  { to { transform: rotate(-360deg) } }
@keyframes cov-float   { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-6px) } }
@keyframes cov-sweep   { 0%{ transform: translateX(-16%); opacity:0 } 20%,80%{ opacity:.9 } 100%{ transform: translateX(116%); opacity:0 } }
@keyframes cov-dash    { to { stroke-dashoffset: -200 } }
@keyframes cov-blink   { 0%,100%{ opacity:.28 } 50%{ opacity:1 } }
@keyframes cov-glitch  { 0%,92%,100%{ transform: translateX(0) } 94%{ transform: translateX(-5px) } 96%{ transform: translateX(4px) } 98%{ transform: translateX(-2px) } }
@keyframes cov-rise    { 0%{ transform: translateY(10px); opacity:0 } 25%,70%{ opacity:1 } 100%{ transform: translateY(-14px); opacity:0 } }
@keyframes cov-scan    { 0%,100%{ transform: translateY(-22%) } 50%{ transform: translateY(22%) } }

/* utilitárias (transform-box p/ girar em torno do centro do próprio elemento) */
.cov-pulse,.cov-ring,.cov-spin,.cov-spinbk,.cov-float,.cov-sweep,.cov-blink,.cov-glitch,.cov-rise,.cov-scan { transform-box: fill-box; transform-origin: center; }
.cov-spin  { animation: cov-spin 14s linear infinite; }
.cov-spinbk{ animation: cov-spinbk 22s linear infinite; }
.cov-pulse { animation: cov-pulse 3.2s ease-in-out infinite; }
.cov-ring  { animation: cov-ring 3s ease-out infinite; animation-delay: var(--d, 0s); }
.cov-float { animation: cov-float 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cov-sweep { animation: cov-sweep 3.4s ease-in-out infinite; }
.cov-dash  { stroke-dasharray: 7 9; animation: cov-dash 3.5s linear infinite; }
.cov-blink { animation: cov-blink 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cov-glitch{ animation: cov-glitch 5s steps(1) infinite; }
.cov-rise  { animation: cov-rise 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.cov-scan  { animation: cov-scan 4s ease-in-out infinite; }

/* ------------------- Laboratórios interativos (Ferramentas) -------------- */
.phish-mail { background: var(--v-surface-2); border: 1px solid var(--v-border); border-radius: var(--v-radius-md); padding: var(--v-space-5); font-size: .92rem; line-height: 1.65; }
.phish-mail p { margin: .5rem 0; }
.phish-row { margin-bottom: .35rem; }
.phish-k { color: var(--v-text-muted); font-size: .8rem; }
.phish-sep { border: none; border-top: 1px solid var(--v-border); margin: .8rem 0; }
.phish-mut { color: var(--v-text-muted); font-size: .82rem; }
.phish-hot, .phish-safe { cursor: pointer; border-radius: 4px; padding: 1px 3px; transition: background var(--v-dur-fast) ease, box-shadow var(--v-dur-fast) ease; text-decoration: none; color: inherit; }
.phish-hot:hover, .phish-safe:hover { background: color-mix(in srgb, var(--v-text) 10%, transparent); }
.phish-hot.flagged, .phish-safe.flagged { background: color-mix(in srgb, var(--v-primary) 22%, transparent); box-shadow: inset 0 0 0 1px var(--v-primary); }
.phish-mail.revealed .phish-hot { background: color-mix(in srgb, #10B981 16%, transparent); box-shadow: inset 0 0 0 1px #10B981; }
.phish-mail.revealed .phish-hot.missed { background: color-mix(in srgb, #FBBF24 14%, transparent); box-shadow: inset 0 0 0 1px #FBBF24; }
.phish-mail.revealed .phish-safe.flagged { background: color-mix(in srgb, #F87171 16%, transparent); box-shadow: inset 0 0 0 1px #F87171; }
.phish-mail.revealed .phish-hot, .phish-mail.revealed .phish-safe { cursor: default; }
.phish-tag { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 5px; border-radius: 4px; margin-right: 6px; vertical-align: middle; }
.phish-exp { font-size: .82rem; color: var(--v-text-secondary); line-height: 1.5; margin: .35rem 0; padding-left: .6rem; border-left: 2px solid var(--v-border); }

.mfa-sim { display: grid; grid-template-columns: 260px 1fr; gap: var(--v-space-6); align-items: start; }
.mfa-phone { background: #0b0f1a; border: 2px solid var(--v-border-strong); border-radius: 26px; padding: 22px 16px; position: relative; box-shadow: var(--v-shadow-lg); }
.mfa-count { position: absolute; top: 10px; right: 16px; font-size: .72rem; color: var(--v-text-muted); }
.mfa-card { background: var(--v-surface-2); border: 1px solid var(--v-border); border-radius: 14px; padding: 16px; text-align: center; margin-top: 18px; }
.mfa-card.shake { animation: mfa-shake .5s; }
@keyframes mfa-shake { 0%,100%{ transform: translateX(0) } 20%{ transform: translateX(-6px) } 40%{ transform: translateX(6px) } 60%{ transform: translateX(-4px) } 80%{ transform: translateX(4px) } }
.mfa-title { font-weight: 700; font-size: 1rem; }
.mfa-sub { color: var(--v-text-secondary); font-size: .82rem; margin: .35rem 0 .5rem; }
.mfa-loc { color: #F87171; font-size: .75rem; margin-bottom: .8rem; }
.mfa-btns { display: flex; gap: .5rem; }
.mfa-btns .btn { flex: 1; }
.mfa-side { font-size: .9rem; line-height: 1.6; }
.mfa-side .mfa-log { color: var(--v-text-muted); font-size: .8rem; }
@media (max-width: 640px) { .mfa-sim { grid-template-columns: 1fr; } .mfa-phone { max-width: 260px; margin-inline: auto; } }
.grad-slate  { background: linear-gradient(135deg, #475569 0%, #60A5FA 55%, #93C5FD 100%); }

/* ------------------------------ Star rating ------------------------------ */
.stars { display: inline-block; white-space: nowrap; flex-shrink: 0; color: var(--v-star); font-size: 0.95em; letter-spacing: 2px; line-height: 1; }
.stars > span { display: inline; }
.stars .empty { color: var(--v-border-strong); }

/* ------------------------------ Navbar ----------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 200;
  background: var(--v-glass-bg); backdrop-filter: var(--v-blur); -webkit-backdrop-filter: var(--v-blur);
  border-bottom: 1px solid var(--v-border);
  transition: border-color var(--v-dur-base), background var(--v-dur-base);
}
.nav.scrolled { box-shadow: var(--v-shadow-md); }
.nav-inner { display: flex; align-items: center; gap: var(--v-space-5); height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--v-font-display); font-weight: 800; font-size: 1.25rem; }
.brand .brand-mark { width: 32px; height: 32px; }
.nav-links { display: flex; align-items: center; gap: var(--v-space-2); margin-left: var(--v-space-4); }
.nav-link {
  position: relative; padding: 0.5rem 0.85rem; border-radius: var(--v-radius-sm);
  color: var(--v-text-secondary); font-weight: 500; font-size: var(--v-text-sm);
  transition: color var(--v-dur-base);
}
.nav-link::after {
  content: ""; position: absolute; left: 0.85rem; right: 0.85rem; bottom: 0.3rem; height: 2px;
  background: var(--v-gradient); border-radius: 2px; transform: scaleX(0); transform-origin: center;
  transition: transform var(--v-dur-base) var(--v-ease-out);
}
.nav-link:hover, .nav-link.active { color: var(--v-text); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: var(--v-space-3); }
.nav-auth-mobile { display: none; } /* só aparece dentro do menu mobile (ver @media 820px) */

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: var(--v-radius-md); border: 1px solid var(--v-border);
  background: var(--v-surface-2); cursor: pointer; color: var(--v-text-secondary);
  transition: transform var(--v-dur-base) var(--v-ease-spring), color var(--v-dur-base), border-color var(--v-dur-base);
}
.icon-btn:hover { color: var(--v-text); border-color: var(--v-primary); }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }

/* Dropdown de usuário */
.menu { position: relative; }
.menu-panel {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px;
  background: var(--v-surface); border: 1px solid var(--v-border);
  border-radius: var(--v-radius-md); box-shadow: var(--v-shadow-lg); padding: var(--v-space-2);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98);
  transition: opacity var(--v-dur-base) var(--v-ease-out), transform var(--v-dur-base) var(--v-ease-out), visibility var(--v-dur-base);
  z-index: 300;
}
.menu.open .menu-panel { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 0.6rem 0.75rem; border-radius: var(--v-radius-sm); color: var(--v-text-secondary); font-size: var(--v-text-sm); width: 100%; background: none; border: none; cursor: pointer; text-align: left; }
.menu-item:hover { background: var(--v-primary-soft); color: var(--v-text); }
.menu-divider { height: 1px; background: var(--v-border); margin: var(--v-space-2) 0; }

.avatar {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  color: #fff; font-weight: 700; font-size: var(--v-text-sm); font-family: var(--v-font-display);
  flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; font-size: var(--v-text-lg); }
.avatar-xl { width: 88px; height: 88px; font-size: var(--v-text-xl); }

.nav-toggle { display: none; }

/* -------------------------------- Hero ----------------------------------- */
.hero { position: relative; padding-block: var(--v-space-9) var(--v-space-8); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--v-space-7); align-items: center; }
.hero h1 { font-size: var(--v-h1); font-weight: 800; }
.hero p.lead { margin-top: var(--v-space-4); max-width: 52ch; }
.hero-cta { display: flex; gap: var(--v-space-3); margin-top: var(--v-space-6); flex-wrap: wrap; }
.hero-stats { display: flex; gap: var(--v-space-6); margin-top: var(--v-space-7); flex-wrap: wrap; }
.hero-stat .num { font-family: var(--v-font-display); font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.hero-stat .lbl { color: var(--v-text-muted); font-size: var(--v-text-sm); }

.hero-visual { position: relative; }
.hero-glass {
  background: var(--v-glass-bg); backdrop-filter: var(--v-blur); -webkit-backdrop-filter: var(--v-blur);
  border: 1px solid var(--v-border); border-radius: var(--v-radius-xl); padding: var(--v-space-5);
  box-shadow: var(--v-shadow-lg);
}
.hero-float { position: absolute; border-radius: var(--v-radius-lg); box-shadow: var(--v-shadow-lg); }
.orb { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; z-index: -1; }
.orb-1 { width: 320px; height: 320px; background: var(--v-primary); top: -60px; right: -40px; }
.orb-2 { width: 260px; height: 260px; background: var(--v-accent); bottom: -80px; left: -30px; }

/* Marquee de logos/temas */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: var(--v-space-6); width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { color: var(--v-text-muted); font-family: var(--v-font-display); font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) { .marquee:hover .marquee-track { animation-play-state: paused; } }

/* ------------------------------ Course card ------------------------------ */
.course-card { display: flex; flex-direction: column; gap: var(--v-space-3); padding: var(--v-space-3); overflow: hidden; align-self: start; }
.course-card .thumb { margin-bottom: var(--v-space-1); }
.course-card .cc-body { padding-inline: var(--v-space-2); display: flex; flex-direction: column; gap: var(--v-space-2); }
.course-card h3 { font-size: var(--v-text-lg); line-height: 1.3; }
.course-card .cc-meta { display: flex; align-items: center; gap: var(--v-space-3); color: var(--v-text-muted); font-size: var(--v-text-xs); flex-wrap: wrap; }
.course-card .cc-foot { display: flex; align-items: center; justify-content: space-between; padding: var(--v-space-2); margin-top: auto; border-top: 1px solid var(--v-border); }
.price { font-family: var(--v-font-display); font-weight: 800; font-size: var(--v-text-lg); }
.price.free { color: var(--v-success); }
.cc-cat { position: absolute; top: 10px; left: 10px; z-index: 2; }
.cc-free { position: absolute; top: 10px; right: 10px; z-index: 2; }
/* Chamada de marketing dentro do card (preenche o espaço e prende o aluno) */
.course-card .cc-sub { font-size: var(--v-text-sm); line-height: 1.45; color: var(--v-text-muted); }
.course-card .cc-hook { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin-top: 2px;
  background: color-mix(in srgb, var(--v-primary) 7%, transparent); border: 1px solid color-mix(in srgb, var(--v-primary) 18%, transparent);
  border-radius: var(--v-radius-md); }
.course-card .cc-hook-line { font-weight: 600; font-size: .9rem; line-height: 1.35; color: var(--v-text); }
.course-card .cc-hook-list { display: flex; flex-direction: column; gap: 5px; }
.course-card .cc-hook-list li { position: relative; padding-left: 20px; font-size: var(--v-text-xs); color: var(--v-text-secondary); line-height: 1.35; }
.course-card .cc-hook-list li::before { content: "✓"; position: absolute; left: 2px; top: -1px; color: var(--v-primary); font-weight: 700; }
.course-card .cc-rate { padding-top: 10px; }

/* ----------------------------- Progress bar ------------------------------ */
.progress { height: 8px; border-radius: var(--v-radius-pill); background: var(--v-surface-3); overflow: hidden; position: relative; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--v-gradient); width: 0; transition: width var(--v-dur-slower) var(--v-ease-emphasized); box-shadow: 0 0 12px rgba(59,130,246,.6); }
.progress-label { display: flex; justify-content: space-between; font-size: var(--v-text-xs); color: var(--v-text-muted); margin-bottom: 6px; }

/* Anel de progresso */
.ring { --p: 0; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--v-primary) calc(var(--p) * 1%), var(--v-surface-3) 0);
  position: relative; font-weight: 700; font-size: var(--v-text-sm); font-family: var(--v-font-display); }
.ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--v-surface); }
.ring span { position: relative; z-index: 1; }

/* -------------------------------- Forms ---------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: var(--v-space-4); }
.field label { font-size: var(--v-text-sm); font-weight: 600; color: var(--v-text-secondary); }
.input, .textarea, .select {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--v-radius-md);
  background: var(--v-surface-2); border: 1px solid var(--v-border);
  color: var(--v-text); font-size: var(--v-text-sm);
  transition: border-color var(--v-dur-base), box-shadow var(--v-dur-base), background var(--v-dur-base);
}
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--v-primary); box-shadow: var(--v-ring); }
.input::placeholder, .textarea::placeholder { color: var(--v-text-muted); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.field .hint { font-size: var(--v-text-xs); color: var(--v-text-muted); }
.field .err { font-size: var(--v-text-xs); color: var(--v-danger); }
.field.has-error .input, .field.has-error .textarea, .field.has-error .select { border-color: var(--v-danger); }
.input-group { position: relative; }
.checkbox { display: flex; align-items: center; gap: 10px; font-size: var(--v-text-sm); color: var(--v-text-secondary); cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--v-primary); }

/* -------------------------------- Alerts --------------------------------- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 0.9rem 1.1rem; border-radius: var(--v-radius-md); font-size: var(--v-text-sm); border: 1px solid var(--v-border); background: var(--v-surface-2); margin-bottom: var(--v-space-4); }
.alert-success { background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.35); color: #86efac; }
.alert-error { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.35); color: #fca5a5; }
.alert-info { background: var(--v-accent-soft); border-color: rgba(34,211,238,.35); color: #67e8f9; }
:root[data-theme="light"] .alert-success { color: #047857; }
:root[data-theme="light"] .alert-error { color: #b91c1c; }
:root[data-theme="light"] .alert-info { color: #0e7490; }

/* Toasts (flash) */
.toast-wrap { position: fixed; top: 88px; right: 24px; z-index: 1100; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { padding: 0.9rem 1.1rem; border-radius: var(--v-radius-md); background: var(--v-surface); border: 1px solid var(--v-border); box-shadow: var(--v-shadow-lg); font-size: var(--v-text-sm); display: flex; gap: 10px; align-items: flex-start; }
.toast.success { border-left: 3px solid var(--v-success); }
.toast.error { border-left: 3px solid var(--v-danger); }
.toast.info { border-left: 3px solid var(--v-accent); }

/* -------------------------------- Tabs / accordion ----------------------- */
.accordion-item { border: 1px solid var(--v-border); border-radius: var(--v-radius-md); margin-bottom: var(--v-space-3); overflow: hidden; background: var(--v-surface); }
.accordion-head { display: flex; align-items: center; gap: var(--v-space-3); padding: var(--v-space-4); cursor: pointer; font-weight: 600; width: 100%; background: none; border: none; text-align: left; }
.accordion-head:hover { background: var(--v-surface-2); }
.accordion-head .chev { margin-left: auto; transition: transform var(--v-dur-base) var(--v-ease-standard); color: var(--v-text-muted); }
.accordion-item.open .chev { transform: rotate(90deg); }
.accordion-body { max-height: 0; overflow: hidden; transition: max-height var(--v-dur-slow) var(--v-ease-standard); }
.accordion-item.open .accordion-body { max-height: 1200px; }
.lesson-row { display: flex; align-items: center; gap: var(--v-space-3); padding: 0.7rem var(--v-space-4); border-top: 1px solid var(--v-border); font-size: var(--v-text-sm); color: var(--v-text-secondary); }
.lesson-row .li { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--v-surface-3); font-size: var(--v-text-xs); flex-shrink: 0; }
.lesson-row.done .li { background: var(--v-success); color: #04231a; }
.lesson-row .dur { margin-left: auto; color: var(--v-text-muted); font-size: var(--v-text-xs); }

/* ------------------------------ Section header --------------------------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--v-space-4); margin-bottom: var(--v-space-6); flex-wrap: wrap; }

/* ------------------------------ Category chips ---------------------------- */
.chips { display: flex; gap: var(--v-space-2); flex-wrap: wrap; }
.chip { padding: 0.5rem 1rem; border-radius: var(--v-radius-pill); border: 1px solid var(--v-border); background: var(--v-surface); font-size: var(--v-text-sm); color: var(--v-text-secondary); cursor: pointer; transition: all var(--v-dur-base); }
.chip:hover { border-color: var(--v-primary); color: var(--v-text); }
.chip.active { background: var(--v-primary-soft); border-color: var(--v-primary); color: var(--v-primary); }

/* ------------------------------ Category card ---------------------------- */
.cat-card { display: flex; flex-direction: column; gap: var(--v-space-3); position: relative; overflow: hidden; }
.cat-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: var(--v-radius-md); font-size: 1.5rem; color: #fff; }

/* ------------------------------ Footer ----------------------------------- */
.footer { border-top: 1px solid var(--v-border); padding-block: var(--v-space-8) var(--v-space-6); margin-top: var(--v-space-9); background: var(--v-bg-2); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--v-space-6); }
.footer h4 { font-size: var(--v-text-sm); text-transform: uppercase; letter-spacing: 0.08em; color: var(--v-text-muted); margin-bottom: var(--v-space-3); font-family: var(--v-font-body); font-weight: 700; }
.footer a { display: block; color: var(--v-text-secondary); font-size: var(--v-text-sm); padding: 0.3rem 0; transition: color var(--v-dur-base); }
.footer a:hover { color: var(--v-primary); }
.footer-bottom { border-top: 1px solid var(--v-border); margin-top: var(--v-space-6); padding-top: var(--v-space-5); display: flex; justify-content: space-between; gap: var(--v-space-4); flex-wrap: wrap; color: var(--v-text-muted); font-size: var(--v-text-sm); }

/* -------------------------------- Tables --------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--v-border); border-radius: var(--v-radius-lg); }
table.data { width: 100%; border-collapse: collapse; font-size: var(--v-text-sm); }
table.data th, table.data td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--v-border); white-space: nowrap; }
table.data th { color: var(--v-text-muted); font-weight: 600; font-size: var(--v-text-xs); text-transform: uppercase; letter-spacing: 0.04em; background: var(--v-surface-2); }
table.data tbody tr { transition: background var(--v-dur-fast); }
table.data tbody tr:hover { background: var(--v-surface-2); }
table.data td.wrap { white-space: normal; }

/* --------------------------------- Auth ---------------------------------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-aside { position: relative; padding: var(--v-space-8); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: var(--v-bg-2); border-right: 1px solid var(--v-border); }
.auth-main { display: grid; place-items: center; padding: var(--v-space-6); }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: var(--v-h3); }

/* ------------------------------ Learn layout ----------------------------- */
.learn { display: grid; grid-template-columns: 320px 1fr; min-height: 100vh; }
.learn-side { border-right: 1px solid var(--v-border); background: var(--v-bg-2); overflow-y: auto; max-height: 100vh; position: sticky; top: 0; }
.learn-side-head { padding: var(--v-space-4); border-bottom: 1px solid var(--v-border); position: sticky; top: 0; background: var(--v-glass-bg); backdrop-filter: var(--v-blur); z-index: 2; }
.learn-main { padding: var(--v-space-6); max-width: 900px; margin-inline: auto; width: 100%; }
.player { aspect-ratio: 16 / 9; border-radius: var(--v-radius-lg); overflow: hidden; border: 1px solid var(--v-border); position: relative; background: var(--v-surface); }
.player iframe { width: 100%; height: 100%; border: 0; }
.player-placeholder { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: #fff; }
.player-placeholder .pp-inner { z-index: 1; }
.play-btn { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--v-space-3); background: rgba(255,255,255,.16); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.3); }
.side-lesson { display: flex; align-items: center; gap: 10px; padding: 0.7rem var(--v-space-4); font-size: var(--v-text-sm); color: var(--v-text-secondary); border-left: 3px solid transparent; transition: background var(--v-dur-fast); }
.side-lesson:hover { background: var(--v-surface-2); }
.side-lesson.active { background: var(--v-primary-soft); border-left-color: var(--v-primary); color: var(--v-text); }
.side-lesson .st { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--v-border-strong); display: grid; place-items: center; flex-shrink: 0; font-size: 11px; }
.side-lesson.done .st { background: var(--v-success); border-color: var(--v-success); color: #04231a; }
.side-module-title { padding: var(--v-space-4) var(--v-space-4) var(--v-space-2); font-size: var(--v-text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--v-text-muted); font-weight: 700; }
.prose { line-height: 1.8; color: var(--v-text-secondary); }
.prose p { margin-bottom: var(--v-space-4); }

/* -------------------------------- Admin ---------------------------------- */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.admin-side { background: var(--v-bg-2); border-right: 1px solid var(--v-border); padding: var(--v-space-5); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 0.7rem 0.85rem; border-radius: var(--v-radius-md); color: var(--v-text-secondary); font-size: var(--v-text-sm); font-weight: 500; margin-bottom: 4px; transition: all var(--v-dur-base); }
.admin-nav a:hover { background: var(--v-surface-2); color: var(--v-text); }
.admin-nav a.active { background: var(--v-primary-soft); color: var(--v-primary); }
.admin-main { padding: var(--v-space-6); overflow-x: hidden; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: var(--v-space-4); margin-bottom: var(--v-space-6); flex-wrap: wrap; }
.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .kpi-num { font-family: var(--v-font-display); font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.kpi .kpi-lbl { color: var(--v-text-muted); font-size: var(--v-text-sm); }
.kpi .kpi-ico { width: 44px; height: 44px; border-radius: var(--v-radius-md); display: grid; place-items: center; background: var(--v-primary-soft); color: var(--v-primary); margin-bottom: var(--v-space-2); }

/* ------------------------------ Certificate ------------------------------ */
.cert { max-width: 900px; margin: var(--v-space-8) auto; padding: var(--v-space-4); }
.cert-paper { position: relative; border-radius: var(--v-radius-xl); padding: clamp(1.5rem, 5vw, 4rem); background: var(--v-surface); border: 1px solid var(--v-border-strong); overflow: hidden; box-shadow: var(--v-shadow-lg); text-align: center; }
.cert-paper::before { content: ""; position: absolute; inset: 0; padding: 2px; border-radius: inherit; background: var(--v-gradient); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .8; }
.cert-seal { width: 90px; height: 90px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--v-space-4); background: var(--v-gradient); color: #fff; box-shadow: var(--v-shadow-glow); }
.cert-name { font-family: var(--v-font-display); font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; margin: var(--v-space-4) 0; }
.cert-course { font-size: var(--v-text-xl); color: var(--v-primary); font-weight: 600; }
.cert-code { font-family: ui-monospace, monospace; letter-spacing: 2px; color: var(--v-text-muted); }

/* ------------------------------ Pagination ------------------------------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: var(--v-space-7); }
.pagination a, .pagination span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--v-radius-md); border: 1px solid var(--v-border); font-size: var(--v-text-sm); color: var(--v-text-secondary); background: var(--v-surface); transition: all var(--v-dur-base); }
.pagination a:hover { border-color: var(--v-primary); color: var(--v-text); }
.pagination .cur { background: var(--v-gradient); color: #fff; border-color: transparent; }
.pagination .disabled { opacity: .4; pointer-events: none; }

/* -------------------------------- Empty ---------------------------------- */
.empty { text-align: center; padding: var(--v-space-9) var(--v-space-4); color: var(--v-text-muted); }
.empty .emoji { font-size: 3rem; margin-bottom: var(--v-space-3); opacity: .7; }

/* ------------------------- Animações didáticas --------------------------- */
.anim { border: 1px solid var(--v-border); border-radius: var(--v-radius-lg); background: var(--v-surface); padding: var(--v-space-4); margin-block: var(--v-space-5); }
.anim-head { display: flex; align-items: center; gap: var(--v-space-3); margin-bottom: var(--v-space-3); flex-wrap: wrap; }
.anim-head strong { font-family: var(--v-font-display); font-size: 1.02rem; }
.anim-badge { display: inline-flex; align-items: center; gap: 6px; padding: .3rem .7rem; border-radius: var(--v-radius-pill); font-size: var(--v-text-xs); font-weight: 700; background: var(--v-primary-soft); color: var(--v-primary); }
.anim-stage { width: 100%; height: auto; display: block; background: var(--v-bg-2); border-radius: var(--v-radius-md); border: 1px solid var(--v-border); }
.anim-caption { min-height: 3.2em; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--v-space-3) var(--v-space-4) 0; color: var(--v-text-secondary); font-size: var(--v-text-sm); line-height: 1.5; }
.anim-controls { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: var(--v-space-2); }
.anim-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: var(--v-surface-3); cursor: pointer; padding: 0; transition: all var(--v-dur-base); }
.anim-dot.on { background: var(--v-primary); transform: scale(1.3); box-shadow: 0 0 8px rgba(59,130,246,.6); }
.anim-replay { margin-left: var(--v-space-3); }

/* --------------------------- Conteúdo rico (apostila) --------------------- */
.rich { line-height: 1.8; color: var(--v-text-secondary); }
.rich p { margin-bottom: var(--v-space-4); }
.rich strong { color: var(--v-text); }
.rich h3 { color: var(--v-text); font-size: 1.15rem; margin: var(--v-space-6) 0 var(--v-space-3); }
.rich ul { margin: 0 0 var(--v-space-4); padding-left: 1.1rem; list-style: disc; }
.rich li { margin-bottom: var(--v-space-2); }
.rich li::marker { color: var(--v-primary); }
.rich .tip { border-left: 3px solid var(--v-warning); background: rgba(251,191,36,.08); padding: var(--v-space-3) var(--v-space-4); border-radius: 0 var(--v-radius-md) var(--v-radius-md) 0; margin: var(--v-space-4) 0; font-size: var(--v-text-sm); }

/* --------------------------------- Quiz ----------------------------------- */
.quiz-opt { display: flex; align-items: center; gap: 10px; padding: .7rem .9rem; border: 1px solid var(--v-border); border-radius: var(--v-radius-md); font-size: var(--v-text-sm); color: var(--v-text-secondary); }
.quiz-opt-input { cursor: pointer; transition: border-color var(--v-dur-base), background var(--v-dur-base); }
.quiz-opt-input:hover { border-color: var(--v-primary); background: var(--v-primary-soft); color: var(--v-text); }
.quiz-opt-input input { accent-color: var(--v-primary); width: 16px; height: 16px; flex-shrink: 0; }
.quiz-opt-input:has(input:checked) { border-color: var(--v-primary); background: var(--v-primary-soft); color: var(--v-text); box-shadow: var(--v-ring); }
.opt-correct { border-color: rgba(34,197,94,.6); background: rgba(34,197,94,.10); color: var(--v-text); }
.opt-wrong { border-color: rgba(248,113,113,.6); background: rgba(248,113,113,.10); }
.quiz-q.q-hit { border-left: 3px solid var(--v-accent); }
.quiz-q.q-miss { border-left: 3px solid var(--v-danger); }
.side-quiz { font-weight: 600; }
.side-quiz .qbadge { margin-left: auto; font-size: .68rem; padding: .1rem .5rem; border-radius: var(--v-radius-pill); background: var(--v-primary-soft); color: var(--v-primary); }
.side-quiz .qbadge.done { background: rgba(34,197,94,.14); color: var(--v-accent); }

/* ------------------------------ Apostila (print) -------------------------- */
.apostila-doc { max-width: 820px; margin-inline: auto; padding: var(--v-space-6) var(--v-space-5); }
.apostila-cover { text-align: center; padding: var(--v-space-9) var(--v-space-5); border: 1px solid var(--v-border); border-radius: var(--v-radius-xl); margin-bottom: var(--v-space-7); background: var(--v-surface); }
.apostila-module { margin-top: var(--v-space-8); }
.apostila-module > h2 { font-size: var(--v-h3); border-bottom: 2px solid var(--v-primary); padding-bottom: var(--v-space-3); margin-bottom: var(--v-space-5); }
.apostila-lesson { margin-bottom: var(--v-space-7); }
.apostila-lesson > h3 { font-size: 1.25rem; margin-bottom: var(--v-space-3); }
@media print {
  .nav, .footer, .toast-wrap, .no-print, .orb { display: none !important; }
  body { background: #fff !important; color: #111 !important; }
  body::before { display: none !important; }
  .apostila-cover, .anim { border-color: #ccc; background: #fff; }
  .rich, .apostila-doc { color: #222 !important; }
  .rich strong, .rich h3, h1, h2, h3 { color: #000 !important; }
  .apostila-module { page-break-before: always; }
  .apostila-lesson { page-break-inside: avoid; }
  a { text-decoration: none; color: inherit; }
}

/* --------------------------- Scroll reveal / anim ------------------------ */
.js-reveal [data-reveal] { opacity: 0; transform: translateY(18px); }
[data-reveal].in { opacity: 1; transform: none; transition: opacity var(--v-dur-slow) var(--v-ease-out), transform var(--v-dur-slow) var(--v-ease-out); }

@keyframes scale-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.scale-in { animation: scale-in var(--v-dur-base) var(--v-ease-out); }
@keyframes glow-pulse { 0%,100% { box-shadow: 0 8px 32px rgba(59,130,246,.35); } 50% { box-shadow: 0 8px 48px rgba(59,130,246,.6); } }
.glow-pulse { animation: glow-pulse 2.6s ease-in-out infinite; }
@keyframes gradient-shift { to { background-position: 200% center; } }
.animate-gradient { background-size: 200% auto; animation: gradient-shift 8s ease infinite; }
@keyframes shimmer { to { background-position: 200% 0; } }
.skeleton { background: linear-gradient(90deg, var(--v-surface-2) 25%, var(--v-surface-3) 37%, var(--v-surface-2) 63%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--v-radius-sm); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.page-enter { animation: fade-in var(--v-dur-slow) var(--v-ease-out); }

/* ------------------------------ Responsive ------------------------------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .learn { grid-template-columns: 1fr; }
  .learn-side { max-height: none; position: static; }
}
@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-grid; }
  .nav-links.mobile-open { display: flex; position: fixed; inset: 72px 0 auto 0; flex-direction: column; background: var(--v-surface); border-bottom: 1px solid var(--v-border); padding: var(--v-space-4); gap: var(--v-space-1); box-shadow: var(--v-shadow-lg); max-width: 100%; }
  /* Botões de login vão para o menu (drawer); topo fica só logo + tema + menu */
  .nav-actions > .btn { display: none; }
  .nav-auth-mobile { display: block; }
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--v-space-5); }
  .sec-head { align-items: flex-start; }
  .catalog-grid { grid-template-columns: 1fr !important; }
  .catalog-layout { grid-template-columns: 1fr !important; }
}

/* ------------------- Alvos de toque (Lei de Fitts) ----------------------- */
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn-sm { min-height: 40px; }
  .icon-btn { width: 44px; height: 44px; }
  .nav-link { padding-block: 0.65rem; }
}

/* --------------------------- Tutor de IA (opcional) ---------------------- */
.tutor {
  margin: var(--v-space-7) 0;
  padding: var(--v-space-5);
  border: 1px solid var(--v-border);
  border-radius: var(--v-radius-lg, 16px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--v-primary) 10%, transparent), transparent 60%),
    var(--v-surface, #0e1526);
}
.tutor-head { display: flex; align-items: flex-start; gap: var(--v-space-3); margin-bottom: var(--v-space-4); }
.tutor-badge {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.05rem; color: #fff;
  background: linear-gradient(135deg, var(--v-primary), var(--v-accent, #22D3EE));
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--v-primary) 60%, transparent);
}
.tutor-out {
  margin-top: var(--v-space-4); padding: var(--v-space-4);
  border-radius: 12px; font-size: .92rem; line-height: 1.6;
  white-space: pre-line; border: 1px solid var(--v-border);
  background: color-mix(in srgb, var(--v-primary) 5%, transparent);
}
.tutor-out--ok   { border-color: color-mix(in srgb, var(--v-accent, #22D3EE) 45%, var(--v-border)); }
.tutor-out--err  { border-color: color-mix(in srgb, #ef4444 45%, var(--v-border)); color: var(--v-text, #e5e7eb); }
.tutor-out--wait { opacity: .8; font-style: italic; }

/* --------------------------- Reduced motion ------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
