.file {
  --stock: #cbbcf5;
  --stock-ink: #34264c;
  scroll-margin-top: clamp(1rem, 4vh, 2.75rem);
}
.file[data-format="Streaming"] { --stock: #f2bb9f; --stock-ink: #512f20 }
.file[data-format="Audiovisual"] { --stock: #cee5a7; --stock-ink: #29361e }
.file[open] { border-bottom-color: #706f68 }
.file > summary { padding-block: clamp(1.15rem, 2vw, 2rem); position: relative }
.file > summary:focus-visible { outline: 2px solid var(--stock-ink); outline-offset: 4px }
.file .publication { line-height: 1.3; font-weight: 520; width: fit-content }
.file[open] .publication {
  color: var(--stock-ink); background: var(--stock);
  box-shadow: .36em 0 var(--stock), -.36em 0 var(--stock);
}
.file .sheet {
  gap: clamp(1.8rem, 4.8vw, 5.5rem);
  padding-bottom: clamp(1.8rem, 3.7vw, 4rem);
}
.sheet figure {
  position: relative; padding: clamp(.5rem, 1vw, .9rem);
  background: #27272a url('medios/grano.png') center / 180px;
  background-blend-mode: multiply;
  border-radius: 3px;
  box-shadow: 0 1px 3px #14141733;
}
.sheet figure::after {
  content: ""; position: absolute; inset: .25rem; pointer-events: none;
  background:
    linear-gradient(var(--stock),var(--stock)) left top/1rem 1px,
    linear-gradient(var(--stock),var(--stock)) left top/1px .6rem,
    linear-gradient(var(--stock),var(--stock)) right bottom/1rem 1px,
    linear-gradient(var(--stock),var(--stock)) right bottom/1px .6rem;
  background-repeat: no-repeat;
}
.sheet img { display: block }
.sheet-print { position: relative; overflow: hidden }
.sheet-print canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none;
  image-rendering: pixelated;
  mask-image: linear-gradient(101deg, transparent 43%, #000 55%);
  mask-size: 300% 100%; mask-position: 100% 50%; mask-repeat: no-repeat;
}
@media (prefers-reduced-motion: reduce) {
  .sheet-print canvas { display: none }
}
.sheet-copy .credit {
  font: 550 .78rem/1.45 var(--mono); letter-spacing: .055em;
}
.sheet-copy h3 { margin-block: .38em .30em }
.sheet-copy .ink-link { border-color: var(--stock-ink) }
@media (max-width: 47.99rem) {
  .file .sheet { gap: 1.15rem }
}
@media (prefers-reduced-motion: no-preference) {
  .to-file::view-transition-group(archive-print) {
    animation-duration: 620ms;
    animation-timing-function: cubic-bezier(.23,.78,.2,1);
    overflow: clip;
  }
  .to-file::view-transition-image-pair(archive-print) { isolation: isolate }
  .to-file::view-transition-old(archive-print),
  .to-file::view-transition-new(archive-print) { height: 100%; object-fit: cover }
  .to-file::view-transition-old(archive-print) { animation: print-out 340ms ease-in both }
  .to-file::view-transition-new(archive-print) { animation: print-in 420ms 80ms ease-out both }
  .to-file::view-transition-old(root) { animation: desk-away 300ms ease-in both }
  .to-file::view-transition-new(root) { animation: archive-up 580ms cubic-bezier(.22,.75,.18,1) both }
  @keyframes print-out { to { opacity: 0 } }
  @keyframes print-in { from { opacity: 0 } }
  @keyframes desk-away { to { opacity: 0; transform: translateY(-1.8rem) } }
  @keyframes archive-up { from { opacity: 0; transform: translateY(1.6rem) } }
  .file > summary .publication { transition: background-color 200ms, color 200ms }
  .file .sheet-copy .ink-link { transition: background-color 180ms }
  .file .sheet-copy .ink-link:hover { background-color: var(--stock) }
}
@media (prefers-reduced-motion: no-preference) {
  .file.arriving .sheet-copy > * { animation: archive-ink 410ms 100ms cubic-bezier(.2,.78,.2,1) both }
  .file.arriving .sheet-copy h3 { animation-delay: 135ms }
  .file.arriving .sheet-copy p:not(.credit) { animation-delay: 165ms }
  @keyframes archive-ink { from { opacity: .3; transform: translateY(.6rem) } }
}
