/* The purple small resource card (hkSc() in includes/purple/hub-kit.php): a wide rounded picture
   box, the title and the grade; a printable's picture is its first pages as a fanned pile. Shared by
   the hub pages (hkHeadTags() links it before css/purple-hub.css, which sets how many cards a row
   for its own columns) and a worksheet maker's related printables (includes/purple/generator-page.php).
   Its kind marks come from css/purple-kinds.css. Moved out of purple-hub.css on 2026-10-30. */
.sgrid { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 12px; }
.sc { display: flex; flex-direction: column; gap: 8px; background: var(--pv-cream); border-radius: 18px; padding: 8px 8px 11px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s; min-width: 0; }
.sc:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(52,30,96,.12); }
.sc:focus-visible { outline: 3px solid rgba(99,75,245,.35); outline-offset: 2px; }
.sc .pic { height: 104px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: #efe9f9; position: relative; }
.sc .pic.sheet { place-items: start center; padding: 8px 12px 0; box-sizing: border-box; }
.sc .pic.sheet img { width: 100%; display: block; border-radius: 5px 5px 0 0; box-shadow: 0 3px 10px rgba(0,0,0,.12); }
.sc .pic.maker { background: #f7f8fc; } .sc .pic.tool { background: #fff; box-shadow: inset 0 0 0 2px #efe9f9; } .sc .pic.quiz { background: #fff; box-shadow: inset 0 0 0 2px #efe9f9; } .sc .pic.app { background: #fff7dc; }
.sc .pic.maker img { width: 62%; height: 84%; object-fit: contain; }
.sc .pic svg { width: 64%; height: auto; max-height: 76%; }
.sc .pic.tool svg { width: 84%; max-height: 88%; }
.sc .pic.quiz svg { width: 84%; height: auto; max-height: 88%; }
.sc .pic.app img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 6px 16px rgba(52,30,96,.25); }
.sc b { font: 600 14px/1.2 'Fredoka', sans-serif; color: var(--pv-plum); padding: 0 4px; }
.sc .m { font-size: 11.5px; color: var(--pv-muted); padding: 0 4px; margin-top: -4px; }

/* The page stack: a printable's first three pages as a small fanned pile (any picture box) */
.stackbox { position: relative; overflow: hidden; background: linear-gradient(160deg, #efe9f9, #e4dcff); }
.stackbox .sheet { position: absolute; left: 50%; top: 12px; width: 40%; aspect-ratio: 8.5 / 11; background: #fff; border-radius: 4px; box-shadow: 0 4px 10px rgba(52,30,96,.22); overflow: hidden; transition: transform .25s ease; }
.stackbox .sheet img { width: 100%; display: block; }
.stackbox .s1 { transform: translateX(-92%) rotate(-9deg); } .stackbox .s2 { transform: translateX(-50%); z-index: 2; top: 8px; } .stackbox .s3 { transform: translateX(-8%) rotate(9deg); }
a:hover .stackbox .s1 { transform: translateX(-104%) rotate(-12deg); } a:hover .stackbox .s3 { transform: translateX(4%) rotate(12deg); }
.stackbox .pg { position: absolute; right: 6px; bottom: 6px; z-index: 3; font: 800 9.5px 'DM Sans', sans-serif; letter-spacing: .4px; text-transform: uppercase; background: #d8f5ec; color: #1f6a55; border-radius: 999px; padding: 2px 7px; }

@media (prefers-reduced-motion: reduce) { .stackbox .sheet, .sc { transition: none; } }
/* Cards and rows a page hides (the hubs' grade filter, js/purple-hub.js) */
.sc[hidden], .sgrid[hidden] { display: none; }
