.rack-handover {
  background: var(--panel-tint);
  border-block: 1px solid var(--rule);
}

.rack-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr);
  column-gap: clamp(2rem, 6vw, 6.5rem);
  row-gap: 1.5rem;
  align-items: start;
}

.rack-heading { grid-area: 1 / 1 / 2 / 3; max-width: 42rem; }
.rack-heading h2 { margin: 0 0 .7rem; }
.rack-heading p, .rack-parts p { color: var(--muted); margin: 0; }

.rack-figure {
  grid-area: 2 / 1;
  align-self: center;
  position: relative;
  isolation: isolate;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 1rem;
  background: #edf1f6;
}

.rack-figure picture, .rack-figure img { display: block; width: 100%; height: auto; }

.rack-marker {
  position: absolute;
  display: grid;
  place-items: center;
  inset: var(--rack-top) auto auto var(--rack-left);
  width: 1.9rem;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #e0eaf4;
  border-radius: 50%;
  color: #fff;
  background: #0d2d49;
  box-shadow: 0 0 0 4px #f7fbff6e;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  transition: background-color .2s, box-shadow .2s;
}

.rack-marker-patch { --rack-top: 38.5%; --rack-left: 23%; }
.rack-marker-switch { --rack-top: 54%; --rack-left: 45%; }
.rack-marker-power { --rack-top: 70%; --rack-left: 33%; }

.rack-parts {
  grid-area: 2 / 2;
  align-self: center;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: rack-part;
}

.rack-parts li {
  counter-increment: rack-part;
  position: relative;
  padding: 1.05rem 0 1.05rem 2.65rem;
  border-top: 1px solid var(--rule);
}

.rack-parts li::before {
  content: counter(rack-part);
  position: absolute;
  inset: 1.15rem auto auto 0;
  width: 1.8rem;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--link);
  border: 1px solid var(--rule);
  border-radius: 50%;
  font-size: .78rem;
  font-weight: 800;
}

.rack-parts strong { display: block; margin-bottom: .28rem; font-size: 1.12rem; }

@media (hover: hover) {
  .rack-layout:has(li:nth-child(1):hover) .rack-marker-patch,
  .rack-layout:has(li:nth-child(2):hover) .rack-marker-switch,
  .rack-layout:has(li:nth-child(3):hover) .rack-marker-power {
    background: #9e2640;
    box-shadow: 0 0 0 5px #ee5a7750;
  }
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rack-figure picture {
      animation: rack-framing linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 36%;
    }

    .rack-marker {
      animation: rack-marker-in linear both;
      animation-timeline: view();
      animation-range: entry 10% cover 28%;
    }
  }
}

@keyframes rack-framing { from { transform: scale(1.065); } to { transform: scale(1); } }
@keyframes rack-marker-in { from { opacity: .45; } to { opacity: 1; } }

@media (max-width: 760px) {
  .rack-layout { display: flex; flex-direction: column; gap: 1.3rem; }
  .rack-layout > * { width: 100%; }
  .rack-heading h2 { max-width: 19ch; }
  .rack-parts li { padding-block: .85rem; }
  .rack-parts li::before { inset-block-start: .95rem; }
}
