.ms-studies {
  --ms-stock: #f7f2e8;
  --ms-ink: #292122;
  --ms-rule: #9d948c;
  --ms-serif: "Times New Roman", Times, serif;
  --ms-sans: var(--font-body, system-ui), sans-serif;
  padding: clamp(3rem, 7vw, 7rem) 0;
  background: var(--ms-stock);
  color: var(--ms-ink);
}
.ms-wrap {
  width: min(100%, 96rem);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 5.4vw, 5.25rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(1.25rem, 4vw, 4.5rem);
}
.ms-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.4rem;
  margin-bottom: clamp(1.15rem, 2.4vw, 2.25rem);
}
.ms-head :is(h1, h2) {
  font: 400 clamp(3rem, 6.5vw, 6rem)/.86 var(--ms-serif);
  letter-spacing: -.065em;
  color: inherit;
}
.ms-head h2 i { font-weight: 400; }
.ms-studies fieldset { border: 0; min-width: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.ms-study legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ms-studies label { cursor: pointer; position: relative; }
.ms-studies input { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ms-study label span, .ms-frame label span {
  display: grid; place-items: center; min-height: 44px;
  font: 590 .9rem/1 var(--ms-sans);
}
.ms-study { column-gap: clamp(.75rem, 2.4vw, 2rem); }
.ms-study label span { color: #625855; border-bottom: 2px solid transparent; }
.ms-study label input:checked + span { border-color: currentColor; color: var(--ms-ink); }
.ms-study label:hover span, .ms-stage a:hover { text-decoration: underline; text-underline-offset: 4px; }
.ms-studies input:focus-visible + span, .ms-studies a:focus-visible, .ms-play:focus-visible {
  outline: 3px solid #282d9b; outline-offset: 3px;
}
.ms-stage, .ms-stage figure { display: contents; }
.ms-studies:has([name=ms-study][value=mask]:checked) figure:not([data-ms-study=mask]),
.ms-studies:has([name=ms-study][value=sequence]:checked) figure:not([data-ms-study=sequence]),
.ms-studies:has([name=ms-study][value=registration]:checked) figure:not([data-ms-study=registration]) { display: none; }
.ms-art {
  grid-column: 1 / -1; grid-row: 2;
  width: 100%; aspect-ratio: 2.58;
  position: relative; isolation: isolate; overflow: hidden;
  container-type: inline-size;
}
.ms-stage figcaption {
  grid-column: 1; grid-row: 3;
  margin-top: 1.15rem;
}
.ms-stage h3 { color: inherit; font: 650 clamp(1.2rem, 1.8vw, 1.55rem)/1.18 var(--ms-sans); letter-spacing: -.035em; }
.ms-stage figcaption p { max-width: 59ch; margin: .4rem 0; color: #514643; font: 400 .99rem/1.45 var(--ms-sans); }
.ms-stage a { color: inherit; font: 600 .85rem/1.4 var(--ms-sans); text-underline-offset: .2em; }
.ms-transport { grid-column: 2; grid-row: 3; margin-top: .9rem; display: flex; align-items: end; align-self: start; gap: 1rem; }
.ms-frame legend { color: #635653; font: 540 .75rem/1.3 var(--ms-sans); }
.ms-frame label span { padding-inline: .72rem; min-width: 44px; }
.ms-frame label input:checked + span { box-shadow: inset 0 -2px currentColor; }
.ms-play {
  min-width: 8.4rem; min-height: 44px; border: 1px solid var(--ms-ink); border-radius: 100px;
  background: var(--ms-ink); color: var(--ms-stock); font: 600 .87rem/1 var(--ms-sans); cursor: pointer;
}
.ms-play::before { content: ""; display: inline-block; margin-right: .55rem; border-block: .29rem solid transparent; border-left: .45rem solid currentColor; }
.ms-play:hover { background: #524547; }
.ms-play[hidden] { display: none; }

/* A fixed slit holds each moving line. The two halves of the iris use the same engraved rings. */
.ms-mask { background: #dded62; color: #421f35; }
.ms-mask-title {
  position: absolute; left: 4.5%; top: 50%; transform: translateY(-52%);
  font: 400 19.4cqw/.79 var(--ms-serif); letter-spacing: -.094em;
}
.ms-mask-title > div { overflow: hidden; padding-right: .13em; }
.ms-mask-title > div:first-child { font-style: italic; }
.ms-mask-title > div + div { margin-left: .105em; padding-bottom: .25em; margin-bottom: -.25em; }
.ms-mask-title span { display: block; }
.ms-aperture {
  position: absolute; top: 50%; right: 7.5%; width: 32.4%; aspect-ratio: .94;
  display: grid; grid-template-columns: 1fr 1fr; transform: translateY(-50%) rotate(19deg);
}
.ms-aperture i {
  display: block; border-radius: 100% 0 0 100% / 50% 0 0 50%;
  background: repeating-radial-gradient(ellipse 100% 50% at right center, #421f35 0 6.8%, transparent 7.15% 13.5%);
  transform: translateY(7%);
}
.ms-aperture i + i {
  background: repeating-radial-gradient(ellipse 100% 50% at left center, #752345 0 6.8%, transparent 7.15% 13.5%);
  border-radius: 0 100% 100% 0 / 0 50% 50% 0; transform: translateY(-7%);
}
.ms-studies:has([name=ms-frame][value=start]:checked) .ms-mask-title span { transform: translateY(68%); }
.ms-studies:has([name=ms-frame][value=middle]:checked) .ms-mask-title span { transform: translateY(25%); }
.ms-studies:has([name=ms-frame][value=middle]:checked) .ms-mask-title > div + div span { transform: translateY(43%); }

/* Only the tiles move. Each track and each final center stays in place. */
.ms-sequence { background: #312136; color: #f6b2a1; }
.ms-sequence-title {
  position: absolute; left: 4.5%; top: 50%; transform: translateY(-50%);
  font: 730 13.7cqw/.78 var(--ms-sans); letter-spacing: -.091em;
}
.ms-sequence-title i { font: italic 400 1.26em/.71 var(--ms-serif); letter-spacing: -.09em; }
.ms-wave {
  position: absolute; right: 4.8%; top: 12%; bottom: 12%; width: 46%;
  display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(4,minmax(0,1fr));
  gap: .45cqw; transform: skewY(-8deg);
}
.ms-wave i { position: relative; overflow: hidden; border-bottom: 1px solid #70596e; }
.ms-wave b {
  position: absolute; inset: 3% 6%; display: block;
  background: #d1b5eb; border-radius: 100% 0 100% 0; transform-origin: bottom left;
}
.ms-wave b::before {
  content: ""; position: absolute; inset: 18% 26%; border-radius: inherit; background: #312136;
}
.ms-wave i:nth-child(2n) b { background: #f6ac99; }
.ms-wave i:nth-child(3n) b::before { inset: 12% 32%; }
.ms-wave i:nth-child(5n+1) { --ms-delay: 0ms; }
.ms-wave i:nth-child(5n+2) { --ms-delay: 85ms; }
.ms-wave i:nth-child(5n+3) { --ms-delay: 170ms; }
.ms-wave i:nth-child(5n+4) { --ms-delay: 255ms; }
.ms-wave i:nth-child(5n) { --ms-delay: 340ms; }
.ms-studies:has([name=ms-frame][value=start]:checked) .ms-wave b,
.ms-studies:has([name=ms-frame][value=middle]:checked) .ms-wave i:nth-child(5n) b { transform: translateY(45%) scale(.55); }
.ms-studies:has([name=ms-frame][value=middle]:checked) .ms-wave i:nth-child(5n+4) b { transform: translateY(30%) scale(.68); }
.ms-studies:has([name=ms-frame][value=middle]:checked) .ms-wave i:nth-child(5n+3) b { transform: translateY(12%) scale(.84); }

/* These are two real color separations. The common stem darkens where the inks overlap. */
.ms-registration { background: #f2baa5; color: #392724; }
.ms-reg-copy {
  position: absolute; left: 4.8%; top: 50%; transform: translateY(-50%);
  font: 400 13.7cqw/.78 var(--ms-serif); letter-spacing: -.085em;
}
.ms-reg-copy i { font-weight: 400; }
.ms-inks { display: flex; align-items: center; gap: 1.2rem; margin-top: 2.3cqw; letter-spacing: normal; font: 650 clamp(10px,1.15cqw,16px)/1.1 var(--ms-sans); }
.ms-inks span::before {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .4em; border-radius: 50%; background: #006d9c;
}
.ms-inks span + span::before { background: #cd433a; }
.ms-plates {
  position: absolute; right: 10%; top: 8%; bottom: 8%; width: 32%;
  display: grid; place-items: center; isolation: isolate; background: #f2baa5;
}
.ms-plates > span {
  position: absolute; top: 36%; left: 50%; transform: translate(-50%,-50%);
  font: italic 700 37cqw/.8 var(--ms-serif); letter-spacing: -.08em; padding-right: .1em;
  color: #0085af; mix-blend-mode: multiply;
}
.ms-plates > span + span { color: #f45143; }
.ms-cross { position: absolute; width: 1.45cqw; height: 1.45cqw; color: #68493f; }
.ms-cross::before, .ms-cross::after { content: ""; position: absolute; background: currentColor; }
.ms-cross::before { top: 50%; width: 100%; height: 1px; }
.ms-cross::after { left: 50%; height: 100%; width: 1px; }
.ms-cross-a { left: 0; top: 0; }.ms-cross-b { right: 0; top: 0; }.ms-cross-c { right: 0; bottom: 0; }
.ms-studies:has([name=ms-frame][value=start]:checked) .ms-plates > span + span { transform: translate(-13%,-63%); }
.ms-studies:has([name=ms-frame][value=middle]:checked) .ms-plates > span + span { transform: translate(-32%,-55%); }

@keyframes ms-mask-in { from { transform: translateY(68%); } to { transform: translateY(0); } }
@keyframes ms-sequence-in { from { transform: translateY(45%) scale(.55); } to { transform: none; } }
@keyframes ms-register-in { from { transform: translate(-13%,-63%); } to { transform: translate(-50%,-50%); } }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-reduce-motion=on]) [data-ms-playing] .ms-mask-title span {
    animation: ms-mask-in 900ms cubic-bezier(.2,.65,.24,1) both;
  }
  html:not([data-reduce-motion=on]) [data-ms-playing] .ms-mask-title > div + div span { animation-delay: 135ms; }
  html:not([data-reduce-motion=on]) [data-ms-playing] .ms-wave b {
    animation: ms-sequence-in 580ms cubic-bezier(.16,.7,.25,1) var(--ms-delay) both;
  }
  html:not([data-reduce-motion=on]) [data-ms-playing] .ms-plates > span + span {
    animation: ms-register-in 1.2s cubic-bezier(.37,.02,.15,1) both;
  }
}
@media (max-width: 800px) {
  .ms-head { align-items: start; flex-wrap: wrap; gap: .75rem; }
  .ms-art { aspect-ratio: 2.1; }
  .ms-wrap { grid-template-columns: minmax(0,1fr); }
  .ms-stage figcaption { grid-row: 4; margin-top: 1rem; }
  .ms-transport { grid-column: 1; grid-row: 3; align-items: end; justify-content: space-between; padding-bottom: .7rem; border-bottom: 1px solid var(--ms-rule); }
}
@media (max-width: 540px) {
  .ms-studies { padding-block: 3rem; }
  .ms-head { display: grid; margin-bottom: .8rem; }
  .ms-study { column-gap: 1.5rem; }
  .ms-art { aspect-ratio: 1; }
  .ms-mask-title { top: 29%; font-size: 25cqw; z-index: 1; }
  .ms-aperture { width: 48%; top: 69%; right: 7%; }
  .ms-sequence-title { top: 29%; left: 6%; font-size: 19.5cqw; }
  .ms-wave { width: 51%; height: 49%; top: auto; bottom: 9%; right: 5%; }
  .ms-reg-copy { top: 27%; font-size: 20cqw; }
  .ms-plates { width: 48%; height: 49%; top: auto; bottom: 5.5%; right: 8%; }
  .ms-plates > span { font-size: 58cqw; }
  .ms-inks { gap: .75rem; margin-top: 4cqw; }
  .ms-cross { width: 3cqw; height: 3cqw; }
}
@media (max-width: 360px) {
  .ms-transport { gap: .25rem; }
  .ms-frame label span { padding-inline: .5rem; }
  .ms-play { min-width: 7.1rem; }
}

.effect-lab .ms-studies { padding-block: clamp(2.25rem,4.5vw,4.5rem); }
.effect-lab .ms-wrap, .effect-lab .pattern-atlas { max-width:86rem; padding-inline:clamp(1.15rem,5.3vw,5rem); }
.ms-lab-title p { max-width:36ch; margin:.9rem 0 0; font:450 1.04rem/1.45 var(--ms-sans); color:#514643; }
