.ux-study {
  margin-top: clamp(22px, 3vw, 43px);
  --study-height: clamp(342px, 69svh, 655px);
  --study-top: 88px;
}
.ux-study[data-scroll] { height: calc(var(--study-height) + clamp(590px, 108svh, 1060px)); }
.ux-study-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: var(--study-height);
  padding: clamp(9px, 1.55vw, 22px);
  background: #e8eadd;
  border: 1px solid var(--study-line);
  color: #15241b;
  --study-line: #3d55484b;
  --study-muted: #3b5446;
  --study-accent: #225d3e;
  --study-mono: "Geist Mono", monospace;
}
.ux-study[data-ready] .ux-study-stage { transition: background-color .4s, color .4s; }
.ux-study[data-scroll] .ux-study-stage { position: sticky; top: var(--study-top); }
.ux-study[data-study-mode="1"] .ux-study-stage {
  background: #11271e;
  color: #f1f4e8;
  --study-line: #ccd4aa52;
  --study-muted: #d0d9cc;
  --study-accent: #c5e59e;
}
.ux-study[data-study-mode="2"] .ux-study-stage { background: #daead8; }
.ux-study-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
  padding: 0 0 clamp(8px, 1vw, 14px);
}
.ux-page .ux-study-meta h2, .ux-page .ux-study-caption p {
  margin: 0;
  font: 500 clamp(.68rem, 1.1vw, .84rem)/1.35 var(--study-mono);
  letter-spacing: 0;
}
.ux-page .ux-study-meta h2 { max-width: none; }
.ux-page .ux-study-caption p { color: var(--study-muted); text-align: end; font-weight: 400; }
.ux-study:not([data-ready]) .ux-study-caption { display: none; }
.ux-study-viewer { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 6px; min-height: 0; }
.ux-study-board {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 53.5fr) minmax(0, 26fr) minmax(0, 20.5fr);
  grid-template-rows: minmax(0, 1fr);
  gap: min(1.7vw, 13px);
  overflow: clip;
}
.ux-study-plate {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  margin: 0;
  overflow: clip;
  border: 0;
  background: #183226;
  color: #fff;
  font-family: inherit;
  text-align: left;
}
.ux-study-plate:enabled { cursor: pointer; }
.ux-study-plate:focus-visible { z-index: 4 !important; outline: 2px solid #b9ed86; outline-offset: -3px; }
.ux-study-plate img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% var(--study-focal-y, 50%);
  transition: filter .25s;
}
.ux-study-plate:enabled:not([inert]):hover img { filter: brightness(1.045); }
.ux-study-plate::after {
  position: absolute;
  content: "";
  inset: 50% 0 0;
  background: linear-gradient(0deg, #101910e8, transparent);
  opacity: var(--study-overlay, 1);
  pointer-events: none;
}
.ux-study-plate-label {
  position: absolute;
  inset: auto clamp(8px, 1.4vw, 20px) clamp(9px, 1.4vw, 20px);
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px;
  font-size: clamp(.75rem, 1.7vw, 1.34rem);
  font-weight: 580;
  opacity: var(--study-overlay, 1);
}
.ux-study-plate-label span { font-size: .83em; }
.ux-study-plate:disabled .ux-study-plate-label span { display: none; }
.ux-study-handset, .ux-study-selection, .ux-study-views { display: none; }
.ux-study[data-ready] .ux-study-board { display: block; }
.ux-study[data-ready] .ux-study-selection, .ux-study[data-ready] .ux-study-views { display: flex; }
.ux-study-selection {
  position: relative;
  z-index: 3;
  justify-content: center;
  justify-self: center;
  gap: clamp(6px, 2.1vw, 28px);
  width: var(--study-chooser-width, 100%);
  transform: translateY(var(--study-chooser-y, 0));
}
.ux-study-selection button, .ux-study-views button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--study-muted);
  cursor: pointer;
  font: 500 clamp(.68rem, 1vw, .84rem)/1 var(--study-mono);
}
.ux-study-selection button { padding: 8px clamp(7px, 1.7vw, 22px); }
.ux-study[data-study-mode="2"] .ux-study-selection { justify-content: space-evenly; gap: 0; }
.ux-study[data-study-mode="2"] .ux-study-selection button { padding-inline: 6px; }
.ux-study-selection button[aria-pressed="true"] {
  text-decoration: underline;
  text-decoration-color: var(--study-accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  color: inherit;
}
.ux-study-selection button:hover, .ux-study-views button:hover { color: var(--study-accent); }
.ux-study-selection button:focus-visible, .ux-study-views button:focus-visible {
  outline: 2px solid var(--study-accent);
  outline-offset: -3px;
}
.ux-study-views { position: relative; align-items: center; border-top: 1px solid var(--study-line); }
.ux-study-views button { flex: 1 1 0; padding: 9px 6px; text-align: start; }
.ux-study-views button + button { padding-left: 11px; border-left: 1px solid var(--study-line); }
.ux-study-views button[aria-pressed="true"] { color: var(--study-accent); font-weight: 600; }
.ux-study-views::before {
  content: "";
  position: absolute;
  inset: -2px 0 auto;
  height: 2px;
  background: var(--study-accent);
  transform: scaleX(var(--study-progress, 0));
  transform-origin: left center;
  pointer-events: none;
}
.ux-study[data-ready] :is(.ux-study-plate, .ux-study-handset) {
  position: absolute;
  top: var(--study-y, 0);
  left: var(--study-x, 0);
  width: var(--study-w, 100%);
  height: var(--study-h, 100%);
  opacity: var(--study-opacity, 1);
}
.ux-study[data-ready] .ux-study-handset {
  display: block;
  z-index: 0;
  overflow: clip;
  background: #eff2e8;
  color: #193628;
  border: 1px solid #53765d;
  border-radius: 20px;
  box-shadow: 0 7px 26px #253f2c2b;
  pointer-events: none;
  opacity: var(--study-phone, 0);
}
.ux-study-handset-top, .ux-study-handset-card {
  position: absolute;
  inset-inline: 12px;
  display: flex;
  justify-content: space-between;
  gap: 5px;
  padding-block: 5px;
  font: 500 .68rem/1.16 var(--study-mono);
}
.ux-study-handset-top { top: 1.7%; }
.ux-study-handset-card { bottom: 2%; border-top: 1px solid #b8c9b5; }
.ux-study-handset-card span:first-child { font-family: Geist, sans-serif; font-weight: 650; font-size: .76rem; }
@media (max-width: 750px) {
  .ux-study-meta { flex-wrap: wrap; }
  .ux-page .ux-study-caption p { text-align: start; }
  .ux-study-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, .545fr) minmax(0, .455fr);
  }
  .ux-study-board .ux-study-plate:first-of-type { grid-column: 1 / -1; }
  .ux-study-views button { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ux-study[data-ready] .ux-study-stage, .ux-study-plate img { transition: none; }
}
