/* Holographic info panel (screen space, so text stays readable at any stage scale). */

.hud {
  --accent: var(--holo);
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 18px 20px 16px;
  color: #dffbff;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    var(--holo-bg);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 4px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .5),
    0 0 24px color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 0 30px color-mix(in srgb, var(--accent) 12%, transparent),
    0 20px 50px rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  font-size: 15px;
  line-height: 1.35;
  scrollbar-width: thin;
  pointer-events: none; /* hover previews never block the objects underneath */
}

.hud.is-pinned {
  pointer-events: auto;
  border-color: var(--accent);
}

.hud[hidden] { display: none; }

/* Corner brackets */
.hud::before,
.hud::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  filter: drop-shadow(0 0 4px var(--accent));
  pointer-events: none;
}
.hud::before { left: 4px; top: 4px; border-right: 0; border-bottom: 0; }
.hud::after { right: 4px; bottom: 4px; border-left: 0; border-top: 0; }

.hud.is-on { animation: hud-in .32s var(--ease-out) both; }

@keyframes hud-in {
  0% { opacity: 0; clip-path: inset(48% 0 48% 0); filter: brightness(2.5); }
  40% { opacity: 1; clip-path: inset(0 0 0 0); }
  55% { opacity: .55; }
  70% { opacity: 1; filter: brightness(1.4); }
  100% { opacity: 1; filter: none; }
}

.hud__kicker {
  margin: 0 0 4px;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent) 70%, #fff);
  opacity: .85;
}

.hud__title {
  margin: 0;
  font-family: var(--font-holo);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #fff;
  text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
}

.hud__role {
  margin: 4px 0 0;
  font-weight: 600;
  font-size: 15px;
  color: color-mix(in srgb, var(--accent) 60%, #fff);
}

.hud__summary { margin: 10px 0 0; color: #c9eef5; }

.hud__bullets {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.hud__bullets li {
  position: relative;
  padding-left: 16px;
  margin-top: 5px;
  color: #d4f3f8;
}

.hud__bullets li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: .55em;
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}

.hud__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.hud__tags li {
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 2px;
}

.hud__links { display: flex; align-items: baseline; gap: 14px; margin-top: 12px; }


.hud__link {
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}
.hud__link:hover { color: #fff; }

/* Leader line from the panel to the target. */
.hud-link {
  --accent: var(--holo);
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  overflow: visible;
}

.hud-link.is-on { opacity: 1; }

.hud-link polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  filter: drop-shadow(0 0 3px var(--accent));
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
}

.hud-link.is-on polyline { animation: hud-draw .35s var(--ease-out) forwards; }

.hud-link circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  filter: drop-shadow(0 0 4px var(--accent));
  transform-box: fill-box;
  transform-origin: center;
  animation: hud-ping 1.4s ease-out infinite;
}

@keyframes hud-draw { to { stroke-dashoffset: 0; } }

@keyframes hud-ping {
  0% { transform: scale(.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
