/* ============================================================
   SABER LIVRE — cursos gratuitos
   ------------------------------------------------------------
   Claro: branco principal + preto + azul-marinho.
   Escuro: preto principal + azul-marinho + amarelo (detalhes).
   Tema via <html data-theme="dark">; botão js/theme.js grava no
   localStorage. Cores temáticas fora do :root estão só nos
   gradientes dos cards/hero, ajustados abaixo.
   ============================================================ */

/* ---------------- Tema CLARO (padrão) ---------------- */
:root {
  /* Fundos — branco principal, toques neutros */
  --bg: #ffffff;
  --bg-alt: #f5f7fd;
  --surface: #ffffff;
  --surface-hover: #eef2fb;

  /* Acento — azul-marinho */
  --accent: #1f2d77;
  --accent-bright: #2e45b8;
  --accent-soft: rgba(31, 45, 119, 0.10);
  --accent-faint: rgba(31, 45, 119, 0.05);
  --accent-glow: rgba(31, 45, 119, 0.26);

  /* Secundário — navy mais intenso (badges grátis / estúdio) */
  --accent2: #1f2d77;
  --accent2-soft: rgba(31, 45, 119, 0.10);

  /* Texto — preto azulado */
  --text: #0d1019;
  --text-muted: #4a5060;
  --text-faint: #8a90a0;

  /* Bordas e sombras */
  --border: rgba(31, 45, 119, 0.13);
  --border-strong: rgba(31, 45, 119, 0.32);
  --shadow: 0 8px 30px rgba(13, 16, 25, 0.10);
  --live-dot: #e53935;

  /* Tipografia */
    --font-display: 'Archivo Black', 'Poppins', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  /* Layout */
  --radius: 12px;
  --container: 1100px;
}

/* ---------------- Tema ESCURO ---------------- */
html[data-theme="dark"] {
  /* Fundos — preto azulado */
  --bg: #0b0e17;
  --bg-alt: #10141f;
  --surface: #161a29;
  --surface-hover: #1c2134;

  /* Acento no escuro — amarelo (os textos/links que são navy no claro
       viram amarelo pra combinar c/ preto + azul-marinho + amarelo) */
    --accent: #ffd54f;
    --accent-bright: #ffe082;
    --accent-soft: rgba(255, 213, 79, 0.13);
    --accent-faint: rgba(255, 213, 79, 0.06);
    --accent-glow: rgba(255, 213, 79, 0.26);

    /* Secundário — mantém tom amarelo mais alto (badges) */
    --accent2: #ffd54f;
    --accent2-soft: rgba(255, 213, 79, 0.13);

  --text: #eef1fb;
  --text-muted: #a9b0c7;
  --text-faint: #767f9c;

  --border: rgba(91, 123, 255, 0.18);
  --border-strong: rgba(91, 123, 255, 0.40);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.55);
}

/* ---------- Reset base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--accent-faint), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Menu de navegação "Cursos ▾" (dropdown) ---------- */
.main-nav {
  position: relative;
  flex-shrink: 0;
}
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.nav-trigger:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--surface-hover);
}
.nav-trigger .caret { font-size: 0.7rem; transition: transform 0.2s ease; }
.main-nav.open .nav-trigger .caret { transform: rotate(180deg); }

/* Painel suspenso */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 90;
}
.main-nav.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-dropdown a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Na medida da topbar: marca + menu(s) + busca + ações, tudo na mesma linha */
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.topbar-tools .search-wrap { flex: 1; max-width: 380px; margin-bottom: 0; }
.topbar-tools .toolbar { padding: 0; display: contents; }
/* Chips antigos removidos da topbar: agora o filtro vive no menu "Cursos ▾".
   A lógica continua (o app.js lê o chip ativo) mas a pilhalinha não aparece. */
.topbar-tools .chip-row { display: none; }
.topbar-tools .toolbar-count { display: none; }

/* ---------- TOPBAR fixa (sempre visível) ---------- */
/* Botão de tema: só o ícone (lua/sol), formato redondo */
.theme-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}
.theme-toggle .ico { font-size: 1.05rem; line-height: 1; }
.theme-toggle .lbl { display: none; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .topbar {
  background: color-mix(in srgb, var(--bg) 90%, transparent);
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  max-width: var(--container);
  margin: 0 auto;
  padding: 12px 24px;
}

/* Marca: logo + nome */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}
.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: -1px;
  color: var(--text);
  white-space: nowrap;
}
.brand-name em {
  font-style: normal;
  color: var(--accent);
}

/* Zona de busca + menus: o bloco consolidado está acima (→ .topbar-tools) */

/* Ações à direita: tema + login */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Header antigo (mantido só como fallback simples em cursos) */
.site-header {
  display: none;
}

/* ---------- Hero ------------------ */
.hero {
  text-align: center;
  padding: 88px 20px 64px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 25% 30%, var(--accent-soft), transparent 45%),
    radial-gradient(circle at 75% 65%, var(--accent2-soft), transparent 40%);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(180deg, #2e45b8 0%, #1f2d77 60%, #0e1a4a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
html[data-theme="dark"] .hero h1 {
  background-image: linear-gradient(180deg, #ffe082 0%, #ffd54f 60%, #d4a017 100%);
}

.hero p {
  max-width: 640px;
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  position: relative;
}

.hero::after {
  content: "✦ ✦ ✦";
  display: block;
  margin-top: 26px;
  color: var(--accent);
  opacity: 0.45;
  letter-spacing: 14px;
  font-size: 0.7rem;
}

/* ---------- Grid de cursos ---------- */
.curso-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
  padding-bottom: 90px;
}

.card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
html[data-theme="dark"] .card { box-shadow: 0 2px 12px rgba(0,0,0,0.35); }

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-strong);
  box-shadow: 0 14px 34px rgba(0,0,0,0.16), 0 0 24px var(--accent-soft);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text);
  padding: 20px 22px 0;
  transition: color 0.25s ease;
}
.card:hover h2 { color: var(--accent); }

.card p {
  padding: 10px 22px 16px;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.card .meta {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.card .meta .gratis {
  background: var(--accent2-soft);
  border: 1px solid color-mix(in srgb, var(--accent2) 45%, transparent);
  color: var(--accent2);
  padding: 2px 10px;
  border-radius: 999px;
  margin-right: 10px;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 1px;
}

/* ---------- Card art ---------- */
.card-art {
  height: 130px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.card-art svg {
  width: 52px;
  height: 52px;
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: var(--accent);
  filter: drop-shadow(0 0 10px var(--accent-glow));
  opacity: 0.9;
  transition: transform 0.3s ease;
}
.card:hover .card-art svg { transform: scale(1.1) rotate(-4deg); }

.card-art::before,
.card-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.card-art::before {
  width: 200px; height: 200px;
  left: -60px; top: -60px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  opacity: 0.35;
}
.card-art::after {
  width: 120px; height: 120px;
  right: 15%; bottom: -55px;
  background: radial-gradient(circle, var(--accent2-soft) 0%, transparent 70%);
  opacity: 0.3;
}

.tema-criacao  { background: linear-gradient(135deg, #f5f7fd 0%, #dde4f5 55%, #c0cdec 100%); }
.tema-pendente { background: linear-gradient(135deg, #f0f2f7 0%, #dfe3ee 55%, #c8cfdf 100%); }
.tema-financas { background: linear-gradient(135deg, #f5f7fd 0%, #dde4f5 55%, #c0cdec 100%); }
.tema-tecnologia { background: linear-gradient(135deg, #f5f7fd 0%, #dde4f5 55%, #c0cdec 100%); }
.tema-foco     { background: linear-gradient(135deg, #f5f7fd 0%, #dde4f5 55%, #c0cdec 100%); }
.tema-marketing { background: linear-gradient(135deg, #f5f7fd 0%, #dde4f5 55%, #c0cdec 100%); }
.tema-arte     { background: linear-gradient(135deg, #f5f7fd 0%, #dde4f5 55%, #c0cdec 100%); }
.tema-riqueza  { background: linear-gradient(135deg, #f7f5ef 0%, #e8e2cf 55%, #d9cfa8 100%); }
html[data-theme="dark"] .tema-criacao  { background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #3a55c0 100%); }
html[data-theme="dark"] .tema-pendente { background: linear-gradient(135deg, #141a2c 0%, #1d2640 55%, #2c3b66 100%); }
html[data-theme="dark"] .tema-financas { background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #3a55c0 100%); }
html[data-theme="dark"] .tema-tecnologia { background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #3a55c0 100%); }
html[data-theme="dark"] .tema-foco     { background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #3a55c0 100%); }
html[data-theme="dark"] .tema-marketing { background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #3a55c0 100%); }
html[data-theme="dark"] .tema-arte     { background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #3a55c0 100%); }
html[data-theme="dark"] .tema-riqueza  { background: linear-gradient(135deg, #2c2816 0%, #46401c 55%, #7a6b26 100%); }

/* ---------- Página do curso ---------- */
article.curso {
  max-width: 820px;
  margin: 48px auto 90px;
  background: linear-gradient(180deg, var(--surface), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px clamp(24px, 6vw, 56px);
  box-shadow: var(--shadow);
}

.curso-hero {
  height: 120px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  background: linear-gradient(135deg, #eef2fb 0%, #d6dfee 55%, #b7c4e8 100%);
  position: relative;
  overflow: hidden;
}
html[data-theme="dark"] .curso-hero {
  background: linear-gradient(135deg, #101a33 0%, #1a2a55 55%, #2a45a0 100%);
}
.curso-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, var(--accent-soft), transparent 50%),
    radial-gradient(circle at 80% 70%, var(--accent2-soft), transparent 50%);
}
.curso-hero svg {
  width: 56px; height: 56px;
  position: absolute; right: 26px; bottom: 22px;
  color: var(--accent);
  filter: drop-shadow(0 0 12px var(--accent-glow));
}

.voltar {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
  margin-bottom: 26px;
  transition: color 0.2s ease;
}
.voltar:hover { color: var(--accent); }

article h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: 0.5px;
  color: var(--accent);
  line-height: 1.3;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

article h2 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.4px;
  color: var(--accent);
  margin: 36px 0 12px;
}

article h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--accent);
  margin: 22px 0 8px;
}

article p { margin: 12px 0; color: var(--text); }
article ul { margin: 12px 0 12px 24px; }
article li { margin: 8px 0; color: var(--text); }
article li::marker { color: var(--accent); }

strong { color: var(--accent); font-weight: 600; }
a { color: var(--accent); }

.destaque {
  margin: 26px 0;
  padding: 18px 22px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text);
}

/* Checklists de aula */
.aulas { list-style: none; margin-left: 0 !important; }
.aulas li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.aulas li:last-child { border-bottom: 0; }
.aulas .num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}
.aulas h3 { margin: 0 0 4px; font-size: 1.02rem; }
.aulas p { margin: 0; color: var(--text-muted); font-size: 0.92rem; }

/* Link para abrir na live */
.live-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 8px 18px;
  background: var(--accent2-soft);
  border: 1px solid color-mix(in srgb, var(--accent2) 45%, transparent);
  border-radius: 999px;
  color: var(--accent2);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: background 0.2s ease;
}
.live-link:hover { background: color-mix(in srgb, var(--accent2-soft) 160%, transparent); }

/* ---------- Widget discreto da live (fixo de canto) ---------- */
.studio-widget {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 50;
  width: 176px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}
html[data-theme="dark"] .studio-widget {
  background: rgba(18, 16, 26, 0.92);
  box-shadow: 0 6px 24px rgba(0,0,0,0.55);
}
.studio-widget:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.24), 0 0 18px var(--accent-soft);
}

.studio-player {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg);
}
.studio-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Overlay por cima: disfarça o player, segura o rótulo */
.studio-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 10px;
  background: linear-gradient(0deg, rgba(255,255,255,0.82) 0%, rgba(255,255,255,0.12) 55%, transparent 100%);
}
html[data-theme="dark"] .studio-overlay {
  background: linear-gradient(0deg, rgba(18,16,26,0.82) 0%, rgba(18,16,26,0.12) 55%, transparent 100%);
}
.studio-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live-dot);
  box-shadow: 0 0 6px var(--live-dot);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--live-dot); }
  50%      { opacity: 0.45; box-shadow: none; }
}
.studio-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 3px 10px;
  background: var(--accent2-soft);
  border: 1px solid color-mix(in srgb, var(--accent2) 45%, transparent);
  border-radius: 999px;
  color: var(--accent2);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background 0.2s ease;
}
.studio-cta:hover { background: color-mix(in srgb, var(--accent2-soft) 160%, transparent); }

/* ---------- Toolbar: busca + filtros (index) ---------- */
.toolbar {
  padding: 8px 0 28px;
}
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 440px;
  margin-bottom: 14px;
}
.search-ico {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  opacity: 0.7;
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-input::placeholder { color: var(--text-faint); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 6px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
html[data-theme="dark"] .chip.active { color: #1a1018; }
.toolbar-count {
  margin-top: 14px;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* ---------- Conta / perfil (login) ---------- */
.auth-slot { flex-shrink: 0; }
.auth-btn {
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: all 0.2s ease;
}
.auth-btn.login {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auth-btn.login:hover { filter: brightness(1.1); }
html[data-theme="dark"] .auth-btn.login { color: #1a1018; }
.auth-btn.logout {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}
.auth-btn.logout:hover { border-color: var(--accent); color: var(--accent); }

.profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.profile-avatar {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
}
html[data-theme="dark"] .profile-avatar { color: #1a1018; }
.profile-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Modal de login ---------- */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,0.5);
  padding: 20px;
}
.auth-modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.auth-modal-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--accent);
  margin-bottom: 8px;
}
.auth-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-bottom: 18px;
}
.auth-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  margin-bottom: 16px;
}
.auth-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.auth-actions {
  display: flex;
  gap: 10px;
}
.auth-primary {
  flex: 1;
  padding: 11px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
html[data-theme="dark"] .auth-primary { color: #1a1018; }
.auth-cancel {
  padding: 11px 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.auth-cancel:hover { border-color: var(--border-strong); }

/* ---------- Barra de progresso do curso ---------- */
.progress-bar-wrap {
  margin: 0 0 30px;
  padding: 16px 18px;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.progress-user { font-weight: 600; color: var(--accent); }
.progress-nums { font-weight: 700; color: var(--accent); }
.progress-nums.dim { color: var(--text-faint); }
.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
  transition: width 0.3s ease;
}
.progress-login-cta {
  margin-top: 12px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.progress-login-cta:hover { background: var(--accent-soft); }

/* Checklists com estado "feito" */
.aulas li { position: relative; cursor: pointer; }
.aulas .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  align-self: center;
  border-radius: 6px;
  border: 2px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  color: transparent;
  transition: all 0.2s ease;
}
.aulas .check.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.aulas .check.on::after { content: "✓"; }
html[data-theme="dark"] .aulas .check.on { color: #1a1018; }
.aulas li.done h3,
.aulas li.done p {
  opacity: 0.6;
  text-decoration: line-through;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 30px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* Marca no rodapé: logo pequena + SABERLIVRE na fonte display, cores da marca */
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  text-decoration: none;
}
.footer-brand .logo-mini {
  height: 34px;
  width: auto;
  display: block;
}
.footer-brand .brand-name {
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -1px;
  font-family: var(--font-display);
  color: var(--text);
}
.footer-brand .brand-name em {
  font-style: normal;
  color: var(--accent);
}
.footer-tagline {
  color: var(--text-muted);
  margin-bottom: 4px;
}
.footer-note {
  color: var(--text-faint);
  font-size: 0.78rem;
}

/* ---------- Responsivo ---------- */
@media (max-width: 640px) {
  .hero { padding: 56px 16px 44px; }
  article.curso { margin-top: 24px; padding: 32px 20px; }
  .studio-widget { width: 148px; bottom: 12px; right: 12px; }
}

/* Fallback de cor-mix para navegadores antigos */
@supports not (color: color-mix(in srgb, red, blue)) {
  .card .meta .gratis { border-color: rgba(22, 163, 74, 0.4); }
  .live-link { border-color: rgba(22, 163, 74, 0.4); }
  .studio-cta { border-color: rgba(22, 163, 74, 0.4); }
}