/* Actual first-page previews, scoped to the math download pages. */
.math-pdf-previews .pdf-preview-files,
.math-pdf-previews .unitdl,
.math-pdf-previews .level-files{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(132px,100%),156px));gap:10px;align-items:start;min-width:0;max-width:100%}
.math-pdf-previews .level-files{flex:1 1 260px;width:100%}
.math-pdf-previews .sheet{align-items:flex-start;min-width:0;width:100%;gap:8px}
.math-pdf-previews .sheet-num{flex-basis:100%;max-width:none;padding-top:3px}
.math-pdf-previews .level-sheets{min-width:0}
.math-pdf-previews a.pdf-preview-link{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:0;box-sizing:border-box;min-width:0;width:100%;max-width:156px;padding:0;overflow:hidden;white-space:normal;border:1px solid #dce1f0;border-radius:10px;background:#fff;color:var(--accent);text-decoration:none;box-shadow:0 6px 18px -14px rgba(40,20,80,.35)}
.math-pdf-previews a.pdf-preview-link:hover{border-color:var(--accent);box-shadow:0 8px 22px -12px rgba(40,20,80,.35)}
.math-pdf-previews a.pdf-preview-link:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.math-pdf-previews .math-pdf-preview{display:block;box-sizing:border-box;width:100%;aspect-ratio:20/27;background:#fff;border-bottom:1px solid #e4e7f1;overflow:hidden}
.math-pdf-previews .math-pdf-preview img{display:block;width:100%;height:100%;object-fit:contain;background:#fff}
.math-pdf-previews .pdf-preview-label{display:block;padding:9px 10px;min-height:46px;box-sizing:border-box;font-family:var(--disp);font-size:12px;font-weight:600;line-height:1.35;text-align:left;overflow-wrap:anywhere}
.math-pdf-previews .pdf-preview-link.ws .pdf-preview-label{color:#fff;background:linear-gradient(135deg,var(--accent),var(--accent3))}
.math-pdf-previews .pdf-preview-link.guide .pdf-preview-label{color:var(--accent);background:var(--soft)}
.math-pdf-previews .pdf-preview-label>[aria-hidden]{display:inline;margin-right:2px}
.math-pdf-previews .em-course-units .pdf-preview-link{padding:0;font-size:12px}
@media(max-width:540px){.math-pdf-previews .pdf-preview-files,.math-pdf-previews .unitdl,.math-pdf-previews .level-files{grid-template-columns:repeat(2,minmax(0,1fr));width:100%;max-width:322px}}
@media(max-width:380px){.math-pdf-previews .pdf-preview-files,.math-pdf-previews .unitdl,.math-pdf-previews .level-files{gap:8px}.math-pdf-previews .pdf-preview-label{padding:8px;font-size:11.5px}}
@media print{.math-pdf-previews a.pdf-preview-link{break-inside:avoid;box-shadow:none}.math-pdf-previews .math-pdf-preview{max-height:130px;aspect-ratio:auto}.math-pdf-previews .math-pdf-preview img{height:130px;object-fit:contain}.math-pdf-previews .pdf-preview-label{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
