/* ===== Apostilas (iscas de estudo): catálogo, leitor e chat com a IA por seção ===== */
.apo-grupo { margin: 22px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.apo-grupo h2 { font-size: 1.15rem; margin: 0; letter-spacing: -.02em; }

.apo-pastas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin-top: 8px; }
.apo-pasta { position: relative; text-align: left; border: 0; background: none; padding: 14px 0 0; cursor: pointer; font: inherit; color: var(--text); transition: transform .18s; }
.apo-pasta::before { content: ''; position: absolute; top: 0; left: 0; width: 46%; height: 18px; border-radius: 12px 12px 0 0; background: var(--apo-aba, #e4d9b6); }
.apo-pasta:hover { transform: translateY(-3px); }
.apo-pasta-capa { display: block; position: relative; border-radius: 4px 18px 18px 18px; overflow: hidden; aspect-ratio: 16 / 9.5; box-shadow: 0 16px 34px -18px rgba(40,30,0,.55); }
.apo-pasta-capa .badge { position: absolute; bottom: 10px; right: 10px; }
.apo-capa { display: block; width: 100%; height: 100%; }
.apo-pasta-info { display: flex; flex-direction: column; gap: 2px; padding: 10px 4px 0; }
.apo-pasta-info small { color: var(--text-dim); font-weight: 700; letter-spacing: .06em; font-size: .72rem; }
.apo-pasta-info b { font-size: 1.05rem; letter-spacing: -.01em; }
.apo-pasta-info span { color: var(--text-dim); font-size: .8rem; }
.apo-banner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 46%); border-radius: 22px; overflow: hidden; margin-bottom: 18px; background: #f5b700; box-shadow: 0 18px 38px -22px rgba(40,30,0,.5); }
.apo-banner-txt { padding: 24px 22px; color: #1c1708; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.apo-banner-txt h2 { margin: 0; font-size: 1.7rem; letter-spacing: -.03em; line-height: 1.05; } .apo-banner-txt small { font-weight: 800; letter-spacing: .12em; font-size: .72rem; color: #6b4b00; } .apo-banner-txt span { font-size: .84rem; color: #3d3410; margin-top: 6px; }
.apo-banner .apo-capa { height: 100%; min-height: 150px; }
@media (max-width: 640px) { .apo-banner { grid-template-columns: 1fr; } .apo-banner .apo-capa { order: -1; max-height: 150px; } }
.apo-cover { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: #f5b700; color: #1c1708; border-radius: 22px; padding: 18px 20px; margin-bottom: 14px; }
.apo-cover img { width: 46px; height: 46px; flex: none; }
.apo-cover > div { flex: 1; min-width: 200px; } .apo-cover small { display: block; font-weight: 800; letter-spacing: .12em; font-size: .7rem; color: #6b4b00; text-transform: uppercase; } .apo-cover h2 { margin: 2px 0 0; font-size: 1.45rem; letter-spacing: -.03em; line-height: 1.1; }
.apo-cover .btn.ghost { background: rgba(255,255,255,.55); border-color: transparent; color: #1c1708; }
.apo-num { font-style: normal; font-weight: 800; font-size: .78rem; width: 26px; height: 26px; border-radius: 99px; background: var(--accent-soft, #fdf0c2); display: grid; place-items: center; color: #7a5a00; }
.apo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.apo-card { text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; cursor: pointer; color: var(--text); font: inherit; display: flex; flex-direction: column; gap: 6px; transition: transform .15s, border-color .15s; }
.apo-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.apo-card b { font-size: .98rem; line-height: 1.25; }
.apo-card span { font-size: .78rem; color: var(--text-dim); }
.apo-topo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.apo-chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: thin; }
.apo-chip { flex: none; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-dim); border-radius: 99px; padding: 7px 13px; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.apo-chip.on { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-color: transparent; }
.apo-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 12px; }
.apo-papel { background: #fff; color: #1c1708; border-radius: 18px; padding: 22px 24px 26px; border: 1px solid #ece4c8; line-height: 1.62; font-size: 1rem; overflow-wrap: anywhere; user-select: text; -webkit-user-select: text; }
.apo-papel .chhead { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 3px solid #f5b700; }
.apo-papel .chhead .n { font-size: 2.6rem; font-weight: 800; line-height: .85; color: #f5b700; letter-spacing: -.05em; }
.apo-papel .chhead .t { font-size: 1.3rem; font-weight: 800; line-height: 1.15; }
.apo-papel .chhead .t small { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8a6100; margin-bottom: 4px; }
.apo-papel p { margin: 0 0 10px; } .apo-papel ul, .apo-papel ol { margin: 0 0 10px; padding-left: 22px; } .apo-papel li { margin: 0 0 5px; }
.apo-papel h3 { font-size: 1.1rem; font-weight: 800; margin: 18px 0 6px; } .apo-papel h4 { font-size: .98rem; font-weight: 800; margin: 12px 0 5px; color: #8a6100; }
.apo-papel .stew { font-size: .8rem; color: #6c6448; margin: 0 0 12px; } .apo-papel .stew b { color: #8a6100; }
.apo-papel .box { border-radius: 14px; padding: 11px 15px 5px; margin: 12px 0 14px; }
.apo-papel .box .lab { font-size: .68rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; margin: 0 0 5px; }
.apo-papel .ideia { background: #fff1c2; border: 1px solid #ecd58a; } .apo-papel .ideia .lab { color: #8a6100; }
.apo-papel .receita { background: #1c1708; color: #f5efdc; } .apo-papel .receita .lab, .apo-papel .receita b { color: #ffd45c; } .apo-papel .receita .katex { color: #f5efdc; }
.apo-papel .erro { background: #fbdedb; border-left: 5px solid #c93a32; } .apo-papel .erro .lab { color: #c93a32; }
.apo-papel .prova { background: #fff; border: 2px solid #1c1708; } .apo-papel .prova .lab { background: #f5b700; color: #1c1708; display: inline-block; padding: 2px 8px; border-radius: 5px; }
.apo-papel .dica { background: #e7f5f3; border-left: 5px solid #1c9a90; } .apo-papel .dica .lab { color: #1c9a90; }
.apo-papel .ex-res { background: #faf7ee; border: 1px solid #e3dcc3; } .apo-papel .ex-res .lab { color: #6c6448; }
.apo-papel figure { margin: 12px 0; text-align: center; } .apo-papel figure svg { width: 100%; max-width: 560px; height: auto; } .apo-papel figure.sm svg { max-width: 360px; } .apo-papel figure.md svg { max-width: 460px; }
.apo-papel figcaption { font-size: .8rem; color: #6c6448; font-style: italic; margin-top: 4px; } .apo-papel .pair { display: flex; gap: 10px; flex-wrap: wrap; } .apo-papel .pair figure { flex: 1 1 240px; }
.apo-papel table { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: .9rem; display: block; overflow-x: auto; } .apo-papel th { background: #1c1708; color: #ffd45c; padding: 6px 10px; text-align: left; font-size: .8rem; } .apo-papel td { padding: 6px 10px; border-bottom: 1px solid #e3dcc3; }
.apo-papel .ex { display: flex; gap: 11px; margin: 0 0 12px; } .apo-papel .ex .k { flex: 0 0 28px; height: 28px; border-radius: 50%; background: #f5b700; font-weight: 800; display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.apo-papel .ex .b { flex: 1; min-width: 0; } .apo-papel .ex .tag { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #8a6100; background: #fff1c2; padding: 1px 7px; border-radius: 4px; margin-bottom: 3px; }
.apo-papel .sol { margin: 0 0 14px; } .apo-papel .sol .hd { font-weight: 800; margin: 0 0 4px; } .apo-papel .sol .hd span { display: inline-block; background: #f5b700; border-radius: 50%; width: 24px; height: 24px; text-align: center; line-height: 24px; margin-right: 8px; font-size: .85rem; }
.apo-papel .sol .ans { display: inline-block; background: #dcf1e6; color: #14603f; font-weight: 700; padding: 2px 10px; border-radius: 6px; margin: 0 0 5px; }
.apo-papel .katex { font-size: 1.04em; } .apo-papel .katex-display { overflow-x: auto; overflow-y: hidden; padding: 2px 0; }
.apo-papel { max-width: 780px; margin-left: auto; margin-right: auto; padding: 30px 34px 34px; font-size: 1.04rem; line-height: 1.72; }
.apo-papel p { margin: 0 0 12px; } .apo-papel li { margin: 0 0 7px; }
.apo-papel figure { margin: 18px 0; } .apo-papel figure svg, .apo-papel figure.md svg { width: 100%; max-width: 100%; } .apo-papel figure.sm svg { max-width: 92%; }
.apo-papel .box { padding: 14px 18px 8px; margin: 16px 0 18px; }
.apo-papel .sol .katex, .apo-papel .box .katex { font-size: 1.1em; }
.apo-papel .exs { display: block; }
.apo-abas { display: flex; gap: 6px; background: var(--surface-2, #f3eedd); border-radius: 16px; padding: 5px; margin: 0 0 14px; max-width: 780px; margin-left: auto; margin-right: auto; }
.apo-abas button { flex: 1; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .92rem; padding: 11px 12px; border-radius: 12px; cursor: pointer; color: var(--text-dim, #6c6448); }
.apo-abas button.on { background: #fff; color: #1c1708; box-shadow: 0 2px 8px -3px rgba(40,30,0,.3); }
.apo-abas .n { display: inline-block; margin-left: 4px; font-size: .74rem; background: #fff1c2; color: #7a5a00; padding: 1px 7px; border-radius: 99px; }
.apo-banco { max-width: 780px; margin: 0 auto; }
.apo-banco-cab h3 { margin: 0 0 4px; font-size: 1.35rem; letter-spacing: -.02em; } .apo-banco-cab > p { margin: 0 0 12px; color: var(--text-dim, #6c6448); font-size: .92rem; }
.apo-porque { background: #fff1c2; border-radius: 14px; padding: 11px 15px; margin-bottom: 14px; font-size: .88rem; line-height: 1.5; color: #3d3410; } .apo-porque span b { font-weight: 700; } .apo-porque > b { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6100; margin-bottom: 2px; }
.apo-filtros { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.apo-filtro { border: 1px solid #e3dcc3; background: #fff; font: inherit; font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 99px; cursor: pointer; color: #6c6448; } .apo-filtro.on { background: #1c1708; border-color: #1c1708; color: #ffd45c; }
.apo-q-nv { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; } .apo-q-nv.n1 { background: #dcf1e6; color: #14603f; } .apo-q-nv.n2 { background: #fff1c2; color: #7a5a00; } .apo-q-nv.n3 { background: #fbdedb; color: #8f2620; }
.apo-q.errou { border-color: #c93a32; background: #fff6f5; } .apo-q.errou .apo-q-n { background: #c93a32; color: #fff; } .apo-q.errou .apo-q-estado { color: #8f2620; }
.apo-q.travada { display: flex; align-items: center; padding: 10px 14px; opacity: .75; background: repeating-linear-gradient(135deg, #faf7ee, #faf7ee 10px, #f3eedd 10px, #f3eedd 20px); } .apo-q.travada .apo-q-cab { margin: 0; width: 100%; } .apo-q.travada .apo-q-n { background: #e8e0c6; color: #6c6448; }
.apo-q-result { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px dashed #d8cfae; padding-top: 10px; } .apo-q-result span { font-weight: 700; font-size: .85rem; color: #6c6448; margin-right: 4px; } .apo-q-result .btn { min-height: 38px; padding: 7px 16px; font-size: .84rem; }
body:has(#pavio-pergunta) .apo-lado, body:has(#pavio-pergunta) .sec-lado { visibility: hidden; }
.apo-upgrade { margin-top: 16px; background: #1c1708; color: #f5efdc; border-radius: 18px; padding: 18px 20px; display: grid; gap: 6px; } .apo-upgrade b { font-size: 1.05rem; } .apo-upgrade span { font-size: .86rem; opacity: .85; line-height: 1.45; } .apo-upgrade .btn { justify-self: start; margin-top: 8px; }
.apo-ex-topo { display: grid; gap: 10px; background: #faf7ee; border: 1px solid #e8e0c6; border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; }
.apo-ex-topo b { font-size: 1.05rem; } .apo-ex-topo span { display: block; font-size: .82rem; color: #6c6448; margin-top: 2px; }
.apo-ex-barra { height: 8px; border-radius: 99px; background: #e8e0c6; overflow: hidden; } .apo-ex-barra i { display: block; height: 100%; background: #23875f; border-radius: 99px; transition: width .35s; }
.apo-qs { display: grid; gap: 14px; }
.apo-q { border: 1.5px solid #e3dcc3; border-radius: 18px; padding: 16px 18px; background: #fff; transition: border-color .2s, background .2s; }
.apo-q.feita { border-color: #23875f; background: #eef8f2; }
.apo-q-cab { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.apo-q-n { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #f5b700; color: #1c1708; font-weight: 800; display: grid; place-items: center; } .apo-q.feita .apo-q-n { background: #23875f; color: #fff; }
.apo-q-tag { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a6100; background: #fff1c2; padding: 3px 9px; border-radius: 6px; } .apo-q.feita .apo-q-tag { background: #d3ecdd; color: #14603f; }
.apo-q-estado { margin-left: auto; font-size: .78rem; font-weight: 800; color: #14603f; }
.apo-q-enun { font-size: 1.02rem; line-height: 1.65; } .apo-q-enun p { margin: 0 0 8px; }
.apo-q-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .apo-q-acoes .btn { min-height: 40px; padding: 8px 14px; font-size: .84rem; }
.apo-q-dica { margin-top: 12px; background: #fff1c2; border-radius: 12px; padding: 10px 14px; font-size: .92rem; } .apo-q-dica b { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #8a6100; margin-bottom: 2px; }
.apo-q-res { margin-top: 12px; border-top: 1px dashed #d8cfae; padding-top: 12px; display: grid; gap: 10px; }
.apo-q-resp { background: #dcf1e6; border-radius: 12px; padding: 10px 14px; font-weight: 700; color: #14603f; } .apo-q-resp > span, .apo-q-pass > span { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 800; opacity: .8; margin-bottom: 2px; }
.apo-q-pass { font-size: .95rem; } .apo-q-pass > span { color: #6c6448; } .apo-q-pass p { margin: 0 0 6px; }
.apo-q-obs { margin-top: 12px; } .apo-q-obs summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: #6c6448; list-style: none; } .apo-q-obs summary::-webkit-details-marker { display: none; }
.apo-q-obs summary::before { content: '✎ '; } .apo-q-ponto { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #f5b700; margin-left: 4px; }
.apo-q-obs textarea { width: 100%; margin-top: 8px; border-radius: 12px; border: 1px solid #e3dcc3; background: #faf7ee; padding: 10px 12px; font: inherit; font-size: .9rem; resize: vertical; min-height: 60px; color: #1c1708; box-sizing: border-box; }
.apo-pagina { margin-bottom: 22px; box-shadow: 0 22px 44px -30px rgba(40,30,0,.55); }
.apo-pg-n { margin-top: 20px; text-align: center; font-size: .78rem; font-weight: 700; color: #8a6100; }
.apo-toc { margin-bottom: 22px; } .apo-toc h3 { margin: 0 0 12px; font-size: 1.4rem; letter-spacing: -.03em; }
.apo-toc-l { display: flex; align-items: baseline; width: 100%; background: none; border: 0; padding: 7px 0; font: inherit; color: #1c1708; cursor: pointer; text-align: left; }
.apo-toc-l .t { font-weight: 600; } .apo-toc-l .d { flex: 1; border-bottom: 1px dotted #a89f82; margin: 0 6px 4px; min-width: 14px; } .apo-toc-l .n { font-size: .84rem; color: #8a6100; font-weight: 700; white-space: nowrap; }
.apo-toc-l:hover .t { color: #8a6100; }
.apo-toc-dica { margin: 14px 0 0; font-size: .84rem; color: #6c6448; }
.apo-papel .prova { display: block; }
#v-apostilas.lendo > .head { display: none; }
.av.mini { overflow: hidden; border: 2px solid #1c1708; background: #fff1c2; } .av.mini svg { width: 100%; height: 100%; display: block; }
.pavio-pergunta { position: fixed; z-index: 9300; right: 18px; bottom: 22px; display: flex; align-items: flex-end; gap: 4px; max-width: min(430px, calc(100vw - 24px)); animation: apoBolha .45s cubic-bezier(.3,1.5,.5,1); }
.pp-bolha { position: relative; background: #fff; color: #1c1708; border: 2.5px solid #1c1708; border-radius: 18px; padding: 14px 16px; box-shadow: 0 20px 44px -16px rgba(40,30,0,.55); margin-bottom: 36px; }
.pp-bolha::after { content: ''; position: absolute; right: -9px; bottom: 20px; width: 15px; height: 15px; background: #fff; border-right: 2.5px solid #1c1708; border-top: 2.5px solid #1c1708; transform: rotate(45deg); }
.pp-bolha p { margin: 0 0 10px; font-weight: 700; font-size: .92rem; line-height: 1.4; }
.pp-botoes { display: flex; gap: 8px; flex-wrap: wrap; } .pp-botoes .btn { min-height: 40px; padding: 8px 14px; font-size: .85rem; }
/* aviso de cookies (/medicao.js) fica acima da barra de abas no celular */
@media (max-width: 860px) { :root:not(:has(#gate:not([hidden]))) { --pv-cookies-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.pp-mini { flex: none; width: 96px; filter: drop-shadow(0 12px 16px rgba(40,30,0,.28)); }
@media (max-width: 860px) { .pavio-pergunta { right: 6px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } .pp-mini { width: 56px; } }
#sec-mini, #apo-lado-mini { display: block; }
.sec-lado { position: fixed; right: 18px; bottom: 26px; z-index: 7900; width: 104px; }
.sec-lado[hidden] { display: none; }
.sec-lado .apo-lado-btn { position: relative; display: block; }
.sec-ponto { position: absolute; top: 6px; right: 14px; width: 15px; height: 15px; border-radius: 50%; background: #c93a32; border: 2.5px solid #fff; }
.sec-bolha { position: absolute; right: 8px; bottom: calc(100% - 6px); width: 270px; background: #fff; color: #1c1708; border: 2.5px solid #1c1708; border-radius: 18px; padding: 13px 15px; box-shadow: 0 20px 44px -16px rgba(40,30,0,.55); }
.sec-bolha::after { content: ''; position: absolute; right: 30px; bottom: -11px; width: 16px; height: 16px; background: #fff; border-right: 2.5px solid #1c1708; border-bottom: 2.5px solid #1c1708; transform: rotate(45deg); }
.sec-bolha.pop { animation: apoBolha .45s cubic-bezier(.3,1.5,.5,1); } .sec-bolha p { margin: 0 0 10px; font-weight: 700; font-size: .88rem; line-height: 1.4; }
.sec-bolha .btn { min-height: 38px; padding: 7px 13px; font-size: .82rem; }
.sec-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; } .sec-acoes .btn { min-height: 44px; padding: 6px 12px; font-size: .8rem; }
body:has(#v-apostilas.on.lendo) .sec-lado, body.apo-selecionando .sec-lado { display: none; }
@media (max-width: 860px) { .sec-lado { width: 54px; right: 6px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } .sec-bolha { width: 220px; right: 0; } .sec-ponto { top: 2px; right: 4px; width: 12px; height: 12px; } }
.apo-lado { position: fixed; right: 18px; bottom: 26px; z-index: 8000; width: 112px; display: flex; flex-direction: column; align-items: center; gap: 0; }
.apo-lado-btn { border: 0; background: none; padding: 0; width: 100%; cursor: pointer; filter: drop-shadow(0 14px 18px rgba(40,30,0,.28)); transition: transform .18s; }
.apo-lado-btn:hover { transform: translateY(-4px) scale(1.04); }
.apo-lado-rotulo { display: block; margin: 2px auto 0; width: max-content; max-width: 100%; background: #1c1708; color: #faf7ee; border-radius: 99px; font-size: .66rem; font-weight: 800; letter-spacing: .05em; padding: 4px 9px; line-height: 1.1; }
.apo-lado-btn.tem-aviso { position: relative; } .apo-lado-btn.tem-aviso::after { content: ''; position: absolute; top: 4px; right: 12px; width: 13px; height: 13px; border-radius: 50%; background: #c93a32; border: 2px solid #fff; }
/* Exercícios das apostilas: abrir, fechar e concluir com movimento (respeita prefers-reduced-motion) */
.apo-q-acoes .btn { transition: transform .12s, background .2s, color .2s, border-color .2s; } .apo-q-acoes .btn:active { transform: scale(.94); }
.apo-q-acoes .btn[aria-expanded="true"] { background: #1c1708; color: #faf7ee; border-color: #1c1708; }
.apo-q-dica, .apo-q-res { overflow: hidden; }
.apo-q-obs[open] textarea { animation: apoAbre .28s cubic-bezier(.3,.8,.3,1); }
@keyframes apoAbre { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.apo-q.concluindo { animation: apoFeita .8s ease; } .apo-q.concluindo .apo-q-n { animation: apoCheck .6s cubic-bezier(.3,1.7,.5,1); } .apo-q.concluindo .apo-q-estado { animation: apoAbre .5s .2s both; }
.apo-q.desfazendo { animation: apoDesfaz .35s ease; }
@keyframes apoFeita { 0% { box-shadow: 0 0 0 0 rgba(35,135,95,.55); background: #fff; } 40% { box-shadow: 0 0 0 14px rgba(35,135,95,0); background: #cfeedd; } 100% { box-shadow: 0 0 0 0 rgba(35,135,95,0); background: #eef8f2; } }
@keyframes apoCheck { 0% { transform: scale(.2) rotate(-120deg); } 70% { transform: scale(1.3) rotate(8deg); } 100% { transform: none; } }
@keyframes apoDesfaz { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.apo-q-cab { position: relative; } .apo-conf { position: absolute; left: 15px; top: 15px; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; animation: apoConf .85s ease-out forwards; }
@keyframes apoConf { from { opacity: 1; transform: translate(0,0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(.4); } }
.apo-ex-topo.pulso b { animation: apoCheck .5s cubic-bezier(.3,1.7,.5,1); }
.apo-chat:not([hidden]) { animation: apoChatIn .3s cubic-bezier(.3,.9,.3,1); } .apo-chat.saindo { animation: apoChatOut .2s ease-in forwards; }
@keyframes apoChatIn { from { opacity: 0; transform: translateX(28px) scale(.98); } to { opacity: 1; transform: none; } } @keyframes apoChatOut { to { opacity: 0; transform: translateX(28px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .apo-q.concluindo, .apo-q.concluindo *, .apo-q.desfazendo, .apo-chat, .apo-q-obs[open] textarea, .apo-conf, .apo-ex-topo.pulso b { animation: none !important; } }
.apo-lado small { font-size: .7rem; font-weight: 700; color: #8a6100; margin-top: 2px; }
.apo-lado-bolha { position: absolute; right: 6px; bottom: calc(100% - 8px); width: 190px; background: #fff; color: #1c1708; border: 2.5px solid #1c1708; border-radius: 16px; padding: 10px 13px; font-size: .86rem; font-weight: 700; line-height: 1.3; box-shadow: 0 14px 30px -14px rgba(40,30,0,.5); }
.apo-lado-bolha::after { content: ''; position: absolute; right: 26px; bottom: -11px; width: 16px; height: 16px; background: #fff; border-right: 2.5px solid #1c1708; border-bottom: 2.5px solid #1c1708; transform: rotate(45deg); }
.apo-lado-bolha.pop { animation: apoBolha .45s cubic-bezier(.3,1.5,.5,1); }
@keyframes apoBolha { from { opacity: 0; transform: translateY(10px) scale(.85); } to { opacity: 1; transform: none; } }
.apo-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #fff1c2; border: 2px solid #1c1708; overflow: hidden; display: block; }
.apo-av svg { width: 100%; height: 100%; display: block; } .apo-av.grande { width: 42px; height: 42px; }
.apo-av.pensa { animation: apoPensa 1.2s ease-in-out infinite; } @keyframes apoPensa { 50% { transform: translateY(-3px); } }
.apo-linha { display: flex; align-items: flex-end; gap: 8px; } .apo-linha.u { justify-content: flex-end; }
.apo-linha .apo-msg { align-self: auto; }
.apo-msg.digitando { display: inline-flex; gap: 4px; padding: 13px 14px; } .apo-msg.digitando i { width: 7px; height: 7px; border-radius: 50%; background: #8a6100; opacity: .35; animation: apoPonto 1s infinite; }
.apo-msg.digitando i:nth-child(2) { animation-delay: .15s; } .apo-msg.digitando i:nth-child(3) { animation-delay: .3s; }
@keyframes apoPonto { 40% { opacity: 1; transform: translateY(-3px); } }
.apo-chat-h { gap: 10px; justify-content: flex-start; } .apo-chat-h > b { flex: 1; } .apo-chat-h .btn { margin-left: auto; }
.apo-sel-alvo { outline: 3px solid #f5b700; outline-offset: 4px; animation: apoAlvo 1.4s ease-in-out infinite; }
@keyframes apoAlvo { 50% { outline-color: rgba(245,183,0,.35); } }
body.apo-selecionando .apo-pagina { cursor: text; }
body.apo-selecionando .apo-pg-corpo :is(p, li, figcaption, td, h3, h4) { cursor: pointer; border-radius: 6px; transition: background .12s; }
body.apo-selecionando .apo-pg-corpo :is(p, li, figcaption, td, h3, h4):hover { background: #fff1c2; }
body.apo-selecionando .apo-lado { display: none; }
@media (max-width: 860px) { .apo-selbar { top: 10px; bottom: auto; left: 10px; right: 10px; transform: none; max-width: none; border-radius: 18px; font-size: .82rem; flex-wrap: wrap; } .apo-selbar span:nth-child(2) { flex: 1; min-width: 150px; } }
.apo-selbar { position: fixed; z-index: 9200; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; background: #1c1708; color: #fff; border-radius: 99px; padding: 8px 16px 8px 8px; font-size: .86rem; font-weight: 600; box-shadow: 0 18px 40px -14px rgba(0,0,0,.55); max-width: calc(100vw - 24px); }
.apo-selbar .link { color: #ffd45c; font-weight: 700; white-space: nowrap; } .apo-selbar-av { width: 34px; height: 34px; border-radius: 50%; background: #fff1c2; overflow: hidden; flex: none; } .apo-selbar-av svg { width: 100%; height: 100%; }
@media (max-width: 860px) { .apo-lado { width: 60px; right: 6px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } .apo-lado-bolha { width: 160px; font-size: .8rem; } }
.apo-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.apo-fab { position: fixed; right: 16px; bottom: 86px; z-index: 8000; box-shadow: 0 14px 36px -10px rgba(0,0,0,.4); }
.apo-sel { position: fixed; z-index: 9100; padding: 8px 13px; font-size: .8rem; box-shadow: 0 10px 28px -8px rgba(0,0,0,.4); }
.apo-chat { position: fixed; z-index: 9050; right: 16px; top: 16px; bottom: 16px; width: 430px; max-width: calc(100vw - 32px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 20px; display: flex; flex-direction: column; box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
.apo-chat[hidden] { display: none; }
.apo-chat-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.apo-chat-h b { font-size: .92rem; line-height: 1.25; } .apo-chat-h small { display: block; color: var(--text-dim); font-weight: 600; font-size: .72rem; }
.apo-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.apo-msg { max-width: 92%; padding: 10px 13px; border-radius: 16px; font-size: .9rem; line-height: 1.5; overflow-wrap: anywhere; }
.apo-msg.u { align-self: flex-end; background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: var(--accent-ink); border-bottom-right-radius: 5px; }
.apo-msg.a { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.apo-msg.a p { margin: 0 0 8px; } .apo-msg.a p:last-child { margin: 0; } .apo-msg .katex-display { overflow-x: auto; }
.apo-vazio { color: var(--text-dim); font-size: .86rem; line-height: 1.5; }
.apo-trecho { margin: 0 16px 8px; padding: 8px 11px; border-radius: 12px; background: var(--soft, #fff1c2); color: var(--text); font-size: .78rem; border: 1px solid var(--border); display: flex; gap: 8px; align-items: flex-start; }
.apo-trecho span { flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.apo-sug { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 8px; }
.apo-sug button { border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 99px; padding: 6px 11px; font: inherit; font-size: .76rem; cursor: pointer; }
.apo-in { display: flex; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--border); }
.apo-in textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); padding: 11px 13px; font: inherit; font-size: .9rem; }
@media (max-width: 820px) {
  .apo-papel { padding: 16px 15px 20px; font-size: .96rem; border-radius: 14px; }
  .apo-chat { left: 0; right: 0; bottom: 0; top: 10vh; width: auto; max-width: none; border-radius: 20px 20px 0 0; }
  .apo-fab { bottom: 92px; }
}
