/* Photographs. Two kinds, never mixed.

   PLATE, in the text: the photograph exactly as taken. No crop, no filter, no re-encoding: the file is served byte
   for byte and only scaled to the column. What makes it belong to the page is everything around it: a 1px ink frame,
   a paper mat whose height is made up so the whole plate is a whole number of rows, a label band inside the top of the
   frame (the plate's number, [full size]) that never touches the picture, and a caption in the system's voice (mono label, sans description). Clicking opens it at
   full size behind frosted glass.

   BANNER, decoration only: the top of an article may carry a picture redrawn in ink and paper alone, by an ordered
   pattern that jitters and slowly breathes, so the greys are described by moving dots. It is never evidence, has
   no caption, and is hidden from assistive technology. */

figure.plate{margin-top:calc(2*var(--l))}
.plate .mat{position:relative;border:1px solid var(--ink);padding:calc(1.5*var(--l)) calc(3*var(--cell)) var(--mat-b,calc(.5*var(--l)));background:var(--paper)}
/* the plate's label band: its number on the left, [full size] on the right, inside the frame and clear of the picture */
.plate .mat::before{content:attr(data-n);position:absolute;top:calc(.25*var(--l));left:calc(3*var(--cell));font:600 var(--b)/var(--l) var(--mono)}
.plate img{display:block;width:100%;height:auto;opacity:0;transition:opacity .25s ease;cursor:zoom-in}
.plate img.in{opacity:1}
.plate figcaption{margin-top:calc(.5*var(--l));display:grid;grid-template-columns:max-content minmax(0,1fr);column-gap:calc(2*var(--cell))}
.plate figcaption .where{font-family:var(--mono);font-weight:300}
.plate figcaption .what{grid-column:1/-1}
.plate button.open{position:absolute;right:calc(3*var(--cell));top:calc(.25*var(--l));padding:0;font-family:var(--mono);min-height:0;line-height:var(--l)}

dialog.plate-view{border:0;padding:0;background:transparent;max-width:none;max-height:none;width:100vw;height:100dvh;margin:0}
dialog.plate-view::backdrop{background:rgba(var(--paper-rgb),.7);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px)}
.plate-view .wrap{height:100%;display:grid;place-items:center;padding:calc(2*var(--l)) calc(2*var(--cell))}
.plate-view figure{margin:0;max-width:100%;max-height:100%;display:flex;flex-direction:column;align-items:flex-start}
.plate-view img{display:block;max-width:calc(100vw - 4*var(--cell));max-height:calc(100dvh - 7*var(--l));width:auto;height:auto;border:1px solid var(--ink);background:var(--paper)}
.plate-view figcaption{margin-top:calc(.5*var(--l));font-family:var(--mono);max-width:calc(100vw - 4*var(--cell));display:flex;gap:calc(2*var(--cell));align-items:baseline}
.plate-view figcaption span{flex:1}
.plate-view[open] figure{animation:pv-in .22s cubic-bezier(.2,.7,.2,1)}
@keyframes pv-in{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}

.banner{position:relative;margin:0 0 calc(2*var(--l));border:1px solid var(--ink);height:var(--banner-h,calc(10*var(--l)));overflow:hidden;background:var(--paper)}
.banner canvas{display:block;width:100%;height:100%;image-rendering:pixelated}
@media (prefers-reduced-motion:reduce){.plate img{transition:none}.plate-view[open] figure{animation:none}}
@media print{.banner{display:none}.plate img{opacity:1}}
