/* Trilha LMS 1.1 — escopo próprio, mantendo o cabeçalho e o menu do tema. */
body.tl-course-page :is(.site-content, .content-area, #primary, .site-main, .container, .content-wrap, .ast-container):has(.tl-course-shell) {
    display: block !important; width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; background: transparent !important;
}
body.tl-course-page .wp-site-blocks { padding-block: 0; }
body.tl-course-page .tl-course-shell { display: block; width: 100%; max-width: none; margin: 0 !important; padding: 0 !important; background: #101112; min-height: 80vh; }
body :is(.tl-surface, .tl-vitrine) {
    --tl-texto: #f0f1f2; --tl-suave: #a4a8ad; --tl-borda: #2c2f32; --tl-fundo: #181a1c;
    --tl-destaque: #bce5cd; --tl-ok: #bce5cd;
    box-sizing: border-box; isolation: isolate; color-scheme: dark; color: var(--tl-texto); background: #101112;
    font: 400 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: left; letter-spacing: normal; text-transform: none; overflow-wrap: anywhere;
}
body :is(.tl-surface, .tl-vitrine) *, body :is(.tl-surface, .tl-vitrine) *::before, body :is(.tl-surface, .tl-vitrine) *::after { box-sizing: border-box; }
body :is(.tl-surface, .tl-vitrine) :is(h1,h2,h3,h4,p,ol,ul,figure) { padding: 0; margin: 0; color: inherit; font-family: inherit; text-transform: none; letter-spacing: normal; }
body :is(.tl-surface, .tl-vitrine) :is(a,button,input,select,textarea) { font-family: inherit; letter-spacing: normal; text-transform: none; }
body :is(.tl-surface, .tl-vitrine) a { color: var(--tl-texto); text-decoration: none; box-shadow: none; }
body :is(.tl-surface, .tl-vitrine) a:hover { color: var(--tl-destaque); }
body :is(.tl-surface, .tl-vitrine) :focus-visible { outline: 2px solid var(--tl-destaque); outline-offset: 4px; }
body :is(.tl-surface, .tl-vitrine) .tl-btn {
    appearance: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
    padding: 11px 18px; margin: 0; border: 1px solid transparent; border-radius: 6px; background: var(--tl-destaque) !important;
    color: #102218 !important; font-size: 14px; font-weight: 650; line-height: 1.4; text-decoration: none !important; cursor: pointer; box-shadow: none;
    transition: background-color .15s ease;
}
body :is(.tl-surface, .tl-vitrine) .tl-btn:hover { background: #d5f2e1 !important; }
body :is(.tl-surface, .tl-vitrine) .tl-btn:disabled { opacity: .6; cursor: wait; }
body :is(.tl-surface, .tl-vitrine) .tl-btn-sec { background: transparent !important; border-color: var(--tl-borda); color: var(--tl-texto) !important; }
body :is(.tl-surface, .tl-vitrine) .tl-btn-off { background: #24272a !important; color: var(--tl-suave) !important; font-size: 12px; cursor: default; }
body :is(.tl-surface, .tl-vitrine) .tl-eyebrow { color: var(--tl-suave); font-size: 10px; font-weight: 650; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase; }
body .tl-curso { width: 100%; max-width: 1800px; margin: 0 auto; padding: 28px clamp(20px, 3vw, 56px) 56px; }
body .tl-curso .tl-voltar { margin-bottom: 28px; font-size: 13px; }
body .tl-curso .tl-voltar a { color: var(--tl-suave); }
body .tl-curso .tl-curso-cabecalho { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 22px; }
body .tl-curso h1 { font-size: clamp(26px, 2.8vw, 40px); font-weight: 600; line-height: 1.2; margin: 7px 0 10px; }
body .tl-curso .tl-prof { color: var(--tl-suave); font-size: 13px; }
body .tl-curso .tl-prof strong { color: #d9dcdf; font-weight: 500; }
body .tl-curso .tl-progresso-numero { font-size: 26px; line-height: 1.2; font-weight: 500; white-space: nowrap; }
body .tl-curso .tl-progresso-numero small { display: block; margin-top: 5px; color: var(--tl-suave); font-size: 12px; font-weight: 400; }
body :is(.tl-surface, .tl-vitrine) .tl-barra { height: 3px; border-radius: 3px; overflow: hidden; background: #303437; }
body :is(.tl-surface, .tl-vitrine) .tl-barra-fill { display: block; height: 100%; background: var(--tl-destaque); }
body .tl-curso .tl-barra-txt { margin: 10px 0 28px; color: var(--tl-suave); font-size: 12px; }
body .tl-curso .tl-aula-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
body .tl-curso .tl-player-col { min-width: 0; }
body .tl-curso .tl-video { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid #25282b; border-radius: 8px; background: #000; }
body .tl-curso .tl-video :is(video,iframe) { position: absolute; display: block; inset: 0; width: 100% !important; height: 100% !important; max-width: none; margin: 0; padding: 0; border: 0; object-fit: contain; }
body .tl-curso .tl-aula-posicao { margin-top: 26px; }
body .tl-curso .tl-aula-titulo { margin: 6px 0 18px; font-size: 25px; font-weight: 550; line-height: 1.3; }
body .tl-curso .tl-aula-texto { max-width: 80ch; color: #c1c5c9; font-size: 15px; }
body .tl-curso .tl-aula-texto :is(p,ul,ol) { margin-bottom: 16px; }
body .tl-curso :is(.tl-aula-texto,.tl-sobre) :is(ul,ol) { padding-left: 24px; }
body .tl-curso :is(.tl-aula-texto,.tl-sobre) a { color: var(--tl-destaque); text-decoration: underline; text-underline-offset: 3px; }
body .tl-curso :is(.tl-aula-texto,.tl-sobre) :is(img,video,iframe) { max-width: 100%; }
body .tl-curso .tl-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
body .tl-curso .tl-badge-ok { display: inline-block; color: var(--tl-ok); font-size: 13px; }
body .tl-curso .tl-feedback { margin-top: 12px; color: #f4b4ad; font-size: 13px; }
body .tl-curso .tl-lista { position: sticky; top: 24px; min-width: 0; max-height: calc(100vh - 64px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; border: 1px solid var(--tl-borda); border-radius: 8px; background: var(--tl-fundo); padding: 20px 12px 12px; }
body .tl-curso .tl-lista h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 8px 18px; font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--tl-borda); }
body .tl-curso .tl-lista h2 span { color: var(--tl-suave); font-size: 11px; font-weight: 400; white-space: nowrap; }
body .tl-curso .tl-lista-aulas { list-style: none; counter-reset: aula; margin: 0; padding: 0; }
body .tl-curso .tl-modulo { margin: 22px 8px 8px; color: var(--tl-suave); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
body .tl-curso .tl-item { list-style: none; counter-increment: aula; margin: 4px 0; }
body .tl-curso .tl-item a { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 10px 12px; border: 1px solid transparent; border-radius: 5px; color: #c1c5c9 !important; font-size: 13px; line-height: 1.5; text-decoration: none !important; }
body .tl-curso .tl-item a::before { content: counter(aula, decimal-leading-zero); flex: 0 0 22px; color: #8f969b; font-size: 11px; font-variant-numeric: tabular-nums; }
body .tl-curso .tl-item a:hover { background: #24272a; }
body .tl-curso .tl-item.tl-atual a { background: #24322b; border-color: #3c5245; color: #def3e7 !important; }
body .tl-curso .tl-item.tl-feita a::before { content: "\2713"; color: var(--tl-destaque); }
body .tl-curso .tl-sobre { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--tl-borda); color: var(--tl-suave); max-width: 85ch; font-size: 14px; }
body .tl-curso .tl-sobre h4 { color: var(--tl-texto); font-size: 16px; font-weight: 550; margin-bottom: 12px; }
/* Jornada: cards compactos, percurso contínuo e um único próximo passo. */
body .tl-vitrine { padding: clamp(20px, 3vw, 40px); border-radius: 10px; width: 100%; }
body .tl-vitrine .tl-vitrine-cabecalho { margin-bottom: 24px; }
body .tl-vitrine .tl-vitrine-cabecalho h2 { margin-top: 6px; font-size: 28px; line-height: 1.2; font-weight: 600; }
body .tl-vitrine .tl-jornada-intro { margin-top: 10px; font-size: 13px; color: var(--tl-suave); }
body .tl-vitrine .tl-jornada { position: relative; max-width: 920px; margin: 0 auto; }
body .tl-vitrine .tl-trilha { position: relative; list-style: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px 40px; padding: 24px 28px; margin: 0; }
body .tl-vitrine .tl-route-ready .tl-trilha { grid-template-columns: repeat(var(--tl-columns, 1), minmax(0, 1fr)); }
body .tl-vitrine .tl-route-lines { display: none; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 0; }
body .tl-vitrine .tl-route-ready .tl-route-lines { display: block; }
body .tl-vitrine .tl-route-line { stroke: #383d40; stroke-width: 2; stroke-linecap: round; fill: none; vector-effect: non-scaling-stroke; }
body .tl-vitrine .tl-route-line.tl-route-done { stroke: #83b49a; }
body .tl-vitrine .tl-no { position: relative; margin: 0; min-width: 0; width: 100%; max-width: 200px; justify-self: center; padding-bottom: 44px; z-index: 1; display: flex; flex-direction: column; }
body .tl-vitrine .tl-card { display: flex; flex-direction: column; flex: 1; height: auto; min-width: 0; overflow: hidden; border: 1px solid var(--tl-borda); border-radius: 8px; background: var(--tl-fundo); }
body .tl-vitrine .tl-capa, body .tl-vitrine .tl-start-symbol { position: relative; aspect-ratio: 4 / 3; width: 100%; background: #252a2d; overflow: hidden; flex-shrink: 0; }
body .tl-vitrine .tl-capa img { display: block; width: 100%; height: 100%; object-fit: cover; }
body .tl-vitrine .tl-capa-vazia { position: absolute; inset: 0; display: grid; place-items: center; color: #89978e; }
body .tl-vitrine .tl-capa-vazia svg { width: 36px; height: 36px; }
body .tl-vitrine .tl-selo { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid #ffffff20; border-radius: 4px; background: #101112ec; color: #d8dde0; font-size: 10px; line-height: 1.4; }
body .tl-vitrine .tl-selo svg { width: 12px; height: 12px; }
body .tl-vitrine .tl-card-corpo { display: flex; flex-direction: column; flex: 1; padding: 14px; }
body .tl-vitrine .tl-card h3 { margin: 0 0 8px; font-size: 16px; line-height: 1.35; font-weight: 550; }
body .tl-vitrine .tl-prof { margin-bottom: 16px; color: #a4a8ad; font-size: 11px; }
body .tl-vitrine .tl-card .tl-btn { margin-top: auto; width: 100%; font-size: 12px; padding: 9px 8px; min-height: 40px; }
body .tl-vitrine .tl-locked-note { display: flex; align-items: center; justify-content: center; margin-top: auto; padding: 9px 4px; min-height: 40px; color: #979da2; border-top: 1px solid var(--tl-borda); text-align: center; font-size: 11px; line-height: 1.4; }
body .tl-vitrine :is(.tl-st-bloqueado,.tl-st-embreve) .tl-capa img { filter: grayscale(1); opacity: .45; }
body .tl-vitrine :is(.tl-st-bloqueado,.tl-st-embreve) .tl-card { background: #151719; }
body .tl-vitrine :is(.tl-st-bloqueado,.tl-st-embreve) h3 { color: #a3a8ad; }
body .tl-vitrine .tl-is-current .tl-card { border-color: #91c9aa; box-shadow: 0 0 0 3px #bce5cd0c; }
body .tl-vitrine .tl-is-current .tl-selo { color: #d8f1e2; border-color: #83b49a66; }
body .tl-vitrine .tl-route-node { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: grid; place-items: center; width: 28px; height: 28px; background: #171a1b; border: 1px solid #4b5054; border-radius: 50%; color: #899197; }
body .tl-vitrine .tl-route-node svg { width: 14px; height: 14px; }
body .tl-vitrine .tl-st-concluido .tl-route-node { background: #20372a; border-color: #83b49a; color: #bce5cd; }
body .tl-vitrine .tl-is-current .tl-route-node { color: #d8f1e2; border-color: #bce5cd; background: #24392c; }
body .tl-vitrine .tl-is-current .tl-route-node::after { content: ""; position: absolute; inset: -5px; border: 1px solid #bce5cd55; border-radius: inherit; pointer-events: none; }
body .tl-vitrine .tl-start-symbol { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: #1d2a23; color: #bce5cd; }
body .tl-vitrine .tl-start-symbol > svg { width: 40px; height: 40px; }
body .tl-vitrine .tl-start-symbol > span { font-size: 8px; font-weight: 600; letter-spacing: .14em; }
body .tl-vitrine .tl-start-card .tl-eyebrow { margin-bottom: 6px; font-size: 8px; }
body .tl-vitrine .tl-start-copy { color: var(--tl-suave); font-size: 11px; margin-bottom: 16px; }
body .tl-vitrine .tl-empty-journey { margin-top: 24px; text-align: center; color: var(--tl-suave); font-size: 13px; }
/* O destaque responde à interação; os cards não ficam pulsando durante a leitura. */
body .tl-vitrine .tl-is-current .tl-route-node::after { opacity: .7; transition: opacity 150ms ease; }
@media (hover: hover) and (pointer: fine) {
    body .tl-vitrine .tl-is-current:hover .tl-route-node::after { opacity: 1; }
}
body .tl-vitrine .tl-is-current:focus-within .tl-route-node::after { opacity: 1; }
body .tl-vitrine .tl-jornada[data-columns="1"] .tl-trilha { padding: 16px 0; }
body .tl-vitrine .tl-jornada[data-columns="1"] { max-width: 340px; }
body .tl-vitrine .tl-jornada[data-columns="1"] .tl-no { padding: 0 0 0 42px; max-width: none; }
body .tl-vitrine .tl-jornada[data-columns="1"] .tl-route-node { left: 0; top: 50%; bottom: auto; transform: translateY(-50%); }
body .tl-vitrine .tl-jornada[data-columns="1"] :is(.tl-capa,.tl-start-symbol) { aspect-ratio: 16 / 9; }
/* Cadastro e estados vazios também pertencem ao tema dark. */
body :is(.tl-surface, .tl-vitrine) .tl-aviso { padding: 20px; margin: 0 0 24px; border: 1px solid var(--tl-borda); border-radius: 8px; background: var(--tl-fundo); }
body .tl-surface > .tl-aviso { max-width: 800px; margin: 0 auto; padding: 32px; }
body :is(.tl-surface, .tl-vitrine) .tl-aviso p + p { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
body .tl-vitrine .tl-aviso-ok { border-color: #476350; }
body .tl-vitrine .tl-aviso-erro { border-color: #945c57; }
body .tl-vitrine .tl-cadastro { max-width: 640px; margin: 0 auto 40px; padding: 24px; border: 1px solid var(--tl-borda); border-radius: 8px; background: var(--tl-fundo); }
body .tl-vitrine .tl-cadastro h2 { font-size: 24px; margin-bottom: 8px; }
body .tl-vitrine .tl-form { margin-top: 24px; }
body .tl-vitrine .tl-form-linha { margin-bottom: 18px; }
body .tl-vitrine .tl-form-duas { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
body .tl-vitrine .tl-form label { display: block; font-size: 13px; font-weight: 500; }
body .tl-vitrine .tl-form :is(input[type="text"],select) { display: block; width: 100%; min-height: 44px; margin: 6px 0 0; padding: 10px 12px; border: 1px solid #4b5055; border-radius: 5px; background: #101112; color: var(--tl-texto); font-size: 16px; }
body .tl-vitrine .tl-form-consent label { color: var(--tl-suave); font-size: 12px; }
body .tl-vitrine .tl-form-consent input { accent-color: var(--tl-destaque); }
@media (min-width: 1700px) { body .tl-curso .tl-aula-layout { grid-template-columns: minmax(0, 1fr) 360px; } }
@media (max-width: 960px) {
    body .tl-curso .tl-aula-layout { grid-template-columns: 1fr; gap: 32px; }
    body .tl-curso .tl-lista { position: static; max-height: 480px; }
}
@media (max-width: 540px) {
    body .tl-curso { padding: 20px 16px 40px; }
    body .tl-curso .tl-voltar { margin-bottom: 22px; }
    body .tl-curso .tl-curso-cabecalho { gap: 12px; }
    body .tl-curso .tl-progresso-numero { font-size: 22px; }
    body .tl-curso .tl-aula-titulo { font-size: 22px; }
    body .tl-vitrine { padding: 16px; }
    body .tl-vitrine .tl-form-duas { grid-template-columns: 1fr; }
    body .tl-vitrine .tl-cadastro { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { body :is(.tl-surface,.tl-vitrine) * { transition: none !important; animation: none !important; } }

body .tl-vitrine .tl-cadastro-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow-y: auto; margin: auto; padding: 28px; border: 1px solid #424a46; border-radius: 10px; background: #181a1c; color: #f0f1f2; box-shadow: 0 24px 80px #0007; }
body .tl-vitrine .tl-cadastro-dialog::backdrop { background: #000b; }
body .tl-vitrine .tl-cadastro-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
body .tl-vitrine .tl-cadastro-dialog h2 { font-size: 24px; line-height: 1.25; font-weight: 550; margin-top: 8px; }
body .tl-vitrine .tl-close-cadastro { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; padding: 0; border: 1px solid #454b48; border-radius: 6px; background: transparent; color: #f0f1f2; font-size: 24px; line-height: 1; cursor: pointer; }
body .tl-vitrine .tl-cadastro-intro { color: #a4a8ad; margin-top: 16px; font-size: 13px; }
body .tl-vitrine .tl-cadastro-dialog .tl-form { margin-top: 22px; }
@media (max-width: 540px) { body .tl-vitrine .tl-cadastro-dialog { padding: 20px; } }
/* Alguns temas definem cor própria nos labels: o cadastro mantém seu contraste. */
body .tl-vitrine .tl-form label { color: var(--tl-texto) !important; }
body .tl-vitrine .tl-form-consent label { color: var(--tl-suave) !important; }
