/* EVOLUEMED - área do aluno (banco de questões) */

:root {
    --paper: #F4F6F5;
    --surface: #FFFFFF;
    --ink: #1D2A2E;
    --muted: #5A6A6F;
    --line: #DCE3E1;
    --plum: #6E2F57;
    --plum-dark: #531F40;
    --plum-soft: #F3E9EF;
    --teal: #1F8A86;
    --teal-soft: #E2F3F2;
    --red: #C23A2F;
    --red-soft: #FBE9E7;
    --radius: 14px;
    --radius-sm: 10px;
    --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--ink);
    background: var(--paper);
    font-feature-settings: "tnum" 1;
}

a { color: var(--plum); }

img { max-width: 100%; }

:focus-visible {
    outline: 3px solid #5F84C4;
    outline-offset: 2px;
    border-radius: 6px;
}

h1, h2, h3 { margin: 0; line-height: 1.2; }

h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; }
h3 { font-size: 1.05rem; font-weight: 700; }

.muted { color: var(--muted); }
.small { font-size: .875rem; }

/* ---------- Topo ---------- */

.topo {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topo-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.marca {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #6A6A6A;
    font-weight: 800;
    letter-spacing: .02em;
    font-size: 1.05rem;
}

.marca img { width: 34px; height: 34px; object-fit: cover; object-position: top; border-radius: 8px; }
.marca span b { font-weight: 800; }
.marca span i { font-style: normal; font-weight: 400; }

.nav { display: flex; gap: 4px; flex: 1; }

.nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav a:hover { color: var(--ink); background: var(--paper); }
.nav a.ativo { color: var(--plum); background: var(--plum-soft); }

.conta { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.conta a { color: var(--muted); font-weight: 600; text-decoration: none; }
.conta a:hover { color: var(--red); }

.tabbar { display: none; }

/* ---------- Página ---------- */

.pagina {
    max-width: 1080px;
    margin: 0 auto;
    padding: 32px 20px 64px;
}

.cabecalho { margin-bottom: 24px; }
.cabecalho p { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }

.secao { margin-top: 40px; }
.secao-topo { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.secao-topo a { font-weight: 600; text-decoration: none; }

.aviso {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background: var(--plum-soft);
    color: var(--plum-dark);
    margin-bottom: 20px;
}
.aviso.erro { background: var(--red-soft); color: var(--red); }

/* ---------- Botões ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    background: var(--plum);
    color: #fff;
    transition: background .15s;
}
.btn:hover { background: var(--plum-dark); }
.btn.claro { background: var(--surface); color: var(--plum); border-color: var(--line); }
.btn.claro:hover { border-color: var(--plum); }
.btn.compra { background: var(--surface); color: #A85F12; border-color: #EBC79C; }
.btn.compra:hover { background: #FFF6EA; }
.btn.grande { min-height: 54px; padding: 14px 24px; font-size: 1.05rem; }
.btn.bloco { width: 100%; }
.btn[disabled], .btn.desativado { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ---------- Início: duas ações ---------- */

.acoes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.acao {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 26px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    text-decoration: none;
    color: var(--ink);
    overflow: hidden;
    min-height: 200px;
}

.acao h2 { font-size: 1.45rem; }
.acao p { margin: 0; color: var(--muted); max-width: 36ch; }
.acao .acao-rodape { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.acao.principal { background: var(--plum); border-color: var(--plum); color: #fff; }
.acao.principal p { color: #E9D9E3; }
.acao.principal .btn { background: #fff; color: var(--plum); }
.acao.principal .btn:hover { background: #F6EEF3; }
.acao.principal .btn.fantasma { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.acao.principal .btn.fantasma:hover { border-color: #fff; }

.acao-hex {
    position: absolute;
    right: -30px;
    top: -30px;
    width: 160px;
    height: 160px;
    opacity: .18;
    pointer-events: none;
}

a.acao:hover { border-color: var(--plum); }

.continuar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    background: var(--teal-soft);
    color: #0F4F4C;
}
.continuar .barra { flex: 1; max-width: 220px; }
.continuar .btn { background: var(--teal); margin-left: auto; }
.continuar .btn:hover { background: #17706D; }

/* ---------- Hexágono das matérias (marca do logo) ---------- */

.hex {
    --cor: var(--plum);
    --p: 0%;
    flex: none;
    width: 44px;
    height: 50px;
    clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    background:
        linear-gradient(to top, var(--cor) var(--p), transparent var(--p)),
        var(--claro, #EEF2F1);
    display: grid;
    place-items: center;
}
.hex.bloqueada { background: #E7ECEA; }
.hex svg { width: 16px; height: 16px; color: #8A979B; }

/* ---------- Lista de matérias ---------- */

.lista {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}
.item:first-child { border-top: 0; }

.item-info { flex: 1; min-width: 0; }
.item-info h3 { font-size: 1rem; }
.item-info .meta { font-size: .875rem; color: var(--muted); margin-top: 2px; }
.item-info .desc { font-size: .875rem; color: var(--muted); margin: 4px 0 0; max-width: 60ch; }

.item-progresso { width: 180px; flex: none; font-size: .8rem; color: var(--muted); }
.item-acao { flex: none; }
.item-acao .btn { min-width: 104px; }

.barra {
    height: 6px;
    background: #E5EBE9;
    border-radius: 99px;
    overflow: hidden;
    margin-top: 6px;
}
.barra span { display: block; height: 100%; background: var(--cor, var(--plum)); border-radius: 99px; }

.preco { font-weight: 800; color: var(--ink); font-size: .95rem; }

/* ---------- Faixa do acesso completo ---------- */

.completo {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    margin-bottom: 24px;
    border-radius: var(--radius);
    background: var(--ink);
    color: #fff;
}
.completo .hexes { display: flex; gap: 4px; flex: none; }
.completo .hexes .hex { width: 18px; height: 21px; }
.completo h2 { font-size: 1.2rem; }
.completo p { margin: 4px 0 0; color: #C6D0D2; max-width: 52ch; }
.completo .preco { color: #fff; font-size: 1.2rem; }
.completo .direita { margin-left: auto; display: flex; align-items: center; gap: 16px; flex: none; }
.completo .btn { background: #fff; color: var(--ink); }
.completo .btn:hover { background: #E9EEEC; }

/* ---------- Formulário de sessão ---------- */

.painel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
}

.campo { margin-bottom: 28px; }
.campo > .rotulo { display: block; font-weight: 700; margin-bottom: 10px; }
.campo > .ajuda { display: block; font-size: .875rem; color: var(--muted); margin: -6px 0 10px; }

.escolhas { display: flex; flex-wrap: wrap; gap: 8px; }

.escolha { position: relative; }
.escolha input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.escolha span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    background: var(--surface);
    font-weight: 700;
    cursor: pointer;
}
.escolha input:checked + span { border-color: var(--plum); background: var(--plum-soft); color: var(--plum); }
.escolha input:focus-visible + span { outline: 3px solid #5F84C4; outline-offset: 2px; }

.modos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modos .escolha span { display: block; padding: 14px 16px; height: 100%; }
.modos .escolha span b { display: block; }
.modos .escolha span small { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; margin-top: 2px; }

.materias-check {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 6px;
}
.check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: .95rem;
}
.check input { width: 18px; height: 18px; accent-color: var(--plum); flex: none; }
.check .hex { width: 18px; height: 21px; }
.check small { color: var(--muted); margin-left: auto; }
.check:has(input:checked) { border-color: #C9A6BC; background: #FBF7FA; }

.links-rapidos { display: flex; gap: 14px; font-size: .9rem; margin-bottom: 10px; }
.links-rapidos button { background: none; border: 0; padding: 0; color: var(--plum); font: inherit; font-weight: 600; cursor: pointer; }

.rodape-form { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Respondendo (modo foco) ---------- */

body.foco { background: var(--surface); }

.foco-topo {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}
.foco-topo-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.foco-topo .sair { color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; }
.foco-topo .sair:hover { color: var(--ink); }
.foco-topo .contador { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.foco-topo .barra { flex: 1; margin-top: 0; height: 8px; }
.foco-topo .barra span { background: var(--plum); transition: width .3s ease; }

.questao {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 20px 120px;
}

.questao-meta { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); margin-bottom: 14px; }
.questao-meta .hex { width: 16px; height: 18px; }

.enunciado {
    font-size: 1.15rem;
    line-height: 1.65;
    margin: 0 0 24px;
    max-width: 68ch;
    white-space: pre-line;
}

.alternativas { display: flex; flex-direction: column; gap: 10px; }

.alt { position: relative; display: block; }
.alt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.alt .alt-corpo {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    min-height: 56px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-size: 1.02rem;
    line-height: 1.5;
}
.alt .letra {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: .9rem;
    background: var(--paper);
    color: var(--muted);
}
.alt:hover .alt-corpo { border-color: #B9C5C2; }
.alt input:checked + .alt-corpo { border-color: var(--plum); background: #FBF7FA; }
.alt input:checked + .alt-corpo .letra { background: var(--plum); color: #fff; }
.alt input:focus-visible + .alt-corpo { outline: 3px solid #5F84C4; outline-offset: 2px; }

.alt.correta .alt-corpo,
.alt.correta input:checked + .alt-corpo { border-color: var(--teal); background: var(--teal-soft); }
.alt.correta .letra,
.alt.correta input:checked + .alt-corpo .letra { background: var(--teal); color: #fff; }
.alt.errada .alt-corpo,
.alt.errada input:checked + .alt-corpo { border-color: var(--red); background: var(--red-soft); }
.alt.errada .letra,
.alt.errada input:checked + .alt-corpo .letra { background: var(--red); color: #fff; }
.alt.travada .alt-corpo { cursor: default; }
.alt .selo { margin-left: auto; font-size: .8rem; font-weight: 700; white-space: nowrap; padding-left: 8px; }
.alt.correta .selo { color: var(--teal); }
.alt.errada .selo { color: var(--red); }

.comentario {
    margin-top: 24px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--paper);
    border-left: 4px solid var(--teal);
}
.comentario.errou { border-left-color: var(--red); }
.comentario:focus { outline: none; }
.comentario h3 { margin-bottom: 6px; }
.comentario p { margin: 0; line-height: 1.65; max-width: 68ch; white-space: pre-line; }

.foco-rodape {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    z-index: 10;
}
.foco-rodape-inner { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.foco-rodape .btn { flex: 1; max-width: 320px; margin-left: auto; }
.foco-rodape .btn.claro { flex: none; margin-left: 0; }

.reportar { margin-top: 28px; font-size: .9rem; }
.reportar summary { color: var(--muted); cursor: pointer; font-weight: 600; width: fit-content; }
.reportar summary:hover { color: var(--ink); }
.reportar-corpo { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; max-width: 520px; }
.reportar textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); resize: vertical; }
.reportar .btn { align-self: flex-start; min-height: 40px; }

.mapa { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; }
.mapa a {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: 8px;
    border: 1px solid var(--line);
    font-size: .8rem;
    font-weight: 700;
    color: var(--muted);
    text-decoration: none;
}
.mapa a.feita { background: var(--plum-soft); color: var(--plum); border-color: transparent; }
.mapa a.atual { border-color: var(--plum); color: var(--plum); }

/* ---------- Resultado ---------- */

.placar {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px;
    border-radius: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
}
.placar-num { font-size: 3.5rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; color: var(--plum); }
.placar p { margin: 6px 0 0; color: var(--muted); }
.placar .acoes-resultado { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.revisao { margin-top: 12px; }
.revisao details { border-top: 1px solid var(--line); }
.revisao details:first-child { border-top: 0; }
.revisao summary {
    list-style: none;
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
}
.revisao summary::-webkit-details-marker { display: none; }
.revisao .marca-res {
    flex: none;
    width: 28px; height: 28px; border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 800; font-size: .8rem; color: #fff;
    background: var(--red);
}
.revisao .marca-res.ok { background: var(--teal); }
.revisao .marca-res.branco { background: #B8C3C0; }
.revisao .resumo-q { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revisao details[open] .resumo-q { white-space: normal; }
.revisao .det { padding: 0 18px 18px 60px; }
.revisao .det p { margin: 0 0 8px; max-width: 70ch; white-space: pre-line; }

.vazio { text-align: center; padding: 48px 20px; color: var(--muted); }
.vazio h2 { color: var(--ink); margin-bottom: 8px; }
.vazio .btn { margin-top: 16px; }

/* ---------- Aulas (cursos com aulas) ---------- */

.cursos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.curso {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}
.curso p { margin: 0; color: var(--muted); font-size: .9rem; }
.curso .btn { margin-top: 8px; align-self: flex-start; }

/* ---------- Celular ---------- */

@media (max-width: 760px) {
    .nav, .conta { display: none; }
    .topo-inner { justify-content: center; }

    .tabbar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 30;
        background: var(--surface);
        border-top: 1px solid var(--line);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .tabbar a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        padding: 8px 4px 10px;
        font-size: .72rem;
        font-weight: 600;
        color: var(--muted);
        text-decoration: none;
    }
    .tabbar svg { width: 22px; height: 22px; }
    .tabbar a.ativo { color: var(--plum); }

    .pagina { padding: 20px 16px 96px; }

    .acoes { grid-template-columns: 1fr; }
    .acao { min-height: 0; padding: 22px; }

    .item { flex-wrap: wrap; gap: 10px 14px; padding: 14px 16px; }
    .item-info { flex-basis: calc(100% - 64px); }
    .item-progresso { order: 3; flex: 1; width: auto; padding-left: 58px; }
    .item-acao { order: 4; margin-left: auto; }
    .item-acao .btn { min-height: 40px; min-width: 96px; }

    .completo { flex-direction: column; align-items: flex-start; }
    .completo .direita { margin-left: 0; width: 100%; justify-content: space-between; }

    .modos { grid-template-columns: 1fr; }

    .continuar { flex-wrap: wrap; }
    .continuar .barra { max-width: none; width: 100%; order: 3; }

    .placar { flex-direction: column; align-items: flex-start; }
    .curso-capa { aspect-ratio: 16 / 5; }
    .placar .acoes-resultado { margin-left: 0; }

    .enunciado { font-size: 1.07rem; }
    .foco-rodape .btn { max-width: none; }
    .alt .alt-corpo { position: relative; }
    .alt .selo {
        position: absolute; top: -10px; right: 12px;
        background: var(--surface); border: 1px solid currentColor;
        border-radius: 99px; padding: 1px 8px; font-size: .72rem;
    }
    .revisao .det { padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* =====================================================================
   Cursos, módulos e aulas
   ===================================================================== */

.ao-vivo {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    border-radius: var(--radius);
    background: #FDECEA;
    color: #7A1F17;
}
.ao-vivo .pulso {
    flex: none;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--red);
    box-shadow: 0 0 0 0 rgba(194, 58, 47, .5);
    animation: pulso 1.8s infinite;
}
@keyframes pulso { 70% { box-shadow: 0 0 0 10px rgba(194, 58, 47, 0); } 100% { box-shadow: 0 0 0 0 rgba(194, 58, 47, 0); } }
.ao-vivo .btn { margin-left: auto; background: var(--red); }
.ao-vivo .btn:hover { background: #9E2C23; }

.cursos-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }

.curso-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    color: var(--ink);
    text-decoration: none;
}
.curso-capa {
    position: relative;
    aspect-ratio: 16 / 7;
    background: var(--plum);
    overflow: hidden;
}
.curso-capa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.curso-capa svg { position: absolute; right: -24px; top: -20px; width: 180px; opacity: .22; }
.curso-capa .sigla { position: absolute; left: 20px; bottom: 14px; color: #fff; font-weight: 800; font-size: 1.15rem; max-width: 80%; line-height: 1.25; }
.curso-corpo { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.curso-corpo h3 { font-size: 1.1rem; }
.curso-corpo .meta { font-size: .875rem; color: var(--muted); }
.curso-corpo .proxima { font-size: .875rem; color: var(--muted); margin-top: 6px; }
.curso-corpo .proxima b { color: var(--ink); font-weight: 600; }
.curso-corpo .btn { margin-top: 12px; align-self: flex-start; }

/* Cabeçalho do curso */
.curso-topo {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: end;
    margin-bottom: 28px;
}
.trilha { font-size: .875rem; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.trilha a { color: var(--muted); text-decoration: none; font-weight: 600; }
.trilha a:hover { color: var(--plum); }
.curso-topo p { margin: 8px 0 0; color: var(--muted); max-width: 70ch; }
.anel { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--plum) calc(var(--p) * 1%), #E5EBE9 0); }
.anel span { width: 74px; height: 74px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.anel-legenda { text-align: center; font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* Módulos e aulas */
.modulos { display: flex; flex-direction: column; gap: 12px; }
.modulo {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.modulo > summary, .modulo > .modulo-cab {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
}
.modulo > summary::-webkit-details-marker { display: none; }
.modulo-num {
    flex: none;
    width: 36px; height: 36px; border-radius: 10px;
    display: grid; place-items: center;
    background: var(--plum-soft); color: var(--plum); font-weight: 800;
}
.modulo-info { flex: 1; min-width: 0; }
.modulo-info h3 { font-size: 1rem; }
.modulo-info .meta { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.modulo-prog { width: 140px; flex: none; font-size: .8rem; color: var(--muted); text-align: right; }
.modulo .seta { flex: none; width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.modulo[open] .seta { transform: rotate(180deg); }
.modulo.sem-aulas { opacity: .7; }

.aulas-lista { list-style: none; margin: 0; padding: 0 0 8px; border-top: 1px solid var(--line); }
.aulas-lista li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 20px 12px 26px;
    text-decoration: none;
    color: var(--ink);
}
.aulas-lista li a:hover { background: var(--paper); }
.aulas-lista li a.atual { background: var(--plum-soft); }
.aulas-lista .estado {
    flex: none;
    width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center;
    border: 2px solid #C9D3D0; color: transparent;
}
.aulas-lista .estado svg { width: 14px; height: 14px; }
.aulas-lista .feita .estado { background: var(--teal); border-color: var(--teal); color: #fff; }
.aulas-lista .vendo .estado { border-color: var(--plum); }
.aulas-lista .vendo .estado::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--plum); }
.aulas-lista .titulo-aula { flex: 1; min-width: 0; }
.aulas-lista .dur { font-size: .8rem; color: var(--muted); flex: none; }
.aulas-lista .icone-pdf { font-size: .72rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; flex: none; }

/* Página da aula */
.aula-grade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0E1416;
    border-radius: var(--radius);
    overflow: hidden;
}
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .sem-video { position: absolute; inset: 0; display: grid; place-items: center; color: #9AA8AC; text-align: center; padding: 20px; }
.aula-cabeca { margin: 20px 0 8px; display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.aula-cabeca h1 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); flex: 1; min-width: 240px; }
.aula-acoes { display: flex; gap: 10px; flex-wrap: wrap; }
.btn.concluida { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.aula-desc { color: var(--muted); max-width: 72ch; margin: 0 0 8px; white-space: pre-line; }
.aula-nav { display: flex; gap: 10px; justify-content: space-between; margin: 20px 0 8px; flex-wrap: wrap; }
.aula-nav a { flex: 1 1 220px; max-width: 48%; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); background: var(--surface); }
.aula-nav a:hover { border-color: var(--plum); }
.aula-nav a small { display: block; color: var(--muted); font-size: .8rem; }
.aula-nav a.prox { text-align: right; margin-left: auto; }

.lateral { position: sticky; top: 76px; }
.lateral .modulo { max-height: calc(100vh - 100px); overflow: auto; }
.lateral .modulo > summary { cursor: default; }

/* Comentários */
.comentarios { margin-top: 36px; max-width: 760px; }
.comentarios form { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 24px; }
.comentarios textarea {
    font: inherit; padding: 12px 14px; min-height: 96px; resize: vertical;
    border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
}
.comentarios textarea:focus { border-color: var(--plum); outline: none; }
.comentarios form .btn { align-self: flex-start; }
.coment { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.coment .avatar {
    flex: none; width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: .8rem;
    background: var(--plum-soft); color: var(--plum);
}
.coment .avatar.prof { background: var(--plum); color: #fff; }
.coment .quem { font-weight: 700; font-size: .9rem; }
.coment .quem small { font-weight: 400; color: var(--muted); margin-left: 6px; }
.coment p { margin: 4px 0 0; white-space: pre-line; }

/* Ao vivo */
.live-grade { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.chat {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    height: min(70vh, 620px);
}
.chat-topo { padding: 14px 16px; border-bottom: 1px solid var(--line); font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 10px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-msgs .msg-item { font-size: .92rem; }
.chat-msgs .msg-user { font-weight: 700; display: inline; }
.chat-msgs .msg-time { display: inline; color: var(--muted); font-size: .75rem; margin-left: 6px; }
.chat-msgs .msg-text { margin-top: 2px; }
.chat-msgs .msg-item.prof .msg-user { color: var(--plum); }
.chat-msgs .muted { color: var(--muted); font-size: .9rem; }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat input { flex: 1; min-width: 0; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); }
.chat input:focus { border-color: var(--plum); outline: none; }
.presenca { margin-top: 20px; }
.presenca-lista { margin-top: 10px; font-size: .9rem; color: var(--muted); }
.presenca-lista .presenca-item { padding: 6px 0; border-top: 1px solid var(--line); }
.presenca-lista .presenca-nome { color: var(--ink); font-weight: 600; display: inline; }
.presenca-lista .presenca-hora { display: inline; margin-left: 6px; font-size: .8rem; }

@media (max-width: 980px) {
    .aula-grade, .live-grade { grid-template-columns: 1fr; }
    .lateral { position: static; }
    .lateral .modulo { max-height: none; }
    .chat { height: 460px; }
}

@media (max-width: 760px) {
    .curso-topo { grid-template-columns: 1fr; }
    .curso-topo .anel-wrap { display: none; }
    .modulo > summary, .modulo > .modulo-cab { padding: 14px 16px; gap: 12px; }
    .modulo-prog { display: none; }
    .aulas-lista li a { padding: 12px 16px; }
    .player { border-radius: 0; margin: 0 -16px; width: calc(100% + 32px); }
    .aula-nav a { max-width: none; }
    .ao-vivo { flex-wrap: wrap; }
    .ao-vivo .btn { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .ao-vivo .pulso { animation: none; }
}
