/* ============================================================
   Apostila digital de anatomia — layout sumário + leitor.
   Herda tokens de product-app.css (--bg, --accent, --ff, etc.).
   Mobile-first; sumário vira drawer no celular.
   ============================================================ */
.apo {
  --apo-rail: 300px;
  --apo-read: 760px;
  font-family: var(--ff);
  color: var(--text);
  display: block; /* coluna única de leitura — o sumário vira gaveta (não mais rail/dashboard) */
  background:
    radial-gradient(720px 420px at 100% -5%, var(--accent-soft), transparent 60%),
    var(--bg);
  position: relative;
}

/* ============================================================
   ATLAS VIVO — tema acadêmico premium (escopo .apo)
   Redefine os tokens herdados só na Área de Estudo: superfície
   cinza clara, leitura em Lora, azul primario + acentos vivos. Palco do 3D
   continua escuro (definido em .apo__fig-3d). Reversível: basta
   remover este bloco para voltar ao tema escuro.
   ============================================================ */
.apo {
  /* superficies em camadas frias, sem bege/dourado */
  --bg: #f4f4f4; --surface: #ffffff; --surface-2: #e8eef2; --surface-3: #d0dde4;
  --border: #c6c6c6; --border-2: #8d8d8d;
  --text: #161616; --text-muted: #525252; --text-dim: #6f6f6f;
  /* acento azul de produto */
  --accent: #0f62fe; --accent-hover: #0353e9; --accent-press: #002d9c;
  --accent-soft: rgba(15,98,254,.12); --accent-line: rgba(15,98,254,.36);
  /* estados legíveis sobre claro */
  --ok: #24a148; --ok-soft: rgba(36,161,72,.13); --danger: #da1e28; --danger-soft: rgba(218,30,40,.12);
  --warn: #fa4d56; --warn-soft: rgba(250,77,86,.13);
  --brass: #8a3ffc;
  /* mata a fonte de código nos rótulos (vira Montserrat) e define a serifa de leitura */
  --ff-mono: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  --ff-read: "Lora", Georgia, serif;
  /* papel frio com acentos cromaticos sutis + textura de grao */
  background:
    radial-gradient(720px 420px at 100% -5%, rgba(17,146,232,.10), transparent 56%),
    radial-gradient(560px 320px at 0% 8%, rgba(138,63,252,.07), transparent 58%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"),
    var(--bg);
}
/* leitura em serifa editorial (Lora) */
.apo .apo__prosa, .apo .apo__lead, .apo .apo__tabela td,
.apo .apo__callout, .apo .apo__quiz-q, .apo .apo__gl-item dd, .apo .apo__popover p {
  font-family: var(--ff-read);
}
.apo .apo__prosa { font-size: 16.5px; line-height: 1.66; }
/* títulos em Montserrat display */
.apo .apo__h1 { font-weight: 800; letter-spacing: -.01em; color: #1a1d22; }
/* kickers e fios cromáticos — toque acadêmico premium */
.apo .apo__side-kicker, .apo .apo__fontes span, .apo .apo__gl-grupo h3 { color: var(--brass); }
/* scrim do glossário mais suave sobre claro */
.apo .apo__glossario { background: rgba(33,36,42,.42); }

.apo__erro { padding: 40px; color: var(--text-dim); font-family: var(--ff-mono); }

/* ------------------------------ Sidebar / sumário ------------------------- */
.apo__sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100dvh;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
  padding: 18px 14px 40px;
  backdrop-filter: blur(4px);
}
.apo__side-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.apo__side-kicker {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent);
}
.apo__side-kicker svg { width: 15px; height: 15px; }
.apo__glossario-btn {
  margin-left: auto; appearance: none; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-muted);
  min-height: 40px;
  font-family: var(--ff-mono); font-size: 11px; padding: 9px 12px; border-radius: 999px;
  transition: color .15s, border-color .15s;
}
.apo__glossario-btn:hover { color: var(--text); border-color: var(--border-2); }

.apo__search { position: relative; margin-bottom: 14px; }
.apo__search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-dim); }
.apo__search input {
  width: 100%; box-sizing: border-box;
  min-height: 40px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 9px;
  color: var(--text); font-family: var(--ff-mono); font-size: 12.5px;
  padding: 9px 12px 9px 32px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.apo__search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.apo__progresso-geral { margin-bottom: 18px; }
.apo__pg-bar { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.apo__pg-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-hover)); border-radius: 999px; transition: width .4s; }
.apo__pg-label { display: block; margin-top: 6px; font-family: var(--ff-mono); font-size: 11px; color: var(--text-dim); }
.apo__pg-label b { color: var(--text); }

/* módulos */
.apo__modulo { margin-bottom: 6px; }
.apo__modulo-head { display: flex; align-items: center; gap: 9px; padding: 10px 8px 6px; }
.apo__modulo-num { font-family: var(--ff-mono); font-size: 11px; color: var(--accent); font-weight: 600; }
.apo__modulo-tit { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-muted); }
.apo__modulo-prog { margin-left: auto; font-family: var(--ff-mono); font-size: 10.5px; color: var(--text-dim); }
.apo__modulo.is-locked .apo__modulo-tit { color: var(--text-dim); }

.apo__modulo-licoes { display: flex; flex-direction: column; gap: 2px; }
.apo__licao {
  display: flex; align-items: center; gap: 9px; width: 100%;
  appearance: none; cursor: pointer; text-align: left;
  background: transparent; border: none; border-radius: 8px;
  padding: 8px 10px; color: var(--text-muted);
  transition: background .14s, color .14s;
}
.apo__licao:hover { background: var(--surface-2); color: var(--text); }
.apo__licao.is-active { background: var(--accent-soft); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.apo__licao-mark {
  flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%;
  border: 1.5px solid var(--border-2); display: grid; place-items: center;
}
.apo__licao-mark svg { width: 11px; height: 11px; color: var(--ok); }
.apo__licao.is-done .apo__licao-mark { border-color: var(--ok); background: var(--ok-soft); }
.apo__licao.is-started .apo__licao-mark { border-color: var(--accent); background: var(--accent-soft); }
.apo__licao-txt { display: flex; flex-direction: column; line-height: 1.25; font-size: 13.5px; }
.apo__licao-txt em { font-style: normal; font-family: var(--ff-mono); font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }
.apo__embreve {
  display: flex; align-items: center; gap: 7px; padding: 8px 12px; margin: 0 4px 4px;
  font-family: var(--ff-mono); font-size: 11.5px; color: var(--text-dim);
  border: 1px dashed var(--border); border-radius: 8px;
}
.apo__embreve svg { width: 14px; height: 14px; }

/* ------------------------------ Leitor ----------------------------------- */
.apo__reader { min-width: 0; padding: 0; }
.apo__doc { max-width: var(--apo-read); min-width: 0; margin: 0 auto; padding: clamp(22px, 4vw, 48px) clamp(18px, 4vw, 44px) 90px; }

.apo__doc-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.apo__crumb { font-family: var(--ff-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.apo__niveis { margin-left: auto; display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px; }
.apo__nivel {
  appearance: none; cursor: pointer; border: none; background: transparent;
  color: var(--text-muted); font-family: var(--ff-mono); font-size: 11.5px; font-weight: 600;
  min-height: 40px;
  padding: 10px 12px; border-radius: 999px; transition: background .15s, color .15s;
}
.apo__nivel:hover { color: var(--text); }
.apo__nivel.is-on { background: var(--accent); color: #fff; }

.apo__h1 { font-size: clamp(26px, 4.5vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.08; margin: 4px 0 8px; }
.apo__lead { font-size: 16px; color: var(--text-muted); line-height: 1.5; margin: 0 0 14px; }
.apo__doc-meta { display: flex; align-items: center; gap: 8px; font-family: var(--ff-mono); font-size: 11.5px; color: var(--text-dim); margin-bottom: 22px; }
.apo__doc-meta svg { width: 14px; height: 14px; color: var(--accent); }
.apo__learning-path { list-style: none; margin: 0 0 22px; padding: 10px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.apo__learning-path li { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 7px 8px; }
.apo__learning-path b { width: 25px; height: 25px; flex: 0 0 25px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font: 700 11px var(--ff-mono); }
.apo__learning-path span { display: grid; gap: 2px; font-size: 12px; font-weight: 750; }
.apo__learning-path small { color: var(--text-dim); font-size: 10px; font-weight: 500; white-space: nowrap; }

/* figura */
.apo__fig { margin: 0 0 22px; }
.apo__fig img {
  display: block; width: 100%; height: auto; max-height: 340px; object-fit: contain;
  border-radius: var(--r-lg); border: 1px solid var(--border);
  background: radial-gradient(120% 120% at 50% 0%, var(--surface-2), var(--surface)); padding: 14px;
  box-sizing: border-box;
}
.apo__fig--abre img { max-height: 380px; box-shadow: var(--shadow); }
/* fotos/renders reais: mais altura e fundo neutro (sem moldura de diagrama) */
.apo__fig--foto img { max-height: 480px; padding: 0; background: var(--surface); }
.apo__fig--abre.apo__fig--foto img { max-height: 540px; }
.apo__fig figcaption { margin-top: 8px; font-family: var(--ff-mono); font-size: 11px; color: var(--text-dim); }
.apo__fig figcaption span { color: var(--text-dim); opacity: .7; }
.apo__fig-fonte { display: inline-flex; align-items: center; min-height: 40px; color: var(--text-dim); text-decoration: none; border-bottom: 1px dotted var(--border-2); }
.apo__fig-fonte:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* blocos de prosa */
.apo__blocos { display: flex; flex-direction: column; gap: 4px; }
.apo__bloco { padding: 6px 0; }
.apo__bloco-tit { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; margin: 16px 0 8px; }
.apo__bloco-nivel {
  font-family: var(--ff-mono); font-size: 9.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px; color: var(--text-dim); border: 1px solid var(--border);
}
.apo__bloco-nivel[data-n="intermediario"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.apo__bloco-nivel[data-n="avancado"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.apo__prosa { font-size: 15.5px; line-height: 1.68; color: var(--text); }
.apo__prosa p { margin: 0 0 12px; }
.apo__prosa strong { color: var(--text); font-weight: 600; }
.apo__prosa ul { margin: 0 0 12px; padding-left: 20px; }
.apo__prosa li { margin: 4px 0; }

/* termo de glossário clicável */
.gl-term {
  min-height: 40px;
  appearance: none; border: none; background: transparent; cursor: pointer;
  color: var(--accent); font: inherit; padding: 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent);
  transition: color .12s, border-color .12s;
}
.gl-term:hover { color: var(--accent-hover); border-bottom-color: var(--accent-hover); }

/* callouts */
.apo__callout { border-radius: var(--r); padding: 14px 16px; margin: 14px 0; font-size: 14.5px; line-height: 1.6; border: 1px solid var(--border); }
.apo__callout strong { display: block; margin-bottom: 4px; font-size: 13px; letter-spacing: .02em; }
.apo__callout p { margin: 0 0 8px; } .apo__callout p:last-child { margin: 0; }
.apo__callout--destaque { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.apo__callout--destaque strong { color: var(--accent); }
.apo__callout--clinica { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.apo__callout--clinica strong { color: var(--danger); }

/* tabela */
.apo__tabela-wrap { overflow-x: auto; margin: 12px 0; border: 1px solid var(--border); border-radius: var(--r); }
.apo__tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.apo__tabela th, .apo__tabela td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); }
.apo__tabela thead th { background: var(--surface-2); font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.apo__tabela tbody tr:last-child td { border-bottom: none; }
.apo__tabela tbody tr:hover { background: var(--surface); }

/* autoteste */
.apo__teste { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.apo__h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; margin: 0 0 16px; }
.apo__h2 svg { width: 18px; height: 18px; color: var(--accent); }
.apo__quiz { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; margin-bottom: 12px; }
.apo__quiz-q { font-weight: 600; font-size: 15px; margin: 0 0 12px; }
.apo__quiz-opts { display: flex; flex-direction: column; gap: 8px; }
.apo__opt {
  appearance: none; cursor: pointer; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  color: var(--text); font-family: var(--ff); font-size: 14px; padding: 11px 14px;
  transition: border-color .14s, background .14s, transform .1s;
}
.apo__opt:hover:not(:disabled) { border-color: var(--accent); transform: translateX(2px); }
.apo__opt.is-correct { border-color: var(--ok); background: var(--ok-soft); color: #1d5650; }
.apo__opt.is-wrong { border-color: var(--danger); background: var(--danger-soft); color: #9c4a44; }
.apo__quiz-fb { display: none; margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--ok); font-size: 13.5px; color: var(--text-muted); line-height: 1.55; }
.apo__quiz-fb.show { display: block; animation: apo-fade .3s ease both; }
/* Quiz da lição: reaproveita o visual do autoteste acima e acrescenta só o
   que é próprio dele — botão de rodada, placar e a fonte da questão. */
.apo__quiz-start { margin-top: 12px; min-height: 42px; padding: 0 18px; border: 1px solid var(--accent); border-radius: var(--r-md); background: var(--accent); color: var(--accent-contrast, #fff); font: 600 14px/1 inherit; cursor: pointer; }
.apo__quiz-start:hover { filter: brightness(1.06); }
.apo__quiz-start--ghost { margin-left: 8px; background: transparent; color: var(--accent); }
.apo__quizmod .apo__h2 small { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.apo__quiz-fim { display: flex; align-items: baseline; gap: 10px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.apo__quiz-fim strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.apo__quiz-fim span { color: var(--text-muted); font-size: 13px; }
.apo__quiz-fonte { display: block; margin-top: 6px; font-size: 11.5px; font-style: normal; color: var(--text-dim); }
.apo__quiz-img { display: block; max-width: 100%; margin: 0 0 12px; border-radius: var(--r-md); }
/* Lacuna: campo de texto + conferir */
.apo__quiz-livre { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.apo__quiz-campo { flex: 1 1 220px; min-height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; }
.apo__quiz-campo:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.apo__quiz-campo:disabled { opacity: .75; }
.apo__quiz-livre .apo__quiz-start { margin-top: 0; }
/* Associacao: um seletor por linha */
.apo__assoc { display: grid; gap: 8px; }
.apo__assoc-linha { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-left-width: 3px; border-left-color: var(--border); border-radius: var(--r-md); background: var(--surface); font-size: 14px; }
.apo__assoc-linha.is-correct { border-left-color: var(--ok); }
.apo__assoc-linha.is-wrong { border-left-color: var(--danger); }
.apo__assoc-linha select { min-height: 38px; padding: 0 8px; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font: inherit; font-size: 13.5px; }
/* O gabarito de quem errou: destacado do texto da explicacao */
.apo__quiz-gab { display: block; margin: 4px 0; font-weight: 600; color: var(--text); }
@media (max-width: 560px) { .apo__assoc-linha { grid-template-columns: 1fr; gap: 6px; } }
/* Revisão do resultado: verde e vermelho não bastam sozinhos — a barra
   lateral e o rótulo "Você marcou / Correta" carregam a informação para quem
   não distingue as duas cores. */
/* Painel de pendências, no alto do índice. Aparece só quando há o que fazer:
   um card zerado é ruído que ensina o olho a ignorar aquele canto da tela. */
.apo__pend-grupo { display: grid; gap: 8px; margin: 0 0 14px; }
.apo__pend { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--r-md); background: var(--surface); text-align: left; cursor: pointer; }
.apo__pend:hover { border-color: var(--accent); }
.apo__pend b { font-size: 20px; font-variant-numeric: tabular-nums; color: var(--accent); }
.apo__pend span { font-size: 13px; font-weight: 600; }
.apo__pend em { grid-column: 2; font-size: 11.5px; font-style: normal; color: var(--text-muted); }
/* "Treinar por tema" nao e pendencia: nao usa a cor de alerta, para o olho
   distinguir o que esta atrasado do que e escolha livre. */
.apo__pend--neutro { border-left-color: var(--border); }
.apo__pend--neutro b { display: inline-flex; color: var(--text-muted); }
.apo__pend--neutro b svg { width: 18px; height: 18px; }
/* Seletor de tema */
.apo__tema { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--border); }
.apo__tema-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.apo__tema-top h3 { margin: 0; font-size: 16px; }
.apo__tema-top .apo__quiz-start { margin-top: 0; flex: none; }
.apo__tema-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.apo__sub-chip { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: 12.5px; cursor: pointer; }
.apo__sub-chip:hover { border-color: var(--accent); color: var(--accent); }
.apo__sub-chip i { margin-left: 5px; font-style: normal; font-variant-numeric: tabular-nums; color: var(--text-muted); }
.apo__revisao { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 10px; }
.apo__rev { padding: 12px 14px; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--r-md); background: var(--surface); }
.apo__rev.is-ok { border-left-color: var(--ok); }
.apo__rev.is-nok { border-left-color: var(--danger); }
.apo__rev-q { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.apo__rev-l { margin: 2px 0; font-size: 13px; }
.apo__rev-l b { font-weight: 600; color: var(--text-muted); }
.apo__rev-e { margin: 6px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--text-muted); }
.apo__quiz-fontes { display: grid; gap: 5px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.apo__quiz-fontes span { display: block; }
.apo__quiz-fontes b { color: var(--text-muted); }
.apo__quiz-fontes a { color: var(--accent); font-weight: 700; text-underline-offset: 2px; }
.apo__quiz-origem[data-kind="authorial"] { padding-left: 9px; border-left: 2px solid var(--accent); }

/* Recursos ativos de estudo */
.apo__key { margin: 24px 0 12px; padding: 18px; border-radius: var(--r-lg); background: linear-gradient(135deg, var(--accent-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); display: grid; gap: 5px; }
.apo__key span { color: var(--accent); font: 700 11px/1 var(--ff-mono); text-transform: uppercase; letter-spacing: .09em; }
.apo__key strong { font-size: 17px; line-height: 1.45; }
.apo__study-box { padding: 18px 0; border-top: 1px solid var(--border); }
.apo__study-box h2 { margin: 0 0 12px; font-size: 18px; }
.apo__study-box p { color: var(--text-muted); line-height: 1.55; }
.apo__evidence { margin: 26px 0; }
.apo__evidence-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .65fr); column-gap: clamp(22px, 4vw, 52px); align-items: center; }
.apo__evidence figure { margin: 0; min-height: 310px; display: grid; grid-template-rows: 1fr auto; background: transparent; }
.apo__evidence figure img { width: 100%; height: 100%; min-height: 310px; max-height: 640px; object-fit: contain; }
.apo__evidence figure img[data-image-zoom] { cursor: zoom-in; }
.apo__evidence figcaption { padding: 9px 0 0; color: var(--text-dim); background: transparent; font-size: 10px; line-height: 1.4; }
.apo__evidence figcaption a { color: #64cfc1; }
.apo__evidence figcaption a,
.apo__plate-card figcaption a,
.apo__concept > footer a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding-block: 7px;
}
.apo__evidence-guide { padding: 22px; align-self: center; }
.apo__evidence-guide > span { color: var(--accent); font: 700 11px var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; }
.apo__evidence-guide ol { list-style: none; display: grid; gap: 14px; margin: 18px 0; padding: 0; }
.apo__evidence-guide li { display: grid; grid-template-columns: 26px 1fr; gap: 9px; align-items: start; color: var(--text-muted); font-size: 13px; line-height: 1.45; }
.apo__evidence-guide li b { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: var(--accent-soft); font: 700 10px var(--ff-mono); }
.apo__evidence-guide p { margin: 10px 0 0; color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.apo__image-zoom { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); background: rgba(10, 14, 20, .94); overscroll-behavior: contain; }
.apo__image-zoom img { max-width: min(96vw, 1500px); max-height: 88vh; width: auto; height: auto; object-fit: contain; cursor: grab; touch-action: none; user-select: none; box-shadow: 0 18px 60px rgba(0,0,0,.45); transition: transform .16s ease; }
.apo__image-zoom img:active { cursor: grabbing; }
.apo__image-zoom-tools { position: absolute; top: max(14px, env(safe-area-inset-top)); left: 50%; z-index: 1; display: flex; align-items: center; gap: 5px; transform: translateX(-50%); padding: 5px; border-radius: 999px; background: rgba(255,255,255,.13); }
.apo__image-zoom-tools button, .apo__image-zoom-tools output { min-width: 38px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 999px; background: transparent; color: #fff; font: 700 13px var(--ff-mono); }
.apo__image-zoom-tools button { cursor: pointer; }
.apo__image-zoom-tools button:hover { background: rgba(255,255,255,.18); }
.apo__image-zoom-close { position: absolute; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.apo__image-zoom p { position: absolute; bottom: max(12px, env(safe-area-inset-bottom)); margin: 0; color: rgba(255,255,255,.7); font: 11px var(--ff-mono); }
body.apo__image-zoom-open { overflow: hidden; }
.apo__steps ol { list-style: none; display: grid; gap: 9px; margin: 12px 0 0; padding: 0; counter-reset: step; }
.apo__steps li { display: grid; grid-template-columns: 31px 1fr; gap: 11px; align-items: start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text-muted); line-height: 1.5; }
.apo__steps li b { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font: 700 11px var(--ff-mono); }
.apo__block-refs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; font: 600 10px var(--ff-mono); }
.apo__block-refs > span { color: var(--text-dim); text-transform: uppercase; letter-spacing: .06em; }
.apo__block-refs a { display: inline-flex; align-items: center; min-height: 40px; padding: 4px 10px; border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border)); border-radius: 999px; color: var(--accent); background: var(--accent-soft); text-decoration: none; }
.apo__block-refs a:hover { text-decoration: underline; }
.apo__study-hint { margin: -8px 0 12px !important; font-size: 12px; }
.apo__chips { display: flex; flex-wrap: wrap; gap: 7px; }
.apo__chips span { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 12px; }
.apo__review { margin: 0; padding-left: 22px; display: grid; gap: 9px; color: var(--text-muted); line-height: 1.45; }
.apo__flashcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.apo__flashcard { position: relative; min-height: 132px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--text); text-align: left; cursor: pointer; overflow: hidden; perspective: 800px; }
.apo__flashcard > span { position: absolute; inset: 0; padding: 16px; display: flex; flex-direction: column; gap: 10px; justify-content: center; backface-visibility: hidden; transition: transform .35s ease; line-height: 1.45; }
.apo__flashcard small { color: var(--accent); font: 700 10px/1 var(--ff-mono); text-transform: uppercase; letter-spacing: .08em; }
.apo__fc-back { transform: rotateY(180deg); background: var(--accent-soft); }
.apo__flashcard.is-flipped .apo__fc-front { transform: rotateY(-180deg); }
.apo__flashcard.is-flipped .apo__fc-back { transform: rotateY(0); }

/* Simuladores acadêmicos */
.apo__fig--sim { border: 0; background: transparent; }
.study-sim { border: 1px solid var(--border); background: var(--surface); border-radius: 18px; padding: 18px; color: var(--text); }
.study-sim__head { display: flex; justify-content: space-between; gap: 12px; align-items: start; margin-bottom: 16px; }
.study-sim__head small { color: var(--accent); font: 700 10px/1 var(--ff-mono); text-transform: uppercase; letter-spacing: .1em; }
.study-sim__head h3 { margin: 5px 0 0; font-size: 19px; }
.study-sim__badge { padding: 5px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10px; font-weight: 700; }
.study-sim__controls, .gaso-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.study-sim label { display: grid; gap: 6px; color: var(--text-muted); font-size: 12px; font-weight: 650; }
.study-sim select, .study-sim input[type="number"] { width: 100%; min-height: 42px; border: 1px solid var(--border); border-radius: 10px; padding: 0 10px; background: var(--bg); color: var(--text); }
.study-sim input[type="range"] { width: 100%; accent-color: var(--accent); }
.ecg-modes { display: inline-flex; gap: 3px; margin: -2px 0 14px; padding: 3px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.ecg-modes button { min-height: 40px; padding: 8px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font: 750 12px/1.2 var(--ff); cursor: pointer; }
.ecg-modes button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: 0 3px 10px color-mix(in srgb,var(--text) 10%,transparent); }
.study-sim--ecg[data-ecg-mode="prova"] .study-sim__controls { grid-template-columns: 1fr; }
.study-sim--ecg[data-ecg-mode="prova"] input[data-bpm] { opacity: .5; cursor: not-allowed; }
/* Papel de ECG de verdade: o viewBox e medido em milimetros, entao o
   quadradinho vale 0,04 s e 0,1 mV sem depender do tamanho da tela.
   A tela verde de monitor foi trocada pelo papel porque so no papel o
   aluno consegue medir intervalo contando quadrados. */
.ecg-paper { border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; background: #fffdfa; }
.ecg-paper svg { display: block; width: 100%; min-width: 520px; height: auto; }
.ecg-g1 { fill: none; stroke: #f0b7a8; stroke-width: .08; }
.ecg-g5 { fill: none; stroke: #dc7d68; stroke-width: .18; }
.ecg-wave, .ecg-cal { fill: none; stroke: #1b1b1b; stroke-width: .35; stroke-linejoin: round; stroke-linecap: round; }
.ecg-cal { stroke: #6b6b6b; }
.ecg-medidas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 0; }
.ecg-med { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.ecg-med dt { margin: 0; font: 700 10px/1 var(--ff-mono); letter-spacing: .08em; color: var(--text-muted); }
.ecg-med dd { margin: 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ecg-med dd small { font-size: 10px; font-weight: 600; color: var(--text-muted); }
.ecg-med dd.is-na { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.ecg-med__ref { font-size: 10px; color: var(--text-dim); font-variant-numeric: tabular-nums; }
/* Fora da faixa: cor + regra lateral, para nao depender so de cor. */
.ecg-med.is-fora { border-color: var(--marca); box-shadow: inset 3px 0 0 var(--marca); }
.ecg-med.is-fora dd { color: var(--marca); }
.ecg-criterio { display: block; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }
.ecg-challenge { margin-top: 14px; padding: 15px; border: 1px solid color-mix(in srgb,var(--accent) 34%,var(--border)); border-radius: 14px; background: color-mix(in srgb,var(--accent) 5%,var(--surface)); }
.ecg-challenge__head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.ecg-challenge__head div { display: grid; gap: 3px; }
.ecg-challenge__head small { color: var(--accent); font: 750 10px/1 var(--ff-mono); letter-spacing: .09em; text-transform: uppercase; }
.ecg-challenge__head strong { font-size: 15px; }
.ecg-challenge__head output { flex: 0 0 auto; padding: 6px 9px; border-radius: 999px; background: var(--accent); color: #fff; font: 750 11px/1 var(--ff-mono); }
.ecg-challenge > p { margin: 8px 0 12px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.ecg-challenge__options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.ecg-challenge__options button { min-height: 48px; padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 650 12px/1.3 var(--ff); text-align: left; cursor: pointer; }
.ecg-challenge__options button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.ecg-challenge__options button.is-correct { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.ecg-challenge__options button.is-wrong { border-color: var(--danger); box-shadow: inset 3px 0 0 var(--danger); }
.ecg-challenge__feedback { min-height: 20px; margin-top: 10px; color: var(--text-muted); font-size: 12px; line-height: 1.45; }
.ecg-challenge__feedback strong { color: var(--text); }
.ecg-challenge__next { min-height: 44px; margin-top: 10px; padding: 9px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font: 750 12px var(--ff); cursor: pointer; }
.study-sim__result { margin-top: 12px; padding: 12px; border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 4px 10px 10px 4px; display: grid; gap: 4px; font-size: 13px; line-height: 1.5; }
.study-sim__result strong { font-size: 14px; }
.study-sim__warn { margin: 12px 0 0; color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.gaso-inputs { grid-template-columns: repeat(3, 1fr); }
.gaso-inputs label small { font-weight: 400; }
.study-sim__steps { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; }
.study-sim__steps summary { cursor: pointer; font-weight: 700; }
.study-sim__steps ol { padding-left: 18px; line-height: 1.6; color: var(--text-muted); }
.phys-stage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 18px 4px; }
.phys-node { position: relative; display: grid; justify-items: center; align-content: start; gap: 9px; text-align: center; min-width: 0; opacity: .46; animation: phys-focus 4.8s infinite; animation-delay: calc(var(--i) * 1.2s); }
.phys-node__orb { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--node) 18%, var(--surface)); border: 2px solid var(--node); color: var(--node); font: 800 18px/1 var(--ff-mono); box-shadow: 0 8px 24px color-mix(in srgb, var(--node) 18%, transparent); }
.phys-node strong { font-size: 12px; line-height: 1.25; }
.phys-flow { position: absolute; top: 18px; right: -12px; color: var(--node); font-size: 22px; font-style: normal; animation: phys-arrow 1.2s ease-in-out infinite; }
.phys-timeline { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.phys-timeline span { display: block; width: 25%; height: 100%; background: var(--accent); border-radius: inherit; animation: phys-line 4.8s linear infinite; }
@keyframes phys-focus { 0%,24% { opacity: 1; transform: translateY(-3px) scale(1.03); } 28%,100% { opacity: .46; transform: none; } }
@keyframes phys-arrow { 50% { transform: translateX(4px); } }
@keyframes phys-line { to { transform: translateX(300%); } }

/* Circulação cardiovascular 3D procedural */
.cardio3d { border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(160deg,#101a22,#080d12); color:#eef5f6; overflow:hidden; box-shadow:0 18px 38px -26px #000; }
.cardio3d__head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 16px 10px; }
.cardio3d__head div { display:grid; gap:4px; }
.cardio3d__head small { color:#62c8bb; font:700 10px/1 var(--ff-mono); letter-spacing:.1em; text-transform:uppercase; }
.cardio3d__head strong { font-size:17px; }
.cardio3d__views { display:flex!important; grid-auto-flow:column; gap:3px!important; padding:3px; border:1px solid #24414b; border-radius:999px; background:#0b171c; }
.cardio3d__views button { min-height:28px; padding:5px 9px; border:0; border-radius:999px; background:transparent; color:#82969e; font:750 10px/1 var(--ff-sans); cursor:pointer; }
.cardio3d__views button.is-active { background:#1a4b43; color:#8be2d6; box-shadow:0 2px 8px #0005; }
.cardio3d__views button:disabled { cursor:not-allowed; opacity:.38; }
.cardio3d__stage { position:relative; height:430px; background:radial-gradient(circle at 50% 45%,#1b2b35,#090e13 72%); touch-action:none; }
.cardio3d__stage canvas { width:100%; height:100%; display:block; cursor:grab; }
.cardio3d__loading { position:absolute; inset:0; display:grid; place-items:center; color:#8ca2ac; font-size:13px; }
.cardio3d__anatomy-tools { position:absolute; z-index:3; top:10px; left:50%; display:flex; gap:4px; max-width:calc(100% - 20px); padding:4px; border:1px solid #ffffff1c; border-radius:12px; background:#071015d9; box-shadow:0 8px 24px #0007; transform:translateX(-50%); backdrop-filter:blur(10px); }
.cardio3d__anatomy-tools[hidden] { display:none; }
.cardio3d__anatomy-tools button { min-height:30px; padding:5px 9px; border:0; border-radius:8px; background:transparent; color:#91a5ad; font:700 10px/1 var(--ff-sans); white-space:nowrap; cursor:pointer; }
.cardio3d__anatomy-tools button.is-active { background:#17453f; color:#91e2d7; }
.cardio3d__anatomy-tools [data-reset-view] { width:30px; padding:0; border-left:1px solid #ffffff17; border-radius:7px; color:#c1d0d5; font-size:18px; }
.cardio3d__structure { position:absolute; z-index:3; left:12px; right:12px; bottom:12px; display:grid; gap:3px; padding:10px 12px; border:1px solid #65d5c955; border-radius:10px; background:#09151bdc; box-shadow:0 10px 24px #0008; backdrop-filter:blur(10px); pointer-events:none; }
.cardio3d__structure[hidden] { display:none; }
.cardio3d__structure small { color:#71cfc3; font:700 9px/1 var(--ff-mono); letter-spacing:.08em; text-transform:uppercase; }
.cardio3d__structure strong { color:#f0f7f8; font-size:14px; }
.cardio3d__phase { margin:12px 14px; padding:12px 14px; min-height:62px; display:grid; gap:4px; border-left:3px solid #5cc8ba; border-radius:4px 10px 10px 4px; background:#13252a; }
.cardio3d__phase strong { color:#7ed9cd; font-size:14px; }
.cardio3d__phase span { color:#c3d0d4; font-size:12px; line-height:1.45; }
.cardio3d__legend { display:flex; flex-wrap:wrap; gap:10px 16px; padding:0 14px 10px; color:#b6c3c8; font-size:11px; }
.cardio3d__legend span { display:flex; align-items:center; gap:6px; }
.cardio3d__legend i { width:9px; height:9px; border-radius:50%; }
.cardio3d__legend .is-venous { background:#398bb8; }.cardio3d__legend .is-arterial { background:#d9414e; }.cardio3d__legend .is-organ { background:#83c7c4; }
.cardio3d__hint { margin:0; padding:0 14px 14px; color:#7e929b; font-size:10px; }
.cardio3d.is-anatomy .cardio3d__phase,.cardio3d.is-anatomy .cardio3d__legend { display:none; }
.cardio3d.is-anatomy .cardio3d__hint { padding-top:10px; }
.cardio3d__fallback { position:absolute; inset:0; display:grid; place-content:center; gap:10px; padding:30px; text-align:center; color:#c9d5d9; }
.cardio3d__fallback span { max-width:320px; color:#88a0a9; line-height:1.55; }
.cardio3d__fallback-flow { max-width:310px; display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:8px; }
.cardio3d__fallback-flow span { padding:8px 10px; border:1px solid currentColor; border-radius:999px; background:#101b22; font-size:11px; animation:cardio-fallback-pulse 4s infinite; }
.cardio3d__fallback-flow i { color:#6f8791; font-style:normal; }
.cardio3d__fallback-flow .venous,.cardio3d__fallback-flow .heart-blue { color:#57a9d2; }
.cardio3d__fallback-flow .lungs { color:#83c7c4; }
.cardio3d__fallback-flow .heart-red,.cardio3d__fallback-flow .arterial { color:#ed7180; }
.cardio3d__fallback-flow span:nth-of-type(2){animation-delay:.8s}.cardio3d__fallback-flow span:nth-of-type(3){animation-delay:1.6s}.cardio3d__fallback-flow span:nth-of-type(4){animation-delay:2.4s}.cardio3d__fallback-flow span:nth-of-type(5){animation-delay:3.2s}
@keyframes cardio-fallback-pulse { 0%,18%{transform:scale(1.06);filter:brightness(1.35)} 22%,100%{transform:none;filter:none} }
@keyframes apo-fade { from { opacity: 0; transform: translateY(4px); } }

/* pranchas anatômicas e clínicas */
.apo__audio-card {
  position: relative;
  margin: 20px 0 24px;
  padding: 18px;
  border: 1px solid color-mix(in srgb,var(--accent) 34%,var(--border));
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,0) 28%),
    radial-gradient(90% 90% at 8% 0%, rgba(17,146,232,.11), transparent 56%),
    linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--accent) 6%,var(--surface-2)));
  box-shadow:
    0 20px 42px -30px rgba(22,22,22,.55),
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(82,82,82,.14);
}
.apo__audio-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  pointer-events: none;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.14);
}
.apo__audio-head { display:flex; align-items:center; gap:12px; margin-bottom:14px; position:relative; }
.apo__audio-avatar {
  width: 50px; height: 50px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.22), transparent 28%),
    linear-gradient(145deg,color-mix(in srgb,var(--accent) 82%,#ffffff),var(--accent-press,#0c4a45));
  color:#fff; font-family:var(--ff); font-size:20px; font-weight:800;
  box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 12%,transparent), inset 0 1px 0 rgba(255,255,255,.24), inset 0 -3px 8px rgba(0,0,0,.22);
  text-shadow: 0 -1px 0 rgba(0,0,0,.24);
}
.apo__audio-head small { display:block; font-family:var(--ff-mono); font-size:9.5px; text-transform:uppercase; letter-spacing:.13em; color:var(--accent); }
.apo__audio-head strong { display:block; margin-top:2px; font-size:15px; }
.apo__audio-head p { margin:2px 0 0; color:var(--text-dim); font-size:11.5px; }
.apo__audio-card audio { width:100%; height:42px; display:block; }
.apo__audio-card.is-enhanced audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: .01;
  pointer-events: none;
}
.apo__audio-deck {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(82,82,82,.28);
  border-radius: 16px;
  background:
    radial-gradient(120% 90% at 8% 0%, rgba(120,169,255,.18), transparent 54%),
    linear-gradient(180deg, #e8eef2 0%, #c9d8e2 58%, #b9c8d3 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -1px 0 rgba(82,82,82,.2),
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 14px 30px -23px rgba(22,22,22,.68);
}
.apo__audio-deck::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 11px;
  pointer-events: none;
  border: 1px solid rgba(255,255,255,.18);
}
.apo__audio-play {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(82,82,82,.32);
  border-radius: 50%;
  cursor: pointer;
  background:
    radial-gradient(circle at 35% 24%, rgba(255,255,255,.22), transparent 25%),
    linear-gradient(180deg, #eef3f7 0%, #c4d3dd 48%, #7f8f9b 100%);
  box-shadow:
    0 13px 24px -16px rgba(22,22,22,.82),
    inset 0 2px 0 rgba(255,255,255,.2),
    inset 0 -6px 11px rgba(42,50,58,.32);
  transition: transform .12s ease, box-shadow .16s ease, background .16s ease;
}
.apo__audio-play::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,0) 42%),
    rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -1px 0 rgba(22,22,22,.18);
}
.apo__audio-play span {
  position: relative;
  z-index: 1;
  display: block;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid var(--accent);
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.22));
}
.apo__audio-card.is-playing .apo__audio-play {
  background:
    radial-gradient(circle at 35% 24%, rgba(255,255,255,.18), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb,var(--accent) 78%,#ffffff), var(--accent));
  box-shadow:
    0 0 0 5px rgba(15,98,254,.12),
    0 14px 28px -18px rgba(15,98,254,.72),
    inset 0 4px 9px rgba(0,0,0,.2),
    inset 0 1px 0 rgba(255,255,255,.28);
}
.apo__audio-card.is-playing .apo__audio-play span {
  width: 18px;
  height: 24px;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(90deg, #fff 0 35%, transparent 35% 65%, #fff 65% 100%);
}
.apo__audio-readout {
  min-width: 0;
  display: grid;
  gap: 10px;
  overflow: hidden;
}
.apo__audio-display {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background:
    repeating-linear-gradient(90deg, rgba(130,207,255,.05) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0)),
    #11181d;
  color: #e0f0ff;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.48), inset 0 0 0 1px rgba(130,207,255,.1);
  font: 700 11px/1 var(--ff-mono);
}
.apo__audio-display span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #82cfff;
}
.apo__audio-eq {
  display: inline-flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  width: 22px;
  flex: 0 0 22px;
  opacity: .42;
}
.apo__audio-eq i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 999px;
  background: #82cfff;
  box-shadow: 0 0 8px rgba(17,146,232,.32);
}
.apo__audio-card.is-playing .apo__audio-eq { opacity: 1; }
.apo__audio-card.is-playing .apo__audio-eq i { animation: apo-eq 780ms ease-in-out infinite alternate; }
.apo__audio-card.is-playing .apo__audio-eq i:nth-child(2) { animation-delay: 120ms; }
.apo__audio-card.is-playing .apo__audio-eq i:nth-child(3) { animation-delay: 240ms; }
.apo__audio-display time { white-space: nowrap; color: #ffffff; }
.apo__audio-seek {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 40px;
  display: block;
  accent-color: var(--accent);
  --audio-progress: 0%;
}
.apo__audio-seek::-webkit-slider-runnable-track {
  height: 11px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, var(--accent) 0 var(--audio-progress), transparent var(--audio-progress) 100%),
    linear-gradient(180deg, #aebdc8, #e8eef2);
  box-shadow:
    inset 0 2px 5px rgba(42,50,58,.28),
    inset 0 0 0 1px rgba(255,255,255,.12),
    0 1px 0 rgba(255,255,255,.2);
}
.apo__audio-seek::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border-radius: 50%;
  border: 1px solid rgba(15,98,254,.38);
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,.76), transparent 24%),
    linear-gradient(180deg, #78a9ff 0%, #0f62fe 58%, #002d9c 100%);
  box-shadow: 0 4px 10px rgba(15,98,254,.34), inset 0 1px 0 rgba(255,255,255,.24);
}
.apo__audio-speed { display:flex; align-items:center; gap:7px; margin-top:12px; position:relative; flex-wrap:wrap; }
.apo__audio-speed span { margin-right:3px; font-size:11px; color:var(--text-dim); }
.apo__audio-speed button { appearance:none; cursor:pointer; min-width:44px; min-height:40px; padding:8px 12px; border:1px solid rgba(82,82,82,.28); border-radius:999px; background:linear-gradient(180deg,#e8eef2,#d0dde4); color:var(--text); font:700 11px var(--ff); box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 7px 16px -14px rgba(22,22,22,.58); }
.apo__audio-speed button.is-on { background:linear-gradient(180deg,color-mix(in srgb,var(--accent) 82%,#fff),var(--accent)); border-color:var(--accent); color:#fff; box-shadow:inset 0 1px 0 rgba(255,255,255,.38), inset 0 -2px 0 rgba(0,0,0,.14); text-shadow:0 -1px 0 rgba(0,0,0,.22); }
.apo__audio-skip { display:flex; gap:8px; margin-top:12px; position:relative; }
.apo__audio-skip button { min-height:42px; padding:8px 13px; border:1px solid rgba(82,82,82,.28); border-radius:999px; background:var(--surface); color:var(--text-muted); font:750 11px var(--ff); cursor:pointer; }
.apo__audio-skip button:hover { border-color:var(--accent); color:var(--accent); }
.apo__audio-card.has-error { border-color:var(--danger); }
.apo__audio-card details { margin-top:10px; border-top:1px solid var(--border); padding-top:8px; }
.apo__audio-card summary { cursor:pointer; color:var(--text-muted); font-size:11.5px; min-height:40px; display:flex; align-items:center; }
.apo__audio-card details p { margin:9px 0 0; color:var(--text-muted); font-size:12.5px; line-height:1.65; }
@keyframes apo-eq {
  from { height: 6px; filter: brightness(.9); }
  to { height: 17px; filter: brightness(1.2); }
}

@media (max-width: 520px) {
  .apo__audio-card { padding: 16px; }
  .apo__audio-deck {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .apo__audio-play {
    width: 56px;
    height: 56px;
  }
  .apo__audio-display {
    gap: 8px;
    padding-inline: 10px;
  }
  .apo__audio-display span { max-width: 13ch; }
}

.apo__concept { --concept:#2563eb; --concept-2:#0ea5e9; overflow:hidden; border:1px solid var(--border); border-radius:var(--r-lg); background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--concept) 8%,var(--surface))); }
.apo__concept[data-group="osteo"] { --concept:#a16207; --concept-2:#d97706; }
.apo__concept[data-group="mio"] { --concept:#be123c; --concept-2:#f43f5e; }
.apo__concept[data-group="cardio"] { --concept:#b91c1c; --concept-2:#ef4444; }
.apo__concept[data-group="ecg"] { --concept:#7c3aed; --concept-2:#a855f7; }
.apo__concept[data-group="gaso"] { --concept:#0369a1; --concept-2:#06b6d4; }
.apo__concept[data-group="cine"] { --concept:#047857; --concept-2:#10b981; }
.apo__concept[data-group="sist"] { --concept:#0f766e; --concept-2:#14b8a6; }
.apo__concept > header { padding:20px 22px 16px; border-left:6px solid var(--concept); }
.apo__concept > header span { font-family:var(--ff-mono); font-size:10px; text-transform:uppercase; letter-spacing:.12em; color:var(--concept); }
.apo__concept > header h4 { margin:6px 0 2px; font-size:22px; color:var(--text); }
.apo__concept > header p { margin:0; color:var(--text-muted); line-height:1.5; }
.apo__concept-stage { min-height:280px; display:grid; place-items:center; padding:22px; background:color-mix(in srgb,var(--concept) 5%,var(--surface)); border-block:1px solid var(--border); }
.apo__concept > footer { display:flex; flex-direction:column; gap:5px; padding:13px 18px; color:var(--text-muted); font-size:12px; }
.apo__concept > footer small { font-size:10.5px; }
.apo__concept > footer a { color:var(--concept); }
.apo__concept button { font:inherit; color:var(--text); cursor:pointer; }
.apo__concept button:focus-visible { outline:3px solid color-mix(in srgb,var(--concept) 40%,transparent); outline-offset:2px; }
.apo__concept button.is-active,.apo__concept button[aria-pressed="true"] { color:#fff!important; background:var(--concept)!important; border-color:var(--concept)!important; transform:translateY(-2px); box-shadow:0 8px 22px color-mix(in srgb,var(--concept) 24%,transparent); }
.apo__concept-labels,.apo__concept-grid { width:100%; max-width:100%; min-width:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; }
.apo__concept-chip,.apo__concept-grid button { min-width:0; min-height:62px; display:flex; align-items:center; gap:8px; padding:10px 12px; border:1px solid color-mix(in srgb,var(--concept) 45%,var(--border)); border-radius:14px; background:var(--surface); transition:.18s ease; }
.apo__concept-chip span,.apo__concept-grid button span { min-width:0; overflow-wrap:anywhere; }
.apo__concept-chip b,.apo__concept-grid b { width:25px; height:25px; display:grid; place-items:center; flex:0 0 auto; border-radius:50%; background:color-mix(in srgb,var(--concept) 14%,var(--surface)); color:var(--concept); font-size:11px; }
.apo__concept-flow { width:100%; display:flex; align-items:center; justify-content:center; gap:9px; }
.apo__concept-flow button,.apo__concept-formula button,.apo__concept-compare button { min-height:68px; flex:1; padding:10px; border:2px solid color-mix(in srgb,var(--concept) 55%,var(--border)); border-radius:15px; background:var(--surface); }
.apo__concept-flow button b { display:block; color:var(--concept); font-size:11px; }
.apo__concept-flow i { color:var(--concept); font-style:normal; font-size:26px; }
.apo__concept-wave { width:100%; height:155px; display:flex; align-items:center; gap:3px; padding:15px; border-radius:16px; background:repeating-linear-gradient(0deg,transparent 0 19px,color-mix(in srgb,var(--concept-2) 18%,transparent) 20px),repeating-linear-gradient(90deg,transparent 0 19px,color-mix(in srgb,var(--concept-2) 18%,transparent) 20px),#071b18; }
.apo__concept-wave i { flex:1; height:var(--h); min-height:3px; background:#5ee7b7; border-radius:4px; box-shadow:0 0 8px #34d399; animation:apo-wave 2.4s ease-in-out infinite alternate; }
.apo__concept-wave + .apo__concept-labels,.apo__concept-curve + .apo__concept-labels,.apo__concept-gauge + .apo__concept-labels,.apo__concept-lever + .apo__concept-labels,.apo__concept-axes + .apo__concept-labels,.apo__concept-joint + .apo__concept-labels,.apo__concept-body + .apo__concept-labels { margin-top:16px; }
@keyframes apo-wave { to { opacity:.62; transform:scaleY(.86); } }
.apo__concept-curve { width:min(640px,90%); height:180px; position:relative; border-left:4px solid var(--text-dim); border-bottom:4px solid var(--text-dim); }
.apo__concept-curve i { position:absolute; inset:22px 28px 20px 18px; border-top:12px solid var(--concept); border-radius:70% 30% 20% 80%; transform:skewY(-18deg); }
.apo__concept-curve span { position:absolute; right:20px; top:22px; width:16px; height:16px; border-radius:50%; background:var(--concept-2); box-shadow:0 0 0 8px color-mix(in srgb,var(--concept-2) 20%,transparent); }
.apo__concept-formula { width:100%; display:grid; grid-template-columns:repeat(3,1fr); gap:12px; align-items:center; }
.apo__concept-formula .is-main { grid-column:1/-1; font-size:34px; font-weight:800; border-color:var(--concept); }
.apo__concept-compare { width:100%; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:16px; }
.apo__concept-compare > div { display:grid; gap:10px; }
.apo__concept-compare > i { color:var(--concept); font-size:30px; font-style:normal; }
.apo__concept-compare button b { display:block; color:var(--concept); }
.apo__concept-body { width:210px; height:250px; position:relative; }
.apo__concept-body i { position:absolute; display:block; background:var(--text-muted); }
.apo__concept-body .head { width:44px; height:44px; left:83px; top:0; border-radius:50%; background:var(--concept-2); }
.apo__concept-body .trunk { width:25px; height:115px; left:92px; top:48px; border-radius:18px; }
.apo__concept-body .arms { width:145px; height:20px; left:32px; top:75px; border-radius:14px; }
.apo__concept-body .legs { width:110px; height:20px; left:50px; top:182px; border-radius:14px; transform:rotate(62deg); box-shadow:0 -70px 0 var(--text-muted); }
.apo__concept-body .axis-v { width:3px; height:240px; left:104px; top:0; background:var(--concept); }
.apo__concept-body .axis-h { width:210px; height:3px; left:0; top:95px; background:var(--concept); }
.apo__concept-joint { width:260px; height:200px; position:relative; }
.apo__concept-joint i { position:absolute; width:66px; height:66px; border:12px solid var(--concept); border-radius:50%; left:97px; top:67px; }
.apo__concept-joint span,.apo__concept-joint b { position:absolute; width:150px; height:20px; left:130px; top:90px; border-radius:12px; background:var(--text-muted); transform-origin:left center; transform:rotate(-32deg); }
.apo__concept-joint b { transform:rotate(42deg); }
.apo__concept-network { width:min(620px,100%); min-height:250px; display:grid; grid-template-columns:1fr 1fr; gap:70px 170px; position:relative; }
.apo__concept-network strong { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:115px; height:115px; display:grid; place-items:center; border-radius:50%; background:color-mix(in srgb,var(--concept) 18%,var(--surface)); border:4px solid var(--concept); color:var(--concept); }
.apo__concept-network button { min-height:65px; border:2px solid var(--concept); border-radius:16px; background:var(--surface); }
.apo__concept-gauge { width:280px; height:150px; position:relative; overflow:hidden; border-radius:280px 280px 0 0; border:28px solid color-mix(in srgb,var(--concept) 22%,var(--surface)); border-bottom:0; }
.apo__concept-gauge i { position:absolute; width:120px; height:8px; left:112px; bottom:0; background:var(--concept); transform-origin:left center; transform:rotate(-48deg); border-radius:8px; }
.apo__concept-gauge b { position:absolute; width:30px; height:30px; left:105px; bottom:-15px; border-radius:50%; background:var(--concept-2); }
.apo__concept-lever { width:min(650px,90%); height:170px; position:relative; }
.apo__concept-lever i { position:absolute; left:0; right:0; top:80px; height:18px; border-radius:12px; background:var(--text-muted); }
.apo__concept-lever b { position:absolute; left:47%; top:95px; border-left:34px solid transparent; border-right:34px solid transparent; border-bottom:58px solid var(--concept-2); }
.apo__concept-lever span { position:absolute; left:22%; top:5px; width:12px; height:75px; background:var(--concept); box-shadow:350px 0 0 var(--concept-2); }
.apo__concept-axes { width:250px; height:250px; position:relative; border:3px solid var(--border); border-radius:50%; }
.apo__concept-axes i,.apo__concept-axes b,.apo__concept-axes span { position:absolute; display:block; background:var(--concept); left:50%; top:15px; width:4px; height:220px; }
.apo__concept-axes b { transform:rotate(90deg); }
.apo__concept-axes span { transform:rotate(52deg); background:var(--concept-2); }
@media(max-width:680px){.apo__concept-labels,.apo__concept-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.apo__concept-flow{display:grid;grid-template-columns:1fr}.apo__concept-flow i{display:none}.apo__concept-stage{padding:16px;overflow:hidden}.apo__concept-network{gap:110px 60px}.apo__concept-formula{grid-template-columns:1fr}.apo__concept-compare{grid-template-columns:1fr}.apo__concept-compare>i{transform:rotate(90deg);text-align:center}}

@media(max-width:340px){
  .apo__concept-labels,.apo__concept-grid{grid-template-columns:1fr}
  .apo__concept-chip,.apo__concept-grid button{min-height:48px}
}

.apo__plates-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: 16px; }
.apo__plate-card { overflow: hidden; border: 0; border-radius: 0; background: transparent; }
.apo__plate-card figure { margin: 0; background: var(--surface-2); }
.apo__plate-card figure { overflow: visible; }
.apo__plate-card figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  cursor: zoom-in;
}
.apo__plate-card figcaption { padding: 9px 12px; background: var(--surface-2); color: var(--text-dim); font-size: 11px; line-height: 1.45; }
.apo__plate-card figcaption a { color: var(--accent); }
.apo__plate-copy { padding: 15px 17px 17px; }
.apo__plate-copy h4 { margin: 0 0 8px; font-size: 16px; }
.apo__plate-index { display: block; margin-bottom: 6px; color: var(--accent); font: 700 10px var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; }
.apo__plate-copy p { margin: 0 0 10px; color: var(--text-muted); line-height: 1.62; }
.apo__plate-copy strong { display: block; margin-top: 10px; font-family: var(--ff-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); }
.apo__plate-copy ul { margin: 7px 0 0; padding-left: 19px; }
.apo__plate-copy li { margin: 5px 0; color: var(--text-muted); line-height: 1.5; }
@media (min-width: 760px) {
  .apo__plates-grid { grid-template-columns: minmax(0, 1fr); }
  .apo__plate-card:only-child { grid-column: 1 / -1; }
}

/* fontes */
.apo__fontes { margin-top: 26px; padding-top: 16px; border-top: 1px dashed var(--border); }
.apo__fontes span { font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--text-dim); }
.apo__fontes ul { margin: 8px 0 0; padding-left: 18px; }
.apo__fontes li { font-size: 13px; color: var(--text-muted); margin: 3px 0; }

/* concluir + pager */
.apo__doc-actions { margin-top: 28px; }
.apo__done {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border-2); color: var(--text);
  font-family: var(--ff); font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: 999px;
  transition: border-color .15s, background .15s, color .15s;
}
.apo__done svg { width: 17px; height: 17px; }
.apo__done:hover { border-color: var(--ok); }
.apo__done.is-done { background: var(--ok-soft); border-color: var(--ok); color: #1d5650; }

.apo__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; }
.apo__pg-btn {
  appearance: none; cursor: pointer; display: flex; flex-direction: column; gap: 3px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 14px 16px; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s;
}
.apo__pg-btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.apo__pg-btn span { font-family: var(--ff-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); }
.apo__pg-btn b { font-size: 14px; font-weight: 600; }
.apo__pg-prev { text-align: left; }
.apo__pg-next { text-align: right; }
.apo__pg-next b { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; }
.apo__pg-next svg { width: 16px; height: 16px; color: var(--accent); }

/* ------------------------------ Glossário (painel) ----------------------- */
.apo__glossario {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(4,7,11,.62); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
}
/* garante que hidden realmente esconda (regra base de display sobrepõe [hidden]) */
.apo__glossario[hidden], .apo__popover[hidden] { display: none !important; }
.apo__gl-card { width: min(680px, 100%); max-height: 84vh; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); overflow: hidden; }
.apo__gl-head { display: flex; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.apo__gl-head strong { font-size: 15px; }
.apo__gl-close { margin-left: auto; appearance: none; cursor: pointer; background: transparent; border: 1px solid var(--border); border-radius: 8px; width: 32px; height: 32px; color: var(--text-muted); display: grid; place-items: center; }
.apo__gl-close svg { width: 16px; height: 16px; }
.apo__gl-close:hover { color: var(--text); border-color: var(--border-2); }
.apo__gl-body { overflow-y: auto; padding: 18px; }
.apo__gl-grupo { margin-bottom: 20px; }
.apo__gl-grupo h3 { font-family: var(--ff-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 10px; }
.apo__gl-item { padding: 8px 0; border-bottom: 1px solid var(--border); }
.apo__gl-item dt { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.apo__gl-item dt em { font-style: normal; font-weight: 400; color: var(--text-dim); font-size: 12.5px; }
.apo__gl-item dd { margin: 0; font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }

/* ------------------------------ Popover de termo ------------------------- */
.apo__popover {
  position: absolute; z-index: 70; width: 280px;
  background: var(--surface-2); border: 1px solid var(--border-2); border-radius: var(--r);
  box-shadow: var(--shadow-lg); padding: 13px 15px; animation: apo-fade .18s ease both;
}
.apo__popover strong { display: block; font-size: 14px; color: var(--text); }
.apo__popover em { display: block; font-style: italic; font-size: 12px; color: var(--text-dim); margin-top: 1px; }
.apo__popover p { margin: 7px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.apo__pop-sin { display: block; margin-top: 7px; font-family: var(--ff-mono); font-size: 11px; color: var(--text-dim); }

/* ------------------------------ Drawer (mobile) -------------------------- */
/* ----- Índice como gaveta (em TODAS as larguras) — fim do layout "dois painéis" ----- */
.apo__menu-btn {
  display: inline-flex; align-items: center; gap: 9px; position: sticky; top: 0; z-index: 30;
  width: 100%; box-sizing: border-box; appearance: none; cursor: pointer;
  background: color-mix(in srgb, var(--surface) 90%, transparent); border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-family: var(--ff); font-size: 13.5px; font-weight: 700; letter-spacing: .01em; padding: 14px 20px;
  backdrop-filter: blur(6px);
}
.apo__menu-btn svg { width: 18px; height: 18px; color: var(--brass, var(--accent)); }
.apo__sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50; width: min(340px, 88vw);
  max-height: none; transform: translateX(-103%); transition: transform .26s cubic-bezier(.2,.7,.2,1);
  border-right: 1px solid var(--border-2); box-shadow: var(--shadow-lg);
}
.apo.is-drawer-open .apo__sidebar { transform: none; }
.apo__overlay { display: none; }
.apo.is-drawer-open .apo__overlay { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(33,36,42,.42); }

/* leitor centralizado tipo livro */
.apo__reader { min-width: 0; }
.apo__doc { max-width: var(--apo-read); margin: 0 auto; }

@media (max-width: 880px) {
  .apo__doc { padding-top: 22px; }
  .apo__niveis { width: 100%; margin-left: 0; justify-content: space-between; }
  .apo__nivel { flex: 1; text-align: center; }
  .apo__pager { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .apo {
    padding-top: 50px;
  }

  .apo__menu-btn {
    position: fixed;
    top: var(--topbar-h, 62px);
    left: 0;
    right: 0;
    z-index: 35;
  }
}

/* Desktop: índice de lições como navegação secundária INTEGRADA (estilo documentação),
   parte do sistema — sem hambúrguer, sem painel separado (fundo transparente + filete). */
@media (min-width: 980px) {
  .apo { display: grid; grid-template-columns: 268px minmax(0, 1fr); align-items: start; }
  .apo__menu-btn { display: none; }
  .apo__sidebar {
    position: sticky; top: 0; left: auto; bottom: auto; z-index: 1;
    width: auto; max-height: 100dvh; overflow-y: auto;
    transform: none; box-shadow: none; backdrop-filter: none;
    background: transparent; border-right: 1px solid var(--border);
    padding: 24px 20px 40px;
  }
  .apo__overlay { display: none !important; }
  .apo__drawer-x { display: none; }
  .apo__side-kicker { color: var(--text-dim); }
}

@media (prefers-reduced-motion: reduce) {
  .apo__sidebar, .apo__pg-bar span, .apo__popover, .apo__quiz-fb { transition: none; animation: none; }
}

@media (max-width: 640px) {
  .apo__learning-path { grid-template-columns: repeat(2, 1fr); }
  .apo__evidence-grid { grid-template-columns: 1fr; }
  .apo__evidence figure, .apo__evidence figure img { min-height: 230px; }
  .apo__evidence figure img { max-height: none; }
  .apo__evidence-grid { row-gap: 18px; }
  .apo__evidence-guide { padding: 17px; }
  .apo__flashcards { grid-template-columns: 1fr; }
  .study-sim { padding: 14px; border-radius: 14px; }
  .study-sim__controls, .gaso-inputs { grid-template-columns: 1fr; }
  .ecg-medidas { grid-template-columns: repeat(2, 1fr); }
  .ecg-modes { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .ecg-challenge__options { grid-template-columns: 1fr; }
  .phys-stage { grid-template-columns: repeat(2, 1fr); gap: 18px 8px; }
  .phys-node:nth-child(2) .phys-flow { transform: rotate(90deg); right: 50%; top: 70px; }
  .phys-node__orb { width: 52px; height: 52px; }
  .cardio3d { border-radius:14px; }
  .cardio3d__stage { height:390px; }
  .cardio3d__anatomy-tools { left:8px; right:8px; max-width:none; padding:3px; gap:2px; overflow-x:auto; transform:none; scrollbar-width:none; }
  .cardio3d__anatomy-tools::-webkit-scrollbar { display:none; }
  .cardio3d__anatomy-tools button { min-height:28px; padding:4px 7px; font-size:9px; }
  .cardio3d__anatomy-tools [data-reset-view] { flex:0 0 28px; width:28px; }
  .apo__key { padding: 15px; }
}

/* variante embutida: o topbar do app já dá o título; cola a sidebar ao topo do conteúdo */
.apo--embedded .apo__sidebar { max-height: calc(100dvh - var(--topbar-h, 62px)); }

/* ====================== Menu principal (tab bar) ====================== */
.apo__tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; justify-content: space-around; align-items: center;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface-2) 92%, transparent);
  border-top: 1px solid var(--border); backdrop-filter: blur(10px);
}
.apo__tab {
  appearance: none; cursor: pointer; background: transparent; border: 0; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; padding: 4px 0;
  color: var(--text-dim); font-family: var(--ff); font-weight: 600; font-size: 10.5px; letter-spacing: .02em;
  transition: color .15s;
}
.apo__tab svg { width: 23px; height: 23px; stroke-width: 1.7; }
.apo__tab:hover { color: var(--text); }
.apo__tab.is-on { color: var(--accent); }
.apo__tab.is-on svg { stroke-width: 2.1; }

/* ====================== Painel de estudo (gaveta repaginada) ====================== */
.apo__side-head { justify-content: flex-start; }
.apo__drawer-x {
  appearance: none; cursor: pointer; width: 44px; height: 44px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border); color: var(--text-muted);
  display: grid; place-items: center;
}
.apo__drawer-x svg { width: 16px; height: 16px; }
.apo__drawer-x:hover { color: var(--text); border-color: var(--border-2); }

.apo__continuar { margin-bottom: 16px; }
.apo__continuar-card {
  display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; cursor: pointer;
  background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-lg);
  padding: 12px 14px; color: var(--text); transition: transform .15s, box-shadow .15s;
}
.apo__continuar-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.apo__continuar-lab { font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.apo__continuar-tit { font-size: 14.5px; font-weight: 600; }

/* ================= Tabela muscular: origem · inserção · ação ================ */
.apo__muscle-entry {
  width: 100%; min-height: 58px; margin: 0 0 14px; padding: 10px 11px;
  display: grid; grid-template-columns: 34px 1fr; column-gap: 10px; align-items: center;
  border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border));
  border-radius: 12px; background: linear-gradient(135deg, var(--danger-soft), var(--surface));
  color: var(--text); text-align: left; cursor: pointer;
}
.apo__muscle-entry > span { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--danger); color: #fff; }
.apo__muscle-entry svg { width: 20px; height: 20px; }
.apo__muscle-entry b { align-self: end; font-size: 13px; }
.apo__muscle-entry em { align-self: start; color: var(--text-dim); font-size: 10px; font-style: normal; }
.apo__muscle-entry:hover { border-color: var(--danger); }

.apo__doc-resource {
  min-height: 40px; margin-left: auto; padding: 7px 11px; display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border)); border-radius: 999px;
  background: var(--danger-soft); color: #a2191f; font: 700 11px var(--ff-mono); cursor: pointer;
}
.apo__doc-resource svg { width: 16px; height: 16px; }
.apo__doc-resource:hover { border-color: var(--danger); }

.apo__muscle-index { --apo-read: 1320px; }
.apo__muscle-hero { display: flex; gap: 14px; align-items: center; margin: 8px 0 10px; }
.apo__muscle-hero > span { flex: 0 0 54px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: #fff; background: linear-gradient(145deg, #da1e28, #8a171b); box-shadow: 0 12px 28px -16px #8a171b; }
.apo__muscle-hero svg { width: 30px; height: 30px; }
.apo__muscle-hero small { color: var(--danger); font: 800 10px var(--ff-mono); letter-spacing: .16em; }
.apo__muscle-hero .apo__h1 { margin: 3px 0 0; }

.apo__muscle-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 18px 0; }
.apo__muscle-stats span { min-height: 58px; padding: 10px 12px; display: flex; align-items: baseline; gap: 7px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-muted); font-size: 12px; }
.apo__muscle-stats b { color: var(--text); font-size: 22px; font-variant-numeric: tabular-nums; }

.apo__muscle-tools { display: flex; align-items: center; gap: 12px; margin: 20px 0 10px; }
.apo__muscle-tools > span { margin-left: auto; white-space: nowrap; color: var(--text-dim); font: 700 11px var(--ff-mono); }
.apo__muscle-search { position: relative; display: block; flex: 1; max-width: 620px; }
.apo__muscle-search svg { position: absolute; z-index: 1; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--text-dim); }
.apo__muscle-search input { width: 100%; min-height: 48px; padding: 0 14px 0 42px; box-sizing: border-box; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); font: 500 14px var(--ff); outline: none; }
.apo__muscle-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.apo__muscle-regions { display: flex; gap: 7px; margin: 0 0 14px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: thin; }
.apo__muscle-regions button { flex: none; min-height: 40px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font: 650 11.5px var(--ff); cursor: pointer; }
.apo__muscle-regions button[aria-pressed="true"] { border-color: var(--danger); background: var(--danger-soft); color: #a2191f; }
.apo__muscle-regions i { margin-left: 4px; color: var(--text-dim); font-size: 10px; font-style: normal; font-variant-numeric: tabular-nums; }

.apo__muscle-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.apo__muscle-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; font-family: var(--ff-read); }
.apo__muscle-table th { padding: 11px 12px; border-bottom: 1px solid var(--border-2); background: var(--surface-2); color: var(--text-muted); text-align: left; font: 750 10px var(--ff-mono); letter-spacing: .08em; text-transform: uppercase; }
.apo__muscle-table th:nth-child(1) { width: 17%; }.apo__muscle-table th:nth-child(2) { width: 20%; }.apo__muscle-table th:nth-child(3) { width: 20%; }.apo__muscle-table th:nth-child(4) { width: 28%; }.apo__muscle-table th:nth-child(5) { width: 15%; }
.apo__muscle-table td { padding: 13px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-muted); font-size: 13.5px; line-height: 1.48; }
.apo__muscle-table tbody tr:last-child td { border-bottom: 0; }
.apo__muscle-table tbody tr:hover { background: color-mix(in srgb, var(--danger-soft) 34%, transparent); }
.apo__muscle-name { display: block; padding: 0; border: 0; background: none; color: var(--text); text-align: left; font: 750 13.5px var(--ff); cursor: pointer; }
.apo__muscle-name:hover { color: var(--danger); text-decoration: underline; text-underline-offset: 3px; }
.apo__muscle-table td:first-child small { display: block; margin-top: 4px; color: var(--text-dim); font: 500 10px var(--ff); }
.apo__muscle-3d { display: inline-flex; margin-top: 7px; padding: 3px 6px; border-radius: 999px; background: var(--ok-soft); color: #0e6027; font: 800 9px var(--ff-mono); font-style: normal; }
.apo__muscle-demo-cell { padding: 8px !important; text-align: center; }
.apo__muscle-demo-thumb { display: inline-flex; width: 76px; height: 86px; padding: 0; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.apo__muscle-demo-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.apo__muscle-demo-thumb:hover { border-color: var(--accent); box-shadow: 0 3px 12px color-mix(in srgb, var(--accent) 20%, transparent); }
.apo__muscle-demo-pending { display: inline-block; max-width: 100px; color: var(--text-dim); font: 600 10px/1.25 var(--ff); text-align: center; }
.apo__muscle-empty { display: grid; gap: 4px; padding: 36px; border: 1px dashed var(--border-2); border-radius: 14px; text-align: center; }
.apo__muscle-empty span { color: var(--text-muted); font-size: 13px; }

.apo__muscle-sources { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.apo__muscle-sources summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; color: var(--text); font-weight: 750; }
.apo__muscle-sources p { color: var(--text-muted); font-size: 12.5px; line-height: 1.55; }
.apo__muscle-sources ul { list-style: none; display: grid; gap: 8px; margin: 10px 0 0; padding: 0; }
.apo__muscle-sources li { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(180px, 1.5fr) minmax(100px, .7fr) auto; gap: 10px; align-items: center; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11.5px; }
.apo__muscle-sources li span { color: var(--text-muted); }
.apo__muscle-sources li em { color: var(--text-dim); font-style: normal; }
.apo__muscle-sources a { min-height: 40px; display: inline-flex; align-items: center; color: var(--accent); font-weight: 700; }

.apo__muscle-title > span { color: var(--danger); font: 850 11px var(--ff-mono); letter-spacing: .2em; }
.apo__muscle-title p { margin: 7px 0 24px; color: var(--text-muted); }
.apo__muscle-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.apo__muscle-facts section { position: relative; min-height: 160px; padding: 18px 16px 16px 54px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); }
.apo__muscle-facts section::before { content: attr(data-letter); position: absolute; left: 14px; top: 15px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font: 850 14px var(--ff-mono); }
.apo__muscle-facts small, .apo__muscle-innervation > span { color: var(--danger); font: 800 10px var(--ff-mono); letter-spacing: .1em; text-transform: uppercase; }
.apo__muscle-facts p { margin: 8px 0 0; color: var(--text); font: 500 14px/1.55 var(--ff-read); }
.apo__muscle-innervation { margin: 10px 0 22px; padding: 14px 16px; border-left: 3px solid var(--accent); border-radius: 4px 12px 12px 4px; background: var(--accent-soft); }
.apo__muscle-innervation > span { color: var(--accent); }
.apo__muscle-innervation p { margin: 5px 0 0; font-size: 13.5px; }

.apo__muscle-demo { margin: 18px 0 12px; padding: clamp(14px, 2.5vw, 20px); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 78%, var(--accent-soft)); color: var(--text); }
.apo__motion-route { min-height: 54px; display: grid; grid-template-columns: 30px minmax(18px, 1fr) auto minmax(18px, 1fr) 30px; gap: 7px; align-items: center; margin-bottom: 12px; }
.apo__motion-route span { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--danger) 48%, var(--border)); border-radius: 50%; background: var(--surface); color: var(--danger); font: 850 11px var(--ff-mono); }
.apo__motion-route i { height: 1px; position: relative; background: color-mix(in srgb, var(--accent) 62%, var(--border)); }
.apo__motion-route i::after { content: ''; position: absolute; right: -1px; top: -3px; border-left: 6px solid color-mix(in srgb, var(--accent) 70%, var(--border)); border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.apo__motion-route b { padding: 7px 10px; border: 1px solid color-mix(in srgb, var(--danger) 30%, var(--border)); border-radius: 999px; background: var(--danger-soft); color: var(--danger); font: 850 9px var(--ff-mono); letter-spacing: .08em; white-space: nowrap; }
.apo__muscle-demo-copy { padding-top: 12px; border-top: 1px solid var(--border); }
.apo__muscle-demo-copy > small { color: var(--accent); font: 800 9px var(--ff-mono); letter-spacing: .1em; }
.apo__muscle-demo-copy h2 { margin: 4px 0 6px; font-size: 18px; line-height: 1.2; }
.apo__muscle-demo-copy p { margin: 0; color: var(--text-muted); font: 500 14px/1.55 var(--ff-read); }
.apo__muscle-planes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.apo__muscle-planes b { margin-right: 2px; color: var(--text-dim); font-size: 11px; }
.apo__muscle-planes span { padding: 5px 8px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--border)); border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; }
.apo__muscle-atlas { width: 100%; min-height: 68px; display: grid; grid-template-columns: 40px 1fr 22px; gap: 12px; align-items: center; padding: 12px 15px; border: 1px solid color-mix(in srgb, var(--ok) 35%, var(--border)); border-radius: 14px; background: var(--ok-soft); color: var(--text); text-align: left; cursor: pointer; }
.apo__muscle-atlas > svg:first-child { width: 30px; height: 30px; color: var(--ok); }.apo__muscle-atlas > svg:last-child { width: 20px; height: 20px; color: var(--ok); }
.apo__muscle-atlas span { display: grid; gap: 3px; }.apo__muscle-atlas b { font-size: 14px; }.apo__muscle-atlas small { color: var(--text-muted); font-size: 11px; }
.apo__muscle-atlas:hover { border-color: var(--ok); }
.apo__muscle-atlas-wrap { display: grid; gap: 8px; }
.apo__muscle-model-note { margin: 0; padding: 0 4px; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.apo__muscle-atlas-wrap.is-context .apo__muscle-atlas { border-color: color-mix(in srgb, var(--accent) 34%, var(--border)); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.apo__muscle-atlas-wrap.is-context .apo__muscle-atlas > svg { color: var(--accent); }
.apo__muscle-pending { display: grid; gap: 4px; padding: 14px 16px; border: 1px dashed var(--border-2); border-radius: 12px; background: var(--surface); }
.apo__muscle-pending b { font-size: 13px; }.apo__muscle-pending span { color: var(--text-muted); font-size: 12px; line-height: 1.5; }

@media (max-width: 760px) {
  .apo__muscle-index, .apo__muscle-detail { padding-inline: 14px; }
  .apo__muscle-stats { grid-template-columns: 1fr; gap: 6px; }
  .apo__muscle-stats span { min-height: 48px; }
  .apo__muscle-tools { align-items: stretch; flex-direction: column; }
  .apo__muscle-tools > span { margin-left: 2px; }
  .apo__muscle-search { max-width: none; }
  .apo__muscle-table-wrap { overflow: visible; border: 0; background: transparent; }
  .apo__muscle-table { min-width: 0; display: block; }
  .apo__muscle-table thead { display: none; }
  .apo__muscle-table tbody { display: grid; gap: 10px; }
  .apo__muscle-table tr { display: grid; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
  .apo__muscle-table td { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 13px; }
  .apo__muscle-table td::before { content: attr(data-label); color: var(--text-dim); font: 750 9px var(--ff-mono); letter-spacing: .06em; text-transform: uppercase; }
  .apo__muscle-table td:first-child { grid-template-columns: 1fr auto; padding: 14px 12px; background: var(--surface-2); }
  .apo__muscle-table td:first-child::before { display: none; }
  .apo__muscle-table td:first-child small { grid-column: 1; }
  .apo__muscle-3d { grid-column: 2; grid-row: 1; margin: 0; }
  .apo__muscle-demo-cell { display: grid !important; grid-template-columns: 76px 1fr !important; align-items: center; padding: 10px 12px !important; }
  .apo__muscle-demo-cell::before { display: block; }
  .apo__muscle-demo-thumb { width: 76px; height: 76px; }
  .apo__muscle-facts { grid-template-columns: 1fr; }
  .apo__muscle-facts section { min-height: 0; }
  .apo__muscle-demo { margin-top: 16px; border-radius: 12px; }
  .apo__motion-route { min-height: 46px; grid-template-columns: 28px 1fr auto 1fr 28px; margin-bottom: 10px; }
  .apo__motion-route span { width: 28px; height: 28px; }
  .apo__motion-route i:first-of-type { grid-column: 2; }
  .apo__motion-route b { grid-column: 3; grid-row: 1; justify-self: center; }
  .apo__motion-route i:last-of-type { display: block; grid-column: 4; }
  .apo__motion-route span:last-child { grid-column: 5; grid-row: 1; }
  .apo__muscle-demo-copy h2 { font-size: 17px; }
  .apo__muscle-sources li { grid-template-columns: 1fr; gap: 2px; }
  .apo__muscle-sources a { min-height: 36px; }
}

/* glossário vira ação no rodapé do painel */
.apo__glossario-btn {
  margin: 16px 0 0; width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px;
}
.apo__glossario-btn svg { width: 15px; height: 15px; }

/* ===== figura 3D: planos anatômicos (planos-viewer.js) ===== */
.apo__fig--3d { margin: 18px 0; }
.apo__movlab {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  contain: layout paint;
}
.apo__movlab .mov-stage,
.apo__movlab .mov-controls { max-width: 100%; min-width: 0; }
.apo__movlab canvas { max-width: 100%; }
.apo__fig-3d {
  /* overlays (legenda/chips/grip) ficam SOBRE o palco escuro → texto e fios claros */
  --text: #e9eef5; --text-muted: #9aa6b6; --border: rgba(255, 255, 255, 0.16);
  position: relative; width: 100%; height: 440px; border-radius: 14px; overflow: hidden;
  /* mesmo palco 3D do Atlas: glow petróleo + grafite profundo + sombra de contato */
  background:
    radial-gradient(120% 85% at 50% -8%, rgba(15, 90, 84, 0.10), transparent 58%),
    radial-gradient(circle at 50% 44%, #171c24, #0b0e12 84%);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.5);
}
.apo__fig-3d::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  box-shadow: inset 0 0 130px 24px rgba(0, 0, 0, 0.5); /* vinheta premium */
}
.apo__fig-3d.is-fallback { height: auto; background: transparent; border: 0; box-shadow: none; overflow: visible; --text: inherit; --text-muted: inherit; --border: inherit; }
.apo__fig-3d.is-fallback::after { display: none; }
.planos3d { position: absolute; inset: 0; }
.planos3d-loading { position:absolute; inset:0; z-index:8; display:grid; place-content:center; gap:12px; padding:30px; background:radial-gradient(circle at 50% 45%,#171f27,#0b0e12 78%); color:#b7c4c9; text-align:center; font-size:12px; }
.planos3d-loading i { display:block; width:min(230px,70vw); height:4px; border-radius:5px; overflow:hidden; background:#26313a; }
.planos3d-loading b { display:block; width:10%; height:100%; border-radius:inherit; background:#4dc4b5; transition:width .2s ease; }
.planos3d canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.planos3d canvas:active { cursor: grabbing; }
.planos3d-legenda {
  position: absolute; left: 12px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 12px;
  padding: 8px 13px; border-radius: 999px;
  background: rgba(16,20,24,.62); backdrop-filter: blur(12px) saturate(1.3);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.10); pointer-events: none;
  box-shadow: 0 10px 30px -14px rgba(0,0,0,.75);
}
.planos3d-legenda span { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--ff, sans-serif); color: #eef2f0; }
.planos3d-legenda i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
/* legenda interativa (modo estruturas): chips clicáveis que acendem a peça */
.planos3d-legenda--int { pointer-events: none; } /* o container ignora; os chips reativam */
.planos3d-chip {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; pointer-events: auto;
  font: 600 12px var(--ff, sans-serif); color: #9aa6a2;
  padding: 4px 9px; border-radius: 999px; transition: background .15s, box-shadow .15s, color .15s;
}
.planos3d-chip:hover, .planos3d-chip:focus-visible { color: #eef2f0; background: rgba(255,255,255,.07); outline: none; }
.planos3d-chip.is-on { color: #37c2b1; background: rgba(55,194,177,.16); box-shadow: inset 0 0 0 1px rgba(55,194,177,.45); }
.planos3d-chip i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.planos3d-erro { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #9aa6a2; font: 500 14px var(--ff, sans-serif); }
@media (max-width: 700px) { .apo__fig-3d { height: 340px; } }
@media (max-width: 700px) {
  .planos3d-legenda--int { left:8px; right:8px; bottom:8px; flex-wrap:nowrap; overflow-x:auto; gap:4px; padding:6px; border-radius:12px; scrollbar-width:none; }
  .planos3d-legenda--int::-webkit-scrollbar { display:none; }
  .planos3d-chip { flex:0 0 auto; font-size:10px; padding:5px 7px; }
}

/* rótulos de direção (modo termos) — vidro escuro do Atlas */
.planos3d-labels { position: absolute; inset: 0; pointer-events: none; }
.planos3d-dir {
  position: absolute; top: 0; left: 0; white-space: nowrap;
  font: 700 11px var(--ff, sans-serif); letter-spacing: .04em; color: #eef2f0;
  background: rgba(16,20,24,.72); backdrop-filter: blur(10px) saturate(1.3);
  -webkit-backdrop-filter: blur(10px) saturate(1.3);
  border: 1px solid rgba(55,194,177,.4);
  padding: 4px 9px; border-radius: 6px;
  box-shadow: 0 8px 22px -12px rgba(0,0,0,.7);
}

/* Notas de confiança do flashcard — aparecem só depois de virar o cartão. */
.apo__fc-wrap { display: grid; gap: 8px; }
.apo__fc-notas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.apo__fc-notas[hidden] { display: none; }
.apo__fc-notas button {
  min-height: 40px;
  padding: 0 6px;
  border: 1px solid var(--border, #8892A1);
  border-radius: 8px;
  background: var(--surface, #fff);
  color: var(--text-muted, #4A5361);
  font: 600 12px/1 var(--ff, sans-serif);
  cursor: pointer;
}
.apo__fc-notas button:hover:not(:disabled) {
  border-color: var(--marca, #A8362B);
  color: var(--marca, #A8362B);
}
.apo__fc-notas button.is-on {
  background: var(--marca, #A8362B);
  border-color: var(--marca, #A8362B);
  color: #fff;
}
.apo__fc-notas button:disabled { opacity: .55; cursor: default; }

@media (max-width: 480px) {
  /* Quatro alvos de toque não cabem lado a lado em tela estreita. */
  .apo__fc-notas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apo__fc-notas button { min-height: 44px; }
}

/* ============================================================
   EDIÇÃO APOSTILA DIGITAL — leitura editorial, impressão e mobile
   Mantém o conteúdo como uma página de estudo (e não como dashboard),
   com ritmo de capítulo, fontes confortáveis e fontes rastreáveis.
   ============================================================ */
.apo__reader { background: transparent; }
.apo__doc {
  max-width: min(920px, calc(100vw - 32px));
  margin: 24px auto 48px;
  padding: clamp(28px, 5vw, 64px) clamp(24px, 6vw, 76px) 82px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 74%, transparent);
  border-radius: 18px;
  box-shadow: 0 18px 55px -38px rgba(22, 32, 44, .42);
}
.apo__doc-top { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.apo__crumb { font-weight: 700; }
.apo__edition {
  display: inline-flex; align-items: center; gap: 7px; margin-left: auto;
  color: var(--text-dim); font: 600 10px var(--ff-mono); letter-spacing: .08em;
  text-transform: uppercase;
}
.apo__edition::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.apo__h1 { max-width: 18ch; margin-top: 26px; }
.apo__lead { max-width: 68ch; font-size: clamp(16px, 2vw, 18px); }
.apo__blocos { counter-reset: apo-section; gap: 0; }
.apo__bloco { position: relative; padding: 20px 0 12px; border-top: 1px solid color-mix(in srgb, var(--border) 64%, transparent); }
.apo__bloco:first-child { border-top: 0; }
.apo__bloco-tit { margin-top: 0; font-size: clamp(18px, 2.4vw, 22px); line-height: 1.2; }
.apo__bloco-tit::before {
  counter-increment: apo-section; content: counter(apo-section, decimal-leading-zero);
  display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font: 700 10px var(--ff-mono); letter-spacing: .04em;
}
.apo__prosa { max-width: 70ch; font-size: 16.5px; line-height: 1.72; }
.apo__callout { box-shadow: 0 8px 24px -22px rgba(22,32,44,.7); }
.apo__evidence, .apo__plates { padding-top: 28px; padding-bottom: 26px; }
.apo__evidence-grid { align-items: start; }
.apo__evidence-guide { padding: 8px 0 0 8px; }
.apo__evidence-guide > span { display: inline-flex; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.apo__evidence figure img, .apo__plate-card figure img { background: #fff; }
.apo__evidence figcaption, .apo__plate-card figcaption { font-size: 11px; line-height: 1.5; }
.apo__block-refs { padding-top: 10px; border-top: 1px dashed color-mix(in srgb, var(--border) 72%, transparent); }
.apo__block-refs a { min-height: 34px; }
.apo__study-note {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  margin: 22px 0 26px; padding: 14px 16px; border-left: 3px solid var(--accent);
  background: linear-gradient(100deg, var(--accent-soft), transparent 75%); border-radius: 0 10px 10px 0;
}
.apo__study-note b { font: 700 10px var(--ff-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.apo__study-note p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.55; }

@media (max-width: 640px) {
  .apo__doc { max-width: none; margin: 0; padding: 24px 18px 64px; border: 0; border-radius: 0; box-shadow: none; }
  .apo__doc-top { gap: 9px; }
  .apo__edition { width: 100%; margin-left: 0; }
  .apo__h1 { max-width: none; margin-top: 20px; }
  .apo__bloco { padding-top: 18px; }
  .apo__bloco-tit::before { flex-basis: 25px; width: 25px; height: 25px; }
  .apo__evidence-guide { padding: 4px 0 0; }
  .apo__study-note { grid-template-columns: 1fr; gap: 6px; }
}

@media print {
  .apo { background: #fff !important; }
  .apo__menu-btn, .apo__sidebar, .apo__overlay, .apo__doc-resource,
  .apo__niveis, .apo__audio-card, .apo__teste, .apo__quiz, .apo__doc-actions,
  .apo__pager, [data-image-zoom] { display: none !important; }
  .apo__doc { max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; }
  .apo__bloco, .apo__evidence, .apo__plates, .apo__callout { break-inside: avoid; }
  .apo__fig img, .apo__evidence figure img, .apo__plate-card figure img { max-height: 420px; }
  .apo__block-refs a { color: #111; background: transparent; border-color: #bbb; }
}

/* ============================================================
   MENU DA ÁREA DE ESTUDO — mesma linguagem do shell do SaaS
   O leitor mantém sua identidade editorial; o índice usa a identidade
   de produto (superfície branca, marca tijolo e estados flat).
   ============================================================ */
.apo__sidebar {
  background: var(--surface);
  border-right-color: var(--border);
  color: var(--text);
  box-shadow: none;
}
.apo__side-kicker {
  color: var(--text-dim);
  font-family: var(--ff);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .14em;
}
.apo__side-kicker svg { color: var(--marca); }
.apo__side-brand { min-width: 0; display: grid; gap: 3px; }
.apo__side-brand > strong {
  display: block;
  color: var(--text);
  font-size: .94rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.apo__glossario-btn, .apo__drawer-x {
  border-color: var(--border);
  border-radius: var(--r);
  color: var(--text-muted);
  background: transparent;
}
.apo__glossario-btn:hover, .apo__drawer-x:hover {
  color: var(--text);
  border-color: var(--border-2);
  background: var(--surface-2);
}
.apo__search input {
  min-height: 40px;
  border-color: var(--border);
  border-radius: var(--r);
  background: var(--surface);
  font-family: var(--ff);
  font-size: .82rem;
}
.apo__search input:focus { border-color: var(--marca); box-shadow: 0 0 0 3px var(--marca-suave); }
.apo__modulo-head { padding: 16px 10px 7px; }
.apo__modulo-num {
  color: var(--marca);
  font-family: var(--ff-mono);
  font-size: .62rem;
  font-weight: 700;
}
.apo__modulo-tit { font-size: .62rem; color: var(--text-dim); letter-spacing: .13em; }
.apo__modulo-prog { font-family: var(--ff-mono); color: var(--text-dim); }
.apo__licao {
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: .86rem;
  font-weight: 600;
}
.apo__licao:hover { color: var(--text); background: var(--surface-2); }
.apo__licao.is-active {
  color: var(--marca-forte);
  background: var(--marca-suave);
  box-shadow: inset 3px 0 0 var(--marca);
}
.apo__licao-mark { border-color: var(--border-2); }
.apo__licao.is-started .apo__licao-mark { border-color: var(--marca); background: var(--marca-suave); }
.apo__licao.is-done .apo__licao-mark { border-color: var(--ok); background: var(--ok-suave); }
.apo__licao-txt em { font-family: var(--ff-mono); color: var(--text-dim); }
.apo__embreve {
  border-color: var(--border);
  border-radius: var(--r);
  font-family: var(--ff);
  color: var(--text-dim);
}
.apo__menu-btn {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom-color: var(--border);
  color: var(--text);
  font-family: var(--ff);
  box-shadow: 0 4px 16px -14px rgba(22, 24, 29, .42);
}
.apo__menu-btn svg { color: var(--marca); }
.apo__sidebar { background: var(--bg); }
.apo.is-drawer-open .apo__overlay { background: rgba(22, 24, 29, .28); }
.apo__sidebar[data-sidebar] { isolation: isolate; }
.apo__sidebar .apo__progresso-geral {
  padding: 12px 10px 14px;
  margin: 0 0 4px;
  border-top: 1px solid var(--border-suave);
  border-bottom: 1px solid var(--border-suave);
}
.apo__sidebar .apo__continuar-card { border-radius: var(--r); }
.apo__sidebar .apo__sumario { padding-top: 4px; }
.apo__sidebar .apo__glossario-btn { width: 100%; justify-content: flex-start; margin-top: 12px; }

@media (min-width: 980px) {
  .apo { align-items: start; background: var(--bg); }
  .apo__sidebar { min-height: 0; padding: 16px 12px 32px; border-radius: 0; }
}
