.library-portal{position:relative;width:100%;height:500px;max-height:70svh;margin:0 auto 4rem;pointer-events:none;isolation:isolate;--open:0}.portal-stage{position:absolute;inset:-12% 0 0;opacity:calc(1 - var(--open));transform:translateY(calc(var(--open) * -40px)) scale(calc(1 + var(--open) * .12))}.portal-stage img,.portal-stage canvas{width:100%;height:100%;object-fit:contain;position:absolute;inset:0}.portal-stage canvas{opacity:0}.portal-stage[data-ready=true] canvas{opacity:1}.portal-stage[data-ready=true] img{opacity:0}.portal-screen{position:absolute;left:50%;top:48%;width:calc(230px + (100% - 230px) * var(--open));height:calc(145px + 200px * var(--open));transform:translate(-50%,-50%);background:#14254f;color:#fff8e7;border:2px solid #14254f;box-shadow:8px 8px 0 #e8692d;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;font:.7rem var(--mono);opacity:var(--open)}.portal-screen span:first-child{font:500 clamp(1.2rem,4vw,3rem) var(--mono)}.portal-screen i{font-size:2rem;font-style:normal}.library-skip{font:.8rem var(--mono);margin:0 0 2rem}.library-skip a{display:inline-flex;align-items:center;min-height:44px}.library-window{scroll-margin-top:7rem}.library-window:focus{outline:3px solid var(--accent);outline-offset:6px}.library-list{gap:1.25rem 2rem}.library-item{padding:0 0 1.5rem}.library-item a{padding:0;justify-content:flex-start;min-height:0}.library-item a:focus-visible{outline-offset:6px}.resource-preview{display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;background:#d6e5fa;border:1px solid #abb8cc;margin-bottom:1rem}.library-item[data-category=shorts] .resource-preview{max-width:220px;aspect-ratio:9/16;object-fit:cover;background:#14254f}.library-item[data-category=newsletter] .resource-preview{object-fit:contain}.library-item .resource-meta{margin-top:.2rem}.play-resource{min-height:44px;margin-top:1rem;font:.75rem var(--mono);padding:.6rem 1rem;background:var(--ink);color:var(--paper);border:1px solid var(--ink)}.video-dialog{width:min(1000px,calc(100% - 2rem));max-height:calc(100svh - 2rem);padding:1rem;border:2px solid var(--ink);background:var(--paper);color:var(--ink);box-shadow:8px 8px 0 var(--ink);overflow:auto}.video-dialog::backdrop{background:#14254fd9}.video-dialog h2{font:600 1rem/1.5 var(--sans);letter-spacing:-.02em;margin:.5rem 0 1rem}.video-dialog button{min-height:44px;padding:.6rem 1rem;font:.75rem var(--mono);background:var(--ink);color:var(--paper);border:0;margin-bottom:1rem}.video-frame{width:100%;aspect-ratio:16/9;border:0;background:#101827;display:block}.video-dialog[data-format=shorts]{width:min(430px,calc(100% - 2rem))}.video-dialog[data-format=shorts] .video-frame{aspect-ratio:9/16;max-height:70svh}.embed-notice{font:.7rem/1.6 var(--mono);color:var(--muted)}
html[data-motion=off] .library-portal{height:300px;margin-bottom:1rem}.library-portal[data-bypass=true]{visibility:hidden}
@media(max-width:800px){.library-portal{height:360px;max-height:55svh}.library-list{gap:1.5rem}.video-dialog{padding:.75rem}}@media(prefers-reduced-motion:reduce){.portal-screen{display:none}.library-portal{height:260px}}
