:root {
  --illus-size: 512px;
  --illus-pad: 3%;
}

.illus-wrap {
  width: var(--illus-size);
  height: var(--illus-size);
  position: relative;
}

.illus-inner {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.illus-content {
  position: absolute;
  inset: 0;
}

.illus-inset {
  position: absolute;
  inset: var(--illus-pad);
  box-sizing: border-box;
}

.illus-layer {
  position: absolute;
  inset: 0;
  display: block;
}

.illus-led {
  background-repeat: no-repeat;
  background-size: 300% 100%;
  background-position: left center;
  z-index: 1;
}

.illus-glow {
  background-repeat: no-repeat;
  background-size: 300% 100%;
  background-position: right center;
  opacity: 0.6;
  mix-blend-mode: screen;
  z-index: 3;
}

.illus-panel {
  display: grid;
  place-items: center;
  z-index: 2;
}

.illus-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.illus-highlight {
  position: absolute;
  border: 1px solid var(--accent);
  box-shadow: 0 0 0 2000px color-mix(in srgb, var(--bg) 75%, transparent);
  z-index: 4;
  pointer-events: none;
}

.illus-highlight.no-dim {
  box-shadow: none;
}

.illus-highlight-label {
  position: absolute;
  transform: translateY(-100%);
  margin-top: -2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  text-shadow: 0 2px 4px color-mix(in srgb, var(--bg) 85%, transparent);
  z-index: 5;
  pointer-events: none;
  white-space: nowrap;
}

.illus-figure {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.illus-caption {
  --illus-caption-pad: 20px;
  margin-top: var(--illus-caption-pad);
  max-width: 28ch;
  font-weight: 400;
  line-height: 1.4;
  white-space: pre-line;
}

.illus-caption--middle,
.illus-caption--bottom {
  margin-top: 0;
}

.illus-caption--middle {
  align-self: center;
}

.illus-caption--bottom {
  align-self: flex-end;
  margin-bottom: var(--illus-caption-pad);
}

.illus-figure--caption-left {
  flex-direction: row-reverse;
}

.illus-figure--caption-left .illus-caption {
  text-align: right;
}
