/* The overlay uses the same 900 × 320 coordinate system as both media surfaces. */
.drawing-wrap,
.large-drawing {
  position: relative;
}

.diagram-terms {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.diagram-term {
  position: absolute;
  display: block;
  appearance: none;
  padding: 0;
  margin: 0;
  min-height: 0;
  min-width: 0;
  background: transparent;
  border: 0;
  border-radius: 2px;
  cursor: help;
  pointer-events: auto;
  touch-action: manipulation;
}

.diagram-term::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  border-bottom: 1px dotted rgb(152 187 226 / 62%);
  pointer-events: none;
}

.diagram-term:hover,
.diagram-term:focus-visible,
.diagram-term[aria-describedby],
.diagram-term[aria-expanded="true"] {
  background: rgb(137 178 231 / 12%);
  outline: 1px solid #b3cef5;
  outline-offset: 1px;
}

@media (forced-colors: active) {
  .diagram-term::after { border-color: LinkText; }
  .diagram-term:focus-visible { outline-color: Highlight; }
}
