﻿/* Interactive anatomy diagram (brain / leg / face). Reuses site tokens.
   Glowing hotspots overlaid on a supplied illustration; same interaction
   pattern as the tirzepatide GLP-1 diagram. */
.anat-dx {
  margin: 34px 0;
  background: transparent !important;
}
#anat-how {
  max-width: 68ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.anat-dx-intro {
  color: var(--ink-soft);
  max-width: 68ch;
  margin: 6px auto 22px;
  text-align: center;
}
.anat-dx-grid {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(260px, 310px);
  gap: 26px;
  align-items: center;
  justify-content: center;
}

/* figure = illustration + hotspot layer */
.anat-figure {
  position: relative;
  line-height: 0;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.anat-figure img {
  width: 100%;
  height: auto;
  display: block;
  background: transparent !important;
  pointer-events: none;
}
.anat-figure-fallback {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center; color: var(--muted); font-size: 0.85rem;
}

.anat-hotspots {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.anat-hot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: var(--d, 13%);
  aspect-ratio: 1 / 1;
  border: 0; padding: 0; background: transparent;
  border-radius: 50%;
  cursor: pointer;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}
.anat-hot::before {
  content: "";
  position: absolute;
  inset: -82%;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 248, 224, 0.96) 0%,
    rgba(255, 224, 148, 0.8) 24%,
    rgba(240, 194, 96, 0.42) 46%,
    transparent 72%);
  mix-blend-mode: screen;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.anat-hot:hover::before,
.anat-hot:focus-visible::before {
  opacity: 1;
  animation: anat-pulse 1.4s ease-in-out infinite;
}
.anat-hot:focus-visible { outline: none; }
@keyframes anat-pulse {
  0%, 100% { opacity: 0.92; transform: scale(1); }
  50%      { opacity: 1;    transform: scale(1.22); }
}
.anat-hot::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background:
    radial-gradient(circle,
      rgba(255, 255, 255, 0.98) 0 18%,
      rgba(243, 231, 255, 0.98) 19% 35%,
      rgba(167, 101, 236, 0.94) 36% 49%,
      rgba(98, 56, 164, 0.76) 50% 56%,
      transparent 57% 100%);
  box-shadow:
    0 0 0 1px rgba(221, 196, 255, 0.92),
    0 0 6px rgba(165, 99, 232, 0.42),
    0 0 12px rgba(221, 190, 255, 0.26);
  pointer-events: none;
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.anat-hot:hover::after,
.anat-hot:focus-visible::after,
.anat-hot.is-selected::after {
  opacity: 1;
  transform: scale(1.04);
}
.anat-hot-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  font-family: var(--font-mono, monospace);
  font-size: 9px; letter-spacing: 0.04em;
  color: rgba(255, 250, 243, 0.9);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

/* detail panel */
.anat-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 8px);
  padding: 20px 22px;
  min-height: 0;
  width: 100%;
  max-width: 310px;
  align-self: center;
  justify-self: center;
  box-shadow: 0 18px 42px rgba(7, 24, 25, 0.12);
  animation: anat-panel-in 0.18s ease-out;
}
.anat-panel.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.anat-panel[hidden] { display: none !important; }
.anat-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.anat-panel-kicker {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.anat-panel h4 { margin: 0; font-size: 1.15rem; font-family: var(--font-display); }
.anat-panel .anat-evidence { font-family: var(--font-mono, monospace); font-size: 0.72rem; color: var(--muted); letter-spacing: 0.03em; white-space: nowrap; }
.anat-panel p { color: var(--ink-soft); margin: 12px 0 0; line-height: 1.6; }
.anat-panel-note {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}
@keyframes anat-panel-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.anat-note { color: var(--muted); font-size: 0.85rem; margin-top: 18px; }

/* static fallback (no JS) */
.anat-fallback { margin-top: 18px; }
.anat-fallback .anat-fb-item { padding: 12px 0; border-top: 1px solid var(--border); }
.anat-fallback h4 { margin: 0 0 4px; font-size: 1.02rem; }
.anat-fallback p { margin: 6px 0 0; color: var(--ink-soft); }

@media (max-width: 720px) {
  .anat-dx-grid,
  .anat-dx:not(.anat-active) .anat-dx-grid { grid-template-columns: 1fr; gap: 18px; }
  .anat-figure { max-width: 320px; margin: 0 auto; }
  .anat-panel { max-width: none; }
  .anat-panel.is-hidden { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .anat-hot::before { animation: none; }
}

