/* The research wheel: photographs of research ride the top of a large, slow wheel, right to left as the page
   is scrolled down (wheel.js places every card). It scrolls with the page (never pinned), on the page's own
   ground in either theme; the edges fade out. */
.story section.wheel { max-width: none; margin: 0; padding: 0; }
/* (out of the site-wide 0.9 zoom, so its viewport units and measurements are the window's own) */
.wheel { zoom: calc(1 / 0.9); position: relative; }
.wheel .pin { position: relative; height: clamp(340px, 60vh, 620px); height: clamp(340px, 60svh, 620px); }
.wheel .frame {
  position: relative; height: 100%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0, #000 9%, #000 91%, rgba(0, 0, 0, 0.2) 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0, #000 9%, #000 91%, rgba(0, 0, 0, 0.2) 100%);
}
.wheel .ring { position: absolute; inset: 0; }
.wheel .card {
  position: absolute; left: 50%; top: 50%; margin: 0; overflow: hidden; border-radius: 14px; background: rgba(19, 19, 19, 0.06);
  box-shadow: 0 18px 40px rgba(19, 19, 19, 0.14), 0 0 0 1px rgba(19, 19, 19, 0.05);
  opacity: 0; will-change: transform, opacity; backface-visibility: hidden; transform-origin: 50% 50%; contain: layout paint;
}
.wheel .card img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (prefers-color-scheme: dark) {
  .wheel .card { background: rgba(236, 234, 227, 0.06); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); }
}
@media (max-width: 700px) {
  .wheel .pin { height: 56svh; }
  .wheel .card { border-radius: 10px; }
}
/* a picture fades up once it has arrived, so a card never shows half-drawn (preloaded ones are there at once) */
.wheel .card img { opacity: 0; transition: opacity 240ms ease; }
.wheel .card img.in { opacity: 1; }
/* film: a fine grain over each photograph and a soft glow of light from its top edge */
.wheel .card::before, .wheel .card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.wheel .card::before { z-index: 1; background: radial-gradient(120% 70% at 35% -10%, rgba(255, 248, 236, 0.2), transparent 62%); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 -40px 60px -30px rgba(0, 0, 0, 0.18); }
.wheel .card::after { z-index: 2; background: url(wheel/grain.png) 0 0 / 160px 160px; opacity: 0.045; }
.wheel .card { box-shadow: 0 18px 40px rgba(19, 19, 19, 0.14), 0 0 0 1px rgba(19, 19, 19, 0.05); }
@media (prefers-color-scheme: dark) {
  .wheel .card { box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06); }
}
/* phones and touch screens: the same look with less to composite each frame (no blend modes, one light shadow) */
@media (max-width: 700px), (pointer: coarse) {
  .wheel .card { box-shadow: 0 10px 24px rgba(19, 19, 19, 0.14); contain: layout paint; }
  .wheel .card::before { mix-blend-mode: normal; box-shadow: none; background: radial-gradient(120% 70% at 35% -10%, rgba(255, 244, 226, 0.16), transparent 62%); }
  .wheel .card::after { display: none; }
}
@media (max-width: 700px) and (prefers-color-scheme: dark), (pointer: coarse) and (prefers-color-scheme: dark) {
  .wheel .card { box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45); }
}
