/* Ficha de documento (single) — CSS exacto del mockup P. Solo carga en single archivosk. */
.crumb{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:22px 44px 0;font-size:13px;font-weight:500;color:var(--mut)}
.crumb a{color:var(--mut);text-decoration:none;padding:5px 8px;border-radius:6px;transition:all 0.2s ease;display:flex;align-items:center;gap:6px}
.crumb a:hover{color:var(--navy);background:rgba(0,51,160,0.06)}
.crumb .sep{color:#a0aec0;display:flex;align-items:center}
.crumb .cur{color:var(--navy);font-weight:600;padding:5px 8px;background:rgba(0,51,160,0.04);border-radius:6px}
.crumb svg{width:14px;height:14px;flex-shrink:0}

.ficha{display:grid;grid-template-columns:330px 1fr;gap:42px;padding:24px 44px 10px;align-items:start}
.fcover{position:sticky;top:24px}
.admin-bar .fcover{top:56px}
.fcover .cvimg{width:100%;border-radius:16px;box-shadow:0 26px 54px -26px rgba(12,45,90,.55);display:block;background:#fff;aspect-ratio:17/22;object-fit:contain}
.dlbig{width:100%;margin-top:16px;background:var(--gold);color:#241803;border:0;border-radius:14px;padding:15px;font-family:Inter;font-weight:700;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:9px;text-decoration:none;transition:background .2s var(--ease-out),color .2s var(--ease-out),transform .12s}
.dlbig:hover{background:var(--red);color:#fff}.dlbig:active{transform:scale(.98)}
.dlbig svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fmt{text-align:center;font-size:12px;color:var(--mut);margin-top:9px}
/* Compartir (bajo la portada) */
.fshare{margin-top:18px;padding-top:16px;border-top:1px solid var(--stroke)}
.fshare-lbl{display:block;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--mut);margin-bottom:9px}
.fshare-row{display:flex;flex-wrap:wrap;gap:8px}
.sh{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:10px;background:#EAF1FB;color:var(--navy);border:0;cursor:pointer;text-decoration:none;transition:background .18s var(--ease-out),color .18s var(--ease-out),transform .12s var(--ease-out)}
.sh:hover{background:var(--navy);color:#fff}
.sh:active{transform:scale(.92)}
.sh svg{width:19px;height:19px;fill:none}
.sh-copy.done{background:#1F8A4C;color:#fff}
.fchips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:14px}
.chip{font-size:10px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;padding:5px 11px;border-radius:7px}
.chip.tax{background:var(--gold);color:#241803}.chip.cat{background:#EAF1FB;color:var(--navy)}
a.chip{text-decoration:none;cursor:pointer;transition:filter .15s var(--ease-out),transform .12s var(--ease-out)}
a.chip:hover{filter:brightness(.95)}a.chip:active{transform:scale(.96)}
.metagrid .v .muted{color:var(--mut);font-weight:500}
.ftitle{font-family:'Space Grotesk';font-size:32px;font-weight:700;color:var(--navy);line-height:1.12;letter-spacing:-.02em;text-wrap:balance;margin-bottom:12px}
.fby{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-size:13.5px;color:var(--mut);margin-bottom:26px}
.fby b{color:var(--navy)}
.fby .dl{display:inline-flex;align-items:center;gap:6px;font-weight:700;color:var(--gold-ink)}
.fby .dl svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.fsec{margin-bottom:28px}
.fsec h2{font-family:Inter;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--navy);margin-bottom:11px}
.resumen,.resumen p{font-size:15px;line-height:1.7;color:#33404F;max-width:68ch;text-wrap:pretty}
.resumen p{margin-bottom:12px}
/* Casillas que se ajustan al contenido: las largas (Autor/Temática/Categoría/Proyecto)
   absorben el espacio (flex-grow 4); las cortas (.m--sm: Año/Formato/Peso/Licencia) quedan
   compactas (flex-grow 1). flex-basis:auto = arrancan del ancho de su texto. Sin huecos: todas
   crecen para llenar cada fila, así que nunca queda el bloque gris vacío. */
.metagrid{display:flex;flex-wrap:wrap;gap:1px;background:var(--stroke);border:1px solid var(--stroke);border-radius:14px;overflow:hidden}
.metagrid .m{background:#fff;padding:14px 16px;flex:4 1 auto;min-width:150px}
.metagrid .m--sm{flex:0 1 auto;min-width:92px}
.metagrid .m--wide{flex:1 1 100%}
/* Relleno blanco: absorbe el sobrante de la última fila sin estirar las casillas cortas (sin bloque gris). */
.metagrid .m--fill{flex:1 1 0;min-width:0;padding:0;background:#fff}
.metagrid .m .k{font-size:11px;color:var(--mut);font-weight:600;margin-bottom:3px}
.metagrid .m .v{font-size:14px;color:var(--navy);font-weight:600}
.metagrid .m .v a{color:var(--navy);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px;transition:color .18s}
.metagrid .m .v a:hover{color:var(--red)}
.citar{background:#fff;border:1px solid var(--stroke);border-radius:14px;padding:18px}
.citar p{font-size:13.5px;line-height:1.55;color:#33404F;font-family:'Space Grotesk'}
.citar .copy{margin-top:12px;background:transparent;border:1px solid var(--stroke2);color:var(--navy);font-weight:600;font-size:12.5px;padding:8px 14px;border-radius:9px;cursor:pointer;display:inline-flex;gap:6px;align-items:center;transition:background .18s,border-color .18s,color .18s}
.citar .copy:hover{background:#FBEAEC;border-color:var(--red);color:var(--red)}
.citar .copy svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.relsec{padding:18px 44px 8px}
.relsec h2{font-family:Inter;font-size:19px;font-weight:800;text-transform:uppercase;letter-spacing:.045em;color:var(--navy)}
.rail{display:flex;align-items:flex-start;gap:18px;overflow-x:auto;padding:16px 44px 26px;scroll-snap-type:x proximity;scroll-padding-left:44px}
.rail .card{flex:0 0 228px;scroll-snap-align:start}
@media(max-width:900px){
 .ficha{grid-template-columns:1fr;gap:24px;padding:22px 18px 10px}
 .fcover{position:static;max-width:300px}.admin-bar .fcover{top:0}
 .ftitle{font-size:clamp(1.5rem,6vw,2rem)}
 .crumb,.relsec,.rail{padding-left:18px;padding-right:18px}
}

/* Badge oficial CC BY-SA en la ficha */
.licm{display:inline-flex;align-items:center}
.ccbadge{display:inline-block;line-height:0}
.ccbadge img{height:24px;width:auto;display:block;border-radius:3px;border:1px solid var(--stroke);background:#fff}
.fby .ccbadge img{height:22px}
.metagrid .v .ccbadge{margin-top:2px}

/* Botón "Leer en línea" (PDF.js) + modal del lector */
.readbtn{width:100%;margin-top:16px;background:var(--navy);color:#fff;border:0;border-radius:14px;padding:15px;font-family:Inter;font-weight:700;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:9px;transition:background .2s var(--ease-out),transform .12s}
.readbtn:hover{background:#10417f}.readbtn:active{transform:scale(.98)}
.readbtn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.readbtn + .dlbig{margin-top:10px}
.pdfmodal{position:fixed;inset:0;z-index:9999;background:rgba(8,22,46,.92);display:flex;flex-direction:column}
.admin-bar .pdfmodal{top:32px}
.pdfmodal[hidden]{display:none}
.pdfmodal-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px;background:var(--navy);color:#fff;padding:11px 16px;flex:0 0 auto;border-bottom:1px solid rgba(255,255,255,.1)}
.pdfmodal-left{display:flex;align-items:center;gap:8px;justify-content:flex-start}
.pdfmodal-center{display:flex;align-items:center;justify-content:center;min-width:0}
.pdfmodal-right{display:flex;align-items:center;gap:8px;justify-content:flex-end}
.pdfmodal-title{font-family:'Space Grotesk';font-weight:700;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center}
.pdfmodal-btn{display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.1);color:#fff;border:0;border-radius:6px;font-size:13px;font-weight:600;padding:8px 14px;cursor:pointer;text-decoration:none;transition:background .2s,color .2s;white-space:nowrap}
.pdfmodal-btn:hover{background:var(--gold);color:#241803}
.pdfmodal-btn svg{width:16px;height:16px}
.pdfmodal-close{background:rgba(255,255,255,.1);color:#fff;border:0;width:34px;height:34px;border-radius:6px;font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s,color .2s}
.pdfmodal-close:hover{background:var(--red);color:#fff}
.pdfmodal-frame{flex:1 1 auto;width:100%;border:0;background:#525659}
