:root {
  --bg: #04070e;
  --bg-2: rgba(255,255,255,0.035);
  --bg-3: rgba(255,255,255,0.06);
  --accent: #c5f24a;
  --accent-dark: #b2e235;
  --cream: #f4f1e9;
  --text: #f4f3ef;
  --text-muted: #aab2c0;
  --text-dim: #6f7888;
  --border: rgba(255,255,255,0.09);
  --pad: clamp(20px, 4vw, 56px);   /* respiro lateral das fileiras */
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rows-container { padding: 0 var(--pad); }

/* ── Topbar (fixa, estilo streaming) ── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px var(--pad);
  background: linear-gradient(rgba(4,7,14,.85), transparent);
  transition: background .3s;
}
.topbar.solid { background: rgba(4,7,14,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; position: relative; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 32px; width: auto; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

/* Busca recolhida: só o ícone; expande ao clicar */
.search-box {
  display: flex; align-items: center; gap: 0;
  background: rgba(4,7,14,.6); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 11px; cursor: pointer;
  transition: border-color .2s, gap .25s, padding .25s;
}
.search-box:hover { border-color: rgba(255,255,255,.25); }
.search-box.open { gap: 9px; padding: 9px 16px; cursor: default; border-color: var(--accent); }
.search-box svg { width: 16px; height: 16px; color: var(--text-dim); flex-shrink: 0; }
.search-box.open svg { color: var(--text-muted); }
.search-box input {
  width: 0; opacity: 0; background: none; border: none; outline: none;
  color: var(--text); font-family: inherit; font-size: 16px; padding: 0;
  transition: width .25s ease, opacity .2s;
}
.search-box.open input { width: 220px; opacity: 1; }
.search-box input::placeholder { color: var(--text-dim); }
/* Esconde o X nativo do input type=search (já temos o nosso) */
.search-box input::-webkit-search-cancel-button,
.search-box input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
#busca-fechar {
  display: none; background: none; border: none; cursor: pointer;
  padding: 2px; flex-shrink: 0; color: var(--text-dim);
}
#busca-fechar:hover { color: var(--text); }
#busca-fechar svg { width: 15px; height: 15px; display: block; }
.search-box.open #busca-fechar { display: block; }
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  .topbar-inner { gap: 10px; }
  .logo { flex-shrink: 0; }
  .logo img { height: 26px; }
  .topbar-right { gap: 8px; min-width: 0; }
  /* Busca aberta no mobile: ocupa a barra inteira, por cima da logo e do chip */
  .search-box.open {
    position: absolute; left: 0; right: 0; top: 50%;
    transform: translateY(-50%); z-index: 10;
    background: #060a13;                       /* sólido: nada aparece por baixo */
    box-shadow: 0 0 0 14px #04070e;            /* cobre o respiro da barra ao redor */
  }
  .search-box.open input { flex: 1; width: auto; font-size: 16px; }
  .user-chip { padding: 4px; gap: 6px; }
  .user-chip .chip-name { display: none; }   /* mobile: só avatar + sair */
  .user-chip button { padding-right: 6px; }
}

.user-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 13px 6px 7px; border-radius: 999px;
  background: rgba(4,7,14,.6); border: 1px solid var(--border);
  font-size: 13px; color: var(--text); font-weight: 600; white-space: nowrap;
}
.user-chip .avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent);
  color: #0a1628; font-size: 12px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.user-chip button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 11px; font-family: inherit; padding: 0; }
.user-chip button:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; background: var(--cream);
  color: #0a0e17; border: none; border-radius: 999px; font-weight: 800;
  font-size: 14px; text-decoration: none; cursor: pointer;
  transition: box-shadow .25s, transform .1s, background .2s; font-family: inherit;
}
.btn:hover { box-shadow: 0 0 0 1px rgba(255,255,255,.12), 0 10px 50px rgba(197,242,74,.28); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost {
  background: rgba(255,255,255,.12); color: var(--text);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { background: rgba(255,255,255,.2); box-shadow: none; }

/* ── Billboard ── */
.billboard {
  position: relative; min-height: clamp(420px, 62vh, 640px);
  display: flex; align-items: flex-end;
  isolation: isolate; overflow: hidden;
}
.billboard-bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.billboard-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 80% 22%; }
/* Vídeo de fundo: 16:9 centralizado, dimensionado para cobrir o billboard (cover) */
.billboard-bg iframe {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw; height: 56.25vw;          /* 16:9 da largura da tela */
  min-height: 100%; min-width: 177.78vh;  /* garante cobertura em telas estreitas */
  border: 0;
}
.billboard::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, var(--bg) 0%, rgba(4,7,14,.94) 30%, rgba(4,7,14,.7) 50%, rgba(4,7,14,.35) 75%, rgba(4,7,14,.18) 100%),
    linear-gradient(180deg, rgba(4,7,14,.4) 0%, rgba(4,7,14,.12) 30%, rgba(4,7,14,.12) 58%, var(--bg) 100%);
}
/* Mobile: o texto fica embaixo do vídeo, então o degradê vem de baixo para cima */
@media (max-width: 720px) {
  .billboard::before {
    background:
      linear-gradient(0deg, var(--bg) 0%, rgba(4,7,14,.92) 24%, rgba(4,7,14,.58) 46%, rgba(4,7,14,.25) 70%, rgba(4,7,14,.38) 100%);
  }
}
.billboard-content { padding: 110px var(--pad) 64px; max-width: 640px; }
.billboard-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.billboard h1 {
  font-size: clamp(26px, 3.4vw, 44px); font-weight: 800;
  line-height: 1.1; letter-spacing: -1px; margin-bottom: 10px;
  text-shadow: 0 2px 24px rgba(0,0,0,.5);
}
.billboard .bb-speaker { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.billboard .bb-desc { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; max-width: 480px; }
.billboard .bb-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.billboard .bb-progress { margin-top: 18px; max-width: 340px; }
.billboard .bb-progress .tp-bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; margin-bottom: 6px; }
.billboard .bb-progress .tp-bar span { display: block; height: 100%; background: var(--accent); }
.billboard .bb-progress .tp-label { font-size: 12px; color: var(--text-muted); font-weight: 600; }

/* ── Fileiras ── */
.row-section { margin: 34px 0 6px; }
.row-head {
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--pad); margin-bottom: 12px;
}
.row-icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px;
  background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center;
}
.row-icon svg {
  width: 18px; height: 18px; fill: none; stroke: var(--accent);
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.row-title { font-size: clamp(17px, 1.6vw, 21px); font-weight: 800; letter-spacing: -.3px; }
.row-meta { font-size: 12px; color: var(--text-dim); font-weight: 600; }
.row-meta.done { color: var(--accent); }
.row-wrap { position: relative; }
.row-scroller {
  display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth;
  padding: 6px var(--pad) 18px; scroll-snap-type: x proximity;
  scroll-padding-left: var(--pad);   /* após rolar, o card encosta alinhado na margem */
  scrollbar-width: none; -ms-overflow-style: none;
}
.row-scroller::-webkit-scrollbar { display: none; }
.row-arrow {
  position: absolute; top: 0; bottom: 18px; width: 48px; z-index: 5;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, rgba(4,7,14,.85), transparent);
  border: none; color: var(--text); cursor: pointer;
  opacity: 0; transition: opacity .2s;
}
.row-arrow.next { right: 0; background: linear-gradient(-90deg, rgba(4,7,14,.85), transparent); }
.row-arrow.prev { left: 0; }
.row-wrap:hover .row-arrow { opacity: 1; }
.row-arrow svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.row-arrow:hover svg { stroke: var(--accent); }

/* ── Card de aula (fileira) ── */
.n-card {
  flex: 0 0 clamp(220px, 22vw, 300px); scroll-snap-align: start;
  cursor: pointer; border-radius: 10px; position: relative;
  transition: transform .22s ease, box-shadow .22s ease;
}
/* Zoom no hover só onde há mouse de verdade — no touch ele causa
   travamentos ao arrastar e não tem função */
@media (hover: hover) {
  .n-card:hover { transform: scale(1.05); z-index: 3; box-shadow: 0 14px 44px rgba(0,0,0,.55); }
  /* O 1º card da fileira expande só para a direita (mantém o alinhamento da margem);
     o último, só para a esquerda. */
  .row-scroller .n-card:first-child { transform-origin: left center; }
  .row-scroller .n-card:last-child { transform-origin: right center; }
}
.n-thumb {
  position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.n-thumb img { width: 100%; height: 100%; object-fit: cover; }
.n-card.locked .n-thumb img { filter: grayscale(60%) brightness(.4); }
.n-hover {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(4,7,14,.35); opacity: 0; transition: opacity .2s;
}
.n-card:hover .n-hover { opacity: 1; }
.n-card.locked .n-hover { opacity: 1; background: rgba(4,7,14,.5); }
.play-circle {
  width: 46px; height: 46px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.play-circle svg { width: 17px; height: 17px; fill: #0a1628; margin-left: 2px; }
.n-hover .lock-ico { width: 26px; height: 26px; stroke: var(--text-muted); fill: none; }
.n-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px;
  background: rgba(4,7,14,.85); color: var(--text-dim); border: 1px solid var(--border);
}
.n-badge.done { color: #0a1628; background: var(--accent); border-color: var(--accent); }
.n-badge.soon { color: var(--text-dim); }
.progress-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255,255,255,.18); z-index: 2; }
.progress-bar span { display: block; height: 100%; background: var(--accent); }
.n-body { padding: 9px 2px 0; }
.n-title {
  font-size: 12.5px; font-weight: 700; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.n-speaker { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }

/* ── Resultados de busca ── */
.search-results { padding: 110px 0 40px; min-height: 60vh; }
.search-grid {
  display: grid; gap: 18px 12px; margin-top: 18px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.search-grid .n-card { flex: none; }
.empty-note { color: var(--text-dim); font-size: 14px; margin-top: 10px; }

/* ── Footer ── */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; text-align: center; color: var(--text-dim); font-size: 13px; }
.footer-logos { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 16px; }
.vertical-tag { padding: 5px 10px; background: var(--bg-2); border-radius: 4px; font-size: 11px; color: var(--text-muted); border: 1px solid var(--border); }

/* ── Modais ── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(4,9,20,.85);
  backdrop-filter: blur(4px); display: none; align-items: center;
  justify-content: center; padding: 5%; z-index: 1000;
}
.modal-overlay.show { display: flex; }
.modal-card {
  background: #0a0f1a; border: 1px solid var(--border); border-radius: 20px;
  padding: 32px 28px; width: 100%; max-width: 420px; position: relative;
  max-height: 92vh; overflow-y: auto;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.modal-tag {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent);
  border: 1px solid rgba(197,242,74,.3); padding: 4px 10px;
  border-radius: 999px; margin-bottom: 16px;
}
.modal-card h2 { font-size: 22px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; text-align: center; }
.modal-card h2 span, .modal-card h3 span { color: var(--accent); }
.modal-card h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.modal-sub { font-size: 13px; color: var(--text-dim); text-align: center; margin-bottom: 20px; }
.form-step { display: none; }
.form-step.active { display: block; }
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%; padding: 13px 14px; background: #11182a;
  border: 1px solid var(--border); border-radius: 10px; color: var(--text);
  font-size: 16px; font-family: inherit;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--accent); }
.modal-submit {
  width: 100%; padding: 14px; background: var(--accent); color: #0a1628;
  border: none; border-radius: 8px; font-family: inherit; font-size: 14px;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: background .2s; display: flex;
  align-items: center; justify-content: center; gap: 8px;
}
.modal-submit:hover { background: var(--accent-dark); }
.modal-submit:disabled { opacity: .6; cursor: default; }
.btn-loading svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-note { font-size: 11px; color: var(--text-dim); text-align: center; margin-top: 12px; line-height: 1.5; }
.modal-error { font-size: 12px; color: #ff7a7a; margin-bottom: 10px; min-height: 16px; }
.btn-voltar { width: 100%; background: none; border: none; color: var(--text-dim); font-size: 12px; font-family: inherit; cursor: pointer; margin-top: 12px; }
.modal-welcome { text-align: center; }
.modal-welcome-icon svg { width: 48px; height: 48px; stroke: var(--accent); fill: none; margin: 0 auto 14px; }
.modal-welcome p { font-size: 13px; color: var(--text-dim); margin: 8px 0 20px; }
.locked-modal-card { text-align: center; }
.locked-modal-close { position: absolute; top: 14px; right: 14px; background: none; border: none; cursor: pointer; }
.locked-modal-close svg { width: 20px; height: 20px; stroke: var(--text-dim); fill: none; }
.locked-modal-icon svg { width: 44px; height: 44px; stroke: var(--accent); fill: none; margin: 4px auto 14px; }
.locked-modal-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.locked-modal-aula { font-size: 13px; color: var(--accent); font-weight: 600; margin-bottom: 12px; }
.locked-modal-body { font-size: 13px; color: var(--text-dim); line-height: 1.6; margin-bottom: 20px; }

/* ── Página da aula ── */
.aula-page { padding: 96px 0 72px; }
.aula-breadcrumb { font-size: 12px; color: var(--text-dim); margin-bottom: 18px; }
.aula-breadcrumb a { color: var(--text-dim); text-decoration: none; }
.aula-breadcrumb a:hover { color: var(--accent); }
.aula-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.player-wrap {
  border-radius: 18px; padding: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(197,242,74,.35);
  box-shadow: 0 0 0 1px rgba(197,242,74,.12), 0 0 40px rgba(197,242,74,.1),
              inset 0 0 0 1px rgba(255,255,255,.05), 0 30px 80px rgba(0,0,0,.45);
}
.player-frame { width: 100%; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; background: #000; position: relative; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Player custom: cobre a UI do YouTube e usa controles próprios */
.player-cover { position: absolute; inset: 0; z-index: 4; cursor: pointer; }
.player-poster {
  position: absolute; inset: 0; z-index: 5; pointer-events: none;
  opacity: 1; transition: opacity .3s;
  background: #04070e;
}
.player-frame.playing .player-poster { opacity: 0; }
.player-poster img { width: 100%; height: 100%; object-fit: cover; }
.player-poster-shade { position: absolute; inset: 0; background: rgba(4,7,14,.45); }
.player-big {
  position: absolute; inset: 0; z-index: 6; display: flex;
  align-items: center; justify-content: center; pointer-events: none;
  opacity: 0; transition: opacity .2s;
}
.player-frame.paused .player-big { opacity: 1; }
.player-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
  padding: 26px 14px 10px;
  background: linear-gradient(transparent, rgba(4,7,14,.88));
  opacity: 0; transition: opacity .25s;
}
.player-frame.paused .player-controls,
.player-frame:hover .player-controls,
.player-frame.show-controls .player-controls { opacity: 1; }
/* Touch: não existe hover/mousemove — controles sempre visíveis */
@media (hover: none) {
  .player-controls { opacity: 1; }
}
.pc-row { display: flex; align-items: center; gap: 6px; }
.pc-btn {
  background: none; border: none; color: var(--text); cursor: pointer;
  width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s; font-family: inherit;
}
.pc-btn:hover { background: rgba(255,255,255,.12); }
.pc-btn svg { width: 20px; height: 20px; fill: currentColor; }
.pc-btn#pc-back svg, .pc-btn#pc-fwd svg, .pc-btn#pc-fs svg { fill: none; }
.pc-speed { width: auto; padding: 0 10px; font-size: 13px; font-weight: 800; }
.pc-time { font-size: 12.5px; color: var(--text-muted); font-weight: 600; margin-left: 6px; font-variant-numeric: tabular-nums; }
.pc-seek { padding: 8px 4px; cursor: pointer; }
.pc-seek-track { position: relative; height: 4px; border-radius: 999px; background: rgba(255,255,255,.22); transition: height .15s; }
.pc-seek:hover .pc-seek-track { height: 6px; }
.pc-seek-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--accent); }
.pc-seek-dot {
  position: absolute; top: 50%; left: 0; width: 13px; height: 13px;
  border-radius: 50%; background: var(--accent);
  transform: translate(-50%, -50%) scale(0); transition: transform .15s;
}
.pc-seek:hover .pc-seek-dot { transform: translate(-50%, -50%) scale(1); }
.player-frame:fullscreen { border-radius: 0; aspect-ratio: auto; }
.player-frame:fullscreen iframe { height: 100%; }
/* Tela cheia "fake" para iPhone (sem Fullscreen API em elementos) */
.player-frame.fs-fake {
  position: fixed; inset: 0; z-index: 3000;
  border-radius: 0; aspect-ratio: auto; background: #000;
}
body.no-scroll { overflow: hidden; }

.aula-info { padding: 24px 8px 0; }
.aula-info .event-tag-label {
  font-size: 11px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}
.aula-info h1 { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; margin-bottom: 8px; }
.aula-info .speaker { font-size: 15px; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.aula-meta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.aula-progress-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--text-muted);
  padding: 7px 14px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--border);
}
.aula-progress-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* Materiais complementares */
.materiais { margin-top: 26px; }
.materiais h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.materiais-list { display: flex; flex-direction: column; gap: 8px; }
/* cartão de download fica compacto; o guia (material-conteudo) usa a largura toda */
.materiais-list .material-item { max-width: 480px; }
.material-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; text-decoration: none;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  transition: border-color .2s, background .2s;
}
.material-item:hover { border-color: var(--accent); background: var(--bg-3); }
.material-icon {
  width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px;
  background: rgba(197,242,74,.1); display: flex; align-items: center; justify-content: center;
}
.material-icon svg { width: 16px; height: 16px; stroke: var(--accent); }
.material-info { display: flex; flex-direction: column; min-width: 0; }
.material-title { font-size: 13px; font-weight: 700; line-height: 1.3; }
.material-ext { font-size: 10.5px; color: var(--text-dim); font-weight: 700; letter-spacing: .06em; }

/* Sidebar: aulas da trilha */
.sidebar h3 { font-size: 16px; font-weight: 800; margin-bottom: 4px; }
.sidebar .sidebar-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; }
.next-list { display: flex; flex-direction: column; gap: 12px; }
.next-item {
  display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px; cursor: pointer; text-decoration: none; color: var(--text);
  transition: border-color .2s;
}
.next-item:hover { border-color: var(--accent); }
.next-item.current { border-color: rgba(197,242,74,.5); background: var(--bg-3); }
.next-thumb { position: relative; aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; background: var(--bg-3); }
.next-thumb img { width: 100%; height: 100%; object-fit: cover; }
.next-title { font-size: 12.5px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.next-speaker { font-size: 11px; color: var(--text-dim); }

/* Autoplay: próxima aula da trilha */
.ap-overlay {
  position: absolute; inset: 0; z-index: 8;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(4,7,14,.93), rgba(4,7,14,.97));
  backdrop-filter: blur(4px); padding: 4%;
}
.ap-inner { display: flex; gap: 4%; align-items: center; width: 100%; max-width: 680px; }
.ap-thumb {
  position: relative; flex: 0 0 38%; aspect-ratio: 16/9;
  border-radius: 10px; overflow: hidden; border: 1px solid rgba(197,242,74,.25);
  background: var(--bg-3);
}
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ap-ring { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4,7,14,.45); }
.ap-ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.ap-ring circle { fill: none; stroke-width: 4; }
.ap-track { stroke: rgba(255,255,255,.18); }
.ap-prog  { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.ap-count { position: absolute; font-size: 22px; font-weight: 800; color: var(--text); }
.ap-info { flex: 1; min-width: 0; }
.ap-label { font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.ap-title {
  font-size: clamp(15px,1.7vw,20px); font-weight: 800; color: var(--text);
  line-height: 1.3; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ap-speaker { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 16px; }
.ap-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ap-btn {
  font-family: inherit; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 10px 18px; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.05);
  color: var(--text); cursor: pointer; transition: background .2s, border-color .2s;
}
.ap-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.32); }
.ap-btn.primary { background: var(--accent); color: #0a1628; border-color: var(--accent); }
.ap-btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
@media (max-width: 600px) {
  .ap-inner { flex-direction: column; gap: 14px; }
  .ap-thumb { flex: 0 0 auto; width: 58%; }
  .ap-info { text-align: center; }
  .ap-actions { justify-content: center; }
}

@media (max-width: 980px) { .aula-layout { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  /* 1 card e meio visíveis; sem snap nem transição — arraste liso */
  .n-card { flex: 0 0 62vw; transition: none; }
  .n-hover { display: none; }                 /* overlay de hover não existe no touch */
  .n-card.locked .n-hover { display: flex; }  /* cadeado continua visível */
  .row-scroller { scroll-snap-type: none; gap: 10px; }
  .row-arrow { display: none; }               /* no touch, arrasta com o dedo */
}
@media (max-width: 560px) {
  .aula-info h1 { font-size: 22px; }
  .billboard-content { padding-bottom: 44px; }
}

/* Logo no footer */
.footer-logo { height: 26px; width: auto; margin: 0 auto 14px; opacity: .85; }

/* Indicador de estudo do mês */
.estudo-card {
  display: flex; align-items: center; gap: 18px;
  margin: 26px var(--pad) 0; padding: 18px 22px;
  background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 14px; backdrop-filter: blur(12px);
}
.estudo-badge {
  flex-shrink: 0; padding: 10px 16px; border-radius: 10px;
  background: rgba(197,242,74,.12); border: 1px solid rgba(197,242,74,.35);
  color: var(--accent); font-size: 15px; font-weight: 800; white-space: nowrap;
}
.estudo-info { flex: 1; min-width: 0; }
.estudo-titulo { font-size: 14.5px; font-weight: 800; }
.estudo-texto { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.estudo-card .row-icon { flex-shrink: 0; }
@media (max-width: 640px) {
  .estudo-card { gap: 12px; padding: 14px 16px; }
  .estudo-card .row-icon { display: none; }
}

/* Modal de perfil (clique no avatar) */
.user-chip .avatar { cursor: pointer; transition: box-shadow .2s; }
.user-chip .avatar:hover { box-shadow: 0 0 0 3px rgba(197,242,74,.3); }
.perfil-card { max-width: 380px; text-align: center; }
.perfil-head { display: flex; align-items: center; gap: 14px; text-align: left; margin-bottom: 18px; }
.perfil-avatar {
  width: 52px; height: 52px; border-radius: 50%; background: var(--accent);
  color: #0a1628; font-size: 22px; font-weight: 800; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.perfil-nome { font-size: 16px; font-weight: 800; }
.perfil-email { font-size: 12px; color: var(--text-dim); }
.perfil-estudo {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 16px; margin-bottom: 6px;
}
.perfil-estudo .estudo-badge { display: inline-block; margin-bottom: 10px; }
.perfil-estudo .estudo-titulo { font-size: 14.5px; font-weight: 800; line-height: 1.35; }
.perfil-estudo .estudo-texto { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }

/* ── Página de perfil ── */
.perfil-page { padding: 96px 0 60px; }
.perfil-page .perfil-head { margin: 8px 0 26px; }
.perfil-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 800px) { .perfil-grid { grid-template-columns: 1fr; } }
.perfil-bloco {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 22px;
}
.perfil-bloco h3 { font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }
.perfil-bloco .perfil-estudo { background: none; border: 0; padding: 0; margin: 0; }
.conquistas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.conquista { border-top: 2px solid var(--accent); padding-top: 8px; }
.conquista .num { font-size: 24px; font-weight: 800; line-height: 1.1; }
.conquista .rot { font-size: 11.5px; color: var(--text-dim); margin-top: 2px; }
.perfil-trilhas { display: flex; flex-direction: column; gap: 12px; }
.perfil-trilha { display: block; text-decoration: none; color: var(--text); }
.perfil-trilha .pt-topo { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.perfil-trilha .pt-nome { font-size: 13.5px; font-weight: 700; }
.perfil-trilha .pt-count { font-size: 11.5px; color: var(--text-dim); font-weight: 700; white-space: nowrap; }
.perfil-trilha .pt-count.done { color: var(--accent); }
.perfil-trilha:hover .pt-nome { color: var(--accent); }
.tp-bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.tp-bar span { display: block; height: 100%; background: var(--accent); }

/* Atalhos por trilha */
.atalhos-wrap { margin: 34px 0 6px; }
.atalhos {
  display: grid; grid-template-rows: repeat(4, auto); grid-auto-flow: column;
  grid-auto-columns: clamp(280px, 32vw, 380px);
  gap: 12px; overflow-x: auto; padding: 4px var(--pad) 16px;
  scroll-snap-type: x proximity; scroll-padding-left: var(--pad);
  scrollbar-width: none; -ms-overflow-style: none;
}
.atalhos::-webkit-scrollbar { display: none; }
.atalho {
  display: flex; align-items: center; gap: 14px; text-align: left;
  padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  font-family: inherit; scroll-snap-align: start;
  transition: border-color .2s, background .2s;
}
.atalho:hover { border-color: var(--accent); background: var(--bg-3); }
.atalho:hover .atalho-seta { transform: translateX(3px); color: var(--accent); }
.atalho-icon {
  width: 42px; height: 42px; border-radius: 11px; background: rgba(255,255,255,.05);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.atalho-icon svg { width: 19px; height: 19px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.atalho-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.atalho-nome { font-size: 14px; font-weight: 800; line-height: 1.25; }
.atalho-meta { font-size: 11.5px; color: var(--text-dim); font-weight: 600; }
.atalho-seta { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-dim); transition: transform .2s, color .2s; }
@media (max-width: 640px) {
  /* Mobile: lista vertical com todas as trilhas, sem arrastar */
  .atalhos {
    grid-template-rows: none; grid-auto-flow: row;
    grid-template-columns: 1fr !important; grid-auto-columns: unset !important;
    overflow-x: visible; gap: 10px;
  }
  .atalho { scroll-snap-align: unset; }
}
/* Âncora com folga da topbar fixa */
.row-section { scroll-margin-top: 84px; }

/* Arrastar para rolar (desktop) */
.row-scroller, .atalhos { cursor: grab; }
.row-scroller.arrastando, .atalhos.arrastando {
  cursor: grabbing; user-select: none;
  scroll-behavior: auto;          /* sem animação durante o arrasto */
  scroll-snap-type: none;         /* snap desligado enquanto arrasta */
}
.arrastando .n-card { pointer-events: none; }  /* sem hover/zoom no meio do arrasto */

/* Abas do perfil (continue assistindo / concluídas) */
.perfil-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.perfil-tab {
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--border); color: var(--text-dim);
  font-family: inherit; font-size: 12px; font-weight: 800;
  transition: border-color .2s, color .2s, background .2s;
}
.perfil-tab:hover { color: var(--text); }
.perfil-tab.active { border-color: var(--accent); color: var(--accent); background: rgba(197,242,74,.08); }
.perfil-vazio { font-size: 12.5px; color: var(--text-dim); }

/* Botão carregar mais (perfil) */
.carregar-mais {
  width: 100%; padding: 10px; margin-top: 4px;
  background: none; border: 1px dashed var(--border); border-radius: 10px;
  color: var(--text-dim); font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: border-color .2s, color .2s;
}
.carregar-mais:hover { border-color: var(--accent); color: var(--accent); }

/* ── Skeleton loading (placeholders enquanto a API responde) ── */
.sk {
  position: relative; overflow: hidden; display: block;
  background: rgba(255,255,255,.055); border-radius: 8px;
}
.sk::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.09), transparent);
  animation: sk-shimmer 1.4s infinite;
}
@keyframes sk-shimmer { to { transform: translateX(100%); } }
.sk-row { margin: 34px 0 6px; }
.sk-title { height: 22px; width: 220px; margin: 0 var(--pad) 14px; }
.sk-cards { display: flex; gap: 12px; padding: 0 var(--pad); overflow: hidden; }
.sk-card { flex: 0 0 clamp(220px, 22vw, 300px); }
.sk-thumb { aspect-ratio: 16/9; border-radius: 10px; }
.sk-line { height: 12px; margin-top: 9px; width: 85%; }
.sk-line.curta { width: 50%; margin-top: 6px; }
.sk-bb { position: absolute; inset: 0; z-index: -3; }
.sk-item { height: 78px; border-radius: 12px; margin-bottom: 12px; }

/* Avaliação em estrelas */
.avaliacao { display: inline-flex; align-items: center; gap: 10px; }
.avaliacao-label { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.estrelas { display: inline-flex; gap: 4px; }
.estrela {
  background: none; border: none; cursor: pointer; padding: 2px;
  display: flex; align-items: center; justify-content: center;
}
.estrela svg {
  width: 22px; height: 22px; fill: none;
  stroke: var(--text-dim); stroke-width: 1.6;
  transition: fill .12s, stroke .12s, transform .12s;
}
.estrela:hover svg { transform: scale(1.15); }
.estrela.on svg { fill: var(--accent); stroke: var(--accent); }
.ap-avaliar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
@media (max-width: 600px) { .ap-avaliar { justify-content: center; } }

/* ── Material complementar: guia lido inline na página ────────────────────
   O conteúdo vem do banco (sanitizado no servidor) e é re-estilizado aqui pro
   tema dark/lime. Tudo escopado sob .material-conteudo para não vazar. ───── */
/* Guia lido inline, logo abaixo do cartão de download do material. */
.material-conteudo {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-2);
  margin: 14px 0 18px;                 /* respiro entre o cartão de download e o guia */
  padding: 18px 22px 26px;
  font-size: 14.5px; line-height: 1.62; color: var(--text);
}
.material-conteudo section { padding: 20px 0; border-top: 1px solid var(--border); }
.material-conteudo section:first-child { border-top: 0; }
.material-conteudo h2 { font-size: 19px; font-weight: 800; line-height: 1.28; margin: 4px 0 10px; }
.material-conteudo h3 { font-size: 15.5px; font-weight: 700; margin: 16px 0 6px; }
.material-conteudo p { margin: 0 0 10px; color: var(--text-muted); }
.material-conteudo b, .material-conteudo strong { color: var(--text); font-weight: 700; }
.material-conteudo sup { font-size: .7em; color: var(--accent); }

/* eyebrow: rótulo de seção */
.material-conteudo .eyebrow {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
/* lead / sub / mote / destaque / alerta / marco: parágrafos com ênfase */
.material-conteudo .lead { font-size: 16px; color: var(--text); font-weight: 600; }
.material-conteudo .sub { color: var(--text-muted); }
.material-conteudo .mote {
  border-left: 3px solid var(--accent); padding: 8px 0 8px 16px; margin: 14px 0;
  font-style: italic; font-size: 15.5px; color: var(--text);
}
.material-conteudo .destaque {
  background: rgba(197,242,74,.09); border: 1px solid rgba(197,242,74,.25);
  border-radius: 10px; padding: 12px 16px; color: var(--text); font-weight: 600;
}
.material-conteudo .alerta {
  background: rgba(255,255,255,.04); border-left: 3px solid var(--text-dim);
  border-radius: 6px; padding: 8px 14px; font-size: 13px; color: var(--text-muted);
}
.material-conteudo .marco { font-weight: 700; color: var(--accent-dark); font-size: 13.5px; }

/* caso clínico */
.material-conteudo .caso { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 8px; }
.material-conteudo .rotulo, .material-conteudo .frente, .material-conteudo .campo, .material-conteudo .tag {
  font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 6px;
}
.material-conteudo .quote {
  font-size: 17px; font-weight: 700; font-style: italic; line-height: 1.4;
  color: var(--text); margin-bottom: 12px;
}

/* stats: painel de números */
.material-conteudo .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.material-conteudo .stat {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--bg-2);
}
.material-conteudo .num { font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1; }
.material-conteudo .rot { font-weight: 700; font-size: 13px; margin: 6px 0 8px; color: var(--text); }
.material-conteudo .fonte { font-size: 11px; color: var(--text-dim); margin-top: 8px; }

/* conceitos: lista de definições */
.material-conteudo .conceitos { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.material-conteudo .conceitos li {
  border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg-2);
}
.material-conteudo .conceitos li b { display: block; margin-bottom: 2px; }
.material-conteudo .conceitos li span { font-size: 13px; color: var(--text-muted); }

/* etapas: protocolo passo a passo */
.material-conteudo .etapas { display: grid; gap: 10px; }
.material-conteudo .etapa {
  display: grid; grid-template-columns: 150px 1fr; gap: 14px;
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: var(--bg-2);
}
.material-conteudo .etapa .tag { color: var(--accent); }
.material-conteudo .etapa .tag small { display: block; color: var(--text-dim); font-weight: 600; text-transform: none; letter-spacing: 0; margin-top: 2px; }

/* produtos */
.material-conteudo .produtos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.material-conteudo .produto {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg-2);
}
.material-conteudo .produto .nome { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }

/* segurança: duas colunas */
.material-conteudo .duascol { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.material-conteudo .seguranca {
  border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: var(--bg-2);
}
.material-conteudo .seguranca ul { margin-left: 18px; }
.material-conteudo .seguranca li { font-size: 13.5px; color: var(--text-muted); margin-bottom: 4px; }

/* tabelas */
.material-conteudo table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.material-conteudo th {
  text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-dim); padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.material-conteudo td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.material-conteudo td:first-child { color: var(--text); font-weight: 600; }

/* listas gerais e referências */
.material-conteudo ul, .material-conteudo ol { margin: 0 0 10px 20px; color: var(--text-muted); }
.material-conteudo li { margin-bottom: 5px; }
.material-conteudo .refs { font-size: 12px; }
.material-conteudo .refs ol { margin-left: 18px; }
.material-conteudo .refs li { color: var(--text-dim); margin-bottom: 8px; line-height: 1.45; }
.material-conteudo .refs i { color: var(--text-muted); }

/* Mobile: colunas viram 1 e as tabelas empilham como cards — as células têm
   frases longas, então tabela horizontal (ou nowrap) estoura a largura da tela. */
@media (max-width: 768px) {
  .material-conteudo { padding: 14px 16px 20px; }
  /* anti-vazamento: itens de grid/flex podem se recusar a encolher abaixo do
     conteúdo (min-width:auto), e DOIs/palavras longas não quebram sozinhos */
  .material-conteudo * { min-width: 0; max-width: 100%; }
  .material-conteudo { overflow-wrap: break-word; word-break: break-word; }
  .material-conteudo .num { font-size: 26px; }
  .material-conteudo h2 { font-size: 17px; }
  .material-conteudo .caso,
  .material-conteudo .stats,
  .material-conteudo .conceitos,
  .material-conteudo .produtos,
  .material-conteudo .duascol { grid-template-columns: 1fr; }
  .material-conteudo .etapa { grid-template-columns: 1fr; }
  /* tabela empilhada: some o cabeçalho, cada linha vira um card, célula vira bloco */
  .material-conteudo thead { display: none; }
  .material-conteudo table, .material-conteudo tbody { display: block; }
  .material-conteudo tr {
    display: block; border: 1px solid var(--border); border-radius: 10px;
    background: var(--bg-2); padding: 10px 12px; margin-bottom: 8px;
  }
  .material-conteudo td {
    display: block; border-bottom: 0; padding: 3px 0; white-space: normal;
  }
  .material-conteudo td:first-child { font-weight: 700; color: var(--text); padding-bottom: 5px; }
}

/* ── Selo de material de estudo na miniatura ── */
.n-thumb { position: relative; }
.n-material {
  position: absolute; top: 8px; right: 8px; z-index: 3;
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(4,7,14,.72); backdrop-filter: blur(4px);
  border: 1px solid rgba(197,242,74,.5);
  color: var(--accent);
}
.n-material svg { width: 15px; height: 15px; }
.n-material-tip {
  position: absolute; top: 50%; right: calc(100% + 8px); transform: translateY(-50%);
  white-space: nowrap; background: #0a0e07; color: var(--text);
  font-size: 11.5px; font-weight: 700; padding: 5px 9px; border-radius: 7px;
  border: 1px solid var(--border);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.n-material:hover .n-material-tip { opacity: 1; }

/* ── Convite "adicionar à Tela de Início" (modal, só mobile, via instalar.js) ── */
.install-modal { text-align: left; }
.install-modal-icon { text-align: center; margin-bottom: 10px; }
.install-modal-icon img { width: 56px; height: 56px; border-radius: 14px; display: inline-block; }
.install-modal h2 { text-align: center; }
.install-modal .modal-sub { text-align: center; }
.install-modal ol { margin: 14px 0 18px 20px; }
.install-modal ol li { margin-bottom: 10px; font-size: 14.5px; color: var(--text-muted); }
.install-modal ol li b { color: var(--text); }
.im-ico { display: inline-flex; vertical-align: middle; margin: 0 2px; }
.im-ico svg { width: 16px; height: 16px; color: var(--accent); }
