/* Ink illustrations sit on the same stock as the text. */
[data-gesto] {
  --gesto-tinta: var(--folio-accent, #c44a29);
  --gesto-papel: var(--folio-paper, #f8f6ee);
}
.field-atlas[data-gesto] {
  --gesto-papel: var(--folio-ink);
  --gesto-tinta: color-mix(in srgb, var(--folio-accent) 46%, var(--folio-paper));
}
.aguja [data-gesto] { --gesto-tinta: #de7843 }
.patio [data-gesto] { --gesto-tinta: #b84d39 }
.trama [data-gesto] { --gesto-tinta: #c35a38 }
.gesto {
  display:block;
  width:min(100%, 32rem);
  margin:1.4rem 0 0;
  pointer-events:none;
}
.gesto svg { display:block; width:100%; height:auto; overflow:hidden }
.folio-heading > .gesto { margin-inline-start:clamp(-1.5rem,-2vw,-.5rem) }
.folio .study-view:has(.gesto) {
  position:sticky;
  align-self:start;
  background:var(--folio-paper);
  color:var(--folio-ink);
}
.study-view:has(.gesto) img { height:clamp(140px,40vh,500px) }
.study-view .gesto {
  position:relative;
  width:min(100%, 25rem);
  margin:0 auto;
}
.studio-note > .gesto { align-self:center; width:100%; max-width:32rem }
.dish-family h2:has(.gesto) { display:flex; align-items:center; justify-content:space-between; gap:.5em }
.dish-family .gesto { flex:0 0 min(24%,9rem); margin:0; color:#4a3429 }
@media (min-width: 860px) {
  .folio:is(.field-atlas,.field-choice,.field-gallery)[data-gesto] .folio-heading {
    display:grid;
    grid-template-columns:minmax(0,1.4fr) minmax(0,.95fr);
    column-gap:3vw;
    max-width:none;
    align-items:start;
  }
  .folio:is(.field-atlas,.field-choice,.field-gallery)[data-gesto] .folio-heading > .gesto {
    grid-column:2;
    grid-row:1 / span 3;
    align-self:center;
    justify-self:end;
    margin:0;
  }
  .studio-note:has(.gesto) h2 { grid-column:1; grid-row:1 }
  .studio-note:has(.gesto) p { grid-column:2; grid-row:1 / span 2 }
  .studio-note > .gesto { grid-column:1; grid-row:2; margin:0 }
}
@media (max-width:740px), (prefers-reduced-motion:reduce) {
  .folio .study-view:has(.gesto) { position:relative; top:auto }
}
@media (max-width:740px) {
  .folio-heading > .gesto { width:min(100%,24rem); margin-inline:auto }
  .study-view .gesto { max-width:18rem }
  .studio-note > .gesto { max-width:20rem }
}
.film-frames { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.film-frames[hidden] {display:none}
.film-stops {display:flex;flex-wrap:wrap;gap:2px;position:relative;width:fit-content;max-width:100%;margin-top:.9rem;padding-bottom:5px}
.film-stops::after {content:"";position:absolute;inset:auto 0 0;height:2px;background:currentColor;transform:scaleX(var(--film-progress,0));transform-origin:left}
.film-stops button {font:600 clamp(.72rem,1vw,.88rem)/1.2 system-ui,sans-serif;min-height:44px;padding:.5em .8em;border:1px solid #fff9;border-radius:0;color:#fff;background:#23221fea;cursor:pointer}
.film-stops button[aria-pressed=true] {background:#fff8df;color:#25251e}
.film-stops button:focus-visible {outline:3px solid #ffbc49;outline-offset:2px;z-index:1}
.roast-readout {position:absolute;inset:auto auto max(16px,3%) 4%;max-width:92%;background:#d7e76e;color:#252a19;padding:.75rem;display:grid;grid-template-columns:28px 1fr;gap:.45rem .7rem;align-items:center}
.roast-readout [data-roast] {position:static;background:none;padding:0;font:700 .88rem/1.2 monospace}
.roast-readout .film-stops {grid-column:1/-1;margin:0}
.roast-dial {width:27px;height:27px;border:1px solid currentColor;border-radius:50%;display:grid;place-items:center}
.roast-dial::before {content:"";width:20px;height:3px;background:currentColor;transform:rotate(var(--angle,0deg))}
.film-pin > .film-frames,.film-plate > .film-frames {z-index:-2}
@media(max-width:680px) {
  .torna .film-frames {object-position:67% center}
  .silvestre .film-frames {object-position:66% center}
}
