/* ==========================================================================
   ABPp — Novo layout (v2) — Publicações: listagem, notícia, vídeos, livros, downloads
   Só usa os tokens do v2.css, então acompanha o tema de cada unidade.
   ========================================================================== */

/* ---------- Comum ---------- */
.pub-section { padding: clamp(8px, 2vw, 24px) 0 clamp(64px, 8vw, 110px); }
.pub-tools { gap: 12px 16px; }
.pub-search { display: flex; align-items: center; gap: 10px; flex: 1 1 280px; max-width: 420px; padding: 0 6px 0 16px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: box-shadow .25s; }
.pub-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px color-mix(in oklab, var(--accent) 16%, transparent); }
.pub-search .icon { color: var(--ink-3); }
.pub-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 12px 6px; font-size: .95rem; }
.pub-search input::-webkit-search-cancel-button { cursor: pointer; }

.cat-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 18px; margin-top: 4px; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row.inline { padding: 4px 2px; margin: 0; flex: 1 1 auto; min-width: 0; }
.cat-chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; padding: 8px 14px; border-radius: 999px; font-size: .85rem; color: var(--ink-2); background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); transition: all .25s var(--ease); }
.cat-chip span { font-size: .72rem; font-weight: 600; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); text-align: center; }
.cat-chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink-3); color: var(--ink); }
.cat-chip[aria-pressed="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.cat-chip[aria-pressed="true"] span { background: rgba(255,255,255,.18); color: #fff; }
.cat-chip .icon { width: .95em; height: .95em; }

.n-media { container-type: inline-size; }
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 34px clamp(14px, 1.8vw, 24px); margin-top: clamp(32px, 4vw, 48px); }
.pub-grid.rel { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 0; }
.pub-card:focus-visible { outline-offset: 6px; }
.pub-more-row { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: clamp(36px, 4vw, 52px); }
.pub-more-row span { font-size: .84rem; color: var(--ink-3); }
.pub-more-row .btn[hidden] { display: none; }
.pub-empty { display: grid; justify-items: center; gap: 14px; margin-top: 32px; }

/* destaque da listagem */
#pub-feature[hidden] { display: none; }
.pub-feature { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-top: 8px; padding: clamp(18px, 2.4vw, 28px); border-radius: var(--radius-xl); background: var(--paper-2); position: relative; overflow: hidden; isolation: isolate; }
.pub-feature::after { content: ''; position: absolute; z-index: -1; width: 420px; aspect-ratio: 1; right: -140px; bottom: -200px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 20px, color-mix(in oklab, var(--accent) 16%, transparent) 20px 22px); }
.pf-media { position: relative; aspect-ratio: 4/5; border-radius: var(--radius-l); overflow: hidden; background: var(--paper-3); box-shadow: var(--shadow-l); transform: rotate(-1.5deg); transition: transform .8s var(--ease); }
.pf-media img { width: 100%; height: 100%; object-fit: cover; }
.pub-feature:hover .pf-media { transform: rotate(0) scale(1.01); }
.pf-media .n-tag { left: 14px; top: 14px; background: var(--accent); color: var(--on-accent); }
.pf-body { display: grid; gap: 14px; justify-items: start; padding-right: clamp(0px, 2vw, 24px); }
.pf-body .n-meta { margin: 0; flex-wrap: wrap; }
.pf-body h2 { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.8rem); font-weight: 600; letter-spacing: -.035em; transition: color .3s; }
.pub-feature:hover h2 { color: var(--brand); }
.pf-body p { color: var(--ink-2); font-size: 1.05rem; max-width: 52ch; }
.pf-body .btn { margin-top: 6px; }

/* faixa da revista */
.revista-band { background: var(--brand-deep); color: #fff; padding: clamp(48px, 6vw, 80px) 0; position: relative; overflow: hidden; isolation: isolate; }
.revista-band::before { content: ''; position: absolute; z-index: -1; width: 640px; aspect-ratio: 1; left: -260px; top: -320px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 24px, rgba(255,255,255,.07) 24px 26px); }
.revista-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.revista-band .eyebrow { color: rgba(255,255,255,.72); }
.revista-band h2 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.8rem); font-weight: 500; margin: 14px 0 12px; }
.revista-band h2 .serif { color: var(--accent-2); }
[data-unidade="pb"] .revista-band h2 .serif, [data-unidade="sp"] .revista-band h2 .serif { color: #ffb3b8; }
.revista-band p { color: rgba(255,255,255,.75); max-width: 52ch; }
.revista-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

@media (max-width: 860px) {
    .pub-feature { grid-template-columns: 1fr; }
    .pf-media { max-width: 340px; transform: none; }
    .revista-inner { grid-template-columns: 1fr; }
    .revista-actions { justify-content: flex-start; }
    .pub-grid.rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .pub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; }
    .pub-search { max-width: none; }
}

/* ==========================================================================
   Notícia (leitura)
   ========================================================================== */
.nt-progress { position: fixed; left: 0; right: 0; top: 0; z-index: 95; height: 4px; pointer-events: none; }
.nt-progress i { display: block; height: 100%; background: var(--ribbon); transform: scaleX(0); transform-origin: 0 50%; transition: transform .1s linear; }
.nt-head { padding: clamp(28px, 4vw, 48px) 0 clamp(28px, 4vw, 44px); position: relative; overflow: hidden; isolation: isolate; }
.nt-head::before { content: ''; position: absolute; z-index: -1; width: 70vmax; height: 70vmax; right: -30vmax; top: -45vmax; border-radius: 50%; background: radial-gradient(closest-side, var(--hero-glow), transparent 70%); }
.nt-title { max-width: 900px; margin-top: clamp(24px, 3vw, 36px); }
.nt-kicker { display: flex; gap: 8px; flex-wrap: wrap; }
.nt-cat { background: var(--accent); color: var(--on-accent); transition: transform .25s var(--ease); }
.nt-cat:hover { transform: translateY(-2px); }
.nt-title h1 { font-size: clamp(2rem, 1.2rem + 3.2vw, 3.8rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; margin: 18px 0 16px; }
.nt-deck { font-family: var(--font-serif); font-style: italic; font-size: clamp(1.2rem, 1rem + .8vw, 1.55rem); color: var(--ink-2); line-height: 1.35; max-width: 50ch; }
.nt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.nt-author { display: flex; align-items: center; gap: 12px; }
.nt-author .avatar { width: 44px; height: 44px; font-size: .85rem; }
.nt-author small { display: block; font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .1em; }
.nt-author b { font-weight: 500; }
.nt-mi { display: inline-flex; align-items: center; gap: 7px; }
.nt-mi .icon { color: var(--accent); }

.nt-layout { display: grid; grid-template-columns: minmax(240px, 340px) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: clamp(56px, 7vw, 96px); }
.nt-aside { position: sticky; top: calc(var(--sticky-top, 0px) + 24px); display: grid; gap: 18px; transition: top .45s var(--ease); }
.nt-cover { position: relative; aspect-ratio: 4/5; border-radius: var(--radius-l); overflow: hidden; background: var(--paper-3); box-shadow: var(--shadow-l); }
.nt-cover[data-zoom] { cursor: zoom-in; }
.nt-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.nt-cover[data-zoom]:hover img { transform: scale(1.03); }
.nt-zoom { position: absolute; right: 12px; bottom: 12px; }
.nt-share small, .nt-tags small { display: block; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; font-weight: 500; }
.nt-share .share a, .nt-share .share button { height: 44px; }

/* o corpo (.prose.conteudo-editor) é estilizado no v2.css; aqui só largura e respiro */
.nt-body { max-width: 68ch; }

/* bloco de fonte (notícias de outros portais) */
.nt-source { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; max-width: 68ch; margin-top: 36px; padding: 18px 18px 18px 20px; border-radius: var(--radius-l); background: var(--card); box-shadow: 0 0 0 1px var(--line), var(--shadow-s); position: relative; overflow: hidden; }
.nt-source::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--ribbon); }
.ns-ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.ns-ico .icon { width: 22px; height: 22px; }
.ns-txt { display: grid; gap: 2px; min-width: 0; }
.ns-txt small { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.ns-txt strong { font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.ns-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem; color: var(--ink-3); }
.ns-meta span + span::before { content: '·'; margin-right: 12px; }
.ns-btn { flex: none; }
.ext-chip { background: var(--paper-2); }
.ext-chip .icon { width: 1em; height: 1em; }
.ext-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 9px; border-radius: 999px; font-size: .72rem; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); width: fit-content; }
.ext-tag .icon { width: .9em; height: .9em; }
@media (max-width: 640px) { .nt-source { grid-template-columns: auto minmax(0, 1fr); } .ns-btn { grid-column: 1 / -1; justify-content: space-between; } }

.nt-tags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nt-tags small { width: 100%; margin-bottom: 2px; }
.nt-tags .chip { transition: background .25s, color .25s; }
.nt-tags .chip:hover { background: var(--ink); color: #fff; }
.nt-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; max-width: 68ch; }
.nt-pg { display: grid; gap: 6px; padding: 18px 20px; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); transition: transform .4s var(--ease), box-shadow .4s; }
.nt-pg:hover { transform: translateY(-3px); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.nt-pg.next { text-align: right; }
.nt-pg small { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.nt-pg.next small { justify-content: flex-end; }
.nt-pg strong { font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.more-pubs { padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 110px); background: var(--paper-2); border-radius: var(--radius-xl) var(--radius-xl) 0 0; position: relative; overflow: hidden; isolation: isolate; }
.more-pubs::before { content: ''; position: absolute; z-index: -1; width: 620px; aspect-ratio: 1; right: -220px; top: -260px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 26px, color-mix(in oklab, var(--accent) 14%, transparent) 26px 28px); }

@media (max-width: 900px) {
    .nt-layout { grid-template-columns: 1fr; }
    .nt-aside { position: static; grid-template-columns: minmax(0, 260px) 1fr; align-items: end; }
}
@media (max-width: 560px) {
    .nt-aside { grid-template-columns: 1fr; }
    .nt-cover { max-width: 300px; }
    .nt-pager { grid-template-columns: 1fr; }
    .nt-pg.next { text-align: left; }
    .nt-pg.next small { justify-content: flex-start; }

}

/* ==========================================================================
   Vídeos
   ========================================================================== */
.vd-stage { background: var(--ink); color: #fff; padding: clamp(28px, 4vw, 44px) 0 clamp(48px, 6vw, 80px); position: relative; overflow: hidden; isolation: isolate; }
.vd-stage::before { content: ''; position: absolute; z-index: -1; width: 80vmax; height: 80vmax; left: -30vmax; top: -50vmax; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--accent) 30%, transparent), transparent 70%); }
.vd-stage .crumbs { color: rgba(255,255,255,.6); }
.vd-stage .crumbs a:hover { color: #fff; }
.vd-head { margin: clamp(20px, 3vw, 32px) 0 clamp(24px, 3vw, 36px); max-width: 760px; }
.vd-head h1 { font-size: clamp(2.4rem, 1.4rem + 3.6vw, 4.4rem); letter-spacing: -.045em; margin-bottom: 12px; }
.vd-head h1 .serif { color: color-mix(in oklab, var(--accent-2) 80%, #fff); }
[data-unidade="pb"] .vd-head h1 .serif, [data-unidade="sp"] .vd-head h1 .serif { color: #ffb3b8; }
.vd-head .lead { color: rgba(255,255,255,.72); }
.vd-grid-top { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.vd-player { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-l); overflow: hidden; background: #000; box-shadow: 0 40px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08); }
.vd-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vd-poster { position: absolute; inset: 0; width: 100%; display: block; cursor: pointer; }
.vd-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .5s; }
.vd-poster:hover img { transform: scale(1.03); filter: brightness(.82); }
.vd-poster::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.55)); }
.vd-play { position: absolute; z-index: 2; left: 50%; top: 50%; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); transform: translate(-50%, -50%); box-shadow: 0 20px 50px -10px rgba(0,0,0,.5); transition: transform .5s var(--ease-bounce); }
.vd-play::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.55); animation: ring 2.4s var(--ease) infinite; }
.vd-play .icon { width: 30px; height: 30px; margin-left: 5px; }
.vd-poster:hover .vd-play, .vd-poster:focus-visible .vd-play { transform: translate(-50%, -50%) scale(1.1); }
.vd-poster .v-dur { z-index: 2; right: 14px; bottom: 14px; font-size: .82rem; }
.vd-demo { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; }
.vd-demo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(14px) brightness(.4); transform: scale(1.1); }
.vd-demo > div { position: relative; display: grid; justify-items: center; gap: 10px; max-width: 420px; }
.vd-demo strong { font-size: 1.3rem; font-weight: 600; }
.vd-demo p { color: rgba(255,255,255,.78); margin-bottom: 8px; }
.vd-info { margin-top: 22px; display: grid; gap: 10px; }
.vd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vd-chips .icon { width: .95em; height: .95em; }
.vd-info h2 { font-size: clamp(1.4rem, 1rem + 1.4vw, 2.1rem); font-weight: 500; letter-spacing: -.025em; outline: 0; }
.vd-info .v-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.vd-info p { color: rgba(255,255,255,.72); max-width: 62ch; }
.vd-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.vd-queue-wrap { display: grid; gap: 12px; }
.vd-queue-label { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 600; }
.vd-queue { display: grid; gap: 8px; }
.vq-item { display: grid; grid-template-columns: 136px 1fr; gap: 14px; align-items: center; padding: 8px; border-radius: 16px; text-align: left; transition: background .25s; }
.vq-item:hover, .vq-item:focus-visible { background: rgba(255,255,255,.08); }
.vq-thumb { position: relative; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #111; }
.vq-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vq-thumb .v-dur { right: 6px; bottom: 6px; font-size: .7rem; }
.vq-txt strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 500; font-size: .92rem; line-height: 1.3; }
.vq-txt small { display: block; margin-top: 4px; color: rgba(255,255,255,.55); font-size: .78rem; }
.vd-channel { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 14px 16px; border-radius: 18px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: background .25s; }
.vd-channel:hover { background: rgba(255,255,255,.12); }
.vd-channel strong { display: block; font-weight: 500; }
.vd-channel small { color: rgba(255,255,255,.6); font-size: .8rem; }
.vd-channel > .icon:last-child { margin-left: auto; }
.vd-yt { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: #ff0000; color: #fff; flex: none; }

/* séries */
.vs-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: clamp(36px, 5vw, 56px); }
.vs-card { display: grid; gap: 16px; padding: 16px 16px 18px; border-radius: var(--radius-l); background: var(--card); box-shadow: 0 0 0 1px var(--line); text-align: left; transition: transform .4s var(--ease), box-shadow .4s; }
.vs-card:hover { transform: translateY(-4px); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
.vs-card[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent), var(--shadow); }
.vs-stack { position: relative; aspect-ratio: 16/9; margin: 10px 14px 0; }
.vs-stack span { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; background: var(--paper-3); box-shadow: 0 8px 20px -10px rgba(0,0,0,.4); transition: transform .5s var(--ease); }
.vs-stack span img { width: 100%; height: 100%; object-fit: cover; }
.vs-stack span:nth-last-child(2) { transform: translate(-8px, -8px) scale(.94); opacity: .75; }
.vs-stack span:nth-last-child(3) { transform: translate(-16px, -16px) scale(.88); opacity: .5; }
.vs-card:hover .vs-stack span:nth-last-child(2) { transform: translate(-12px, -12px) scale(.94) rotate(-2deg); }
.vs-card:hover .vs-stack span:nth-last-child(3) { transform: translate(-22px, -20px) scale(.88) rotate(-4deg); }
.vs-txt small { display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; color: var(--ink-3); letter-spacing: .04em; }
.vs-txt small .icon { width: 1em; height: 1em; color: var(--accent); }
.vs-txt strong { display: block; margin-top: 4px; font-weight: 500; font-size: 1.05rem; letter-spacing: -.01em; }

/* grade de vídeos */
.vd-count { font-size: .84rem; color: var(--ink-3); margin: 14px 0 0; }
.vid-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px clamp(14px, 1.8vw, 22px); margin-top: 18px; }
.vid-card { display: grid; gap: 10px; align-content: start; }
.vc-thumb { position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--paper-3); box-shadow: var(--shadow-s); transition: transform .5s var(--ease), box-shadow .5s; }
.vc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.vc-thumb .n-tag { left: 8px; top: 8px; }
.vid-card:hover .vc-thumb { transform: translateY(-4px); box-shadow: var(--shadow-l); }
.vid-card:hover .vc-thumb img { transform: scale(1.05); }
.vc-play { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--ink); transform: translate(-50%, -50%) scale(.8); opacity: 0; transition: all .4s var(--ease-bounce); box-shadow: 0 12px 30px -10px rgba(0,0,0,.5); }
.vc-play .icon { width: 20px; height: 20px; margin-left: 3px; }
.vid-card:hover .vc-play, .vid-card:focus-visible .vc-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
@media (hover: none) { .vc-play { opacity: 1; transform: translate(-50%, -50%) scale(.85); } }
.vc-meta { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--ink-3); padding: 0 2px; }
.vc-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.vid-card strong { font-weight: 500; line-height: 1.32; padding: 0 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; transition: color .3s; }
.vid-card:hover strong { color: var(--brand); }

@media (max-width: 980px) { .vd-grid-top { grid-template-columns: 1fr; } .vd-queue { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
    .vd-queue { grid-template-columns: 1fr; }
    .vq-item { grid-template-columns: 120px 1fr; }
    .vd-play { width: 68px; height: 68px; }
    .vd-play .icon { width: 24px; height: 24px; }
}

/* ==========================================================================
   Livros
   ========================================================================== */
.book3d { position: relative; display: block; width: 100%; aspect-ratio: 2/3; perspective: 1400px; cursor: pointer; }
.book3d .b-cover { position: absolute; inset: 0; border-radius: 4px 10px 10px 4px; overflow: hidden; transform-origin: 0 50%; box-shadow: -1px 0 0 rgba(0,0,0,.1), 0 24px 40px -18px rgba(28,22,51,.55), 0 4px 10px -4px rgba(28,22,51,.25); transition: transform .7s var(--ease), box-shadow .7s var(--ease); z-index: 2; background: var(--paper-3); }
.book3d .b-cover img { width: 100%; height: 100%; object-fit: cover; }
/* lombada */
.book3d .b-cover::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 9%; background: linear-gradient(90deg, rgba(0,0,0,.28), rgba(255,255,255,.18) 40%, rgba(0,0,0,.06)); z-index: 1; }
.book3d .b-cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,.22), transparent 38%); pointer-events: none; }
/* páginas */
.book3d .b-pages { position: absolute; top: 2%; bottom: 2%; right: 1%; left: 6%; border-radius: 2px 6px 6px 2px; background: repeating-linear-gradient(90deg, #fff 0 2px, #ece7dc 2px 3px); box-shadow: 0 20px 30px -16px rgba(28,22,51,.35); transform: translateX(0); transition: transform .7s var(--ease); z-index: 1; }
.book3d:not(.static):hover .b-cover, .book3d:not(.static):focus-visible .b-cover { transform: rotateY(-24deg); box-shadow: 18px 30px 50px -20px rgba(28,22,51,.55); }
.book3d:not(.static):hover .b-pages, .book3d:not(.static):focus-visible .b-pages { transform: translateX(6%); }
.book3d.static { cursor: default; }

.lv-feature { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; padding: clamp(24px, 4vw, 48px); margin-top: 8px; border-radius: var(--radius-xl); background: var(--paper-2); position: relative; overflow: hidden; isolation: isolate; }
.lv-feature::after { content: ''; position: absolute; z-index: -1; width: 520px; aspect-ratio: 1; left: -200px; bottom: -280px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 22px, color-mix(in oklab, var(--accent) 16%, transparent) 22px 24px); }
.book3d.big { max-width: 300px; transform: rotate(-3deg); }
.lv-feature-txt { display: grid; gap: 14px; justify-items: start; }
.lv-feature-txt h2 { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.7rem); font-weight: 600; letter-spacing: -.035em; }
.lv-feature-txt h2 .serif { font-weight: 400; color: var(--brand); }
.lv-by { color: var(--ink-3); font-size: .92rem; }
.lv-feature-txt > p:not(.lv-by) { color: var(--ink-2); max-width: 56ch; }
.lv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.lv-head { margin-top: clamp(48px, 6vw, 80px); align-items: center; }
.lv-head .cat-row { flex: 0 1 auto; }
.lv-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 48px clamp(18px, 3vw, 40px); }
.lv-item { display: grid; gap: 18px; align-content: start; position: relative; }
.lv-item .book3d { width: 86%; margin: 0 auto; }
.lv-item .book3d::after { content: ''; position: absolute; left: -12%; right: -12%; bottom: -14px; height: 14px; border-radius: 3px; background: linear-gradient(var(--paper-3), color-mix(in oklab, var(--paper-3) 70%, var(--ink))); box-shadow: 0 10px 18px -10px rgba(28,22,51,.45); z-index: 0; }
.lv-txt { padding: 6px 4px 0; }
.lv-txt small { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
[data-unidade="pb"] .lv-txt small, [data-unidade="sp"] .lv-txt small { color: var(--accent); }
.lv-txt h3 { font-size: 1.02rem; font-weight: 500; line-height: 1.3; margin: 6px 0 6px; }
.lv-txt h3 button { text-align: left; transition: color .25s; }
.lv-txt h3 button:hover { color: var(--brand); }
.lv-txt h3 span { color: var(--ink-3); font-weight: 400; }
.lv-txt p { font-size: .84rem; color: var(--ink-3); line-height: 1.4; }

/* modal genérico das publicações */
html.pm-on { overflow: hidden; }
.pub-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 24px; }
.pub-modal[hidden] { display: none; }
.pm-backdrop { position: absolute; inset: 0; background: color-mix(in oklab, var(--brand-deep) 60%, rgba(0,0,0,.4)); backdrop-filter: blur(8px); opacity: 0; transition: opacity .3s; }
.pm-box { position: relative; width: min(920px, 100%); max-height: calc(100dvh - 48px); overflow-y: auto; background: var(--paper); border-radius: var(--radius-xl); box-shadow: 0 50px 120px -30px rgba(0,0,0,.6); padding: clamp(24px, 4vw, 44px); opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .35s, transform .5s var(--ease); scrollbar-width: thin; }
.pub-modal.open .pm-backdrop { opacity: 1; }
.pub-modal.open .pm-box { opacity: 1; transform: none; }
.pm-x { position: absolute; right: 16px; top: 16px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow-s), 0 0 0 1px var(--line); transition: transform .3s var(--ease); }
.pm-x:hover { transform: rotate(90deg); }
.lv-modal { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.lv-m-cover .book3d { max-width: 260px; }
.lv-m-txt { display: grid; gap: 12px; justify-items: start; padding-right: 32px; }
.lv-m-txt h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem); font-weight: 600; letter-spacing: -.03em; }
.lv-m-txt h2 .serif { font-weight: 400; color: var(--brand); }
.lv-m-txt h3 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.lv-m-txt > p { color: var(--ink-2); }
.lv-ficha { display: grid; gap: 8px; margin: 4px 0 0; width: 100%; }
.lv-ficha div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.lv-ficha dt { color: var(--ink-3); }
.lv-ficha dd { margin: 0; }
.lv-ref { width: 100%; padding: 14px 16px; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); display: grid; gap: 8px; justify-items: start; }
.lv-ref small { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.lv-ref p { font-size: .88rem; color: var(--ink-2); font-family: ui-serif, Georgia, serif; }
.lv-ref .btn { min-height: 40px; font-size: .84rem; }

@media (max-width: 760px) {
    .lv-feature { grid-template-columns: 1fr; }
    .book3d.big { max-width: 210px; }
    .lv-modal { grid-template-columns: 1fr; }
    .lv-m-cover .book3d { max-width: 180px; }
    .lv-m-txt { padding-right: 0; }
}
@media (max-width: 520px) {
    .lv-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 18px; }
    .pub-modal { padding: 0; place-items: end center; }
    .pm-box { border-radius: 28px 28px 0 0; max-height: 92dvh; transform: translateY(100%); }
    .pub-modal.open .pm-box { transform: none; }
}

/* ==========================================================================
   Downloads
   ========================================================================== */
.dl-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.dl-stats span { padding: 8px 14px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); font-size: .86rem; color: var(--ink-2); }
.dl-stats b { color: var(--ink); font-weight: 600; }
.dl-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(24px, 4vw, 48px); align-items: start; margin-top: 18px; }
.dl-group { margin-top: 24px; }
.dl-group h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; font-weight: 500; margin-bottom: 14px; }
.dl-group h2 span { font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-3); }
.dl-grid { display: grid; gap: 10px; }
.dl-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--card); box-shadow: 0 0 0 1px var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.dl-card:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 1px var(--line); }
/* ícone de arquivo com canto dobrado, na cor do tipo */
.dl-file { position: relative; width: 46px; height: 56px; border-radius: 6px 14px 6px 6px; background: color-mix(in oklab, var(--c) 14%, var(--card)); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c) 40%, transparent); display: grid; place-items: end center; padding-bottom: 8px; flex: none; }
.dl-file::before { content: ''; position: absolute; right: 0; top: 0; width: 14px; height: 14px; border-radius: 0 0 0 6px; background: color-mix(in oklab, var(--c) 35%, var(--card)); }
.dl-file span { font-size: .62rem; font-weight: 700; letter-spacing: .04em; color: #fff; background: var(--c); padding: 2px 5px; border-radius: 4px; }
.dl-txt h3 { font-size: 1rem; font-weight: 500; line-height: 1.3; }
.dl-txt p { font-size: .86rem; color: var(--ink-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: .76rem; color: var(--ink-3); }
.dl-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.dl-demo { margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--paper-2); font-weight: 500; }
.dl-actions { display: flex; gap: 6px; }
.dl-btn { display: inline-flex; align-items: center; gap: 7px; height: 42px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: #fff; font-size: .86rem; font-weight: 500; transition: background .25s, transform .25s var(--ease); }
.dl-btn:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-1px); }
.dl-btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.dl-btn.ghost:hover { background: var(--paper-2); color: var(--ink); }
.dl-note { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: .82rem; color: color-mix(in oklab, var(--accent) 70%, var(--ink)); padding: 8px 12px; border-radius: 12px; background: var(--accent-soft); }
.dl-aside { position: sticky; top: calc(var(--sticky-top, 0px) + 96px); display: grid; gap: 16px; transition: top .45s var(--ease); margin-top: 24px; }
.dl-transp { display: grid; gap: 8px; padding: 22px; border-radius: var(--radius-l); background: var(--brand); color: #fff; position: relative; overflow: hidden; isolation: isolate; transition: transform .4s var(--ease); }
.dl-transp::after { content: ''; position: absolute; z-index: -1; width: 260px; aspect-ratio: 1; right: -90px; bottom: -120px; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 14px, rgba(255,255,255,.12) 14px 15.5px); }
.dl-transp:hover { transform: translateY(-3px); }
.dl-transp .eyebrow { color: rgba(255,255,255,.75); }
.dl-transp strong { font-size: 1.2rem; font-weight: 500; letter-spacing: -.01em; }
.dl-transp > span:not(.eyebrow):not(.link-arrow) { color: rgba(255,255,255,.75); font-size: .88rem; }
.dl-transp .link-arrow { color: #fff; margin-top: 6px; }
.dl-links-box { padding: 20px; border-radius: var(--radius-l); background: var(--card); box-shadow: 0 0 0 1px var(--line); }
.dl-links-box h2 { font-size: 1.05rem; font-weight: 500; margin-bottom: 10px; }
.dl-links { display: grid; }
.dl-link { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-radius: 12px; transition: background .2s; }
.dl-link:hover { background: var(--paper-2); }
.dl-link + .dl-link { border-top: 1px solid var(--line); }
.dl-link-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.dl-link strong { display: block; font-weight: 500; font-size: .92rem; }
.dl-link small { color: var(--ink-3); font-size: .78rem; }
.dl-link > .icon:last-child { margin-left: auto; color: var(--ink-3); }

@media (max-width: 980px) { .dl-layout { grid-template-columns: 1fr; } .dl-aside { position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) {
    .dl-aside { grid-template-columns: 1fr; }
    .dl-card { grid-template-columns: auto minmax(0, 1fr); }
    .dl-actions { grid-column: 1 / -1; }
    .dl-actions .dl-btn { flex: 1; justify-content: center; }
}
