/* Gallery pages: the adm1nsys kit gives header, footer, type and tokens; this adds the grid of
   sheets, the file lists and the certificate block, scoped to main.gallery */

.gallery .lead a { color: var(--text); }
.gallery h2 { margin: 2.5rem 0 1rem; font-size: 1.25rem; }
.gallery { padding-bottom: clamp(2rem, 5vw, 3rem); }

.gallery .grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); }
.sheet-tile { display: block; aspect-ratio: 3 / 4; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; transition: border-color 0.2s; }
.sheet-tile img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sheet-tile:hover { border-color: var(--muted); }

.files { margin: 0.75rem 0 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.files li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 1rem; border-top: 1px solid var(--line-soft); }
.files li:first-child { border-top: 0; }
.files a { font: 500 14px/1.4 var(--mono); text-decoration: none; word-break: break-all; }
.files a:hover { text-decoration: underline; }
.files span { font: 400 13px/1.4 var(--mono); color: var(--muted); white-space: nowrap; }

/* engineering graphics: sheets with captions, certificate block */
.sheet { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.sheet a.img { display: block; aspect-ratio: 4 / 3; background: #fff; }
.sheet img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sheet .b { padding: 0.875rem 1rem 1rem; }
.sheet h3 { margin: 0 0 0.375rem; font-size: 15px; }
.sheet .files { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; overflow: visible; border: 0; background: none; }
.sheet .files a { color: var(--muted); }
.sheet .files a:hover { color: var(--text); text-decoration: none; }
.cert { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; align-items: center; margin-bottom: 0.5rem; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.cert img { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.cert h2 { margin: 0 0 0.5rem; }
.cert p { margin: 0 0 0.75rem; color: var(--text-2); }
.cert a { font: 500 14px/1.4 var(--mono); }
.note-small { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .cert { grid-template-columns: 1fr; } .cert img { max-width: 260px; } }
