/* ==========================================================================
   Redd — Блок «Как устроен Redd» (#anatomy) — Вариант 2 (Покадровая 3D-разборка)
   Apple-style 88-frame WebP image sequence на HiDPI <canvas> с бесшовным
   растяжением градиента, интерактивными узлами в разборе и 3-этапным скроллом.
   ========================================================================== */

#anatomy.rsv {
  --rsv-bg2: 0;
  --rsv-bg3: 0;
  --rsv-warm: 0;
  --rsv-head-y: 0px;
  --rsv-hs-o: 0;
  --rsv-ui-o: 0;
  --rsv-ui-x: 26px;
  --rsv-orb-x: 0px;
  --rsv-orb-y: 0px;

  position: relative;
  color: #fff;
  background: var(--bg, #0a0a0a);
  font-family: inherit;
  isolation: isolate;
}

#anatomy.rsv *,
#anatomy.rsv *::before,
#anatomy.rsv *::after {
  box-sizing: border-box;
}

/* ---------- Scroll story track & sticky viewport ---------- */
#anatomy .rsv-story {
  position: relative;
  height: 410vh;
}

#anatomy .rsv-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: var(--bg, #0a0a0a);
}

/* ---------- Full-bleed studio PROCVETAEV crimson gradient backdrop ---------- */
#anatomy .rsv-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--bg, #0a0a0a);
  overflow: hidden;
}

/* Stage 2: Deep obsidian-burgundy velvet + luminous warm scarlet upper-mid studio wave */
#anatomy .rsv-bg-s2 {
  position: absolute;
  inset: 0;
  opacity: var(--rsv-bg2);
  will-change: opacity;
  background:
    radial-gradient(ellipse 88% 42% at 50% 34%, rgba(213, 27, 39, 0.78) 0%, rgba(156, 1, 28, 0.38) 46%, transparent 78%),
    radial-gradient(ellipse 56% 36% at 16% 38%, rgba(196, 1, 35, 0.48) 0%, transparent 72%),
    radial-gradient(ellipse 56% 36% at 84% 36%, rgba(196, 1, 35, 0.46) 0%, transparent 72%),
    radial-gradient(ellipse 68% 36% at 50% 62%, rgba(92, 5, 18, 0.52) 0%, transparent 74%),
    linear-gradient(180deg, #0d0204 0%, #5b0512 20%, #9c081d 36%, #560511 64%, #31030a 100%);
}

/* Stage 3: Velvet burgundy top melting into signature radiant PROCVETAEV crimson-scarlet floor
   Bottom edge locks uniformly to #c20c22 so .rsv-exit-fade connects with zero seam. */
#anatomy .rsv-bg-s3 {
  position: absolute;
  inset: 0;
  opacity: var(--rsv-bg3);
  will-change: opacity;
  background:
    linear-gradient(180deg, transparent 82%, #c20c22 100%),
    radial-gradient(ellipse 70% 48% at 49% 64%, rgba(232, 34, 48, 0.64) 0%, rgba(196, 1, 35, 0.28) 52%, transparent 80%),
    radial-gradient(ellipse 62% 40% at 80% 82%, rgba(224, 28, 42, 0.46) 0%, transparent 72%),
    radial-gradient(ellipse 60% 38% at 18% 82%, rgba(204, 16, 34, 0.4) 0%, transparent 72%),
    linear-gradient(180deg, #3c040c 0%, #680615 24%, #a1081e 54%, #c20c22 84%, #c20c22 100%);
}

/* Dynamic soft studio key-light orb behind the 3D robot (subtly shifts on module switch) */
#anatomy .rsv-bg-orb {
  position: absolute;
  left: 50%;
  top: 56%;
  width: min(920px, 84vw);
  height: min(640px, 68vh);
  border-radius: 50%;
  opacity: calc(var(--rsv-warm) * 0.44);
  transform: translate3d(calc(-50% + var(--rsv-orb-x)), calc(-50% + var(--rsv-orb-y)), 0);
  background: radial-gradient(circle, rgba(242, 46, 58, 0.55) 0%, rgba(196, 1, 35, 0.2) 45%, transparent 72%);
  filter: blur(28px);
  transition: transform 0.7s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  will-change: transform, opacity;
}

/* Filmic anti-banding micro-grain (kills 8-bit dark-red gradient banding cleanly) */
#anatomy .rsv-bg-grain {
  position: absolute;
  inset: 0;
  opacity: calc(var(--rsv-warm) * 0.038);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 140px 140px;
}

/* ---------- Transparent HiDPI 3D sequence canvas ---------- */
#anatomy .rsv-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 24px 38px rgba(20, 0, 4, calc(var(--rsv-warm) * 0.44)));
}

/* Gentle top readability vignette under fixed .hdr navbar on crimson stages */
#anatomy .rsv-scrim-top {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.38) 0%, rgba(10, 10, 10, 0.08) 16%, transparent 30%);
  opacity: var(--rsv-warm);
}

/* Seamless atmospheric fade from Stage 3 #c20c22 back to #0a0a0a before #integrations */
#anatomy .rsv-exit-fade {
  position: relative;
  z-index: 2;
  height: 136px;
  margin-top: -2px;
  background: linear-gradient(180deg, #c20c22 0%, #7d0716 36%, #260308 72%, var(--bg, #0a0a0a) 100%);
  pointer-events: none;
}

/* Static media fallback (hidden in live canvas mode; shown in reduced-motion/no-JS) */
#anatomy .rsv-static-media {
  display: none;
}

/* A genuine supplied image remains visible until Canvas2D paints successfully. */
#anatomy:not(.rsv-painted) .rsv-static-media { display:block;position:absolute;inset:28% 20% 20%; }
#anatomy:not(.rsv-painted) .rsv-static-media img { display:none; }
#anatomy:not(.rsv-painted) .rsv-static-media .rsv-st-wave { display:block;width:100%;height:100%;object-fit:contain; }
@media (prefers-reduced-motion: reduce), (max-height:479px), (scripting:none) {
  #anatomy:not(.rsv-painted) .rsv-static-media { display:flex;position:relative;inset:auto; }
  #anatomy:not(.rsv-painted) .rsv-static-media img { display:block; }
  #anatomy:not(.rsv-painted) .rsv-static-media .rsv-st-wave { width:min(320px,78vw);height:auto; }
}
/* ---------- Persistent top header aligned with site .wrap ---------- */
#anatomy .rsv-head {
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(92px, 11.8vh, 124px);
  z-index: 4;
  pointer-events: none;
  transform: translate3d(0, var(--rsv-head-y), 0);
  will-change: transform;
}

#anatomy .rsv-head-in {
  width: min(1200px, calc(100% - clamp(48px, 10vw, 240px)));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
}

#anatomy .rsv-title {
  margin: 0;
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(28px, 4vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: #fff;
  text-wrap: balance;
}

#anatomy .rsv-meta {
  width: clamp(205px, 22.5vw, 310px);
  padding-top: 4px;
}

#anatomy .rsv-eyebrow {
  margin: 0;
  font-weight: 500;
  font-size: clamp(10.5px, 0.95vw, 13.5px);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, rgba(255, 224, 232, 0.92) calc(var(--rsv-warm) * 100%), var(--accent-text, #ed3434));
}

#anatomy .rsv-lead {
  margin: 10px 0 0;
  font-weight: 400;
  font-size: clamp(12px, 1.05vw, 15px);
  line-height: 1.46;
  color: color-mix(in srgb, rgba(255, 255, 255, 0.9) calc(var(--rsv-warm) * 100%), var(--gray, #c2c2c2));
  text-wrap: pretty;
}

#anatomy .rsv-badge {
  margin-top: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, rgba(255, 255, 255, 0.34) calc(var(--rsv-warm) * 100%), rgba(255, 255, 255, 0.28));
  background: color-mix(in srgb, rgba(255, 255, 255, 0.14) calc(var(--rsv-warm) * 100%), rgba(255, 255, 255, 0.05));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--hl2, inset 0 1px 0 rgba(255, 255, 255, 0.2));
  font-weight: 500;
  font-size: clamp(9px, 0.78vw, 11px);
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}

#anatomy .rsv-badge img {
  width: 6px;
  height: 6px;
  flex: none;
  filter: drop-shadow(0 0 6px rgba(237, 52, 52, 0.9));
}

/* ---------- Stage 2 Interactive Hardware Callout Hotspots (pixel-locked to 3D frame) ---------- */
#anatomy .rsv-hotspots {
  position: absolute;
  z-index: 5;
  opacity: var(--rsv-hs-o);
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.25s;
}

#anatomy.rsv-exploded-open .rsv-hotspots {
  visibility: visible;
  transition: visibility 0s linear 0s;
}

#anatomy .rsv-hs {
  position: absolute;
  width: 36px;
  height: 36px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: pointer;
  padding: 0;
  border: 0;
  background: none;
}

#anatomy .rsv-hs:focus-visible {
  outline: none;
}

#anatomy .rsv-hs-dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  background: rgba(196, 1, 35, 0.72);
  box-shadow: 0 0 14px rgba(196, 1, 35, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), background-color 0.28s ease;
}

#anatomy .rsv-hs-dot::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.42);
  animation: rsvHsPulse 2.6s ease-out infinite;
}

#anatomy .rsv-hs-dot i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
}

#anatomy .rsv-hs:hover .rsv-hs-dot,
#anatomy .rsv-hs:focus-visible .rsv-hs-dot {
  transform: scale(1.28);
  background: #fff;
}

#anatomy .rsv-hs:hover .rsv-hs-dot i,
#anatomy .rsv-hs:focus-visible .rsv-hs-dot i {
  background: var(--crimson, #C40123);
}

#anatomy .rsv-hs-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translate(-50%, 6px);
  min-width: 175px;
  max-width: 230px;
  padding: 10px 13px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(34, 4, 12, 0.78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--hl2, inset 0 1px 0 rgba(255, 255, 255, 0.2)), 0 16px 34px rgba(0, 0, 0, 0.36);
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  z-index: 10;
}

#anatomy .rsv-hs--below .rsv-hs-tip {
  bottom: auto;
  top: calc(100% + 6px);
  transform: translate(-50%, -6px);
}

#anatomy .rsv-hs-tip strong {
  display: block;
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 224, 232, 0.94);
}

#anatomy .rsv-hs-tip span {
  display: block;
  margin-top: 4px;
  font-weight: 400;
  font-size: 12px;
  line-height: 1.38;
  color: #fff;
}

#anatomy .rsv-hs:hover .rsv-hs-tip,
#anatomy .rsv-hs:focus-visible .rsv-hs-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}

@keyframes rsvHsPulse {
  0% { transform: scale(0.7); opacity: 0.75; }
  100% { transform: scale(1.75); opacity: 0; }
}

/* ---------- Stage 3 Interactive Layer (Left Glass Card | Robot Space | Right 2x3 Pills) ---------- */
#anatomy .rsv-ui {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  padding-top: clamp(200px, 28vh, 270px);
  padding-bottom: clamp(24px, 4.5vh, 54px);
  opacity: var(--rsv-ui-o);
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear 0.25s;
}

#anatomy.rsv-final .rsv-ui {
  visibility: visible;
  transition: visibility 0s linear 0s;
}

#anatomy .rsv-ui-grid {
  width: min(1200px, calc(100% - clamp(48px, 10vw, 240px)));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(195px, 290px) minmax(170px, 1fr) minmax(245px, 410px);
  align-items: center;
  gap: clamp(12px, 1.8vw, 24px);
}

#anatomy .rsv-ui-spacer {
  min-height: 1px;
  pointer-events: none;
}

/* Left Airy Frosted Crimson-Glass Card */
#anatomy .rsv-card {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 18px);
  padding: clamp(14px, 1.6vw, 22px) clamp(14px, 1.6vw, 22px) clamp(12px, 1.3vw, 18px);
  border-radius: clamp(16px, 1.6vw, 22px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, rgba(102, 10, 26, 0.32) 0%, rgba(64, 5, 16, 0.42) 100%);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  box-shadow: var(--hl2, inset 0 1px 0 rgba(255, 255, 255, 0.2)), 0 22px 50px rgba(0, 0, 0, 0.24);
  transform: translate3d(calc(var(--rsv-ui-x) * -1), 0, 0);
  will-change: transform;
}

#anatomy .rsv-card-copy {
  transition: opacity 0.2s ease, transform 0.24s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#anatomy .rsv-card.is-switching .rsv-card-copy {
  opacity: 0;
  transform: translateY(5px);
}

#anatomy .rsv-card h3 {
  margin: 0;
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(10px, 0.88vw, 12.5px);
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 224, 232, 0.88);
}

#anatomy .rsv-card-text {
  margin: 8px 0 0;
  font-weight: 400;
  font-size: clamp(12px, 1vw, 14.5px);
  line-height: 1.46;
  color: rgba(255, 255, 255, 0.96);
  min-height: clamp(54px, 5vw, 66px);
  text-wrap: pretty;
}

/* Light frosted exploded schematic thumbnail inside left card */
#anatomy .rsv-thumb {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: clamp(10px, 1vw, 14px);
  background: linear-gradient(180deg, #f8f6f7 0%, #e6e1e4 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 8px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), box-shadow 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#anatomy .rsv-thumb:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 1), 0 12px 26px rgba(0, 0, 0, 0.28);
}

#anatomy .rsv-thumb:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

#anatomy .rsv-thumb-stage {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1024 / 571;
  padding: 8px 10px;
}

#anatomy .rsv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

#anatomy .rsv-thumb-hint {
  position: absolute;
  right: 8px;
  bottom: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(20, 4, 10, 0.72);
  color: #fff;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.25s ease, transform 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  pointer-events: none;
}

#anatomy .rsv-thumb:hover .rsv-thumb-hint,
#anatomy .rsv-thumb:focus-visible .rsv-thumb-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Precision active-module pin on the exploded thumbnail */
#anatomy .rsv-pin {
  position: absolute;
  left: var(--pin-x, 31.5%);
  top: var(--pin-y, 48.5%);
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: left 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), top 0.45s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#anatomy .rsv-pin::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: rgba(196, 1, 35, 0.28);
  animation: rsvPinPulse 2.2s ease-out infinite;
}

#anatomy .rsv-pin i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--crimson, #C40123);
  border: 1.5px solid #fff;
  box-shadow: 0 0 10px rgba(196, 1, 35, 0.85);
  transform: translate(-50%, -50%);
}

@keyframes rsvPinPulse {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.7); opacity: 0; }
}

/* Right 2x3 Interactive Frosted Crimson-Glass Pills Grid */
#anatomy .rsv-tags {
  pointer-events: auto;
  justify-self: end;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, max-content));
  gap: clamp(8px, 0.85vw, 12px) clamp(8px, 0.8vw, 11px);
  justify-content: end;
  transform: translate3d(var(--rsv-ui-x), 0, 0);
  will-change: transform;
}

#anatomy .rsv-tags button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px clamp(11px, 1.3vw, 18px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(98, 10, 26, 0.32);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--hl2, inset 0 1px 0 rgba(255, 255, 255, 0.2));
  font-family: inherit;
  font-weight: 500;
  font-size: clamp(9.5px, 0.8vw, 11.5px);
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    border-color 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    color 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow 0.28s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#anatomy .rsv-tags button:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.72);
  color: #fff;
  transform: translateY(-1px);
}

#anatomy .rsv-tags button[aria-pressed="true"] {
  background: #fff;
  border-color: #fff;
  color: var(--crimson-deep, #9C011C);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

#anatomy .rsv-tags button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* ---------- Minimal clickable 3-stage vertical rail on right edge (desktop) ---------- */
#anatomy .rsv-rail {
  position: absolute;
  right: clamp(14px, 2vw, 28px);
  top: 50%;
  z-index: 7;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#anatomy .rsv-rail button {
  position: relative;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#anatomy .rsv-rail button::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  transition: height 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)), background-color 0.3s ease, box-shadow 0.3s ease;
}

#anatomy .rsv-rail button[aria-current="step"]::before {
  height: 20px;
  background: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.55);
}

#anatomy .rsv-rail button:hover::before {
  background: rgba(255, 255, 255, 0.85);
}

#anatomy .rsv-rail button span {
  position: absolute;
  right: 26px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(20, 4, 10, 0.72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity 0.22s ease, transform 0.24s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
}

#anatomy .rsv-rail button:hover span,
#anatomy .rsv-rail button:focus-visible span {
  opacity: 1;
  transform: translateX(0);
}

/* Visually hidden accessible copy source */
#anatomy .rsv-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}

/* Pause decorative pulse loops when offscreen or tab hidden */
#anatomy.motion-offscreen .rsv-hs-dot::before,
#anatomy.motion-offscreen .rsv-pin::before,
.motion-hidden #anatomy .rsv-hs-dot::before,
.motion-hidden #anatomy .rsv-pin::before {
  animation-play-state: paused !important;
}

/* ---------- Compact split-screen panes (760px - 1040px) ---------- */
@media (min-width: 760px) and (max-width: 1040px) {
  #anatomy .rsv-head {
    top: clamp(78px, 11vh, 102px);
  }
  #anatomy .rsv-head-in,
  #anatomy .rsv-ui-grid {
    width: calc(100% - 48px);
  }
  #anatomy .rsv-ui-grid {
    grid-template-columns: minmax(185px, 230px) minmax(160px, 1fr) minmax(220px, 285px);
  }
  #anatomy .rsv-tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  #anatomy .rsv-tags button {
    white-space: normal;
    padding: 8px 10px;
    font-size: 9.5px;
    letter-spacing: 0.04em;
  }
  #anatomy .rsv-rail {
    display: none;
  }
}

/* ---------- Mobile sticky 3-stage scroll (< 760px, height >= 480px) ---------- */
@media (max-width: 759px) and (min-height: 480px) {
  #anatomy .rsv-story {
    height: 360vh;
  }

  #anatomy .rsv-rail {
    display: none;
  }

  #anatomy .rsv-head {
    top: 76px;
    transform: none !important;
  }

  #anatomy .rsv-head-in {
    width: calc(100% - 32px);
    flex-direction: column;
    gap: 8px;
  }

  #anatomy .rsv-title {
    font-size: clamp(24px, 7vw, 32px);
    line-height: 1.02;
  }

  #anatomy .rsv-title br {
    display: none;
  }

  #anatomy .rsv-meta {
    width: 100%;
    padding-top: 0;
  }

  #anatomy .rsv-eyebrow {
    font-size: 10.5px;
  }

  #anatomy .rsv-lead {
    margin-top: 4px;
    font-size: 12.5px;
    line-height: 1.38;
  }

  #anatomy .rsv-badge {
    margin-top: 10px;
    padding: 6px 11px 6px 10px;
    font-size: 9.5px;
  }

  #anatomy .rsv-hs {
    width: 32px;
    height: 32px;
  }

  #anatomy .rsv-hs-dot {
    width: 12px;
    height: 12px;
  }

  #anatomy .rsv-hs-tip {
    min-width: 150px;
    max-width: 190px;
    padding: 8px 10px;
  }

  #anatomy .rsv-ui {
    align-items: flex-end;
    padding-top: 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  #anatomy .rsv-ui-grid {
    width: calc(100% - 28px);
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  #anatomy .rsv-ui-spacer {
    display: none;
  }

  #anatomy .rsv-tags {
    order: -1;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    transform: translate3d(0, var(--rsv-ui-x), 0);
  }

  #anatomy .rsv-tags button {
    width: 100%;
    min-height: 38px;
    padding: 7px 8px;
    font-size: 9.5px;
    letter-spacing: 0.04em;
    white-space: normal;
  }

  #anatomy .rsv-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border-radius: 16px;
    transform: translate3d(0, var(--rsv-ui-x), 0);
  }

  #anatomy .rsv-card h3 {
    font-size: 10px;
  }

  #anatomy .rsv-card-text {
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.38;
    min-height: 0;
  }

  #anatomy .rsv-thumb-stage {
    padding: 5px;
  }

  #anatomy .rsv-exit-fade {
    height: 76px;
  }
}

/* ---------- Reduced motion OR extremely short landscape height (< 480px) ---------- */
@media (prefers-reduced-motion: reduce), (max-height: 479px) {
  #anatomy .rsv-story {
    height: auto;
  }
  #anatomy .rsv-stage {
    position: relative;
    top: auto;
    height: auto;
    min-height: 0;
    padding: 84px 0 56px;
    background:
      linear-gradient(180deg, transparent 86%, #c20c22 100%),
      radial-gradient(ellipse 84% 28% at 50% 45%, rgba(213, 27, 39, 0.56) 0%, transparent 72%),
      radial-gradient(ellipse 80% 28% at 50% 82%, rgba(232, 34, 48, 0.54) 0%, transparent 74%),
      linear-gradient(180deg, #0a0a0a 0%, #0a0a0a 18%, #520512 34%, #9c081d 48%, #520512 64%, #a1081e 82%, #c20c22 100%);
  }
  #anatomy .rsv-bg,
  #anatomy .rsv-canvas,
  #anatomy .rsv-scrim-top,
  #anatomy .rsv-hotspots,
  #anatomy .rsv-rail {
    display: none;
  }
  #anatomy .rsv-head {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none !important;
  }
  #anatomy .rsv-static-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 44px;
    margin-top: 32px;
    padding-inline: 20px;
  }
  #anatomy .rsv-st-wave { width: min(320px, 78vw); height: auto; }
  #anatomy .rsv-st-exp { width: min(820px, 94vw); height: auto; }
  #anatomy .rsv-st-asm { width: min(320px, 74vw); height: auto; }
  #anatomy .rsv-ui {
    position: relative;
    inset: auto;
    padding: 36px 0 0;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  #anatomy .rsv-ui-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 720px;
  }
  #anatomy .rsv-ui-spacer {
    display: none;
  }
  #anatomy .rsv-tags {
    order: -1;
    justify-self: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    transform: none !important;
  }
  #anatomy .rsv-card {
    transform: none !important;
  }
  #anatomy .rsv-hs-dot::before,
  #anatomy .rsv-pin::before {
    animation: none !important;
  }
}

/* Keep the header before fallback artwork despite canvas-first source order. */
@media (prefers-reduced-motion: reduce), (max-height: 479px), (scripting: none) {
  #anatomy .rsv-stage { display: flex; flex-direction: column; }
  #anatomy .rsv-head { order: -1; position: relative; top: auto; transform: none !important; }
  #anatomy .rsv-tags button { min-height: 44px; }
  #anatomy *, #anatomy *::before, #anatomy *::after { transition: none !important; }
}
/* Short mobile screens keep the genuine sequence but move controls into flow. */
#anatomy.rsv-flow > .rsv-ui { position:relative;inset:auto;padding:24px 0;opacity:1;visibility:visible;background:#c20c22; }
#anatomy.rsv-flow > .rsv-ui .rsv-tags, #anatomy.rsv-flow > .rsv-ui .rsv-card { transform:none; }
#anatomy.rsv-flow .rsv-ui-grid { grid-template-columns:minmax(0,1fr);max-width:720px; }
#anatomy.rsv-flow .rsv-ui-spacer { display:none; }
#anatomy.rsv-flow .rsv-tags { order:-1;justify-self:stretch;grid-template-columns:repeat(2,minmax(0,1fr)); }
#anatomy.rsv-flow .rsv-tags button { min-height:44px;white-space:normal; }
#anatomy.rsv-flow .rsv-card { grid-template-columns:minmax(0,1fr); }
#anatomy.rsv-flow .rsv-thumb { max-width:220px;justify-self:center; }
/* ---------- No-JS fallback ---------- */
@media (scripting: none) {
  #anatomy .rsv-story { height: auto; }
  #anatomy .rsv-stage { position: relative; height: auto; padding: 64px 0; }
  #anatomy .rsv-canvas, #anatomy .rsv-hotspots, #anatomy .rsv-rail, #anatomy .rsv-ui { display: none; }
  #anatomy .rsv-static-media { display: flex; flex-direction: column; align-items: center; gap: 36px; margin-top: 32px; }
  #anatomy .rsv-copy { position: static; width: auto; height: auto; clip-path: none; padding: 24px; }
}
