/* Topic previews on the chapter overviews: a still of each topic's main sim on its card (Cards view) and a small
   one at the start of its row (List view). Course.overview() adds them when assets/previews/manifest.js
   (window.PREVIEWS, made by tools/make-previews.js) is loaded. Builds on the "Cards / List views" rules in
   course.css. The Blueprint look's rules are in their own section at the end; delete that section with the look. */

/* ================= Original (and the layout shared by both looks) ================= */
/* ---------- cards: the still sits on top, edge to edge ---------- */
.pgrid{grid-template-columns:repeat(auto-fill,minmax(min(100%,250px),1fr))}
.pcard{grid-template-rows:auto auto auto 1fr auto;padding-top:0}
.pcard .pv{display:block;aspect-ratio:16/9;margin:0 -18px 8px;border-bottom:1px solid var(--rule);border-radius:13px 13px 0 0;background:var(--panel);overflow:hidden}
.pcard .pv img{display:block;width:100%;height:100%;object-fit:cover}
.pcard:hover:not(.soon) .pv{border-bottom-color:var(--accent)}
/* nothing to show: a quiet panel with the topic number, the same size as a still */
.pv-none,.pcard .pv.pv-none,.vthumb.pv-none{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;background:var(--sunk);color:var(--ink-3);text-align:center;padding:0 16px}
.pv-none b{font:600 34px/1 var(--f-mono);color:var(--rule-2)}
.pv-none em{font:500 12.5px var(--f-display);font-style:normal;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tcard.soon .pv{opacity:.8}

/* ---------- list: a small still at the start of each row, every row the same height ---------- */
.plist{grid-auto-rows:1fr}
.vthumb{flex:none;display:block;width:112px;aspect-ratio:16/9;border:1px solid var(--rule);border-radius:7px;overflow:hidden;background:var(--panel)}
.vthumb img{display:block;width:100%;height:100%;object-fit:cover}
.vthumb.pv-none{padding:0}
.vthumb.pv-none b{font-size:18px}
a.prow:hover .vthumb{border-color:var(--accent)}
.prow{padding-top:12px;padding-bottom:12px}
.plist .prow:first-child{border-top:1px solid transparent}   /* the same height as the rows below it, in every group */
@media (max-width:720px){
  .prow .vthumb{width:88px}
  .vrow.prow .vpills{padding-left:138px}   /* line up with the title: thumb 88 + gap 14 + number 22 + gap 14 */
}
@media (max-width:420px){
  .prow .vnum{display:none}
  .prow .vthumb{width:80px}
  .vrow.prow .vpills{padding-left:94px}    /* thumb 80 + gap 14 */
  .prow .vd{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;line-height:1.35;height:2.7em}
}

/* ================= Blueprint look =================
   Stills are framed like details on the drawing: square corners, a thin rule; a missing still is a dashed
   construction box with the topic number in mono. */
:root[data-look="blueprint"] .pcard .pv{border-radius:1px 1px 0 0;border-bottom-color:var(--rule-2)}
:root[data-look="blueprint"] .pv-none,
:root[data-look="blueprint"] .pcard .pv.pv-none{background:transparent}
:root[data-look="blueprint"] .pcard .pv.pv-none{border-bottom:1px dashed var(--draft)}
:root[data-look="blueprint"] .pv-none b{font-weight:500;color:var(--draft)}
:root[data-look="blueprint"] .pv-none em{font:500 11px var(--f-mono);letter-spacing:.06em;text-transform:uppercase;color:var(--anno)}
:root[data-look="blueprint"] .vthumb{border-color:var(--rule-2);border-radius:2px}
:root[data-look="blueprint"] .vthumb.pv-none{border-style:dashed;border-color:var(--draft)}
:root[data-look="blueprint"] .plist .prow:first-child{border-top-color:transparent}
