/* ===========================================================================
   ModulosPlay — estilos de componente/tela.
   Tokens, reset e base tipográfica vivem em css/design-tokens.css (carregado
   antes deste arquivo). Não redefinir :root aqui — fonte única é design-tokens.
   =========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* ── Focus visible: anel de foco consistente em toda a app ─────────────── */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: var(--shadow-focus);
}
/* tabindex=-1 só recebe foco por código (o FocusOnNavigate leva o foco pro <h1> a cada página, pro
   leitor de tela anunciar): não é alvo de teclado, então sem anel — senão o título aparecia contornado. */
[tabindex="-1"]:focus { outline: none; box-shadow: none; }

/* ── Títulos: menores que o default do kit + respiro ────────────────────
   foundation.css deixa h1=48px/h2=38px com margin:0 (muito grande e colado
   p/ títulos de página internos). Reescalamos e damos margem aqui. */
h1 { font-size: var(--text-3xl); line-height: var(--lh-tight); margin: 0 0 var(--space-4); }
h2 { font-size: var(--text-xl);  line-height: var(--lh-snug);  margin: var(--space-8) 0 var(--space-3); }
h3 { font-size: var(--text-lg);  line-height: var(--lh-snug);  margin: var(--space-6) 0 var(--space-2); }
:is(h1, h2, h3):first-child { margin-top: 0; }

/* ── Meus Cursos: lista + resumo ────────────────────────────────────── */
.mc-list {
    list-style: none;
    padding: 0;
    margin: var(--space-6) 0 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.mc-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.mc-item--done { border-color: var(--success); }

.mc-head { display: flex; align-items: stretch; }

.mc-thumb {
    position: relative; flex-shrink: 0; width: 160px; align-self: stretch;
    overflow: hidden; background: var(--surface-2); text-decoration: none;
}
.mc-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mc-thumb__play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 36px; height: 36px; border-radius: 99px;
    background: rgba(7, 29, 25, .85); color: var(--primary);
    display: flex; align-items: center; justify-content: center; font-size: 14px; padding-left: 3px;
}
.mc-row__area { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; }

.mc-row {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px 130px 24px;
    align-items: center;
    gap: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: transparent;
    border: 0;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
    transition: background var(--t-fast);
}
.mc-row:hover { background: var(--bg-surface); }

.mc-row__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mc-row__title {
    font-family: var(--font-display);
    font-weight: var(--fw-strong);
    font-size: 19px; line-height: 1.3; letter-spacing: -.015em;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}
.mc-row__prof { font-size: var(--fs-caption); color: var(--text-muted); }
.mc-row__data { font-size: var(--fs-caption); color: var(--text-muted); }
.mc-row__turmas {
    align-self: flex-start;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    background: var(--primary-tint);
    color: var(--primary);
    font-size: var(--fs-caption);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.mc-row__progress { display: flex; align-items: center; gap: var(--space-3); }
.mc-row__progress .ds-progress { flex: 1; }
.mc-row__pct {
    font-size: var(--fs-caption);
    font-weight: var(--fw-strong);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    min-width: 38px;
    text-align: right;
}
.mc-row__status { justify-self: start; }

.mc-row__chevron {
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    justify-self: center;
    transition: transform var(--t-base) var(--ease-smooth);
}
.mc-row__chevron--open { transform: rotate(90deg); }

.mc-summary {
    padding: var(--space-5);
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.mc-summary__head { margin-bottom: var(--space-4); }
.mc-summary__count {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-strong);
}
.mc-summary__empty { color: var(--text-muted); font-size: 14px; }

.mc-mods {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}
.mc-mod {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px 44px;
    align-items: center;
    gap: var(--space-4);
}
.mc-mod__name {
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mc-mod__pct {
    font-size: var(--fs-caption);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.mc-materiais {
    margin: 0 0 var(--space-5);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}
.mc-materiais__title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-strong);
    margin: 0 0 var(--space-3);
}

/* "Suas turmas": uma linha por turma do mesmo curso; a selecionada comanda o resumo abaixo. */
.mc-turmas { margin: 0 0 var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--border); }
.mc-turmas__lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.mc-turma {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 44px;
    align-items: center;
    gap: var(--space-4);
    width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3);
    background: none; border: 1px solid transparent; border-radius: var(--radius-sm);
    font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.mc-turma:hover { background: var(--bg-elevated); }
.mc-turma:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mc-turma--sel { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, transparent); }
.mc-turma__nome { font-size: 14px; color: var(--text-primary); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.mc-turma__tag {
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    font-size: var(--fs-caption);
}
.mc-turma__tag--atual { border-color: var(--primary); color: var(--primary); }
.mc-turma__pct {
    font-size: var(--fs-caption);
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.mc-summary__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

@media (max-width: 820px) {
    .mc-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "main status"
            "prog prog";
        gap: var(--space-3);
    }
    .mc-row__main { grid-area: main; }
    .mc-row__status { grid-area: status; }
    .mc-row__progress { grid-area: prog; }
    .mc-row__chevron { display: none; }
    .mc-mod { grid-template-columns: 1fr 80px; }
    .mc-mod__bar { display: none; }
    .mc-turma { grid-template-columns: minmax(0, 1fr) 44px; }
    .mc-turma__bar { display: none; }
}
@media (max-width: 480px) {
    /* Celular: o selo de status descia o título a poucas letras. Empilha e deixa 2 linhas. */
    .mc-row {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "main" "status" "prog";
        gap: var(--space-2);
    }
    .mc-row__title {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Filtro de Meus cursos (só aparece com mais de 6 cursos). */
.mc-filtro { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: var(--space-4); }
.mc-busca { position: relative; flex: 1 1 280px; max-width: 420px; }
.mc-busca svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-subtle); pointer-events: none; }
.mc-busca input {
    width: 100%; height: 44px; box-sizing: border-box; padding: 0 14px 0 42px;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px;
    font: inherit; font-size: 15px; color: var(--text); caret-color: var(--primary);
}
.mc-busca input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.mc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mc-chip {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--border); border-radius: var(--radius-control); corner-shape: squircle; background: var(--surface);
    color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.mc-chip:hover { color: var(--text); border-color: var(--border-strong); }
.mc-chip[aria-pressed="true"] { background: var(--primary-tint); border-color: var(--primary); color: var(--primary); }
.mc-chip__n { font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
    .mc-busca { max-width: none; flex-basis: 100%; }
    .mc-busca input { font-size: 16px; }   /* 16px: o iOS não dá zoom no foco */
    .mc-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
    .mc-chips::-webkit-scrollbar { display: none; }
    .mc-chip { flex-shrink: 0; }
}

/* ── Layout (menu superior) ─────────────────────────────────────────── */
* { scrollbar-color: var(--border) transparent; scrollbar-width: thin; }
.page { display: flex; flex-direction: column; min-height: 100vh; }

/* viewport-fit=cover (index.html): no app instalado no iPhone a página passa por baixo da
   barra de status e, deitado, do recorte da câmera. O header pinta atrás da barra. */
.app-header {
    position: sticky; top: 0; z-index: 100;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}

main { flex: 1; min-width: 0; padding: 0 env(safe-area-inset-right) 0 env(safe-area-inset-left); }

/* Página que falhou ao carregar (ErrorBoundary do MainLayout) e rota inexistente (App.razor). */
.erro-pagina { min-height: 50vh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.erro-pagina h1 { margin: 0; font-size: var(--fs-h3); }
.erro-pagina p { margin: 0 0 4px; color: var(--text-muted); }
.content { padding: 2.5rem 3rem 5rem; max-width: 1600px; margin: 0 auto; width: 100%; }

/* ── Topbar (padrão do kit Modulos Play) ────────────────────────────── */
.topbar {
    height: 72px;
    display: flex; align-items: center; gap: 40px;
    max-width: 1440px; margin: 0 auto; padding: 0 56px;
}
/* Logo por tema (igual ao player): o arquivo padrão tem o "MODULOS" branco, que some no claro.
   197px = o mais largo dos dois a 24px de altura; `contain` + `left` mantém a proporção de cada um. */
.topbar__brand {
    display: inline-flex; flex-shrink: 0; text-decoration: none;
    width: 197px; height: 24px;
    background: url("../assets/logo-modulosplay.png") left center / contain no-repeat;
}
[data-theme="light"] .topbar__brand { background-image: url("../assets/logo-modulosplay-light.png"); }
.topbar__brand:hover { text-decoration: none; }

.topbar__burger {
    display: none; flex-direction: column; gap: 4px;
    justify-content: center; align-items: center;
    /* Área de toque 44×44 (os três traços somavam 32×26). */
    min-width: 44px; min-height: 44px;
    background: transparent; border: 0; cursor: pointer; padding: 6px;
    margin-left: auto;
}
.topbar__burger span { width: 20px; height: 2px; background: var(--text-muted); border-radius: 2px; }

.topbar__area { flex: 1; display: flex; align-items: center; min-width: 0; }
.topbar__nav { display: flex; gap: 6px; align-self: stretch; }
.topbar__link {
    display: flex; align-items: center; padding: 0 14px;
    color: var(--text-muted); text-decoration: none;
    font-size: 15px; font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.topbar__link:hover { color: var(--text-strong); text-decoration: none; }
.topbar__link.active { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
/* --accent puro dava 3,4:1 (claro) e 3,6:1 (escuro) sobre o fundo; o tom -hover passa de 4,5:1 nos dois. */
.topbar__link--cta { color: var(--accent-hover); }
.topbar__link--cta:hover { color: var(--text-strong); background: var(--accent-tint); }

.topbar__user { margin-left: auto; flex-shrink: 0; display: flex; align-items: center; gap: 12px; }

@media (max-width: 860px) {
    .topbar { gap: 12px; padding: 0 16px; }
    .topbar__burger { display: flex; }
    .topbar__area {
        position: absolute; left: 0; right: 0; top: 72px;
        flex-direction: column; align-items: stretch; gap: 8px;
        background: var(--surface); border-bottom: 1px solid var(--border);
        /* Acima do .user-backdrop (150): o menu do usuário mora dentro desta área
           no celular, e o backdrop por cima engolia o toque em "Meus Cursos". */
        padding: 16px; z-index: 160;
    }
    .topbar__area.collapse { display: none; }
    .topbar__nav { flex-direction: column; gap: 2px; }
    .topbar__link { border-bottom: 0; padding: 12px 14px; border-radius: 8px; }
    .topbar__link.active { background: var(--primary-tint); }
    .topbar__user { margin-left: 0; }
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover {
    color: var(--action);
    border-color: var(--action);
    background: var(--bg-surface);
}

/* Caixinha do usuário */
.user-menu { position: relative; }
.user-trigger {
    display: flex; align-items: center; gap: .55rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-control); corner-shape: squircle; padding: .35rem .85rem .35rem .4rem;
    color: var(--text); font: 500 .95rem var(--font-body); cursor: pointer;
    transition: border-color var(--t-fast) var(--ease-smooth);
}
.user-trigger:hover, .user-menu.open .user-trigger { border-color: var(--primary); }
.user-avatar {
    width: 28px; height: 28px; border-radius: var(--radius-full);
    background: var(--primary); color: var(--text-onprimary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}
.user-caret { color: var(--text-muted); font-size: .7rem; }

.user-dropdown {
    position: absolute; right: 0; top: calc(100% + .5rem);
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); padding: .4rem;
    min-width: 180px; z-index: 200;
    box-shadow: var(--shadow-lg);
}
.user-item {
    display: block; width: 100%; text-align: left;
    background: transparent; border: 0; color: var(--text);
    font: 500 .92rem var(--font-body); padding: .6rem .8rem;
    border-radius: var(--radius-sm); cursor: pointer;
}
.user-item:hover { background: var(--bg-elevated); }
.user-sair { color: var(--danger); }
.user-backdrop { position: fixed; inset: 0; z-index: 150; }

/* ── Botões / inputs ────────────────────────────────────────────────── */

.input {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    padding: .6rem .8rem;
    font: inherit;
    width: 100%;
}
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.input::placeholder { color: var(--text-muted); }

.link {
    background: none;
    border: 0;
    color: var(--primary);
    font: inherit;
    cursor: pointer;
    padding: 0;
}
.link:hover { text-decoration: underline; }

.status { color: var(--text-muted); margin: .5rem 0 1.25rem; }

/* Certificado: réplica do Print/Certificado.rdlc do V3 (A4 paisagem 29,7 x 21 cm).
   Posições = cm do relatório em % da página; fonte em cqw (1pt = 0,1188cqw).
   backend/Services/CertificadoPdf.cs desenha o PDF com as mesmas medidas. */
.certificado-pagina { max-width: 1100px; margin-inline: auto; }
.certificado-acoes { display: flex; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.certificado-aviso { margin: 0 0 var(--space-4); color: var(--text-muted); }
.certificado-v3 {
    position: relative;
    width: 100%;
    aspect-ratio: 297 / 210;
    container-type: inline-size;
    background: #fff url("../assets/certificado-fundo.jpg") center / 100% 100% no-repeat;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: var(--shadow-lg);
}
.certificado-v3 p { margin: 0; }
.certificado-v3 > p { position: absolute; text-align: center; }
.cv3-nome { left: 13.002%; top: 33.373%; width: 72.143%; font-size: 1.901cqw; font-weight: 700; }
.cv3-cpf { left: 32.007%; top: 36.919%; width: 34.430%; font-size: 1.425cqw; }
.cv3-empresa { left: 13.002%; top: 39.507%; width: 72.143%; font-size: 1.188cqw; }
.cv3-concluiu { left: 41.129%; top: 45.126%; width: 15.366%; font-size: 1.307cqw; font-weight: 700; }
.cv3-curso { left: 13.002%; top: 47.286%; width: 72.143%; font-size: 1.782cqw; }
.cv3-detalhes { position: absolute; left: 10.552%; top: 59.458%; width: 45.943%; font-size: 1.188cqw; line-height: 1.604cqw; }
.cv3-detalhes small { font-size: .83em; }
.cv3-detalhes .cv3-realizado { margin-top: .17cqw; line-height: 1.25; }
.cv3-prova { font-size: .831cqw; }
.cv3-detalhes .cv3-pontos { margin-top: .58cqw; font-size: .831cqw; line-height: 1.2; }
.cv3-qr { display: block; width: 8.519cqw; margin-top: .15cqw; image-rendering: pixelated; }
.cv3-detalhes .cv3-codigo { margin-left: .846cqw; font-size: .713cqw; line-height: 1.2; }

.card {
    display: flex;
    flex-direction: column;
    text-align: left;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    color: var(--text);
    transition: transform var(--t-fast), border-color var(--t-fast);
}
.card:hover { transform: translateY(-3px); border-color: var(--primary); }
.card img { width: 100%; height: 150px; object-fit: cover; display: block; }

.tag {
    display: inline-block;
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: var(--radius-sm);
    text-transform: none;
    letter-spacing: 0;
}

/* ── Detalhe do curso (paridade V3) ─────────────────────────────────── */
.voltar {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
    color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 600;
    margin: 12px 0 0 20px;
}
.voltar:hover { color: var(--text); text-decoration: none; }
.hero-area { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; }
/* Cor da área (a do V3, ver ApiCore AreaSql.Cor) usada como TEXTO: mantém matiz e croma e puxa a
   luminosidade só o necessário pro contraste AA no tema (≤ .5 no claro, ≥ .63 no escuro — no escuro
   o vermelho e o amarelo do V3 passam intactos e o azul mal mexe). Sem cor relativa, fica a crua. */
.cor-area { color: var(--area); color: oklch(from var(--area) min(l, .5) c h); }
[data-theme="dark"] .cor-area { color: oklch(from var(--area) max(l, .63) c h); }
/* Na capa com foto o véu é fraco no topo (35%): o rótulo vira um tom claro da cor da área, com sombra. */
.hero[data-theme="dark"] .cor-area { color: oklch(from var(--area) max(l, .82) c h); text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }

.hero {
    position: relative;
    border-radius: var(--radius-lg);
    background-color: var(--bg-elevated);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.hero-overlay { padding: 2.5rem 2rem; }
.hero h1 { margin: .5rem 0 .25rem; }
.hero h1:focus { outline: none; }
.hero .subtitulo { color: var(--text); opacity: .85; margin: 0 0 .75rem; font-size: 1.05rem; }
.hero .meta {
    display: flex; flex-wrap: wrap; gap: 1rem; align-items: center;
    color: var(--text); opacity: .9; font-size: .95rem; margin-top: .5rem;
}

@media (max-width: 767px) {
    .hero { border-radius: 0; min-height: 200px; margin: -16px -16px 0; }
    /* Só o "voltar" sobre a capa do curso vira botão redondo; o da trilha fica em linha (antes vazava pra baixo do logo). */
    .hero .voltar {
        position: absolute; top: 8px; left: 8px; z-index: 2;
        width: 48px; height: 48px; margin: 0; justify-content: center; border-radius: 99px;
        color: #fff; background: rgba(12, 22, 32, .45);
    }
    .hero .voltar span { display: none; }
    .trd .voltar { margin: 0; }
    .hero-overlay { padding: 64px 16px 20px; }
    .hero h1 { font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
    .hero .meta { flex-wrap: wrap; gap: 8px; }
    .hero .meta > span {
        display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
        border-radius: 8px; border: 1px solid rgba(255, 255, 255, .35); font-size: 13px;
        background: rgba(12, 22, 32, .55);   /* a capa atrás é foto: sem fundo, o texto dela vaza pela pílula */
    }
}

/* Conteúdo rich-text vindo do tr_CURSO (V3) */
/* Conteúdo de tr_CURSO é texto com quebras de linha (\n) — preservar.
   pre-line mantém as quebras e ainda renderiza eventual HTML/tags. */
.prose { color: var(--text); line-height: 1.7; white-space: pre-line; }
.prose :is(p, ul, ol, h1, h2, h3, h4, table) { white-space: normal; }
.prose :is(p, ul, ol) { margin: .5rem 0 1rem; }
.prose :is(h1,h2,h3,h4) { font-family: var(--font-display); margin: 1.25rem 0 .5rem; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin: .3rem 0; }
.prose a { color: var(--primary); }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--border); padding: .4rem .6rem; }

.crc-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.crc-list li {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .5rem .9rem;
}
.crc-list strong { color: var(--primary); }
.crc-cod { color: var(--text-muted); font-size: .85rem; }

/* Menu sanfona das seções do curso (sem JS, usa <details>) */
.acc { margin-bottom: 2rem; }
.acc-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
    overflow: hidden;
}
.acc-item:first-child { border-top: 1px solid var(--border); }
.acc-item > summary {
    cursor: pointer; list-style: none;
    padding: 1rem 1.1rem;
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
    display: flex; align-items: center; gap: .6rem;
}
.acc-item > summary::-webkit-details-marker { display: none; }
.acc-item > summary::before {
    content: "\203A"; /* › */
    color: var(--primary); font-size: 1.3rem; line-height: 1;
    transition: transform var(--t-fast) ease; flex-shrink: 0;
}
.acc-item[open] > summary::before { transform: rotate(90deg); }
.acc-item[open] > summary { border-bottom: 1px solid var(--border); }
.acc-item > summary:hover { color: var(--primary); }

.prof-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: .75rem; background: var(--bg-elevated);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: 1.25rem 1rem; margin-bottom: 1rem;
}
.prof-foto { width: 72px; height: 72px; border-radius: var(--radius-full); object-fit: cover; flex-shrink: 0; }
.prof-info { min-width: 0; width: 100%; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.prof-area {
    color: var(--text-muted); font-size: .82rem;
    background: var(--bg-surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .15rem .55rem;
}

/* Tela do curso com abas e cara de streaming (spec 2026-10-03) */
.hero--curso { min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; }
.hero--curso .voltar { position: absolute; top: 0; left: 0; }
.hero--curso .hero-overlay { padding-top: 4.5rem; }   /* hero alto (ao vivo no hero) cresce pra cima: sem isso passa por baixo do "voltar" */
.hero-acoes { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.hero-progresso { display: flex; align-items: center; gap: var(--space-3); max-width: 420px; margin-top: var(--space-4); font-size: .9rem; color: var(--text); }
.hero-progresso__barra { flex: 1; min-width: 0; }
.hero-msg { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: .9rem; }
.hero-datas { margin: var(--space-2) 0 0; color: var(--text); opacity: .8; font-size: .9rem; }

/* Turma ao vivo (abaixo do hero) e, sem turma gravada, ação principal dentro do hero */
.curso-aovivo {
    margin-top: var(--space-5); padding: var(--space-4) var(--space-5); max-width: 880px;
    background: var(--bg-elevated); border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--border));   /* o "Ao vivo" já está na etiqueta */
    border-radius: var(--radius-md);
}
.curso-aovivo:focus { outline: none; }
.curso-aovivo:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }   /* a sombra translúcida sozinha ficava em ~2:1 */
.curso-aovivo--principal { margin-top: var(--space-5); padding: 0; max-width: none; background: none; border: 0; }
.curso-aovivo__topo { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.curso-aovivo__titulo { margin: 0; font-size: 1.05rem; color: var(--text-strong); }
.curso-aovivo__texto { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: .92rem; }
.curso-aovivo__acoes { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-3); }
.curso-aovivo__lotada { margin: 0; font-weight: 600; color: var(--text-muted); }
/* Turma gravada: card secundário quando o ao vivo ocupa o hero */
.curso-gravada {
    margin-top: var(--space-5); padding: var(--space-4) var(--space-5); max-width: 880px;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.curso-gravada .curso-aovivo__acoes:focus { outline: none; }

/* Aviso de versão nova do curso (nunca cancela a matrícula antiga) */
.curso-versao {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4);
    background: var(--primary-tint); border: 1px solid var(--border); border-radius: var(--radius-md);
}
.curso-versao--arquivada { background: var(--warning-tint); border-color: var(--warning); }
.curso-versao--discreta { padding: 0; background: none; border: 0; font-size: .9rem; }
.curso-versao__texto { flex: 1 1 320px; margin: 0; color: var(--text); }
.curso-versao--discreta .curso-versao__texto { flex: 0 1 auto; color: var(--text-muted); }
.curso-versao__acoes { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.curso-versao .erro { flex-basis: 100%; margin: 0; }

.curso-abas { margin-top: var(--space-6); }
.curso-painel { padding-top: var(--space-5); max-width: 880px; }

.episodios { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.episodio {
    display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
    width: 100%; min-height: 56px; text-align: left; cursor: pointer;
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4); color: var(--text); text-decoration: none;
    transition: border-color var(--t-fast);
}
.episodio:hover { border-color: var(--primary); text-decoration: none; }
.episodio--bloqueado { cursor: default; }
.episodio--bloqueado:hover { border-color: var(--border); }
.episodio--atual { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); }
.episodio-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text-muted); text-align: center; }
.episodio-corpo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.episodio-titulo { font-weight: 600; }
.episodio-sinopse {
    color: var(--text-muted); font-size: .88rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.episodio-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: .85rem; white-space: nowrap; }
.episodio-ok { color: var(--success); font-weight: 600; }

.incluso {
    margin-bottom: var(--space-6);
}
.incluso h2 { font-size: 1.05rem; margin: 0 0 var(--space-3); color: var(--text-strong); }
.incluso ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-2) var(--space-4); }

.prof-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-4); }

.apresentacao-overlay {
    position: fixed; inset: 0; z-index: 100; padding: 16px;
    background: rgba(5, 4, 10, .82); display: flex; align-items: center; justify-content: center;
}
.apresentacao-caixa { position: relative; width: min(960px, 100%); }
.apresentacao-fechar {
    position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border: 0; border-radius: 99px;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}

/* ── Popup dos planos (curso pago sem assinatura). Mesmo desenho dos planos da landing. ── */
.planos-overlay {
    position: fixed; inset: 0; z-index: 100; padding: 16px; overflow-y: auto;
    background: rgba(5, 4, 10, .82); display: flex; align-items: flex-start; justify-content: center;
}
.planos-caixa {
    position: relative; width: min(1040px, 100%); margin: auto 0; padding: var(--space-6) var(--space-5) var(--space-5);
    background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.planos-caixa h2 { font-family: var(--font-display); font-size: var(--text-2xl); color: var(--text-strong); margin: 0 48px var(--space-2) 0; }
.planos-fechar {
    position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: var(--radius-full);
    background: var(--surface-2); color: var(--text); font-size: 26px; line-height: 1; cursor: pointer;
}
.planos-fechar:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.planos-sub { color: var(--text-muted); margin: 0 0 var(--space-4); }
.planos-todos { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 var(--space-5); padding: 0; font-size: 14px; }
.planos-todos li, .plano li { display: flex; align-items: baseline; gap: 8px; }
.planos-todos span, .plano li span { color: var(--primary); flex-shrink: 0; }
.planos-grade { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.plano { position: relative; display: flex; flex-direction: column; padding: var(--space-5) var(--space-4) var(--space-4);
         background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); }
.plano--destaque { border-color: var(--primary); }
.plano__selo { position: absolute; top: -12px; right: 20px; background: var(--primary); color: var(--text-onprimary);
               font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 4px; }
.plano h3 { font-family: var(--font-display); font-size: 20px; color: var(--text-strong); margin: 0 0 4px; }
.plano p { margin: 0; }
.plano__usuario { font-size: 14px; color: var(--text-muted); }
.plano__usuario strong { color: var(--text); }
.plano__preco { margin-top: var(--space-3); color: var(--text-muted); font-size: 13px; }
.plano__preco strong { display: block; color: var(--text-strong); font-family: var(--font-display); font-size: 28px; line-height: 1.4; }
.plano__preco small { margin-left: 2px; font-size: 15px; font-weight: 600; color: var(--text-muted); }
.plano ul { list-style: none; margin: var(--space-4) 0 var(--space-4); padding: var(--space-3) 0; border-block: 1px solid var(--border);
            display: grid; gap: 10px; font-size: 14px; flex: 1; align-content: start; }
.plano li.plano__nao, .plano li.plano__nao span { color: var(--text-muted); }
.plano .ds-btn { min-height: 48px; }
.planos-nota { margin: var(--space-4) 0 0; font-size: 13px; color: var(--text-muted); }
.planos-nota + .planos-nota { margin-top: var(--space-2); }
@media (max-width: 767px) {
    .planos-overlay { padding: 0; }
    .planos-caixa { margin: 0; min-height: 100%; border-radius: 0; border: 0; padding: var(--space-5) 16px; }
    .planos-grade { grid-template-columns: 1fr; gap: var(--space-5); }
}

@media (max-width: 767px) {
    .hero--curso { min-height: 320px; }
    .hero--curso .voltar { top: 8px; left: 8px; }
    .hero-acoes .ds-btn { flex: 1 1 100%; min-height: 48px; }
    .hero-acoes .ds-btn--primary { height: 52px; font-size: 16px; }
    .curso-aovivo__acoes .ds-btn, .curso-versao__acoes .ds-btn { flex: 1 1 100%; min-height: 48px; }
    .curso-aovivo:not(.curso-aovivo--principal), .curso-gravada { padding: var(--space-4); }
    /* O hero sangra -16px no celular; sem isso ele encosta no aviso de versão. */
    .curso-versao { margin-bottom: calc(var(--space-4) + 16px); }
    .curso-abas { margin-top: var(--space-4); }
    .episodio { grid-template-columns: 2rem minmax(0, 1fr) auto; padding: var(--space-3); }
    .episodio-num { font-size: 1.15rem; }
}

/* ── Mensagem de erro inline (página do curso) ─────────────────────── */
.erro { color: var(--danger); font-size: .9rem; margin: .5rem 0; }

/* Lista de materiais (Components/MateriaisLista.razor). */
.materiais-lista { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.materiais-lista li {
    display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
    padding: var(--space-3) var(--space-4); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-md);
    transition: border-color var(--t-fast), background var(--t-fast);
}
.materiais-lista li:hover { border-color: var(--primary); background: var(--surface-2); }
.materiais-lista a {
    flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: var(--space-2);
    color: var(--text); font-weight: 500;
}
.materiais-lista a:hover { color: var(--primary); text-decoration: none; }
.materiais-lista a :is(svg, i) { flex-shrink: 0; color: var(--primary); }
.materiais-lista .tipo {
    color: var(--text-muted); font-size: var(--text-xs); font-weight: 700; letter-spacing: 0;
    text-transform: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: .15rem .5rem;
}
.materiais-lista .obs { width: 100%; color: var(--text-muted); font-size: var(--text-xs); }

/* ── Superfície de vídeo ─────────────────────────────────────────────
   Panda/Vimeo injetam o próprio wrapper 16:9 (padding-top:56.25%); aqui
   só damos cantos, fundo e elevação. Fallback/placeholder/skeleton não
   têm SDK, então recebem a caixa 16:9 explícita. */
.video-player { display: block; width: 100%; }
.video-player__panda,
.video-player__vimeo,
.video-player__youtube,
.video-player__jitsi,
.video-player__frame,
.video-player__placeholder {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
}
.video-player__frame { position: relative; aspect-ratio: 16 / 9; }
.video-player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-player__placeholder {
    aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: var(--space-6);
    background: var(--grad-brand); color: var(--text-onbrand);
}
.video-player__placeholder p { max-width: 42ch; opacity: .92; font-size: var(--text-sm); line-height: var(--lh-base); }
.video-player__placeholder code { background: rgba(255,255,255,.16); padding: .1em .4em; border-radius: var(--radius-xs); }

/* ── Blazor error UI ────────────────────────────────────────────────── */
#blazor-error-ui {
    background: var(--danger);
    color: #fff;
    bottom: 0;
    display: none;
    left: 0;
    padding: .8rem 1.2rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

/* Splash de carregamento (vive dentro do #app; o Blazor a substitui ao montar).
   Sempre escura, igual ao background_color do manifest: no app instalado a splash
   nativa do Android emenda nesta sem piscar. Cores fixas porque o logo é branco. */
.splash { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; background: #0C1620; }
.splash img { width: min(240px, 60vw); height: auto; animation: splash-in .5s cubic-bezier(.22, 1, .36, 1) both; }
.splash__bar { width: min(160px, 40vw); height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.splash__bar span { display: block; height: 100%; width: var(--blazor-load-percentage, 0%); background: #45D5B5; transition: width .15s ease-out; }
@keyframes splash-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .splash img { animation: none; } }

/* ── Responsivo ─────────────────────────────────────────────────────── */
@media (max-width: 820px) {
    .content { padding: 1.5rem 1.25rem 3rem; }
    .trl .trl-hero { margin-top: -1.5rem; padding-inline: 1.25rem; }
    .user-menu { width: 100%; }
    .user-trigger { width: 100%; justify-content: flex-start; }
    .user-dropdown { position: static; width: 100%; box-shadow: none; margin-top: .4rem; }
}

/* ===========================================================================
   Catálogo — layout no padrão do kit "Modulos Play" (tokens já re-skinados)
   =========================================================================== */
.eyebrow {
    font-size: var(--text-xs); font-weight: 700; letter-spacing: 0;
    text-transform: none; color: var(--accent);
}

/* Catálogo alinhado com o logo: gutter do .content (3rem) + o daqui = 56px do
   .topbar, e max-width = 1440 − 2×3rem, então vale em qualquer largura ≥ 861px. */
.cat-hero {
    max-width: calc(1440px - 6rem); margin: 0 auto; width: 100%; box-sizing: border-box;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 48px;
    padding: 12px calc(56px - 3rem) 32px;
    border-bottom: 1px solid var(--border);
}
.cat-hero__texto { display: flex; flex-direction: column; gap: 12px; max-width: 620px; }
.cat-hero__title {
    font-size: clamp(28px, 2.7vw, 40px); line-height: 1.15; font-weight: 800;
    letter-spacing: -.035em; margin: 0; color: var(--text);
}
.cat-hero__sub { font-size: 17px; line-height: 1.5; color: var(--text-muted); margin: 0; }

.cat-search { position: relative; flex: 0 1 500px; display: flex; align-items: center; gap: 10px; margin: 0; }
.cat-search svg { position: absolute; left: 18px; color: var(--text-subtle); pointer-events: none; }
.cat-search input {
    flex: 1; min-width: 0; height: 56px; box-sizing: border-box;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px;
    padding: 0 20px 0 50px; font: inherit; font-size: 15px; color: var(--text); caret-color: var(--primary);
}
.cat-search input:focus { outline: none; border-color: var(--primary); box-shadow: var(--shadow-focus); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.cat-main { max-width: calc(1440px - 6rem); margin: 0 auto; padding: 0 calc(56px - 3rem) 80px; width: 100%; box-sizing: border-box; }
.cat-hero + .cat-main { padding-top: 32px; }
.cat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 40px; align-items: start; }
.cat-body { min-width: 0; }

.cat-filtro {
    position: sticky; top: 96px; display: flex; flex-direction: column; gap: 6px;
    max-height: calc(100vh - 112px); overflow-y: auto;
}
.cat-filtro__head { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.cat-filtro__btn {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px;
    padding: 10px 14px; border: 0; border-radius: 8px; background: transparent;
    color: var(--text-muted); font: inherit; font-size: 14px; font-weight: 500;
    text-align: left; cursor: pointer; transition: background var(--t-fast), color var(--t-fast);
}
.cat-filtro__btn:hover { background: var(--surface); color: var(--text); }
.cat-filtro__btn[aria-pressed="true"] { background: var(--primary-tint); color: var(--primary); font-weight: 700; }
/* "Gratuitos" é um atalho pra outra página, não um filtro da grade: link com a cara do chip. */
a.cat-filtro__btn:hover { text-decoration: none; }
.cat-filtro__dot { width: 8px; height: 8px; border-radius: 99px; flex-shrink: 0; }
.cat-filtro__count { margin-left: auto; opacity: .75; font-weight: 500; }

@media (max-width: 1199px) {
    .cat-hero { flex-direction: column; align-items: stretch; gap: 20px; padding: 12px calc(56px - 3rem) 24px; }
    .cat-search { flex-basis: auto; }
    .cat-main { padding: 0 calc(56px - 3rem) 64px; }
    .cat-hero + .cat-main { padding-top: 24px; }
    .cat-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .cat-filtro { position: static; flex-direction: row; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
    .cat-filtro__head { display: none; }
    .cat-filtro__btn {
        flex-shrink: 0; width: auto; min-height: 44px; padding: 0 14px;
        border-radius: var(--radius-control); corner-shape: squircle; border: 1px solid var(--border); background: var(--surface);
        font-size: 13px; font-weight: 600; white-space: nowrap;
    }
    .cat-filtro__btn[aria-pressed="true"] { border-color: var(--primary); }
    .cat-filtro__count { display: none; }
}
@media (max-width: 767px) {
    .cat-hero { padding: 8px 0 16px; }
    .cat-hero__title { font-size: 24px; }
    .cat-hero__sub { display: none; }
    .cat-search input { height: 52px; font-size: 16px; border-radius: 28px; border: 0; background: var(--surface-2); }
    .cat-main { padding: 0 0 32px; }
    .cat-hero + .cat-main { padding-top: 16px; }
    .cat-filtro { margin: 0 -16px; padding: 8px 16px 12px; }
}

.section-head {
    display: flex; justify-content: space-between; align-items: flex-end;
    gap: 24px; margin: 0 0 18px;
}
@media (max-width: 767px) {
    .section-head { flex-wrap: wrap; align-items: baseline; gap: 4px 16px; }
}
.cat-section { margin-top: 48px; }
/* Só zera o topo quando a seção é realmente a primeira coisa no corpo do
   catálogo (Cursos.razor: nada de Continuar/Lançamentos acima) ou a primeira
   seção logo abaixo do cabeçalho da página (PorArea.razor, sem .cat-body). */
.cat-body > .cat-section:first-child,
.cat-main > .cat-section:first-of-type {
    margin-top: 0;
}
.section-head h2 { font-size: var(--text-2xl); margin: 0; letter-spacing: -.01em; overflow-wrap: anywhere; }
.section-head__title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.section-head__bar { width: 4px; height: 26px; border-radius: 2px; flex-shrink: 0; }
.section-head__count { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
@media (max-width: 767px) {
    .section-head { margin-bottom: 12px; }
    .section-head h2 { font-size: 18px; }
    .cat-section { margin-top: 28px; }
}

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 1800px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1199px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (max-width: 767px)  { .cards { grid-template-columns: minmax(0, 1fr); gap: 16px; } }

/* Course card (.cc) — o card inteiro é um <a>; o título é o protagonista. */
.cc {
    display: flex; flex-direction: column; min-width: 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    color: var(--text); text-decoration: none;
    transition: border-color var(--t-fast);
}
.cc:hover, .cc:focus-within { border-color: var(--border-strong); text-decoration: none; }
.cc:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.cc__thumb { display: block; aspect-ratio: 16 / 10; position: relative; background: var(--surface-2); }
.cc__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cc__pill {
    position: absolute; top: 12px; left: 12px; z-index: 1;
    background: #071D19; color: #45D5B5;
    font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0;
    padding: 6px 10px; border-radius: var(--radius-sm);
}
.cc__pill--vivo { background: #D7263D; color: #fff; }
.cc__pill--data { background: rgba(4, 12, 18, .78); color: #fff; }
.cc__prog { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 4px; background: rgba(255, 255, 255, .3); }
.cc__prog > span { display: block; height: 100%; background: #45D5B5; }
.cc__body { display: flex; flex-direction: column; flex: 1; gap: 10px; padding: 20px 20px 16px; }
.cc__area { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.cc__title {
    font-size: 19px; line-height: 1.35; font-weight: 700; letter-spacing: -.02em;
    color: var(--text); overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.cc__sub {
    font-size: 14px; line-height: 1.5; color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cc__meta {
    display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center;
    margin-top: auto; padding-top: 14px; font-size: 13px; color: var(--text-muted);
}
.cc__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.cc__crc { color: var(--primary); font-weight: 600; }
.cc__cta {
    display: flex; justify-content: space-between; align-items: center;
    min-height: 44px; margin-top: 4px; padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 14px; font-weight: 700; color: var(--text);
}
@media (max-width: 767px) {
    .cc__thumb { aspect-ratio: 16 / 9; }
    .cc__body { padding: 18px 18px 14px; }
    .cc__sub { font-size: 15px; }
    .cc__meta { font-size: 14px; }
    .cc__cta { min-height: 48px; font-size: 15px; }
}

/* Continue strip */
.continue {
    background: var(--surface);
    border: 1px solid var(--primary); border-radius: 18px;
    padding: 20px 16px; margin: 0 0 40px;
    display: flex; align-items: center; gap: 8px; position: relative;
}
.continue__body {
    flex: 1; min-width: 0;
    display: grid; grid-template-columns: 280px 1fr auto; gap: 28px; align-items: center;
    padding: 0 8px;
    animation: continueIn var(--t-base) var(--ease-spring);
}
@keyframes continueIn {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}
/* Seta "anterior": o curso vem da esquerda, do lado da seta clicada. */
.continue__body--prev { animation-name: continueInPrev; }
@keyframes continueInPrev { from { opacity: 0; transform: translateX(-16px); } }
/* Depois da 1ª troca a barra já aparece cheia: reencher a cada seta é ruído. */
.continue__body--trocou .ds-progress__fill { animation: none; }
@media (prefers-reduced-motion: reduce) {
    .continue__body { animation: none; }
}
.continue__arrow {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.continue__arrow:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.continue__dots {
    position: absolute; right: 16px; bottom: 10px;
    font-size: 11px; color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
@media (max-width: 980px) {
    /* Carrossel continua funcionando no mobile: setas menores nas laterais,
       contador reposicionado pra não cobrir o conteúdo empilhado. */
    .continue { padding: 16px 6px; gap: 4px; }
    .continue__arrow { width: 32px; height: 32px; font-size: 17px; align-self: center; }
    .continue__dots { display: none; }
}
.continue__preview {
    aspect-ratio: 16/9; border-radius: 12px; overflow: hidden; position: relative;
    background: var(--grad-brand); cursor: pointer;
}
.continue__preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.continue__play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    width: 44px; height: 44px; border-radius: 999px; background: #fff; color: var(--brand-navy);
    display: flex; align-items: center; justify-content: center; font-size: 16px; padding-left: 3px;
}
.continue__info h3 { font-size: var(--text-2xl); line-height: 1.25; margin: 8px 0 0; }
.continue__meta { display: flex; gap: 18px; margin-top: 10px; font-size: 13px;
    color: var(--text-muted); font-variant-numeric: tabular-nums; }
.continue__prog { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; max-width: 560px; }
.continue__prog .ds-progress { flex: 1 1 160px; }
.continue__prog-txt { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.continue__actions { display: flex; flex-direction: column; gap: 8px; }

.cat-vermais { display: flex; justify-content: center; margin-top: 24px; }

@media (max-width: 980px) {
    .continue__body { grid-template-columns: minmax(0, 1fr); }
    .continue__meta { flex-wrap: wrap; gap: 4px 18px; }
    .continue__actions { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 767px) {
    .continue { margin-bottom: 16px; }
    .continue__info h3 { font-size: var(--text-xl); }
}

/* ── Casca mobile (≤ 767px): topo só com logo e conta; barra inferior assume a
   navegação (bottom-nav.css); conteúdo com respiro pra barra. ─────────────── */
@media (max-width: 767px) {
    .page { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
    .topbar { height: 52px; padding: 0 10px 0 16px; gap: 8px; }   /* 10 + 6 de folga do toque = avatar a 16px da borda, igual ao logo */
    .topbar__brand { width: 164px; height: 44px; }   /* logo segue com 20px (contain); a caixa de toque é que cresce */
    .topbar__burger { display: none; }
    .topbar__area, .topbar__area.collapse {
        display: flex; position: static; flex-direction: row; align-items: center;
        padding: 0; background: transparent; border: 0; margin-left: auto; flex: 0 0 auto;
    }
    .topbar__nav { display: none; }
    .topbar__user { margin-left: 0; gap: 4px; }
    .topbar__link--cta { min-height: 44px; padding: 0 12px; border-radius: var(--radius-control); corner-shape: squircle; }
    .theme-toggle { display: none; }          /* no celular o tema fica na página Perfil */
    .user-nome, .user-caret { display: none; }
    .content { padding: 16px 16px 2rem; }
    body { font-size: 15px; }
    h1 { font-size: 24px; }
    /* O menu do usuário (herda largura 100%/dropdown estático do painel-burger
       de ≤820px, que não se aplica mais aqui) precisa ficar compacto na barra
       de 52px da casca mobile e abrir como popover, não como painel inline. */
    .user-menu, .user-trigger { width: auto; }
    /* Sem nome nem seta, só o avatar: sem a moldura de pílula, mas com os 44px de toque. */
    /* Alvo de toque mínimo de 44px (botões do kit e abas nasciam com 38–41px). */
    :is(.ds-btn, .ds-tab) { min-height: 44px; }
    .user-trigger { min-width: 44px; min-height: 44px; padding: 0; justify-content: center; border: 0; background: none; }
    .user-avatar { width: 32px; height: 32px; font-size: .9rem; }
    .user-dropdown {
        position: absolute; right: 0; top: calc(100% + 8px); width: auto;
        min-width: 200px; margin-top: 0; box-shadow: var(--shadow-lg);
    }
}

/* ── Perfil ───────────────────────────────────────────────────────────── */
.perfil { max-width: 640px; }
.perfil__cartao {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.perfil__avatar {
    width: 56px; height: 56px; border-radius: 99px; flex-shrink: 0;
    background: var(--primary); color: var(--text-onprimary); font-weight: 800; font-size: 22px;
    display: inline-flex; align-items: center; justify-content: center;
}
.perfil__dados { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.perfil__dados strong { font-size: 18px; }
.perfil__dados span { color: var(--text-muted); font-size: 14px; overflow-wrap: anywhere; }
.perfil__lista { display: flex; flex-direction: column; margin-top: 24px; border-top: 1px solid var(--border); }
.perfil__item {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    min-height: 56px; padding: 0 4px; border: 0; border-bottom: 1px solid var(--border);
    background: transparent; color: var(--text); font: inherit; font-size: 16px;
    text-align: left; text-decoration: none; cursor: pointer;
}
.perfil__item:hover { text-decoration: none; background: var(--surface); }
.perfil__valor { color: var(--text-muted); font-size: 15px; }
.perfil__item--sair { color: var(--danger); }

/* Notificações (spec 2026-09-22-web-push-portal-design.md): submenu dentro da lista do Perfil */
.perfil__menu > summary { list-style: none; }
.perfil__menu > summary::-webkit-details-marker { display: none; }
.perfil__rotulo { display: inline-flex; align-items: center; gap: 12px; }
.perfil__rotulo .fa-solid { width: 18px; text-align: center; color: var(--text-muted); }
.perfil__valor .perfil__seta { margin-left: 10px; font-size: 12px; transition: transform .2s ease-out; }
.perfil__menu[open] .perfil__seta { transform: rotate(180deg); }
.perfil__painel { padding: 4px 4px 12px 34px; border-bottom: 1px solid var(--border); }
.perfil__dispositivo {
    display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px;
}
.perfil__aviso { margin: 0 0 8px; color: var(--text-muted); font-size: 14px; }
.perfil__erro { color: var(--danger); font-size: 14px; margin: 8px 0 0; }
.perfil__prefs { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.perfil__prefs legend { font-weight: 700; font-size: 14px; padding: 0; color: var(--text-muted); }
.perfil__prefs .perfil__switch:last-of-type { border-bottom: 0; }

/* Interruptor do dispositivo: maior que os das preferências, com o sino na bolinha. */
.perfil__sino {
    position: relative; flex-shrink: 0; width: 64px; height: 36px; padding: 0; border: 0;
    border-radius: 99px; background: var(--surface-3); cursor: pointer;
    transition: background .2s ease-out;
}
.perfil__sino-bola {
    position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--surface); color: var(--text-muted); font-size: 13px;
    box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s ease-out, color .2s ease-out;
}
.perfil__sino[aria-checked="true"] { background: var(--primary); }
.perfil__sino[aria-checked="true"] .perfil__sino-bola { transform: translateX(28px); color: var(--primary); }
.perfil__sino:disabled { opacity: .5; cursor: not-allowed; }
.perfil__sino:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .perfil__seta, .perfil__sino, .perfil__sino-bola { transition: none; }
}
.perfil__switch {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    min-height: 56px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.perfil__switch input {
    appearance: none; flex-shrink: 0; position: relative; margin: 0; cursor: pointer;
    width: 44px; height: 24px; border-radius: 99px; background: var(--surface-3);
    transition: background .15s ease-out;
}
.perfil__switch input::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
    border-radius: 50%; background: var(--text); transition: transform .15s ease-out;
}
.perfil__switch input:checked { background: var(--primary); }
.perfil__switch input:checked::after { transform: translateX(20px); background: var(--text-onprimary); }
.perfil__switch input:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    .perfil__switch input, .perfil__switch input::after { transition: none; }
}


@media (max-width: 767px) {
    /* Meus cursos vira lista M3: miniatura 96px, título e progresso empilhados. */
    .mc-list { margin-top: var(--space-4); gap: 0; margin-inline: -16px; }
    .mc-item { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
    .mc-thumb { width: 96px; aspect-ratio: 16 / 10; align-self: center; margin: 10px 0 10px 16px; border-radius: 8px; }
    .mc-row {
        grid-template-columns: minmax(0, 1fr) 24px;
        grid-template-areas: "main chevron" "prog chevron";
        gap: 8px; padding: 12px 16px 12px 14px;
    }
    .mc-row__title { font-size: 15px; }
    .mc-row__status { display: none; }
    .mc-row__chevron { display: block; grid-area: chevron; align-self: center; }
}

/* ── Catálogo no celular: cartão compacto e prateleiras (spec 2026-09-22) ── */
.cc__thumb-area {
    display: none; position: absolute; left: 10px; right: 10px; bottom: 10px;
    font-size: 12px; font-weight: 700; letter-spacing: 0; line-height: 1.2;
    text-transform: none; color: #fff;
}
.cc__pontos {
    display: none; position: absolute; right: 6px; bottom: 6px; z-index: 1;
    padding: 2px 6px; border-radius: 6px; background: rgba(0, 0, 0, .65);
    color: #fff; font-size: 11px; font-weight: 700;
}

.pr { margin: 0 -16px 24px; }
.pr__head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 44px; padding: 4px 16px; box-sizing: border-box;   /* título de 2 linhas enche os 44px: o padding mantém o respiro */
    border: 0; background: none; color: var(--text); font: inherit; text-align: left;
    text-decoration: none; cursor: pointer;
}
.pr__head:hover { text-decoration: none; }
.pr__titulo { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.pr__nome { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.pr__cor { width: 4px; height: 18px; border-radius: 2px; flex-shrink: 0; }
.pr__mais { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.pr__trilho {
    display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 4px;
    scroll-snap-type: x mandatory; scroll-padding-left: 16px;
    overscroll-behavior-x: contain; scrollbar-width: none;
}
.pr__trilho::-webkit-scrollbar { display: none; }
.pr__trilho > * { flex: 0 0 40%; scroll-snap-align: start; }   /* ~2,4 cartões visíveis */

@media (max-width: 767px) {
    .cat-body--grade .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
    :is(.pr, .cat-body--grade) .cc { border: 0; border-radius: 0; background: transparent; overflow: visible; }
    :is(.pr, .cat-body--grade) .cc__thumb { aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; }
    :is(.pr, .cat-body--grade) .cc__body { padding: 8px 2px 0; gap: 0; }
    :is(.pr, .cat-body--grade) :is(.cc__area, .cc__sub, .cc__meta, .cc__cta) { display: none; }
    :is(.pr, .cat-body--grade) .cc__title {
        font-size: 14px; line-height: 1.3; letter-spacing: -.01em;
        display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    }
    :is(.pr, .cat-body--grade) :is(.cc__thumb-area, .cc__pontos) { display: block; }
    :is(.pr, .cat-body--grade) .cc__pill { top: 6px; left: 6px; padding: 3px 7px; font-size: 11px; }
}

/* ── Catálogo no celular: destaque e troca prateleiras × grade (spec 2026-09-22) ── */
.cat-celular, .topbar__busca { display: none; }
@media (max-width: 767px) {
    .topbar__busca {
        display: inline-flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; border-radius: 99px; color: var(--text);
    }
    .cat-hero:not(.cat-hero--busca) { display: none; }
    .cat-hero:not(.cat-hero--busca) + .cat-main { padding-top: 0; }   /* sem o cabeçalho, sem o respiro dele */
    .cat-filtro { scrollbar-width: none; }
    .cat-filtro::-webkit-scrollbar { display: none; }
    .continue { display: none; }
    .cat-celular { display: block; }
    .cat-body--prateleiras > :not(.cat-celular) { display: none; }

    /* Carrossel dos cursos em andamento: um cartão por gesto, o próximo aparecendo na borda. */
    .dst-trilho {
        display: flex; gap: 10px; margin: 0 -16px 20px; padding: 0 16px;
        overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px;
        overscroll-behavior-x: contain; scrollbar-width: none;
    }
    .dst-trilho::-webkit-scrollbar { display: none; }
    .dst {
        position: relative; display: block; flex: 0 0 88%; --proporcao: 75%;
        scroll-snap-align: start; scroll-snap-stop: always;
        border-radius: 16px; overflow: hidden; background: var(--surface-2);
        color: #fff; text-decoration: none;
    }
    .dst:only-child { flex-basis: 100%; }
    .dst:hover { text-decoration: none; }
    .dst img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .dst-todos {
        flex: 0 0 36%; scroll-snap-align: end;
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
        border-radius: 16px; background: var(--surface-2); color: var(--text);
        font-size: 15px; font-weight: 700; text-decoration: none;
    }
    .dst-todos:hover { text-decoration: none; }
    .dst-todos__icone {
        display: grid; place-items: center; width: 48px; height: 48px; border-radius: 99px;
        background: #45D5B5; color: #071D19;
    }
    .dst__pos {
        position: absolute; top: 12px; right: 12px; padding: 3px 9px; border-radius: var(--radius-sm);
        background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700;
    }
    .dst__info {
        position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 6px;
        padding: 56px 16px 16px; background: linear-gradient(transparent, rgba(4, 12, 18, .92) 55%);
    }
    .dst__eyebrow { font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: #9FE1CB; }
    .dst__titulo {
        font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em;
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    }
    .dst__meta { font-size: 13px; opacity: .85; }
    .dst__barra { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
    .dst__barra > span { display: block; height: 100%; background: #45D5B5; }
    .dst__btn {
        align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
        margin-top: 4px; padding: 0 20px; border-radius: var(--radius-control); corner-shape: squircle;
        background: #45D5B5; color: #071D19; font-size: 15px; font-weight: 700;
    }
}

/* ── Início: home do aluno logado (spec 2026-09-23) ─────────────────────────── */
/* Coluna minmax(0, 1fr): com a coluna implícita (auto) os trilhos horizontais (dicas, prateleiras) contam a
   largura somada dos cartões, a coluna estoura a tela e a página inteira fica mais larga — o banner (88%)
   vira gigante no iOS e o Android desloca a página e o menu de baixo para o lado. */
.ini { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.ini-ola { display: grid; gap: 4px; }
.ini-ola h1 { margin: 0; font-size: var(--text-3xl); letter-spacing: -.02em; text-wrap: balance; }
.ini-ola p { margin: 0; font-size: 17px; color: var(--text-muted); }
.ini-celular { display: none; }
.ini-erro { display: grid; justify-items: start; gap: 16px; padding: 48px 0; }

/* Topo do Início (pedido 2026-09-26): um slide por vez, ~40% da altura da tela. A capa (3:2, com texto
   na arte) aparece inteira à direita; a mesma imagem desfocada preenche o fundo. */
.ban { position: relative; }
.ban__slide {
    position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 46%); align-items: center; gap: 32px;
    height: clamp(320px, 40vh, 460px); padding: 32px 72px; overflow: hidden; border-radius: 20px;
    background: linear-gradient(120deg, var(--area, var(--surface-2)) 0%, var(--surface) 75%); color: #fff;
    animation: banEntra var(--t-base) ease-out;
}
.ban__fundo { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover;
              filter: blur(28px) brightness(.45); }
.ban__slide::after { content: ""; position: absolute; inset: 0;
                     background: linear-gradient(90deg, rgba(4, 12, 18, .85) 0%, rgba(4, 12, 18, .35) 60%, transparent); }
.ban__texto, .ban__capa { position: relative; z-index: 1; }
.ban__texto { display: grid; justify-items: start; gap: 12px; }
.ban__capa { justify-self: end; width: auto; height: auto; max-width: 100%; max-height: calc(clamp(320px, 40vh, 460px) - 64px); border-radius: 14px;
             box-shadow: 0 16px 48px rgba(0, 0, 0, .45); }
.ban__titulo { margin: 0; color: #fff; font-size: var(--text-3xl); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance;
               display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ban__meta { margin: 0; font-size: 15px; opacity: .85; }
.ban__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 4px; padding: 0 24px; border-radius: var(--radius-control); corner-shape: squircle;
            background: #45D5B5; color: #071D19; font-size: 16px; font-weight: 700; }
.ban__cta:hover { text-decoration: none; filter: brightness(1.08); }
.ban__tag { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 5px 12px; border-radius: var(--radius-sm);
            background: rgba(0, 0, 0, .55); color: #9FE1CB; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.ban__tag--destaque { color: #FFD166; }
.ban__tag--vivo { background: #D7263D; color: #fff; }
.ban__tag--hoje { background: rgba(215, 38, 61, .85); color: #fff; }
.ban__tag--vivo::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: banPulso 1.4s ease-in-out infinite; }
.ban__seta { position: absolute; top: 50%; z-index: 2; transform: translateY(-50%); display: grid; place-items: center;
             width: 44px; height: 44px; border: 0; border-radius: 99px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 26px; cursor: pointer; }
.ban__seta:hover { background: rgba(0, 0, 0, .7); }
.ban__seta--ant { left: 14px; }
.ban__seta--prox { right: 14px; }
.ban__pontos { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2; display: flex; justify-content: center; gap: 2px; }
.ban__ponto { width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; }
.ban__ponto::before { content: ""; display: block; width: 8px; height: 8px; margin: auto; border-radius: 99px;
                      background: rgba(255, 255, 255, .45); transition: width var(--t-fast), background var(--t-fast); }
.ban__ponto[aria-current="true"]::before { width: 20px; background: #fff; }
@keyframes banEntra { from { opacity: .4; } to { opacity: 1; } }
@keyframes banPulso { 50% { opacity: .3; } }
@media (max-width: 1023px) {
    .ban__slide { grid-template-columns: minmax(0, 1fr) minmax(0, 40%); padding: 24px 64px; }
    .ban__titulo { font-size: var(--text-2xl); }
    .ban__capa { max-height: calc(clamp(320px, 40vh, 460px) - 48px); }
}
@media (prefers-reduced-motion: reduce) {
    .ban__slide, .ban__tag--vivo::before { animation: none; }
}

.ptr { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px;
       border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.ptr__cab { display: flex; align-items: baseline; gap: 12px; }
.ptr__titulo { margin: 0; font-size: var(--text-xl); letter-spacing: -.01em; }
.ptr__trocar { margin-left: auto; padding: 4px 0; border: 0; background: none; color: var(--primary);
               font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ptr__trocar:hover { text-decoration: underline; }
.ptr__trocar--fim { margin-left: 0; align-self: flex-start; }
.ptr__meta { margin: 0; font-size: 13px; color: var(--text-muted); }
.ptr__fim { margin: 0; font-weight: 600; }
.ptr__passos { display: grid; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.ptr__passo { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: center;
              font-size: 14px; color: var(--text-muted); }
.ptr__passo a { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: inherit; text-decoration: none; }
.ptr__passo a:hover { color: var(--text); text-decoration: underline; }
.ptr__n { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--border-strong);
          border-radius: 50%; font-size: 12px; font-weight: 800; }
.ptr__passo--ok .ptr__n { border-color: var(--primary); background: var(--primary); color: var(--text-onprimary); }
.ptr__passo--agora { color: var(--text); font-weight: 700; }
.ptr__passo--agora .ptr__n { border-color: var(--primary); color: var(--primary); }
.ptr__capas { display: none; }

.cvt { display: grid; gap: 10px; padding: 20px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); }
.cvt__titulo { margin: 0; font-size: var(--text-xl); }
.cvt__sub { margin: 0; font-size: 14px; color: var(--text-muted); }
.cvt__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cvt__chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius-control); corner-shape: squircle; background: none;
             color: var(--text); font: inherit; font-size: 14px; cursor: pointer;
             transition: border-color var(--t-fast), background var(--t-fast); }
.cvt__chip:hover { border-color: var(--primary); background: var(--surface-2); }
.cvt__chip--todas { border-color: var(--primary); color: var(--primary); font-weight: 700; }

.ini-prat .section-head { align-items: baseline; }
.ini-prat__desc { margin: -10px 0 16px; font-size: 14px; color: var(--text-muted); }
.pr__desc { margin: -4px 16px 10px; font-size: 14px; color: var(--text-muted); }
.ini-prat__mais { border: 0; background: none; color: var(--primary); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.ini-fileira { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ini-fileira:not(.ini-fileira--aberta) > :nth-child(n+5) { display: none; }
.ini-prat--ate4 .ini-prat__mais { display: none; }
a.ini-prat__mais:hover { text-decoration: none; }
/* "Ver todos" no fim da prateleira (Continuar assistindo): um cartão só com o convite. */
.pr-todos {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    min-height: 100%; border-radius: var(--radius-lg); background: var(--surface-2); color: var(--text);
    font-size: 15px; font-weight: 700; text-decoration: none;
}
.pr-todos:hover { text-decoration: none; }
.pr-todos__icone {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 99px;
    background: #45D5B5; color: #071D19;
}
.pr__trilho > .pr-todos { flex-basis: 30%; }
@media (max-width: 1199px) {
    .ini-fileira { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ini-fileira:not(.ini-fileira--aberta) > :nth-child(n+3) { display: none; }
    .ini-prat--ate4 .ini-prat__mais { display: inline; }
}

.esc-fundo { position: fixed; inset: 0; z-index: 300; background: rgba(4, 12, 18, .6); }
.esc { position: fixed; z-index: 301; left: 50%; top: 50%; transform: translate(-50%, -50%);
       width: min(560px, calc(100% - 32px)); max-height: min(80vh, 720px); overflow-y: auto; padding: 20px;
       border: 1px solid var(--border); border-radius: 18px; background: var(--surface);
       box-shadow: 0 20px 60px rgba(0, 0, 0, .4); outline: none; }
.esc__cab { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.esc__cab h2 { margin: 0; font-size: var(--text-xl); }
.esc__voltar, .esc__fechar { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 99px;
                             background: none; color: var(--text-muted); font-size: 24px; cursor: pointer; }
.esc__fechar { margin-left: auto; }
.esc__voltar:hover, .esc__fechar:hover { background: var(--surface-2); color: var(--text); }
.esc__grupos, .esc__lista { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.esc__grupo, .esc__trilha { display: grid; gap: 4px; width: 100%; padding: 14px 16px; border: 1px solid var(--border);
                            border-radius: 12px; background: none; color: var(--text); font: inherit; text-align: left;
                            cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.esc__grupo:hover, .esc__trilha:hover { border-color: var(--primary); background: var(--surface-2); }
.esc__grupo { grid-template-columns: 1fr auto; align-items: center; }
.esc__grupo span, .esc__n { font-size: 13px; color: var(--text-muted); }
.esc__desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
             font-size: 13px; color: var(--text-muted); }
.esc__limpar { margin-top: 14px; border: 0; background: none; color: var(--primary); font: inherit; font-size: 14px;
               font-weight: 700; cursor: pointer; }

@media (max-width: 767px) {
    .ini { gap: 24px; }
    .ini-ola h1 { font-size: 22px; }
    .ini-ola p { font-size: 15px; }
    .ini-computador { display: none; }
    .ini-celular { display: block; }
    .ptr, .cvt { padding: 16px; }
    .ptr__passos { display: none; }
    .ptr__capas { display: flex; gap: 10px; margin: 4px -16px 0; padding: 0 16px; overflow-x: auto;
                  scroll-snap-type: x mandatory; scrollbar-width: none; }
    .ptr__capas::-webkit-scrollbar { display: none; }
    .ptr__capa { position: relative; flex: 0 0 44%; --proporcao: 62.5%; overflow: hidden; border-radius: 12px;
                 background: var(--surface-2); scroll-snap-align: start; color: #fff; text-decoration: none; }
    .ptr__capa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .ptr__capa::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(4, 12, 18, .9)); }
    .ptr__cn { position: absolute; z-index: 1; left: 8px; top: 8px; display: grid; place-items: center; width: 24px; height: 24px;
               border-radius: 50%; background: rgba(0, 0, 0, .6); font-size: 12px; font-weight: 800; }
    .ptr__capa--agora .ptr__cn { background: var(--primary); color: var(--text-onprimary); }
    .ptr__ct { position: absolute; z-index: 1; left: 8px; right: 8px; bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2;
               -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.25; }
    .esc { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 85vh; border-radius: 18px 18px 0 0;
           padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Escolher trilha: no computador a caixa cresce do centro; no celular a folha sobe de baixo.
   Só a entrada anima — fechar é instantâneo (resposta do sistema tem que ser imediata). */
.esc-fundo { transition: opacity var(--t-base) ease; }
.esc { transition: opacity var(--t-base) var(--ease-spring), transform var(--t-base) var(--ease-spring); }
@starting-style {
    .esc-fundo { opacity: 0; }
    .esc { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
}
@media (max-width: 767px) {
    .esc { transition: transform 300ms var(--ease-drawer); }
    @starting-style { .esc { opacity: 1; transform: translateY(100%); } }
}
@media (prefers-reduced-motion: reduce) {
    .esc { transition-property: opacity; }
}

/* ── Trilhas de carreira (spec 2026-09-23): escada por área e linha do tempo ─── */
.trl-area, .trd, .trl-atalho { --area: var(--primary); }
.trl-area--contabil { --area: var(--area-contabil); }
.trl-area--fiscal { --area: var(--area-fiscal); }
.trl-area--dp { --area: var(--area-dp); }
.trl-area--financeiro { --area: var(--area-financeiro); }
/* --area-ink: a cor da área quando vira texto/ícone. No claro, o tom puro não passa 4.5:1 sobre branco. */
.trl-area, .trd { --area-ink: oklch(from var(--area) max(l, .74) min(c, .16) h); }
[data-theme="light"] :is(.trl-area, .trd) { --area-ink: oklch(from var(--area) min(l, .46) min(c, .12) h); }

.trl { display: grid; gap: 36px; }
.trl-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 32px;
            min-height: 240px; overflow: hidden; isolation: isolate; border-bottom: 1px solid var(--border);
            /* De ponta a ponta: cancela o padding do .content (2.5rem 3rem, max 1600px) e alinha o texto com a página. */
            margin: -2.5rem calc(50% - 50vw) 0; padding: 40px max(3rem, calc(50vw - 800px + 3rem)); }
main:has(.trl-hero) { overflow-x: clip; }
/* Tablet: a panorâmica fica miúda numa coluna estreita; usa a vertical (o <picture> troca até 1199px), recortada. */
@media (min-width: 768px) and (max-width: 1199px) {
    .trl-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .trl-hero__image { height: 380px; object-fit: cover; object-position: center 35%; }
}
/* Mesma receita do banner do Início: a própria imagem desfocada preenche o fundo. */
.trl-hero__fundo { position: absolute; inset: -24px; z-index: -2; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover;
                   filter: blur(28px) brightness(.45); }
.trl-hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
                   background: linear-gradient(90deg, rgba(4, 12, 18, .85) 0%, rgba(4, 12, 18, .35) 60%, transparent); }
.trl-hero__media { display: block; min-width: 0; }
.trl-hero__image { display: block; width: 100%; height: auto; border-radius: var(--radius-lg); }
.trl-hero h1 { margin: 0; font-size: clamp(26px, 3vw, 40px); line-height: 1.15; letter-spacing: -.02em; color: #fff; text-wrap: balance; }
.trl-hero__novo { font-weight: 700; color: #fff !important; }
.trl-hero p { max-width: 52ch; margin: 12px 0 0; color: rgb(255 255 255 / .86); }
/* Atalhos pras áreas: chips que quebram linha, cabe qualquer número de áreas. */
.trl-atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.trl-atalho { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
              border-radius: var(--radius-control); corner-shape: squircle;
              border: 1px solid rgb(255 255 255 / .18); background: rgb(8 12 22 / .55); backdrop-filter: blur(6px);
              color: oklch(from var(--area) max(l, .8) min(c, .14) h); font-size: 13px; font-weight: 700; text-decoration: none; }
.trl-atalho:hover, .trl-atalho:active { text-decoration: none; background: rgb(255 255 255 / .12); }
.trl-area__cab h2 { scroll-margin-top: 96px; }

.trl-empresa { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid color-mix(in srgb, #7C9CFF 45%, var(--border));
               border-radius: 14px; background: var(--surface);
               color: var(--text); text-decoration: none; }
.trl-empresa:hover { text-decoration: none; border-color: #7C9CFF; }
.trl-empresa i { color: #7C9CFF; }
.trl-empresa span { color: var(--text-muted); }
.trl-empresa__ver { margin-left: auto; color: #7C9CFF !important; font-weight: 800; white-space: nowrap; }

/* Cada área é uma cena na cor dela. A escada é uma silhueta: cada degrau é uma coluna que sobe do chão
   (padding-top decrescente, colunas esticadas até o fundo), então o topo de cada degrau cai exato,
   seja qual for o texto. O título ocupa o canto vazio em cima dos primeiros degraus. */
.trl-area { --sobe: 32px; position: relative; overflow: hidden; padding: 24px; border-radius: 22px;
            border: 1px solid color-mix(in srgb, var(--area) 28%, var(--border));
            background: color-mix(in srgb, var(--area) 5%, var(--surface)); }
.trl-area__cab { position: absolute; z-index: 1; top: 24px; left: 24px; max-width: min(44%, 440px); display: grid; gap: 2px; }
.trl-area__cab h2 { margin: 0; font-size: var(--text-2xl); letter-spacing: -.02em; line-height: 1.15; text-wrap: balance; }
.trl-area__cab p { margin: 0; font-size: 14px; font-weight: 700; color: var(--area-ink); }
.trl-area--curta .trl-area__cab { position: static; margin-bottom: 16px; }

.trl-escada { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; margin: 0; padding: 12px 0 0; list-style: none; }
.trl-escada > li { display: flex; flex-direction: column; container-type: inline-size;
                   padding-top: calc((var(--n) - 1 - var(--i)) * var(--sobe)); }
.trl-degrau { position: relative; flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 16px;
              border: 1px solid color-mix(in srgb, var(--area) 22%, var(--border)); border-radius: 14px 14px 6px 6px;
              background: var(--surface);
              color: var(--text); text-decoration: none;
              transition: border-color var(--t-fast), box-shadow var(--t-base); }
.trl-degrau:hover { border-color: var(--area); text-decoration: none; }
.trl-degrau__linha { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.trl-degrau__ic { display: grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
                  background: color-mix(in srgb, var(--area) 18%, transparent); color: var(--area-ink); font-size: 15px; }
/* Capas dos primeiros cursos, sobrepostas: dá rosto ao degrau. Somem quando o cartão fica estreito. */
.trl-degrau__capas { display: flex; }
.trl-degrau__capas img { width: 28px; height: 28px; margin-left: -9px; border: 2px solid var(--surface); border-radius: 50%;
                         object-fit: cover; background: var(--surface-2); }
.trl-degrau__capas img:first-child { margin-left: 0; }
.trl-degrau b { font-size: 15px; line-height: 1.25; text-wrap: balance; }
.trl-degrau__faz { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
                   font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.trl-degrau__meta { margin-top: 2px; font-size: 12px; font-weight: 700; color: var(--area-ink); font-variant-numeric: tabular-nums; }
.trl-degrau .ds-progress { height: 5px; margin-top: 8px; }
@container (width < 150px) { .trl-degrau__faz { display: none; } }
@container (width < 132px) { .trl-degrau__capas { display: none; } }
/* O topo da carreira: a coluna mais alta, com mais cor. */
.trl-degrau--topo { border-color: color-mix(in srgb, var(--area) 50%, var(--border));
                    background: color-mix(in srgb, var(--area) 12%, var(--surface)); }
.trl-degrau--sua { border-color: var(--area);
                   box-shadow: 0 0 0 1px var(--area) inset; }
.trl-degrau__voce { position: absolute; top: -10px; right: 12px; padding: 2px 8px; border-radius: 8px; background: var(--area);
                    color: #071D19; font-size: 11px; font-weight: 800; letter-spacing: .05em; }

/* Número do passo: no PC, selo no canto do degrau, com seta pro próximo degrau no vão entre as colunas. */
.trl-degrau__num { position: absolute; top: -10px; left: 12px; display: grid; place-items: center; min-width: 22px; height: 22px;
                   padding: 0 6px; border: 1px solid var(--area); border-radius: 11px; background: var(--surface);
                   color: var(--area-ink); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.trl-passo--feito .trl-degrau__num,
.trl-degrau--sua .trl-degrau__num { background: var(--area); color: #071D19; }
@media (min-width: 1200px) {
    .trl-escada { column-gap: 22px; }
    .trl-escada > li { position: relative; }
    .trl-escada > li:not(:last-child)::after { content: "›"; position: absolute; right: -17px;
        top: calc((var(--n) - 1 - var(--i)) * var(--sobe) + 14px); color: var(--area-ink); font-size: 22px; font-weight: 800; line-height: 1; }
}

.trl-escada__mais { display: none; }

/* Abaixo de 1200px os degraus não cabem lado a lado: vira linha do tempo vertical. O número vira o nó da linha,
   o traço liga um passo ao próximo (mais forte nos passos concluídos) e o cartão fica só com cargo e números. */
@media (max-width: 1199px) {
    .trl-area { --sobe: 0px; --gap: 12px; padding: 20px; }
    .trl-area__cab { position: static; max-width: none; margin-bottom: 12px; }
    .trl-escada { display: grid; grid-template-columns: none; gap: var(--gap); padding: 4px 0 0; }
    .trl-escada > li { position: relative; padding-left: 46px; }
    .trl-escada > li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 46px; bottom: calc(-1 * var(--gap) - 10px);
        width: 2px; border-radius: 1px; background: color-mix(in srgb, var(--area) 35%, transparent); }
    .trl-escada > li.trl-passo--feito:not(:last-child)::before { background: var(--area); }
    .trl-degrau { padding: 12px 36px 12px 14px; border-radius: 14px; }
    .trl-degrau::after { content: "›"; position: absolute; right: 14px; top: 50%; translate: 0 -50%;
        color: var(--area-ink); font-size: 22px; font-weight: 800; line-height: 1; }
    .trl-degrau__num { top: 8px; left: -46px; width: 34px; height: 34px; border-width: 2px; border-radius: 50%; font-size: 15px; }
    .trl-degrau--sua .trl-degrau__num { box-shadow: 0 0 0 4px color-mix(in srgb, var(--area) 30%, transparent); }
    .trl-degrau__linha { display: none; }
    .trl-degrau__voce { top: 12px; right: 36px; }
    .trl-degrau--sua b { padding-right: 52px; }
    /* Recolhida: só os 3 primeiros; o traço do 3º some aos poucos, sinal de que a escada continua. */
    .trl-escada--fechada > li:nth-child(n+4) { display: none; }
    .trl-escada--fechada > li:nth-child(3)::before { bottom: -20px;
        background: linear-gradient(color-mix(in srgb, var(--area) 35%, transparent), transparent); }
    .trl-escada__mais { display: block; margin: 12px 0 0 46px; padding: 10px 14px; min-height: 44px; border: 1px dashed color-mix(in srgb, var(--area) 50%, var(--border));
        border-radius: 12px; background: none; color: var(--area-ink); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
    .trl-escada__mais:hover { border-style: solid; border-color: var(--area); }
}
@media (max-width: 639px) { .trl-degrau__faz { display: none; } }

.trl-extra__cab { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.trl-extra__cab h2 { margin: 0; font-size: var(--text-xl); letter-spacing: -.01em; }
.trl-extra__cab span { font-size: 13px; color: var(--text-muted); }

.trl-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.trl-tema { --area: #F5B83D; display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 14px;
            background: var(--surface);
            color: var(--text); text-decoration: none; transition: transform var(--t-base) var(--ease-spring), border-color var(--t-fast); }
.trl-tema:nth-child(2n) { --area: #FF8A65; }
.trl-tema:hover { border-color: var(--area); text-decoration: none; }
.trl-tema__ic { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px;
                background: color-mix(in srgb, var(--area) 20%, transparent); color: var(--area); font-size: 18px; }
.trl-tema b { display: block; font-size: 15px; }
.trl-tema span span { font-size: 13px; color: var(--text-muted); }
.trl-v3 { display: grid; justify-items: center; gap: 12px; margin: 0; padding: 28px 16px 8px; border-top: 1px solid var(--border);
          text-align: center; color: var(--text-muted); }
.trl-v3 b { font-size: var(--text-xl); color: var(--text); letter-spacing: -.01em; }
.trl-v3 small { font-size: 13px; }

.trd { display: grid; gap: 24px; }
.trd--tema { --area: #F5B83D; }
.trd-cab { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: end; padding: 24px; border: 1px solid var(--border);
           border-radius: 20px; background: var(--surface); }
.trd-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--area-ink); }
.trd-cab h1 { margin: 6px 0; font-size: clamp(26px, 3vw, 36px); letter-spacing: -.02em; }
.trd-cab p { max-width: 64ch; margin: 0 0 12px; color: var(--text-muted); white-space: pre-line; }
.trd-chips { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--text-muted); }
.trd-chips b { color: var(--text); }
.trd-lado { display: grid; justify-items: center; gap: 10px; }
.trd-anel { position: relative; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
            background: conic-gradient(var(--area) calc(var(--pct) * 1%), var(--surface-2) 0); }
.trd-anel::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.trd-anel b { position: relative; font-size: 20px; }
.trd-anel__txt { font-size: 12px; color: var(--text-muted); }
.trd-seguir { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 0; border-radius: var(--radius-control); corner-shape: squircle;
              background: var(--area); color: #071D19; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.trd-seguir--on { border: 1px solid var(--area); background: none; color: var(--text); cursor: default; }
/* Logo depois de seguir: o botão vira a confirmação com um leve desfoque (mascara a troca) e o check aparece. */
.trd-seguir--recem { animation: trd-segue var(--t-base) var(--ease-spring); }
.trd-seguir--recem > :first-child { animation: trd-check 300ms var(--ease-spring) 60ms backwards; }
@keyframes trd-segue { from { opacity: 0; transform: scale(.96); filter: blur(2px); } }
@keyframes trd-check { from { opacity: 0; transform: scale(.6) rotate(-12deg); } }
@media (prefers-reduced-motion: reduce) {
    .trd-seguir--recem, .trd-seguir--recem > :first-child { animation: none; }
}
.trd-deixar { border: 0; background: none; color: var(--text-muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

.trd-linha { position: relative; display: grid; gap: 12px; margin: 0; padding: 0 0 0 48px; list-style: none; }
.trd-linha::before, .trd-linha::after { content: ""; position: absolute; left: 17px; top: 42px; width: 2px; }
.trd-linha::before { bottom: 42px; background: var(--surface-2); }
.trd-linha::after { height: calc((100% - 84px) * var(--fill)); background: var(--area); }
.trd-passo { position: relative; }
.trd-passo__n { position: absolute; left: -44px; top: 50%; z-index: 1; display: grid; place-items: center; width: 36px; height: 36px;
                transform: translateY(-50%); border: 2px solid var(--surface-2); border-radius: 50%; background: var(--bg);
                color: var(--text-muted); font-size: 13px; font-weight: 800; }
.trd-passo--ok .trd-passo__n { border-color: var(--area); background: var(--area); color: #071D19; }
.trd-passo--agora .trd-passo__n { border-color: var(--area); color: var(--area-ink); }
.trd-passo > a { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 10px 16px 10px 10px;
                 border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none;
                 transition: border-color var(--t-fast); }
.trd-passo > a:hover { border-color: var(--area); text-decoration: none; }
.trd-passo--agora > a { border-color: var(--area); }
.trd-passo__capa { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 10px; background: var(--surface-2); }
.trd-passo__capa img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trd-passo b { display: block; font-size: 15px; line-height: 1.3; }
.trd-passo > a > span:nth-child(2) > span { font-size: 13px; color: var(--text-muted); }
.trd-passo__acao { font-size: 13px; font-weight: 700; color: var(--text-muted); white-space: nowrap; }
.trd-passo--ok .trd-passo__acao { color: var(--area-ink); }
.trd-passo--agora .trd-passo__acao { padding: 8px 14px; border-radius: var(--radius-control); corner-shape: squircle; background: var(--area); color: #071D19; }

.trd-vizinhos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.trd-vizinho { padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; }
.trd-vizinho:hover { text-decoration: none; border-color: var(--area); }
.trd-vizinho span { display: block; font-size: 13px; color: var(--text-muted); }
.trd-vizinho b { font-size: 16px; }
.trd-vizinho--prox { grid-column: 2; text-align: right; border-color: color-mix(in srgb, var(--area) 50%, var(--border));
                     background: var(--surface); }

.ptr__ver { align-self: flex-start; color: var(--primary); font-size: 14px; font-weight: 700; }
.cat-trilhas { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--border);
               border-radius: 14px; background: var(--surface);
               color: var(--text); text-decoration: none; }
.cat-trilhas:hover { text-decoration: none; border-color: var(--primary); }
.cat-trilhas__ic { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px;
                   background: var(--primary); color: var(--text-onprimary); font-size: 17px; }
.cat-trilhas b { display: block; font-size: 15px; }
.cat-trilhas span span { font-size: 13px; color: var(--text-muted); }
.cat-trilhas svg { margin-left: auto; color: var(--text-muted); }

@media (max-width: 767px) {
    .trl { gap: 28px; }
    .trl-hero h1 { white-space: normal; }
    .trl .trl-hero { grid-template-columns: 1fr; align-items: start; gap: 0;
                    min-height: 340px; margin: -16px -16px 16px; padding: 24px 20px; border-radius: 0; border-bottom: 0; isolation: auto; }
    .trl-hero__fundo, .trl-hero::after { display: none; }
    .trl-hero__media { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 var(--radius-control) var(--radius-control); corner-shape: squircle; }
    .trl-hero__media::after { content: ""; position: absolute; inset: 0;
                             background: linear-gradient(90deg, rgb(8 12 22 / .94), rgb(8 12 22 / .72)); }
    .trl-hero__image { height: 100%; object-fit: cover; object-position: center top; border-radius: 0; }
    .trl-hero__copy { position: relative; z-index: 1; }
    .trl-hero h1 { font-size: clamp(28px, 7.8vw, 36px); color: #fff; }
    .trl-hero p { font-size: 14px; line-height: 1.65; color: rgb(255 255 255 / .9); }
    .trl-hero .trl-hero__novo { color: #fff; }
    .trl-atalhos { margin-top: 16px; }
    .trl-area { padding: 16px; border-radius: 18px; }
    .trl-escada { margin: 0 -16px; padding: 12px 16px 4px; scroll-padding-inline: 16px; }
    .trl-escada > li { flex-basis: 62%; }
    .trd-cab { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 18px; }
    .trd-cab h1 { font-size: 24px; line-height: 1.2; }
    .trd-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
                font-size: 14px; line-height: 1.5; cursor: pointer; }
    .trd-desc--aberta { display: block; }
    .trd-lado { grid-template-columns: auto minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 14px; }
    .trd-lado > :is(.trd-seguir, .trd-deixar, .ds-btn) { grid-column: 1 / -1; justify-self: stretch; justify-content: center; }
    .trd-seguir { white-space: nowrap; }
    .trd-anel { width: 72px; height: 72px; }
    .trd-linha { padding-left: 42px; }
    .trd-linha::before, .trd-linha::after { left: 14px; }
    .trd-passo__n { left: -40px; width: 30px; height: 30px; }
    .trd-passo > a { grid-template-columns: 84px minmax(0, 1fr); }
    .trd-passo__acao { grid-column: 2; justify-self: start; }
    .trd-vizinhos { grid-template-columns: minmax(0, 1fr); }
    .trd-vizinho--prox { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .trl-degrau, .trl-tema, .trd-passo > a { transition: none; }
}

/* ── Movimento (comedido) ───────────────────────────────────────────────────
   Só o que ajuda a ler a mudança, nada em loop: a página chega com um leve subir,
   as barras de progresso do Continuar/hero enchem,
   e hover/toque respondem. "backwards" nas entradas: terminada a animação, hover
   e estados voltam a mandar no transform. */
@keyframes mp-entra { from { opacity: 0; transform: translateY(8px); } }
@keyframes mp-enche { from { transform: scaleX(0); } }
/* Navegação é frequente: a página só "assenta" (4px), não sobe. */
@keyframes mp-chega { from { opacity: 0; transform: translateY(4px); } }
/* Popover nasce do gatilho (avatar, canto superior direito), não de baixo. */
@keyframes mp-abre { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

/* O esqueleto (aria-busy) aparece na hora; só o conteúdo que o substitui entra — senão a página "sobe" duas vezes. */
.content > :not([aria-busy]) { animation: mp-chega var(--t-base) var(--ease-spring) backwards; }
.content > :nth-child(2) { animation-delay: 30ms; }
.content > :nth-child(n+3) { animation-delay: 60ms; }

.continue .ds-progress__fill, .hero-progresso .ds-progress__fill, .dst__barra > span { transform-origin: left; animation: mp-enche .9s var(--ease-spring) .2s backwards; }
.mc-summary { animation: mp-entra var(--t-base) var(--ease-spring) backwards; }
.user-dropdown { transform-origin: top right; animation: mp-abre var(--t-fast) var(--ease-spring) backwards; }

.cc { transition: border-color var(--t-fast), transform var(--t-fast) var(--ease-spring); }
.cc__thumb { overflow: hidden; }
.dst, .dst-todos { transition: transform var(--t-fast) var(--ease-spring); }
.cc:active, .dst:active, .dst-todos:active { transform: scale(.985); }

/* ── Dicas: feed de vídeos curtos (spec 2026-09-26) ─────────────────── */
/* Área do vídeo é sempre escura (é um player), por isso cores fixas em vez de tokens. */
.content:has(> .dicas) { padding: 0; max-width: none; }
.dicas {
    height: calc(100dvh - 73px);   /* 72px da topbar + 1px da borda */
    display: flex; align-items: center; justify-content: center; gap: 20px;
    padding: 24px 16px; box-sizing: border-box;
}
.dicas__feed {
    position: relative; height: 100%; aspect-ratio: 9 / 16; max-width: 100%;
    overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain;
    scrollbar-width: none; border-radius: 16px; background: #000;
}
.dicas__feed::-webkit-scrollbar { display: none; }
.dica { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; color: #fff; }
.dica__video { position: absolute; inset: 0; background: #000; }
.dica__video > :is(img, iframe) { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.dica--deitada .dica__video > :is(img, iframe) { top: 50%; bottom: auto; height: auto; aspect-ratio: 16 / 9; transform: translateY(-50%); }
/* Camada do toque: o iframe de outro domínio engoliria o deslizar e a roda do mouse. Deixa os 56px de
   baixo livres pra barra de progresso do Panda. */
/* env() vale 0 fora do iPhone — soma com o espaço fixo da barra do Panda pra não ficar embaixo do home indicator. */
.dica__toque { position: absolute; inset: 0 0 calc(56px + env(safe-area-inset-bottom)); border: 0; padding: 0; background: none; cursor: pointer; }
/* Som bloqueado (iPhone): deixa livre a caixa "ATIVAR SOM" do próprio Panda (~64px, canto superior
   esquerdo) — é um gesto dentro do iframe, que o iPhone aceita; por cima da nossa camada ela nunca seria clicável. */
.dicas--bloqueado .dica__toque { top: 64px; }
.dica__info {
    position: absolute; left: 0; right: 68px; bottom: calc(56px + env(safe-area-inset-bottom)); padding: 0 16px 12px;
    pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.dica__etiqueta { display: inline-block; padding: 2px 8px; border-radius: 6px; background: rgba(255, 255, 255, .2); font-size: 12px; font-weight: 600; }
.dica__titulo { margin: 6px 0 2px; font-size: 16px; line-height: 1.35; font-weight: 700; color: #fff; }
.dica__dur { font-size: 13px; opacity: .8; }
.dica__acoes { position: absolute; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.dica__btn, .dicas__voltar {
    width: 44px; height: 44px; border-radius: 99px; border: 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer;
}
.dica__som, .dicas--som .dica__mudo { display: none; }
.dicas--som .dica__som { display: block; }
.dica__aviso {
    position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
    padding: 6px 12px; border-radius: 99px; background: rgba(0, 0, 0, .7); font-size: 13px; pointer-events: none;
}
.dica__aviso:empty { display: none; }
.dicas__setas { display: flex; flex-direction: column; gap: 12px; }
.dicas__setas button {
    width: 48px; height: 48px; border-radius: 99px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.dicas__voltar { display: none; }
@media (max-width: 767px) {
    /* Feed abaixo da barra de status: o "ATIVAR SOM" do Panda fica no topo do iframe e sumia embaixo dela. */
    .dicas { position: fixed; inset: 0; z-index: 300; height: 100dvh; padding: env(safe-area-inset-top) 0 0; background: #000; }
    .dicas__feed { width: 100%; aspect-ratio: auto; border-radius: 0; }
    .dicas__setas { display: none; }
    .dicas__voltar { display: inline-flex; position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 1; }
}

.pr--dicas .pr__trilho > * { flex: 0 0 132px; }
.dica-mini {
    position: relative; display: block; --proporcao: 177.78%; border-radius: 12px; overflow: hidden;
    background: #000; color: #fff; text-decoration: none;
}
.dica-mini:hover { text-decoration: none; }
/* Cartões de trilho (flex em linha) NÃO usam aspect-ratio: no Safari/iOS o item esticado (stretch) tem a
   largura derivada da altura pelo aspect-ratio e cresce em loop até ocupar a tela, mesmo com min-width: 0.
   A proporção vem do padding-top (% da largura), que só depende do flex-basis. Conteúdo é absoluto. */
:is(.dst, .ptr__capa, .dica-mini)::before { content: ""; display: block; padding-top: var(--proporcao); }
.dica-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.dica-mini__texto {
    position: absolute; inset: auto 0 0; padding: 28px 10px 10px;
    display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.3;
    background: linear-gradient(transparent, rgba(0, 0, 0, .75));
}
.dica-mini__etiqueta { font-size: 11px; opacity: .85; }
.dica-mini__titulo { font-weight: 600; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 768px) {
    .pr--dicas { margin: 0 0 40px; }
    .pr--dicas :is(.pr__head, .pr__trilho) { padding-inline: 0; }
    .pr--dicas .pr__trilho > * { flex-basis: 160px; }
}

@media (prefers-reduced-motion: reduce) {
    .content > *, .continue .ds-progress__fill, .hero-progresso .ds-progress__fill, .dst__barra > span,
    .mc-summary, .user-dropdown { animation: none; }
    .cc:active, .dst:active, .dst-todos:active { transform: none; }
}

/* Aula do player em iframe de tela inteira (Pages/Aula.razor). */
/* Fora das áreas seguras (barra de status, recorte, indicador de início) sobra uma faixa: na cor do
   topo e da barra de progresso do player (mesmo token nos dois), senão parecia um buraco preto. */
.aula-tela { position: fixed; inset: 0; background: var(--surface); }
.aula-quadro {
    position: fixed; border: 0; background: #000;
    inset: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    width: calc(100% - env(safe-area-inset-left) - env(safe-area-inset-right));
    height: calc(100% - env(safe-area-inset-top) - env(safe-area-inset-bottom));
}
.aula-erro { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
.aula-erro p { margin: 0 0 4px; color: var(--text-muted); }

/* Convite para instalar (Components/ConviteInstalar.razor): cartão acima da barra inferior;
   no tablet, canto inferior direito. Só a entrada anima, como a folha da trilha. */
.cvi {
    position: fixed; z-index: 130; left: 12px; right: 12px; bottom: calc(64px + 12px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 14px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-lg);
    transition: opacity var(--t-base) ease, transform 300ms var(--ease-drawer);
}
@starting-style { .cvi { opacity: 0; transform: translateY(16px); } }
.cvi__icone { width: 44px; height: 44px; border-radius: 12px; }
.cvi__titulo { margin: 0; font-size: 16px; }
.cvi__texto { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.cvi__acoes { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
@media (min-width: 768px) { .cvi { left: auto; right: 24px; bottom: 24px; width: 380px; } }
@media (prefers-reduced-motion: reduce) { .cvi { transition: none; } }
/* Convite de notificações (Components/ConvitePush.razor): o mesmo cartão, com o sino no lugar do ícone. */
.cvp__sino { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: var(--text-onprimary); font-size: 20px; }

/* Fileiras que rolam de lado cortam o que passa da borda delas: ali o anel de foco é desenhado
   por dentro do item, senão o aluno de teclado não vê qual cartão está selecionado. Fica no fim
   do arquivo pra vencer o offset próprio de .cc. */
:is(.mc-chips, .cat-filtro, .pr__trilho, .dst-trilho, .ptr__capas, .trl-escada) :focus-visible { outline-offset: -2px; }

.mc-cert-aviso { margin: 8px 0 0; font-size: 13px; color: var(--text-muted); }
